DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th June 2008
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Thanked 0 Times in 0 Posts
Default postgresql chinese character problem

This is what I get if I try to insert values in chinese, although the database is created with -E utf8:

$ psql a
Welcome to psql 8.2.6, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

a=# \encoding
UTF8
a=# insert into a (aa) values (自由);
ERROR: column "自由" does not exist
LINE 1: insert into a (aa) values (自由);
^
a=# select * from a;
aa
----
1
2
3
4
5
6
(6 rows)

As you can see, I inserted some number values just to try if it worked. Only, it does not accept chinese. Any ideas? I'm running the package that comes with OpenBSD 4.3, running in Mlterm. Also see my thread in X11, for problems with character input.
Thank you
Reply With Quote
  #2   (View Single Post)  
Old 8th June 2008
wilfried's Avatar
wilfried wilfried is offline
Real Name: Peter Strömberg
Port Guard
 
Join Date: May 2008
Location: Teckomatorp, Sweden
Posts: 11
Thanked 3 Times in 3 Posts
Default

In SQL when you mean a string you usually have to put it between ' characters, e.g.
Code:
INSERT INTO a (aa) VALUES ('a string')
__________________
HP ProCurve 1800-24G, Phenom 9750, Dual Opteron 265, AMD64 3000+,
Dual P3-800, eMac G4 1.0GHz, Sun Blade 150, Alpha PWS 433 and more ...
Reply With Quote
  #3   (View Single Post)  
Old 8th June 2008
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Thanked 0 Times in 0 Posts
Default

Thank you wilfried, problem solved!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: ISO-8859-1 Character Set on NetBSD JMJ_coder Guides 0 25th February 2009 12:53 AM
Big5 Character Set in Apache problem after upgrade to 6.4 paul-lkw FreeBSD Installation and Upgrading 0 23rd February 2009 09:20 AM
Do you need hard link for PostgreSQL? Sunnz General software and network 5 26th October 2008 07:07 PM
[FreeBSD] which version of PostgreSQL? MacApp FreeBSD Ports and Packages 8 12th July 2008 09:25 AM
PostgreSql rc.d script fridder FreeBSD Ports and Packages 1 1st July 2008 01:12 AM


All times are GMT. The time now is 08:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick