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

Re: Collations versus record-returning functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Collations versus record-returning functions
Date: 2011-03-19 16:45:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
I wrote:
> ISTM there are basically three things we might do about this:

> (1) Decide that the patch's behavior is correct and what's embodied in
> the regression expected file is wrong.

> (2) Allow collations to propagate up through nodes that deliver
> noncollatable outputs.

> (3) Decide that composite types are collatable.

I thought of another possibility, which is to special-case field
selection from a function-returning-composite, ie make it look
through the function node and use the function's input collation.
FieldSelect needs to be a special case in the collation assignment code
anyway because of the possibility of taking the collation from the field
declaration instead of the input, so this is not *quite* as ugly as it
first sounds.  It's still ugly, but it makes that regression test pass
with only a very localized change.  So I will do it like that for now
until someone comes up with an argument for another choice.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Marko KreenDate: 2011-03-19 17:13:42
Subject: Re: tolower() identifier downcasing versus multibyte encodings
Previous:From: Tom LaneDate: 2011-03-19 16:39:03
Subject: Re: Indent authentication overloading

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