Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-30-2003, 07:36 AM   #1
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Rep: Reputation: 15
postgres serial fields

I am having a problem migrating a database from Informix to PostgresSQL due to differences in the behaviour of the SERIAL fields in postgres.

In informix, if I pass a '0' to a serial field (e.g. a record index) I am given the next available value in the field automatically.

As far as I can tell from postgres the same thing should happen. Postgres creates a sequence for the serial field and sets the default value as:


however if I try to enter a 0 to the list, 0 gets added to the table, then future inputs return a "duplicate value not allowed" error.

Any tips?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two New LQ Profile Fields jeremy LQ Suggestions & Feedback 8 07-13-2005 12:10 AM
Help me using kernel_stat fields... arunka Programming 0 03-24-2005 07:18 AM
inittab fields env Linux - General 2 03-04-2005 01:36 PM
Supressing Fields w/ AWK Rv5 Programming 3 10-19-2004 12:06 PM
compulsory fields masand LQ Suggestions & Feedback 20 09-07-2004 05:33 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration