Re: Schema variables - new implementation for Postgres 15

Поиск
Список
Период
Сортировка
Искать
От
Justin Pryzby
Тема
Re: Schema variables - new implementation for Postgres 15
Дата
Msg-id
20211106145714.GI17618@telsasoft.com
Ответ на
Список
Дерево обсуждения
Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 "Joel Jacobson" <joel@compiler.org>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
RE: Schema variables - new implementation for Postgres 15 "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Gilles Darold <gilles@darold.net>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Gilles Darold <gilles@darold.net>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Gilles Darold <gilles@darold.net>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Jaime Casanova <jcasanov@systemguards.com.ec>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Jaime Casanova <jcasanov@systemguards.com.ec>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: Schema variables - new implementation for Postgres 15 Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: Schema variables - new implementation for Postgres 15 Dean Rasheed <dean.a.rasheed@gmail.com>
Re: Schema variables - new implementation for Postgres 15 "Joel Jacobson" <joel@compiler.org>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 "Joel Jacobson" <joel@compiler.org>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Dean Rasheed <dean.a.rasheed@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15+1 Justin Pryzby <pryzby@telsasoft.com>
Re: Schema variables - new implementation for Postgres 15+1 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15+1 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Justin Pryzby <pryzby@telsasoft.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Justin Pryzby <pryzby@telsasoft.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Justin Pryzby <pryzby@telsasoft.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Justin Pryzby <pryzby@telsasoft.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Marcos Pegoraro <marcos@f10.com.br>
Re: Schema variables - new implementation for Postgres 15 Julien Rouhaud <rjuju123@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Justin Pryzby <pryzby@telsasoft.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: Schema variables - new implementation for Postgres 15 Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Erik Rijkers <er@xs4all.nl>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
RE: Schema variables - new implementation for Postgres 15 "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
Re: Schema variables - new implementation for Postgres 15 Pavel Stehule <pavel.stehule@gmail.com>
On Sat, Nov 06, 2021 at 04:45:19AM +0100, Pavel Stehule wrote:
> st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra  napsal:
> > 1) Not sure why we need to call this "schema variables". Most objects
> > are placed in a schema, and we don't say "schema tables" for example.
> > And it's CREATE VARIABLE and not CREATE SCHEMA VARIABLE, so it's a bit
> > inconsistent.

+1

At least the error messages need to be consistent.
It doesn't make sense to have both of these:

+               elog(ERROR, "cache lookup failed for schema variable %u", varid);
+               elog(ERROR, "cache lookup failed for variable %u", varid);

> Yes, there is inconsistency, but I think it is necessary. The name
> "variable" is too generic. Theoretically we can use other adjectives like
> session variables or global variables and the name will be valid. But it
> doesn't describe the fundamentals of design. This is similar to the
> package's variables from PL/SQL. These variables are global, session's
> variables too. But the usual name is "package variables". So schema
> variables are assigned to schemes, and I think a good name can be "schema
> variables". But it is not necessary to repeat keyword schema in the CREATE
> COMMAND.
> 
> My opinion is not too strong in this case, and I can accept just
> "variables" or "session's variables" or "global variables", but I am not
> sure if these names describe this feature well, because still they are too
> generic. There are too many different implementations of session global
> variables (see PL/SQL or T-SQL or DB2).

I would prefer "session variable".

To me, this feature seems similar to a CTE (which exists for a single
statement), or a temporary table (which exists for a single transaction).  So
"session" conveys a lot more of its meaning than "schema".

But don't rename everything just for me...

-- 
Justin


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Pavel Stehule
Дата:
FAQ