Search Postgresql Archives

No serial type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I've just started using PostgreSQL and have been reading up on it. Part of what I wanted to do was to have a column which automatically incremented itself by one every time I do an INSERT. From reading the manual I was lead to believe that the correct type for this was either serial or bigserial. But whenever I try and update my column to this type it says that it can not find that data type. Am I doing something wrong?

This is what I get:

simon=> ALTER TABLE users ALTER COLUMN userid TYPE serial;
ERROR:  type "serial" does not exist

I'm running this version:

simon=> SELECT version();
                                         version
-----------------------------------------------------------------------------------------
PostgreSQL 8.3.3 on i386-unknown-openbsd4.4, compiled by GCC cc (GCC) 3.3.5 (propolice)
(1 row)

Thank you or any help.

"I disapprove of what you say, but I'll defend to the death your right to say it." - Voltaire





--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux