[PATCH] collation for (expr)

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-01-08T22:17:10Z
Lists: pgsql-hackers

Attachments

Here is a patch for the following construct, specified in the SQL
standard:

    collation for (expr)

returns the collation of the argument.  It's similar to pg_typeof.

The SQL standard is not clear on the exact format of the return value.
I went with what ruleutils.c produces, which is useful for human
inspection and also for plugging back into SQL statements.