Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-12 Thread Tom Lane
I wrote: > Hmm. I'm afraid that's going to break something, because I had had it > like that originally and changed it in commit > 988620dd8c16d77f88ede167b22056176324. However, I'm not quite sure > *what* it will break, because it seems like in general extension > dependencies ought to act p

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-12 Thread Tom Lane
Robert Haas writes: > On Mon, Oct 10, 2011 at 2:52 PM, Tom Lane wrote: >> The underlying issue here is whether objects dependent on an extension >> member should have direct dependencies on the extension too, and if not, >> how do we prevent that?  The recordDependencyOnCurrentExtension calls >>

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-12 Thread Robert Haas
On Mon, Oct 10, 2011 at 2:52 PM, Tom Lane wrote: > Robert Haas writes: >> But there's a bigger problem: it seems to me that we have an >> inconsistency between what happens when you create an extension from >> scratch and when you upgrade it from unpackaged.  Both pg_buffercache >> and pg_stat_st

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-11 Thread Dimitri Fontaine
Robert Haas writes: > On Mon, Oct 10, 2011 at 2:52 PM, Tom Lane wrote: >> The underlying issue here is whether objects dependent on an extension >> member should have direct dependencies on the extension too, and if not, >> how do we prevent that?  The recordDependencyOnCurrentExtension calls >>

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-10 Thread Robert Haas
On Mon, Oct 10, 2011 at 2:52 PM, Tom Lane wrote: > Robert Haas writes: >> But there's a bigger problem: it seems to me that we have an >> inconsistency between what happens when you create an extension from >> scratch and when you upgrade it from unpackaged.  Both pg_buffercache >> and pg_stat_st

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-10 Thread Tom Lane
Robert Haas writes: > But there's a bigger problem: it seems to me that we have an > inconsistency between what happens when you create an extension from > scratch and when you upgrade it from unpackaged. Both pg_buffercache > and pg_stat_statements just do this in the "upgrade from unpackaged" >

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-10 Thread Robert Haas
On Mon, Oct 10, 2011 at 12:34 PM, Tom Lane wrote: > Robert Haas writes: >> rhaas=# alter extension pg_stat_statements drop type pg_stat_statements[]; >> ERROR:  syntax error at or near "[" >> LINE 1: ...extension pg_stat_statements drop type pg_stat_statements[]; >>                              

Re: [HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-10 Thread Tom Lane
Robert Haas writes: > rhaas=# alter extension pg_stat_statements drop type pg_stat_statements[]; > ERROR: syntax error at or near "[" > LINE 1: ...extension pg_stat_statements drop type pg_stat_statements[]; > ^ > Hmm. So just

[HACKERS] ALTER EXTENSION .. ADD/DROP weirdness

2011-10-10 Thread Robert Haas
OK, I'm stumped: rhaas=# create extension pg_stat_statements; CREATE EXTENSION rhaas=# drop view pg_stat_statements; ERROR: cannot drop view pg_stat_statements because extension pg_stat_statements requires it HINT: You can drop extension pg_stat_statements instead. rhaas=# alter extension pg_sta