Re: Equivalent for AUTOINCREMENT?
| От | Grzegorz Jaśkiewicz |
|---|---|
| Тема | Re: Equivalent for AUTOINCREMENT? |
| Дата | |
| Msg-id | 2f4958ff0810310639occ0bfb0k8eab8ebe56e86a38@mail.gmail.com обсуждение исходный текст |
| Ответ на | Equivalent for AUTOINCREMENT? (Michelle Konzack <linux4michelle@tamay-dogan.net>) |
| Ответы |
Re: Equivalent for AUTOINCREMENT?
|
| Список | pgsql-general |
# create table foo( a SERIAL );
NOTICE: CREATE TABLE will create implicit sequence "foo_a_seq" for serial column "foo.a"
CREATE TABLE
NOTICE: CREATE TABLE will create implicit sequence "foo_a_seq" for serial column "foo.a"
CREATE TABLE
# \d+ foo
Table "public.foo"
Column | Type | Modifiers | Description
--------+---------+-------------------------------------------------+-------------
a | integer | not null default nextval('foo_a_seq'::regclass) |
Has OIDs: no
Table "public.foo"
Column | Type | Modifiers | Description
--------+---------+-------------------------------------------------+-------------
a | integer | not null default nextval('foo_a_seq'::regclass) |
Has OIDs: no
AUTOINCREMENT has so many problems, that soon you'll start to love sequences so much, you'll start to hate mysql's childlish approach to problem solving :)
Also make sure you read carefuly: http://www.postgresql.org/docs/8.3/static/sql-createsequence.html
В списке pgsql-general по дате отправления: