Re: Where's The Primary Key?

Поиск
Список
Период
Сортировка
От Nabil Sayegh
Тема Re: Where's The Primary Key?
Дата
Msg-id 1059360137.2148.36.camel@billy
обсуждение исходный текст
Ответ на Where's The Primary Key?  ("Jim Louis" <jim.louis@worldnet.att.net>)
Список pgsql-novice
Am Fre, 2003-07-25 um 09.13 schrieb Jim Louis:
>          Table "junk_t"
>  Attribute |  Type   | Modifier
> -----------+---------+----------
>  idx       | integer | not null
>  dat       | integer |
> Index: junk_idx

\d junk_idx

apart from that, it's much easier just to do:

...
idx int PRIMARY KEY,
...

Just leave the naming of the index to postgresql.

FYI:
You may also want to use SERIAL instead of INT.
It creates INT but with (auto-filled) serial numbers (auto increment).

hth
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : http://www.e-trolley.de


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

Предыдущее
От: "Jim Louis"
Дата:
Сообщение: Where's The Primary Key?
Следующее
От: "A.Bhuvaneswaran"
Дата:
Сообщение: Re: Accessing Postgres db from apache using PHP