Обсуждение: Question about SERIAL

Поиск
Список
Период
Сортировка

Question about SERIAL

От
Erwin Ambrosch
Дата:
Hi,

is there a possibilty to increment a sequence when data are imported form a
textfile using the \copy command.

Thanks Erwin

Re: Question about SERIAL

От
"Joel Burton"
Дата:
After the \copy, set the new sequence with setval (but you knew this; your
last message to the group was asking about how to use setval: what's your
real question here?)

- J.

Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Erwin Ambrosch
> Sent: Tuesday, May 14, 2002 10:24 AM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Question about SERIAL
>
>
> Hi,
>
> is there a possibilty to increment a sequence when data are
> imported form a
> textfile using the \copy command.
>
> Thanks Erwin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


Re: Question about SERIAL

От
Philip Hallstrom
Дата:
Look at the SETVAL function in the documentation about sequences...

On Tue, 14 May 2002, Erwin Ambrosch wrote:

> Hi,
>
> is there a possibilty to increment a sequence when data are imported form a
> textfile using the \copy command.
>
> Thanks Erwin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>