Re: view table pkey values

From: Scott Frankel <leknarf(at)pacbell(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: rod(at)iol(dot)ie, pgsql-general(at)postgresql(dot)org
Subject: Re: view table pkey values
Date: 2009-08-24 18:02:56
Message-ID: 4B2297E4-069A-4AD2-9D33-4BC65B93096B@pacbell.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Got it! Yes, this started happening after loading from a pg_dump.
Thanks for the explanation!
Scott

On Aug 24, 2009, at 10:52 AM, Tom Lane wrote:

> Scott Frankel <leknarf(at)pacbell(dot)net> writes:
>> Is there a command that lists the values for the internal,
>> foo_foo_id_seq, sequence?
>
> select * from foo_foo_id_seq;
>
> The usual way to get into this sort of trouble is to load a bunch of
> data into the table while explicitly specifying ID values. It will
> take the data (as long as it doesn't conflict with existing IDs)
> but nothing happens to the sequence. pg_dump knows it has to update
> the sequence too, but a lot of other tools don't; and even with
> pg_dump
> a selective restore can mess things up.
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-08-24 18:03:02 Re: view table pkey values
Previous Message Tom Lane 2009-08-24 17:52:12 Re: view table pkey values