Re: proposal: session server side variables

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: session server side variables
Date: 2016-12-29 20:15:36
Message-ID: 184d140b-63fb-5890-32e1-b5b38bd0b3be@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-12-29 21:02:31 Re: gettimeofday is at the end of its usefulness?
Previous Message Florian Weimer 2016-12-29 20:02:49 Re: gettimeofday is at the end of its usefulness?