Re: PSQL commands: \quit_if, \quit_unless

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: PSQL commands: \quit_if, \quit_unless
Дата
Msg-id CA+TgmoahODYR3dDNaqthgkmxBTvUp_-KKnTgXKji953UKnzfBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PSQL commands: \quit_if, \quit_unless  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: PSQL commands: \quit_if, \quit_unless  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Tue, Dec 6, 2016 at 8:45 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> There are some differences: pgbench already had one operator at a time
> expressions, while psql has survived till today with none, which suggest a
> less pressing need.

I don't really think so.  People have been wanting expressions in psql
since I got involved in the project.

> Moreover the features are partly orthogonal and would touch psql
> significantly in different although probably overlapping areas:
>  - expressions is rather about \set, even if reused with \if as well
>  - condition is about \if ... \endif and ignoring some input lines

I don't think that difference is very relevant, really.

> The current expression evaluation in pgbench is about 1000 lines for
> scanning, parsing & evaluating, and does not yet support boolean
> expressions, although a patch for that has been in the queue for some time.
> I foresee that someone will suggest/require/demand... that the expression
> code be shared between pgbench and psql, which is another argument for
> dissociating these two features (expression and conditional in psql) from
> the start.

That seems like an argument the other way, from here.  I'm not sure
that Tom is right in wanting so much to be shared between psql and
pgbench.  They're different tools with different purposes, and I'm not
sure sharing between them makes much sense.  But if it does make sense
to share, then that's another reason for not designing something
ad-hoc for psql: integrating it later will be more work in total.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Account for catalog snapshot in PGXACT->xmin updates.
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add support for restrictive RLS policies