pg_dump question

Started by Nonamealmost 22 years ago2 messagesgeneral
Jump to latest
#1Noname
linhluong@canada.com

Hi everyone,

I need some help
Can I dump specifc table and still get the actual sequence for it.
Somehow when I go

pg_dump -Fc -t <table name> -D <dbname>
it only give me the for that table
create table text
all the indexes
all the triggers

However, it totally does not bring in the sequence for that table
create table address (
id integer DEFAULT nextval('address_id_seq'::text) NOT NULL
phone1 text
);
and address_id_seq is not mentioned anywhere in the dump file?
Am I doing something wrong?
Any insight would be appreciated.

How can I get it?
Thanks a bunch

--

Linh Luong

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: pg_dump question

linhluong@canada.com writes:

Can I dump specifc table and still get the actual sequence for it.

It works for me in 7.3 and later --- at least when the column was
created by calling it a SERIAL column. If you made the sequence
separately then I don't think this is really a bug.

regards, tom lane