Re: error tryiing to insert with collate - Mailing list pgsql-novice

From Tom Lane
Subject Re: error tryiing to insert with collate
Date
Msg-id 24702.1325527627@sss.pgh.pa.us
Whole thread Raw
In response to error tryiing to insert with collate  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Responses Re: error tryiing to insert with collate  (Thom Brown <thom@linux.com>)
List pgsql-novice
"Jean-Yves F. Barbier" <12ukwn@gmail.com> writes:
> I'm trying to insert as:
> INSERT INTO tst1m VALUES ( default,
>     'źŠÿǚŦÍÏÔJŽććżûŘäpèăîÍŢŃDµŴŻĊĜÿG' COLLATE "hu_HU.utf8",
>     'úĽčŏṻŗĿÁťħĵŇğŚáÛĨæħŽīhĴÝUĶďeźİīŇč' COLLATE "hu_HU.utf8" );

> and get: ERROR:  unsupported node type: 325

Hmm, that's a bug, which I will go fix --- thanks for the report!
However, the reason that nobody noticed the bug before now is that it's
entirely useless to attach a COLLATE clause to an INSERT value.
COLLATE is only interesting when attached to an argument of an operator
or function that pays attention to collation, such as the "<" operator.
Here, your values are going to go directly into the table without any
comparisons or anything else happening to them, and once they're in
the table it'll be the table column's declared collation that controls
how they're compared.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Lock while delete a table
Next
From: Sergio Sinuco
Date:
Subject: Re: Lock while delete a table