No serial type

Поиск
Список
Период
Сортировка
От Simon Connah
Тема No serial type
Дата
Msg-id 20F76673-4FB5-4841-BE8E-5FF190E27DDC@btopenworld.com
обсуждение исходный текст
Ответы Re: No serial type  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
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





В списке pgsql-general по дате отправления:

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Foreign Key 'walker'?
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: High Availability for PostgreSQL on Windows 2003.