RE: How do system tables relate to other tables in postgresql

Поиск
Список
Период
Сортировка
От tamsin
Тема RE: How do system tables relate to other tables in postgresql
Дата
Msg-id NEBBKHBOBMJCHDMGKCNJIEODDAAA.tg_mail@bryncadfan.co.uk
обсуждение исходный текст
Ответ на How do system tables relate to other tables in postgresql  ("Graeme Longman" <graeme@saebex.com>)
Список pgsql-general
think this should do it:

select attname from pg_attribute
where attnotnull = 't'
and attrelid =
(select oid from pg_class where relname = 'tablename');

regards,
tamsin


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Graeme Longman
Sent: 11 July 2001 13:07
To: pgsql-general@postgresql.org
Subject: [GENERAL] How do system tables relate to other tables in
postgresql


Hi,

Hope you can help me out.

I'm trying to write a select statement which returns the all the columns of
a table with a 'not null' modifier.

I realise that I will need to use the system tables but can't work out which
columns of which system tables to include in my statement.

Thanks for any help in advance,
Graeme


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


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

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: Partial Indices vs. mixing columns and functions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: OIDs