From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Wolfgang Walther <walther(at)technowledgy(dot)de> |
Cc: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Sergey Shinderuk <s(dot)shinderuk(at)postgrespro(dot)ru>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, dean(dot)a(dot)rasheed(at)gmail(dot)com, er(at)xs4all(dot)nl, joel(at)compiler(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Schema variables - new implementation for Postgres 15 |
Date: | 2024-05-31 11:14:19 |
Message-ID: | CAFj8pRC_EcwAA23F8shpiAggR=5=8ci2qhYa79Fa-6by-TqD6A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
pá 31. 5. 2024 v 13:10 odesílatel Wolfgang Walther <walther(at)technowledgy(dot)de>
napsal:
> Pavel Stehule:
> > 2. But my main argument is, it is not really safe - it solves Peter's
> > use case, but if I use a reverse example of Peter's case, I still have a
> > problem.
> >
> > I can have a variable x, and then I can write query like `SELECT x FROM
> x`;
> >
> > but if somebody creates table x(x int), then the query `SELECT x FROM x`
> > will be correct, but it is surely something else. So the requirement of
> > the usage variable inside FROM clause doesn't help. It doesn't work.
>
> But in this case you could make variables and tables share the same
> namespace, i.e. forbid creating a variable with the same name as an
> already existing table.
>
It helps, but not on 100% - there is a search path
>
> Best,
>
> Wolfgang
>
From | Date | Subject | |
---|---|---|---|
Next Message | Wolfgang Walther | 2024-05-31 11:37:35 | Re: Schema variables - new implementation for Postgres 15 |
Previous Message | Wolfgang Walther | 2024-05-31 11:10:43 | Re: Schema variables - new implementation for Postgres 15 |