Re: [SQL] Newbie dbadmin out of his league

Поиск
Список
Период
Сортировка
Искать
От
Ross J. Reedstrom
Тема
Re: [SQL] Newbie dbadmin out of his league
Дата
Msg-id
19990827171140.A15338@wallace.ece.rice.edu
Ответ на
Список
Дерево обсуждения
Newbie dbadmin out of his league Tim Pizey <tim@paneris.co.uk>
Re: [SQL] Newbie dbadmin out of his league Tom Lane <tgl@sss.pgh.pa.us>
Re: [SQL] Newbie dbadmin out of his league "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
Re: [SQL] Newbie dbadmin out of his league Tim Pizey <tim@paneris.co.uk>
Re: [SQL] Newbie dbadmin out of his league Herouth Maoz <herouth@oumail.openu.ac.il>
Re: [SQL] Newbie dbadmin out of his league Tim Pizey <tim@paneris.co.uk>
On Fri, Aug 27, 1999 at 05:19:18PM -0400, Tom Lane wrote:
> Tim Pizey  writes:
> > 2. How do I use COPY?
> 
> 
> Just create the sequence with the right starting value (one past last
> ID being loaded).  You can do that before or after the COPY, doesn't
> matter.

What I always do with sequences that are autocreated for serial types 
(and so have a start value of 1), after the COPY puts all my data in place:

select setval('tablename_field_seq',max(field)) from tablename;

Ross

-- 
Ross J. Reedstrom, Ph.D.,  
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005

В списке pgsql-sql по дате отправления
От: Michael Richards
Дата:
Сообщение: indexes using datetime
От: Frank Joerdens
Дата:
Сообщение: datetime query issue
FAQ