Re: PSQL commands: \quit_if, \quit_unless - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: PSQL commands: \quit_if, \quit_unless
Date
Msg-id alpine.DEB.2.20.1612041730020.4497@lancre
Whole thread Raw
In response to Re: PSQL commands: \quit_if, \quit_unless  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: PSQL commands: \quit_if, \quit_unless  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hello Pavel,

> Some possibilities from pgbench can have sense in psql too - generating
> some random numbers from a range.

Could you expand on the use case where this would be useful?

> In the end we use one parser for psql and for pgbench.

Note that "master" lexer is already shared, thanks to Tom, so as to detect 
consistently where a query ends.

> I agree, so step 2 should be enough, and I accept so there is opened door
> for any future enhancing.

Good, because that was the idea:-)

> We can implement some client side boolean functions (similar to pgbench
> functions that can cover often tasks: version_less, version_greather,
> user_exists, tables_exists, index_exists, variable_exists, schema_exists,

Yes, that is a possibility, but this can already be queried into a 
:-variable, so it is less indispensable.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] Reload SSL certificates on SIGHUP
Next
From: Pavel Stehule
Date:
Subject: Re: PSQL commands: \quit_if, \quit_unless