Re: bug in on_error_rollback !?

From: Richard Troy <rtroy(at)ScienceTools(dot)com>
To: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bernd Helmle <mailings(at)oopsware(dot)de>
Subject: Re: bug in on_error_rollback !?
Date: 2006-10-28 21:30:42
Message-ID: Pine.LNX.4.33.0610281425510.30114-100000@denzel.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Gurjeet,

I see that the question of case sensitivity in psql is still being
discussed. "I don't have a dog in that fight," but thought I might make a
suggestion. To wit:

I propose you adopt the standard that I personally have adopted eons ago -
literally perhaps 20 years ago - and has by now saved me many days of
time, I'm sure; ALWAYS presume case sensitivity and code _exactly_ that
way every time. (And develop you're own capitalization standard, too, so
you'll always know which way it goes.) You'll never be disappointed that
way and you won't create hidden bugs. If you want to keep arguing that
Postgres should change to meet your expectations, fine, and if it changes,
great for you, but you'll just have the same problem someday with some
other package - better you change your habits instead!

Richard

On Sat, 28 Oct 2006, Gurjeet Singh wrote:

> Date: Sat, 28 Oct 2006 20:01:00 +0530
> From: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
> To: Peter Eisentraut <peter_e(at)gmx(dot)net>
> Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>,
> Bernd Helmle <mailings(at)oopsware(dot)de>
> Subject: Re: [HACKERS] bug in on_error_rollback !?
>
> On 10/27/06, Peter Eisentraut <peter_e(at)gmx(dot)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.
>
>
>
>

--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy(at)ScienceTools(dot)com, http://ScienceTools.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2006-10-29 00:26:39 Re: bug in on_error_rollback !?
Previous Message Richard Broersma Jr 2006-10-28 14:59:09 Re: Case Preservation disregarding case sensitivity?