Re: Returning the name of a primary key

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Returning the name of a primary key
Дата
Msg-id 20050516183503.GA7400@surnet.cl
обсуждение исходный текст
Ответ на Returning the name of a primary key  (Juan Pablo Espino <jp.espino@gmail.com>)
Ответы Re: Returning the name of a primary key  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-hackers
On Mon, May 16, 2005 at 01:25:46PM -0500, Juan Pablo Espino wrote:

> I need to write a function that retrieve the name of at least one
> table primary key, if it exists.  The only argument passed to the
> function is the table name.  I have thought something like this:

Why mess around with a C function, if you can do it in straight SQL?
You can write a SQL function if need be.

-- 
Alvaro Herrera (<alvherre[a]surnet.cl>)
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos / con todos los humanos acabaré (Bender)


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: bitmap scans, btree scans, and tid order
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bitmap scans, btree scans, and tid order