Skip site navigation (1) Skip section navigation (2)

Re: detecting serials in 8.1

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: detecting serials in 8.1
Date: 2006-02-19 20:01:28
Message-ID: 43F8CE98.8040509@pse-consulting.de (view raw or flat)
Thread:
Lists: pgadmin-hackers
Kris Jurka wrote:
> 
> 8.1 has changed the default text for serials from something like
> nextval('public.tab_col_seq'::text) to nextval('tab_col_seq'::regclass)

Applied with editing (didn't check for schema).

> +     // Technically this serial check can still fail for sequences that
> +     // get created with non-default names.  Consider:
> +     // CREATE SEQUENCE st_a_seq;
> +     // CREATE TABLE st (a serial);
> +     // Now the default's sequence is actually st_a_seq1.

This can't be created consistently using the CREATE TABLE foo (bar 
serial) syntax, instead the column default syntax would need to be used. 
I've put this on the TODO list, we'd need some discussion what reverse 
engineering we really should show in such cases. This also has to 
correspond with our column dialog, which will add pg_depend 
automatically if adding a serial to an existing table (thus mimicking 
the CREATE TABLE ... SERIAL stuff).

Regards,
Andreas


In response to

Responses

pgadmin-hackers by date

Next:From: svnDate: 2006-02-19 20:06:19
Subject: SVN Commit by andreas: r5009 - trunk/pgadmin3/src/schema
Previous:From: Andreas PflugDate: 2006-02-19 19:57:07
Subject: Re: SVN Commit by dpage: r5003 - in trunk/pgadmin3:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group