Param symbols and collations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Param symbols and collations
Date: 2011-03-24 21:44:11
Message-ID: 15450.1301003051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A few days ago I was complaining that we needed to adjust the SPI and
parser APIs so that callers could pass in collation values for Param
symbols. After some review of the code, I think we can get away without
that. Instead, let's just legislate that you have to use a parser
callback hook if you want to create Param nodes that have a collation
different from their type's default collation. plpgsql already uses a
callback hook. The only other place that seems to need non-default
Param collations is SQL functions, so they would need to change to use a
callback hook instead of just passing a fixed parameter-type OID array.
But the SQL function code would have to change anyway to pass collations
through from the function's input collation. So there's really very
little that we'd gain by modifying the behavior of the parse_param.c
hooks, and the amount of API churn needed to do that is unreasonably
large.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2011-03-24 21:47:29 Re: Pre-set Hint bits/VACUUM FREEZE on data load..?
Previous Message Robert Haas 2011-03-24 21:44:10 Re: psql \dt and table size