Hi all,
when trying to restore a dump I get the following error:
pg_restore: [archiver (db)] could not execute query: ERROR:  argument of commutator must be a name

Operator commutator is itself, and when reading the ascii version
of the dump (produced with -Fc) I see that this has been changed
with what was probably it's oid instead.

Is this a bug in pg_dump ?
How do I tell which pg_dump version produced the dump ?
Is self commutation valid ?

TIA

--strk;

Tue, 3 Aug 2004 10:36:46 +0200
strk <strk@keybit.net>
operator commutator
> Operator commutator is itself, and when reading the ascii version
> of the dump (produced with -Fc) I see that this has been changed
> with what was probably it's oid instead.

Can you paste that ascii from the dump?

> Is this a bug in pg_dump ?
> How do I tell which pg_dump version produced the dump ?

I'm not sure it is possible.  If it is, it will be at the very top of 
the ascii version.

Chris


Tue, 03 Aug 2004 16:49:48 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: operator commutator
On Tue, Aug 03, 2004 at 04:49:48PM +0800, Christopher Kings-Lynne wrote:
> >Operator commutator is itself, and when reading the ascii version
> >of the dump (produced with -Fc) I see that this has been changed
> >with what was probably it's oid instead.
> 
> Can you paste that ascii from the dump?

--
-- TOC entry 537 (OID 2663955)
-- Name: ~=; Type: OPERATOR; Schema: public; Owner: strk
-- Data Pos: 0
--

CREATE OPERATOR ~= (
    PROCEDURE = geometry_same,
    LEFTARG = geometry,
    RIGHTARG = geometry,
    COMMUTATOR = 2663954,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


> 
> >Is this a bug in pg_dump ?
> >How do I tell which pg_dump version produced the dump ?
> 
> I'm not sure it is possible.  If it is, it will be at the very top of 
> the ascii version.

No luck. Would be helpful IMO.

> 
> Chris

--strk;


Tue, 3 Aug 2004 11:10:49 +0200
strk <strk@keybit.net>
Re: operator commutator
> --
> -- TOC entry 537 (OID 2663955)
> -- Name: ~=; Type: OPERATOR; Schema: public; Owner: strk
> -- Data Pos: 0
> --
> 
> CREATE OPERATOR ~= (
>     PROCEDURE = geometry_same,
>     LEFTARG = geometry,
>     RIGHTARG = geometry,
>     COMMUTATOR = 2663954,
>     RESTRICT = eqsel,
>     JOIN = eqjoinsel
> );

How about:

\x
SELECT oid, * FROM pg_operator WHERE oprname='~=' OR oid=2663954;

Chris


Tue, 03 Aug 2004 17:17:27 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: operator commutator
On Tue, Aug 03, 2004 at 05:17:27PM +0800, Christopher Kings-Lynne wrote:
> >--
> >-- TOC entry 537 (OID 2663955)
> >-- Name: ~=; Type: OPERATOR; Schema: public; Owner: strk
> >-- Data Pos: 0
> >--
> >
> >CREATE OPERATOR ~= (
> >    PROCEDURE = geometry_same,
> >    LEFTARG = geometry,
> >    RIGHTARG = geometry,
> >    COMMUTATOR = 2663954,
> >    RESTRICT = eqsel,
> >    JOIN = eqjoinsel
> >);
> 
> How about:
> 
> \x
> SELECT oid, * FROM pg_operator WHERE oprname='~=' OR oid=2663954;

Unfortunately I'm not on the machine from which the dump was
issued, so I can't check. I'll inspect when possible, so I'll also
tell you which pg_dump version was it.

--strk;

> 
> Chris

Tue, 3 Aug 2004 11:31:15 +0200
strk <strk@keybit.net>
Re: operator commutator