Re: proposal: session server side variables

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: 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 19:23:18
Message-ID: alpine.DEB.2.20.1612292018040.32017@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-12-29 19:51:01 Re: proposal: session server side variables
Previous Message Stephen Frost 2016-12-29 17:59:28 Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal