Hello,

For checking variable definition, I would suggest to extend the variable
access syntax so that there is no exception to the one thing rule between
client side and server side evaluation:

   \if :?variable

Don't like that one bit;

Possibly:-)

This is kind of a shell-like hack ${VAR:?error-message-if-not-defined},
or ${#VAR} to get a length.

They are not likable but they do the job.

you're going to run out of namespace there in no time.

I do not undestand where there would be a namespace issue. Is that under the assumption that ":?xxx" is frequently used in SQL?

And you don't have a very good way to say "if not defined", either.

Indeed. I'm afraid that handling "NOT" client-side would be necessary with this approach, so the decision would be 1 thing or 2 things where the first one is "NOT" would be handled client-side.

--
Fabien.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to