Re: BUG #2307: Buckup and sequences in DEFAULT part

Lists: pgsql-bugs
From: Kamil Giza <kamilg(at)zeto(dot)olsztyn(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: BUG #2307: Buckup and sequences in DEFAULT part
Date: 2006-03-09 13:18:07
Message-ID: 44102B0F.9050801@zeto.olsztyn.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

It's a problem because after restore, server is looking for sequence in
schema "public" but sequence was created in schema "schema".
When I'm inserting new row to the table I have an error because server
can't find the sequence.
I know I can set proper searchpath, but now I can't because I have
sequences with the same names in different schemas.

regards,
Kamil Giza

Attachment Content-Type Size
kamilg.vcf text/x-vcard 204 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kamil Giza <kamilg(at)zeto(dot)olsztyn(dot)pl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2307: Buckup and sequences in DEFAULT part
Date: 2006-03-09 15:12:04
Message-ID: 25046.1141917124@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Kamil Giza <kamilg(at)zeto(dot)olsztyn(dot)pl> writes:
> It's a problem because after restore, server is looking for sequence in
> schema "public" but sequence was created in schema "schema".

No, it doesn't. regclass constants don't work that way; the sequence is
identified by OID, and isn't subject to search path issues at all. You
are assuming a problem that does not exist anymore.

regards, tom lane