Re: [HACKERS] proposal: session server side variables - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] proposal: session server side variables
Date
Msg-id alpine.DEB.2.20.1612292018040.32017@lancre
Whole thread Raw
In response to Re: [HACKERS] proposal: session server side variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] proposal: session server side variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [HACKERS] proposal: session server side variables  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
> 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.

> For example - MySQL @var is volatile - can be changed in query - that's
> mean, you cannot use it as const for planner :(

Indeed, because of the ":=" within in a SELECT query, the variable is 
updated at each round. Yuk.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] proposal: session server side variables