Re: limit table to one row

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: limit table to one row
Дата
Msg-id b42b73150906080619s5eb4650cud0e0daf75e601fee@mail.gmail.com
обсуждение исходный текст
Ответ на Re: limit table to one row  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
On Sun, Jun 7, 2009 at 1:38 AM, Craig Ringer<craig@postnewspapers.com.au> wrote:
> Brandon Metcalf wrote:
>> Is there a way when creating a table to limit it to one row?  That is,
>> without using a stored procedure?
>>
>> I searched the documentation, but didn't find anything.
>>
>
>
> CREATE TABLE x (...);
>
> CREATE UNIQUE INDEX x_only_one_row ON ((1));

very clever :D

merlin

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Using results from DELETE ... RETURNING
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Foreign Key Unique Constraint can be dropped