Re: ALTER TABLE commands

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: ALTER TABLE commands
Дата
Msg-id Pine.BSF.4.21.0110162142210.20084-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на ALTER TABLE commands  (Tariq Muhammad <tmuhamma@libertyrms.com>)
Список pgsql-admin
On Tue, 16 Oct 2001, Tariq Muhammad wrote:

> I am trying to set value of an attribute to not null but it does not work
> I am using the following statment:
>
> UPDATE contact
> SET attnotnull = TRUE
> WHERE attname = '_rserv_ts' ;
>
> The error I get is as under :
>
> ERROR:  Attribute 'attname' not found

You need to update pg_attribute, something like:
update pg_attribute
 set attnotnull=true
 where attname='_rserv_ts' and
  exists (select * from pg_class where
    pg_class.oid=pg_attribute.oid and
    pg_class.relname='contact');


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Database subdirectories in V7.1.x
Следующее
От: "Moovarkku Mudhalvan"
Дата:
Сообщение: Convertion of Oracle Database to Postgresql