Re: [HACKERS] Undefined psql variables - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] Undefined psql variables
Date
Msg-id CAFj8pRD0NY_2FPxQO2nXzKU68mBh04BR2LFwJHNNaUmt1n+mkg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Undefined psql variables  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers




> I suggest to reuse pgbench expression engine, developed by Haas Robert:-)

Not a bad idea (though I'm sure there are other reasonable options, too).

I checked the pgbench code - and I think it can work well - just add logical operators and compare operators.

Don't need to create more complex language there.


> Generating a error message with ${foo:?} is nice, but what psql need is just
> a way to test whether a variable is defined or not.

I'm not saying we should slavishly follow bash, but don't confuse what
you need with what other people need.  bash (well, sh, really) grew
that syntax for a reason, and it may be more than "there was this one
guy back in the seventies who wanted it, and ...".

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

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [HACKERS] Quorum commit for multiple synchronous replication.
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] snapbuild woes