Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Working with Postgresql serial data type in Perl

by erix (Parson)
on Dec 18, 2010 at 21:34 UTC ( #877803=note: print w/replies, xml ) Need Help??


in reply to Re^2: Working with Postgresql serial data type in Perl
in thread Working with Postgresql serial data type in Perl

It's all in the excellent manual: datatype serial (also available in PDF )

Note that:

Prior to PostgreSQL 7.3, serial implied UNIQUE. This is no longer automatic. If you wish a serial column to have a unique constraint or be a primary key, it must now be specified, just like any other data type.

(Btw: a hint regarding the database name: call it postgresql, postgres, or even Pg, but calling it 'Postgre' makes the same impression as writing PERL instead of Perl).

  • Comment on Re^3: Working with Postgresql serial data type in Perl

Replies are listed 'Best First'.
Re^4: Working with Postgresql serial data type in Perl
by vendion (Scribe) on Dec 19, 2010 at 01:28 UTC

    Thanks for the help and also thanks for that hint, I will try to keep it in mind in the future.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://877803]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2017-06-28 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (619 votes). Check out past polls.