Re: [HACKERS] Fixing busted citext function declarations

2015-05-11 Thread David E. Wheeler
On May 11, 2015, at 5:01 PM, Tom Lane wrote: > Me too. Something fell through the cracks rather badly there :-(. > Would you check your commit history to see if anything else got missed? Let’s see… In https://github.com/theory/citext/commit/4030b4e1ad9fd9f994a6cdca1126a903682acae4 I copied y

Re: [HACKERS] Fixing busted citext function declarations

2015-05-11 Thread Tom Lane
"David E. Wheeler" writes: > On May 5, 2015, at 9:40 AM, Tom Lane wrote: >> In >> http://www.postgresql.org/message-id/bn1pr04mb37467aa1d412223b3d4a595df...@bn1pr04mb374.namprd04.prod.outlook.com >> it's revealed that the citext extension misdeclares its versions of >> regexp_matches(): they shou

Re: [HACKERS] Fixing busted citext function declarations

2015-05-11 Thread David E. Wheeler
Tom, On May 5, 2015, at 9:40 AM, Tom Lane wrote: > In > http://www.postgresql.org/message-id/bn1pr04mb37467aa1d412223b3d4a595df...@bn1pr04mb374.namprd04.prod.outlook.com > it's revealed that the citext extension misdeclares its versions of > regexp_matches(): they should return SETOF text[] but

Re: [HACKERS] Fixing busted citext function declarations

2015-05-07 Thread Tom Lane
"David G. Johnston" writes: > On Thu, May 7, 2015 at 4:19 PM, Tom Lane wrote: >> pg_upgrade is okay in any case because it dumps and reloads the current >> extension's components. Doesn't matter whether there's another version >> that is not compatible. > ​For clarity - which one is "current"

Re: [HACKERS] Fixing busted citext function declarations

2015-05-07 Thread David G. Johnston
On Thu, May 7, 2015 at 4:19 PM, Tom Lane wrote: > Bruce Momjian writes: > > On Thu, May 7, 2015 at 04:19:52PM -0400, Bruce Momjian wrote: > >> Just a reality check but this will break a pg_upgrade, and will not be > >> detected by --check. > > > Actually, pg_upgrade might be OK because the view

Re: [HACKERS] Fixing busted citext function declarations

2015-05-07 Thread Tom Lane
Bruce Momjian writes: > On Thu, May 7, 2015 at 04:19:52PM -0400, Bruce Momjian wrote: >> Just a reality check but this will break a pg_upgrade, and will not be >> detected by --check. > Actually, pg_upgrade might be OK because the views would be recreated > with the new functions already install

Re: [HACKERS] Fixing busted citext function declarations

2015-05-07 Thread Bruce Momjian
On Thu, May 7, 2015 at 04:19:52PM -0400, Bruce Momjian wrote: > On Tue, May 5, 2015 at 02:07:08PM -0300, Alvaro Herrera wrote: > > Tom Lane wrote: > > > > > * We can't use CREATE OR REPLACE FUNCTION in the upgrade script because > > > that intentionally doesn't let you change the result type of

Re: [HACKERS] Fixing busted citext function declarations

2015-05-07 Thread Bruce Momjian
On Tue, May 5, 2015 at 02:07:08PM -0300, Alvaro Herrera wrote: > Tom Lane wrote: > > > * We can't use CREATE OR REPLACE FUNCTION in the upgrade script because > > that intentionally doesn't let you change the result type of an existing > > function. I considered doing a manual UPDATE of the pg_p

Re: [HACKERS] Fixing busted citext function declarations

2015-05-05 Thread Tom Lane
"David G. Johnston" writes: > On Tue, May 5, 2015 at 10:20 AM, Tom Lane wrote: >> Alvaro Herrera writes: >>> I think we should keep the 1.0 version this time, in back branches. >> Agreed. Maybe we shouldn't even make 1.1 the default in the back >> branches. > ​Does 9.0 get different treatme

Re: [HACKERS] Fixing busted citext function declarations

2015-05-05 Thread David G. Johnston
On Tue, May 5, 2015 at 10:20 AM, Tom Lane wrote: > Alvaro Herrera writes: > > (I think it is possible that the behavior change is actually problematic > > as opposed to just behaving differently. For instance, if the function > > is used in a subselect that's expected to return only one row, an

Re: [HACKERS] Fixing busted citext function declarations

2015-05-05 Thread Tom Lane
Alvaro Herrera writes: > (I think it is possible that the behavior change is actually problematic > as opposed to just behaving differently. For instance, if the function > is used in a subselect that's expected to return only one row, and it > suddenly starts returning more, the query would rais

Re: [HACKERS] Fixing busted citext function declarations

2015-05-05 Thread David E. Wheeler
On May 5, 2015, at 10:07 AM, Alvaro Herrera wrote: >> So AFAICS we need to actually drop and recreate >> the citext regexp_matches() functions in the upgrade script. That means >> "ALTER EXTENSION citext UPDATE" will fail if these functions are being >> used in any views. That's annoying but I

Re: [HACKERS] Fixing busted citext function declarations

2015-05-05 Thread Alvaro Herrera
Tom Lane wrote: > * We can't use CREATE OR REPLACE FUNCTION in the upgrade script because > that intentionally doesn't let you change the result type of an existing > function. I considered doing a manual UPDATE of the pg_proc entry, but > then remembered why CREATE OR REPLACE FUNCTION is picky a

[HACKERS] Fixing busted citext function declarations

2015-05-05 Thread Tom Lane
In http://www.postgresql.org/message-id/bn1pr04mb37467aa1d412223b3d4a595df...@bn1pr04mb374.namprd04.prod.outlook.com it's revealed that the citext extension misdeclares its versions of regexp_matches(): they should return SETOF text[] but they're marked as returning just text[]. We know generally