Re: [HACKERS] proposal: session server side variables

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] proposal: session server side variables
Дата
Msg-id 184d140b-63fb-5890-32e1-b5b38bd0b3be@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers

On 12/29/2016 02:23 PM, Fabien COELHO wrote:
>
>> There is a singleton table :)
>>
>> create table foo(x integer unique not null default 1 check(x = 1), y 
>> integer);
>> insert into foo(y) values(100);
>> analyze foo;
>
> I know this one. It can be empty, which a singleton cannot be. For a 
> singleton table, you should have one and only one row, you cannot 
> insert or delete, so this is only part of the real thing.


Surely we can do a bit better than that, if that's what you really want. 
Create the table with an initial row and add a trigger preventing 
anything except update.


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




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

Предыдущее
От: Florian Weimer
Дата:
Сообщение: Re: [HACKERS] gettimeofday is at the end of its usefulness?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] gettimeofday is at the end of its usefulness?