Re: plpgsql doesn't supply typmod for the Params it generates
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Date: 2011-05-12T21:55:20Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix plpgsql's issues with dropped columns in rowtypes in 8.4 branch.
- 5d3853a7fa40 8.4.8 cited
Attachments
- plpgsql-provide-typmod.patch (text/x-patch) patch
I wrote: > I think the appropriate fix is pretty clear: add a function similar to > exec_get_datum_type that returns the datum's typmod, and use that to set > paramtypmod properly. What is worrying me is that it's not clear how > much user-visible behavioral change will result, and therefore I'm not > entirely comfortable with the idea of back-patching such a change into > 9.0 --- and it wouldn't work at all in 8.4, where there simply isn't a > good opportunity to set a typmod for parameters passed to the main > executor (since the SPI interfaces plpgsql uses don't support that). Attached is a proposed patch for HEAD that sets up the Param's typmod sanely. I've verified that this fixes the reported problem and does not result in any changes in the regression tests, which makes me a bit more optimistic about it ... but I'm still not convinced it'd be a good idea to back-patch into 9.0. regards, tom lane