Re: Variable substitution in psql backtick expansion - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: Variable substitution in psql backtick expansion
Date
Msg-id bc15034d-b421-42ac-89b1-c3485fa1728b@manitou-mail.org
Whole thread Raw
In response to Variable substitution in psql backtick expansion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
    Tom Lane wrote:

> Thoughts?

ISTM that expr is too painful to use to be seen as the
idiomatic way of achieving comparison in psql.

Among its disadvantages, it won't work on windows, and its
interface is hard to work with due to the necessary
quoting of half its operators, and the mandatory spacing
between arguments.

Also the quoting rules and command line syntax
depend on the underlying shell.
Isn't it going to be tricky to produce code that works
across different families of shells, like bourne and csh?

I think that users would rather have the option to just put
an SQL expression behind \if. That implies a working connection
to evaluate, which expr doesn't, but that's no
different from the other backslash commands that read
the database.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [bug fix] Savepoint-related statements terminates connection
Next
From: Robert Haas
Date:
Subject: Re: Patch: Write Amplification Reduction Method (WARM)