Re: [HACKERS] operator dependency of commutator and negator, redux

2012-12-20 Thread Tom Lane
Brendan Jurd dire...@gmail.com writes: On 20 December 2012 11:51, Tom Lane t...@sss.pgh.pa.us wrote: While reconsidering the various not-too-satisfactory fixes we thought of back then, I had a sudden thought. Instead of having a COMMUTATOR or NEGATOR forward reference create a shell operator

Re: [HACKERS] operator dependency of commutator and negator, redux

2012-12-20 Thread Robert Haas
On Thu, Dec 20, 2012 at 10:52 AM, Tom Lane t...@sss.pgh.pa.us wrote: Brendan Jurd dire...@gmail.com writes: On 20 December 2012 11:51, Tom Lane t...@sss.pgh.pa.us wrote: While reconsidering the various not-too-satisfactory fixes we thought of back then, I had a sudden thought. Instead of

Re: [HACKERS] operator dependency of commutator and negator, redux

2012-12-20 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Dec 20, 2012 at 10:52 AM, Tom Lane t...@sss.pgh.pa.us wrote: I was thinking a NOTICE at most. If it's a WARNING then restoring perfectly valid pg_dump files will result in lots of scary-looking chatter. You could make an argument for printing

Re: [HACKERS] operator dependency of commutator and negator, redux

2012-12-20 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: a separate ALTER OPERATOR COMMUTATOR statement (or something of the sort) that pg_dump can emit as a separate item. Even a NOTICE in I like that capability, but it's not helping us in the backward compatibility section where we will still read

[HACKERS] operator dependency of commutator and negator, redux

2012-12-19 Thread Tom Lane
Bug #7758 seems to be a rediscovery of the behavior that Itagaki-san complained of a couple years ago: http://archives.postgresql.org/pgsql-hackers/2010-09/msg02035.php While reconsidering the various not-too-satisfactory fixes we thought of back then, I had a sudden thought. Instead of having a

Re: [HACKERS] operator dependency of commutator and negator, redux

2012-12-19 Thread Brendan Jurd
On 20 December 2012 11:51, Tom Lane t...@sss.pgh.pa.us wrote: While reconsidering the various not-too-satisfactory fixes we thought of back then, I had a sudden thought. Instead of having a COMMUTATOR or NEGATOR forward reference create a shell operator and link to it, why not simply

[HACKERS] operator dependency of commutator and negator

2010-09-29 Thread Itagaki Takahiro
When we drop an operator used by other operators as COMMUTATOR or NEGATOR, pg_dump generates an invalid SQL command for the operators depending on the dropped one. Is it an unavoidable restriction? CREATE OPERATOR ( PROCEDURE = text_lt, LEFTARG = text, RIGHTARG = text, COMMUTATOR = );

Re: [HACKERS] operator dependency of commutator and negator

2010-09-29 Thread Alvaro Herrera
Excerpts from Itagaki Takahiro's message of mié sep 29 03:56:33 -0400 2010: When we drop an operator used by other operators as COMMUTATOR or NEGATOR, pg_dump generates an invalid SQL command for the operators depending on the dropped one. Is it an unavoidable restriction? Maybe we need a

Re: [HACKERS] operator dependency of commutator and negator

2010-09-29 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Itagaki Takahiro's message of mié sep 29 03:56:33 -0400 2010: When we drop an operator used by other operators as COMMUTATOR or NEGATOR, pg_dump generates an invalid SQL command for the operators depending on the dropped one. Is

Re: [HACKERS] operator dependency of commutator and negator

2010-09-29 Thread Itagaki Takahiro
On Wed, Sep 29, 2010 at 11:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not sure that fixing this case is worth the amount of work it'd take.  How often do you drop just one member of a commutator pair? I found the issue when an user tries to write a safe installer script under DROP before

Re: [HACKERS] operator dependency of commutator and negator

2010-09-29 Thread Tom Lane
Itagaki Takahiro itagaki.takah...@gmail.com writes: On Wed, Sep 29, 2010 at 11:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not sure that fixing this case is worth the amount of work it'd take. How often do you drop just one member of a commutator pair? I found the issue when an user tries