Inserting values into a SERIAL field

From: "Ian deSouza" <iandesouza(at)earthlink(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Inserting values into a SERIAL field
Date: 2001-03-04 17:22:46
Message-ID: GRuo6.14992$7Y1.1513585@newsread2.prod.itd.earthlink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

Is there any SQL statement to PostgreSQL that will allow me to insert rows
with a specified value for the SERIAL value. I know this is not what you
want to do normally, but I'm trying to provide a kind of general export and
import function to a generic database. Since there exists foreign key values
in instances of other tables that point into field values for a table that
has a SERIAL id, I'd like to somehow import all this data and continue using
the SERIAL functionality for the highest value of the id fields.

Ian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2001-03-04 17:31:48 Re: triggers vs "NEW" pseudorecord
Previous Message Bruce Richardson 2001-03-04 17:16:26 NULL parameters abort functions