how can tell if a column is a primary key?

Поиск
Список
Период
Сортировка
От Mark Stosberg
Тема how can tell if a column is a primary key?
Дата
Msg-id 382F925C.31358F09@summersault.com
обсуждение исходный текст
Ответы Re: [SQL] how can tell if a column is a primary key?  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Re: [SQL] how can tell if a column is a primary key?  (Howie <caffeine@toodarkpark.org>)
Список pgsql-sql
Hello! 
I'm writing some perl code to access arbitrary Postgres tables. As part
of this, I would like to be to tell if a given column is a primary key.
Given a table and a column name, is there is a select statement I can
run on the systems tables to tell me whether or not it's a primary key? Thanks.
  -mark

-- <<-------------------------------------------------------------->>
personal website                <    Summersault Website Design  http://mark.stosberg.com/     >
http://www.summersault.com/


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

Предыдущее
От: Chaotic Inceptions
Дата:
Сообщение: Arrays of composites, bug or usage?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Verificate values in other table?