Re: Returning the name of a primary key

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Returning the name of a primary key
Дата
Msg-id 20151.1116269343@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Returning the name of a primary key  (Juan Pablo Espino <jp.espino@gmail.com>)
Список pgsql-hackers
Juan Pablo Espino <jp.espino@gmail.com> writes:
> 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:

You need to be searching the list of indexes, not the attributes per se.
ATExecDropNotNull() might be a useful example.
        regards, tom lane


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: pgFoundry
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Cost of XLogInsert CRC calculations