Why do I need to pass value for Serial type in Insert/Update?

From: "Duffey, Kevin" <KDuffey(at)marketron(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Why do I need to pass value for Serial type in Insert/Update?
Date: 2003-09-12 19:22:25
Message-ID: 59007C908447154E9D9432A651876F377089DA@bmmail.buymedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I don't know if jdbc/java code requires this, but when I use two gui admin tools I found, and I insert a row into the table using their row editor feature, both require me to enter a number for the Serial type. I thought this type was used to auto-increment an id field and that I would not need to enter anything into it? Basically we need the normal indexed ID field for each table, and we want it to auto-increment. The serial shows a function of nextVal() or something like that, so I assume it auto-increments, and it shows unique and not-null. Can someone explain how serial is used, why would I still need to pass a value for it?

Thanks.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com)
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003

***************************************************************************
"The information contained in this e-mail message may be confidential and
protected from disclosure. If you are not the intended recipient, any
dissemination, distribution or copying is strictly prohibited. If you think
that you have received this e-mail message in error, please e-mail the
sender at exadmins(at)marketron(dot)com(dot)"
***************************************************************************

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Holger Marzen 2003-09-12 19:25:17 Re: query-question
Previous Message Richard Huxton 2003-09-12 18:50:27 Re: Regarding constraint database