Re: get column default value

Поиск
Список
Период
Сортировка
От Ketema Harris
Тема Re: get column default value
Дата
Msg-id 73E54DDE-B024-49FD-8247-739F9B73532A@gmail.com
обсуждение исходный текст
Ответ на get column default value  (Jean-Christophe Roux <jcxxr@yahoo.com>)
Список pgsql-php
The default value for a column is just that the value you say is default.  It only come into play when you do an insert into the table.  If you do not provide a value for that column then your default value is entered.

Now if you set the default value of a column to a sequence, then you can manage the sequence using the sequence functions: currval, nextval, and setval.  Sequences and their functions are documented in the pg manual.

On Nov 13, 2006, at 9:49 AM, Jean-Christophe Roux wrote:

Hello,
How can I get the default value for a column?
To change the default value, something like
ALTER TABLE dummy ALTER COLUMN value SET DEFAULT -12;
would do the job, but how could I query the value?


Thanks in advance


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

Предыдущее
От: Jean-Christophe Roux
Дата:
Сообщение: get column default value
Следующее
От: Jean-Christophe Roux
Дата:
Сообщение: Re: get column default value