Skip site navigation (1) Skip section navigation (2)

Re: error tryiing to insert with collate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: error tryiing to insert with collate
Date: 2012-01-02 18:07:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"Jean-Yves F. Barbier" <12ukwn(at)gmail(dot)com> writes:
> I'm trying to insert as:
> INSERT INTO tst1m VALUES ( default, 
> 	'JpDG' COLLATE "hu_HU.utf8", 
> 	'hUe' 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

In response to


pgsql-novice by date

Next:From: Sergio SinucoDate: 2012-01-02 19:13:58
Subject: Re: Lock while delete a table
Previous:From: Tom LaneDate: 2012-01-02 17:07:06
Subject: Re: Lock while delete a table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group