Re: [SQL] SQL-Query 2 get primary key

Поиск
Список
Период
Сортировка
От Marc Grimme
Тема Re: [SQL] SQL-Query 2 get primary key
Дата
Msg-id 36CD9AE1.F2C412CE@atix.de
обсуждение исходный текст
Ответ на SQL-Query 2 get primary key  (Marc Grimme <grimme@atix.de>)
Список pgsql-sql
Hi,

jose' soares wrote:
>
> You may query pg_indexes as in:
>
> select * from pg_indexes where tablename = 'test';
>
> tablename|indexname|indexdef
> ---------+---------+-----------------------------------------------------------------------
>
> test     |test_pkey|CREATE UNIQUE INDEX "test_pkey" ON "test" USING
> btree ("id" "int4_ops")
> (1 row)
>
>
>
I read about the pg_indexes table and stuff but I am interested in the
"columnname" of the primary key in the specified table.
Isn´t this feature very important?
Cheers,
Marc
--
-----------------------------------------------------------
Marc Grimme - An der Muehle 1 - 85716 Unterschleissheim
Fon: +49 89 37 48 81 22 - +49 89 37 48 92 7 - 3/0 -
mail2: grimme@informatik.tu-muenchen.de, grimme@atix.de
-----------------------------------------------------------
The UNIX Guru's View of Sex:
# unzip ; strip ; touch ; finger ; mount ; fsck ; more ; yes ; umount ;
sleep

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

Предыдущее
От: "jose' soares"
Дата:
Сообщение: Re: [SQL] SQL-Query 2 get primary key
Следующее
От: Martin Möderndorfer
Дата:
Сообщение: Triggers to create Tables