Re: Bug in pg_dump 7.4

Lists: pgsql-hackers
From: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Bug in pg_dump 7.4
Date: 2004-05-06 13:38:10
Message-ID: 200405061538.10203.darko.prenosil@finteh.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Part of dump file:

CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
nextval('doc.seq_doc_id'::text)
CONSTRAINT cnst_chk_doc_id CHECK fn_chk_doc_id(VALUE);

It should look like this:

CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
nextval('doc.seq_doc_id'::text)
CONSTRAINT cnst_chk_doc_id CHECK ( fn_chk_doc_id(VALUE) ) ;

I did not notice any similar error report on the list, so I believe that this
is not fixed yet ?

Regards !


From: Rod Taylor <pg(at)rbt(dot)ca>
To: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump 7.4
Date: 2004-05-06 14:17:31
Message-ID: 1083853050.91282.1.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
> nextval('doc.seq_doc_id'::text)
> CONSTRAINT cnst_chk_doc_id CHECK ( fn_chk_doc_id(VALUE) ) ;
>
> I did not notice any similar error report on the list, so I believe that this
> is not fixed yet ?

It comes out right for me in 7.4.2.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump 7.4
Date: 2004-05-06 16:37:57
Message-ID: 1114.1083861477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rod Taylor <pg(at)rbt(dot)ca> writes:
>> CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
>> nextval('doc.seq_doc_id'::text)
>> CONSTRAINT cnst_chk_doc_id CHECK ( fn_chk_doc_id(VALUE) ) ;

> It comes out right for me in 7.4.2.

AFAICT the relevant fix was well before 7.4 release:

2003-10-04 14:22 tgl

* src/: backend/utils/adt/ruleutils.c,
backend/utils/cache/lsyscache.c, include/utils/lsyscache.h: Fix
pg_get_constraintdef() to ensure CHECK constraints are always shown
with required outer parentheses. Breakage seems to be leftover
from domain-constraint patches. This could be smarter about
suppressing extra parens, but at this stage of the release cycle I
want certainty not cuteness.

regards, tom lane


From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump 7.4
Date: 2004-05-06 16:41:00
Message-ID: 20040506164100.GA15358@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, May 06, 2004 at 10:17:31 -0400,
Rod Taylor <pg(at)rbt(dot)ca> wrote:
> > CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
> > nextval('doc.seq_doc_id'::text)
> > CONSTRAINT cnst_chk_doc_id CHECK ( fn_chk_doc_id(VALUE) ) ;
> >
> > I did not notice any similar error report on the list, so I believe that this
> > is not fixed yet ?
>
> It comes out right for me in 7.4.2.

What type is fn_chk_doc_id? There was a bug like this for boolean variables
in the 7.4 beta. Maybe there is a similar bug for boolean functions?
Just to be sure, this is happening in a released version of 7.4, not a beta
version, correct?


From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "Bruno Wolff III" <bruno(at)wolff(dot)to>, "Rod Taylor" <pg(at)rbt(dot)ca>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump 7.4
Date: 2004-05-06 21:42:17
Message-ID: 004001c433b3$16b17e30$1389bfd5@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Sorry, this was 7.4 beta 3 ( I was upgrading one test database from 7.4 beta
3, pg_restore was version 7.4.2).
You are right, fn_chk_doc_id is bool type.
However I'll try to dump upgraded database with a new version of pg_dump and
let You know.
Sorry again :-(

Regards !

----- Original Message -----
From: "Bruno Wolff III" <bruno(at)wolff(dot)to>
To: "Rod Taylor" <pg(at)rbt(dot)ca>
Cc: "Darko Prenosil" <darko(dot)prenosil(at)finteh(dot)hr>; "PostgreSQL Development"
<pgsql-hackers(at)postgresql(dot)org>
Sent: Thursday, May 06, 2004 6:41 PM
Subject: Re: [HACKERS] Bug in pg_dump 7.4

> On Thu, May 06, 2004 at 10:17:31 -0400,
> Rod Taylor <pg(at)rbt(dot)ca> wrote:
> > > CREATE DOMAIN doc_ident AS bigint NOT NULL DEFAULT
> > > nextval('doc.seq_doc_id'::text)
> > > CONSTRAINT cnst_chk_doc_id CHECK ( fn_chk_doc_id(VALUE) ) ;
> > >
> > > I did not notice any similar error report on the list, so I believe
that this
> > > is not fixed yet ?
> >
> > It comes out right for me in 7.4.2.
>
> What type is fn_chk_doc_id? There was a bug like this for boolean
variables
> in the 7.4 beta. Maybe there is a similar bug for boolean functions?
> Just to be sure, this is happening in a released version of 7.4, not a
beta
> version, correct?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>