dbTalk Databases Forums  

[BUGS] BUG #2307: Buckup and sequences in DEFAULT part

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2307: Buckup and sequences in DEFAULT part in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Giza Kamil
 
Posts: n/a

Default [BUGS] BUG #2307: Buckup and sequences in DEFAULT part - 03-08-2006 , 02:04 PM







The following bug has been logged online:

Bug reference: 2307
Logged by: Giza Kamil
Email address: kamilg (AT) zeto (DOT) olsztyn.pl
PostgreSQL version: 8.1.3
Operating system: Windows,Linux
Description: Buckup and sequences in DEFAULT part
Details:

Hi!
My script is:
CREATE SEQUENCE schema.seq_taid;
CREATE TABLE schema.tab1(ID integer DEFAULT nextval('schema.seq_taid'));

After runing on server I have:

CREATE TABLE schema.tab1(ID integer DEFAULT
nextval('schema.seq_taid'::regclass));

but on 8.0 version was

CREATE TABLE schema.tab1(ID integer DEFAULT
nextval(('schema.seq_taid'::text)::regclass));

Buckups on 8.0 were OK, but on 8.1 I'm getting samething like that:
CREATE TABLE schema.tab1(ID integer DEFAULT nextval('seq_taid'::regclass));
Buckup cat schema name from sequence name in function nextval in DEFAULT
part.

Problem exists in buckups in PgAdmin and pg_buckup from command line on
server.

Is there any kind of solution for that or I have to wait for next version.
It's a very important for me to resolve this problem as quickly as
possible.

Best regards,
Kamil Giza

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2307: Buckup and sequences in DEFAULT part - 03-08-2006 , 03:11 PM






"Giza Kamil" <kamilg (AT) zeto (DOT) olsztyn.pl> writes:
Quote:
Buckups on 8.0 were OK, but on 8.1 I'm getting samething like that:
CREATE TABLE schema.tab1(ID integer DEFAULT nextval('seq_taid'::regclass));
You haven't said why you think this is a problem. The dump is perfectly
valid AFAICS.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2307: Buckup and sequences in DEFAULT part - 03-09-2006 , 09:12 AM



Kamil Giza <kamilg (AT) zeto (DOT) olsztyn.pl> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #4  
Old   
Kamil Giza
 
Posts: n/a

Default Re: [BUGS] BUG #2307: Buckup and sequences in DEFAULT part - 03-09-2006 , 06:27 PM



This is a multi-part message in MIME format.
--------------060706010905000608010207
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------060706010905000608010207
Content-Type: text/x-vcard; charset=utf-8;
name="kamilg.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="kamilg.vcf"

begin:vcard
fn:Kamil Giza
n:Giza;Kamil
org:ZETO Olsztyn;Projektowania i Programowania
email;internet:kamilg (AT) zeto (DOT) olsztyn.pl
title;quoted-printable:Kierownik Zespo=C5=82u Nowa Gmina
version:2.1
end:vcard


--------------060706010905000608010207
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

--------------060706010905000608010207--


Reply With Quote
  #5  
Old   
Kamil Giza
 
Posts: n/a

Default Re: [BUGS] BUG #2307: Buckup and sequences in DEFAULT part - 03-10-2006 , 09:51 PM



This is a multi-part message in MIME format.
--------------010504040508080405000007
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit

OK. You are right. Everything is OK with PostgreSQL. The problem is with
ZEOS components for Delphi. Sorry for trouble.

regards,
Kamil Giza

--------------010504040508080405000007
Content-Type: text/x-vcard; charset=utf-8;
name="kamilg.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="kamilg.vcf"

begin:vcard
fn:Kamil Giza
n:Giza;Kamil
org:ZETO Olsztyn;Projektowania i Programowania
email;internet:kamilg (AT) zeto (DOT) olsztyn.pl
title;quoted-printable:Kierownik Zespo=C5=82u Nowa Gmina
version:2.1
end:vcard


--------------010504040508080405000007
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

--------------010504040508080405000007--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.