Re: [HACKERS] proposal: session server side variables
От | Pavel Stehule |
---|---|
Тема | Re: [HACKERS] proposal: session server side variables |
Дата | |
Msg-id | CAFj8pRDe62_xfTkKkM5q7qeGWrrxD_Jck2QTxjLvMO8_2qaUOQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] proposal: session server side variables (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: [HACKERS] proposal: session server side variables
|
Список | pgsql-hackers |
2016-12-29 20:23 GMT+01:00 Fabien COELHO <coelho@cri.ensmp.fr>:
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.
subselect is "singleton" - it returns one row every time.
Not sure if term "singleton" is valid in relation database.
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 по дате отправления: