How to insert with a serial - Mailing list pgsql-general

From elwood@agouros.de (Konstantinos Agouros)
Subject How to insert with a serial
Date
Msg-id elwood.1003670142@news.agouros.de
Whole thread Raw
Responses Re: How to insert with a serial  (Flávio Brito <flavio@stat.com.br>)
Re: How to insert with a serial  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
Hi,

I have a table defined like this:

  Attribute  |         Type          |                 Modifier
-------------+-----------------------+------------------------------------------
 name        | character varying(40) |
 type        | integer               |
 id          | integer               | not null default nextval('serial'::text)
 ownerteamid | integer               |
Index: devices_pkey

How do I insert into it so that id is automatically incremented?

Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: MemoryContextAlloc
Next
From: Masaru Sugawara
Date:
Subject: Re: Sequence problems during restart