Re: UTF8 problem - Mailing list pgsql-novice

From Jean-Yves F. Barbier
Subject Re: UTF8 problem
Date
Msg-id 20111118155231.39d03fb1@anubis.defcon1
Whole thread Raw
In response to Re: UTF8 problem  ("Kai Otto" <Kai@medis.nl>)
List pgsql-novice
On Fri, 18 Nov 2011 09:53:31 +0100
"Kai Otto" <Kai@medis.nl> wrote:

...
> > And don't use double quotes unless imperative need.
> > As Pg is by default case insensitive, it is easier to have (and
> > write!):
> >
> > CREATE TABLE japanesetest (
> >    id     bigint   PRIMARY KEY,
> >    name   text
> > ) WITHOUT OIDS;
> >
> > INSERT INTO japanesetest (id, name) VALUES (2, '\x83}\x83C
> > \x83h\x83L\x83\x85\x83\x81\x83\x93\x83g (My Documents)')
> >
> > And if primary-key-number-designation-when-inserting (that's its
> Indian
> > name:) isn't really a concern, use a bigserial instead, and
> > autoincrement
> > it using .... VALUES( default, .....
> >
> > --
> > Interchangeable parts won't.
>
> Without double quotes the table is not recognized:
>       SELECT * FROM JapaneseTest
> Results in:
>       ERROR:  relation "japanesetest" does not exist

Of course it don't work, this is because double-quotes render Pg case sensitive,
this is why I rewrote the whole shebang.
Retest with the (whole) above syntax.

> For the ID column, I am actually using uuid. But for testing this was
> easier.

IF you need a special UUID, then use it; however if it's not mandatory,
use a serial or a big serial - shorter and faster and optimized to process
for Pg instead of a char(36) for UUID.

> Anyway, thanks for your help.



--
X-rated movies are all alike ... the only thing they leave to the
imagination is the plot.

pgsql-novice by date:

Previous
From: "Kai Otto"
Date:
Subject: Re: UTF8 problem
Next
From: Phil Dobbin
Date:
Subject: Real novice question: Roles