Re: bug in on_error_rollback !?

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: bug in on_error_rollback !?
Дата
Msg-id 65937bea0610280731i45e5786cvbe1f24134db2bca6@mail.gmail.com
обсуждение исходный текст
Ответ на Re: bug in on_error_rollback !?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: bug in on_error_rollback !?  (Richard Troy <rtroy@ScienceTools.com>)
Список pgsql-hackers


On 10/27/06, Peter Eisentraut <peter_e@gmx.net> wrote:
In psql, the psql
parts follow the syntax rules of psql, the SQL parts follow the syntax
rules of SQL.  The syntax rules of psql in turn are inspired by Unix
shells, sort of because psql is used that way.  (Surely one wouldn't
want the argument to \i be case-insensitive?) 

A very good reasoning... I completely agree...

But you'd also agree that since the psql variables can (and most often they are) used in SQL satements, we should consider making atleast \set case insensitive!

postgres=# \set x 1
postgres=# select :x;
 ?column?
----------
        1
(1 row)

postgres=# select :X;
ERROR:  syntax error at or near ":"
LINE 1: select :X;
               ^
postgres=#

<Greg>
what harm allowing "\set on_error_rollback" would be: it certainly
won't break any existing scripts.
...
I wrote this feature (but someone else
chose the name!) and I still occasionally write it lowercase and wonder
why it isn't working. :)
</Greg>

    I agree, we can't make every '\' command case-insensitive, but a few, where it makes absolute sense, should be subject to reconsideration. We have the choice of making it more user-friendly, and less confusing.



--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

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

Предыдущее
От: "Jonah H. Harris"
Дата:
Сообщение: PGFoundry down?
Следующее
От: Richard Troy
Дата:
Сообщение: Re: bug in on_error_rollback !?