From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bret Hughes <bhughes@elevating.com>
Cc: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: postgresql sql list <pgsql-sql@postgresql.org>
Subject: Re: trigger/for key help
Date: 13 Apr 2004 02:20:00 -0400
Message-ID: <873c78e6wf.fsf@stark.xeocode.com> (raw)
In-Reply-To: <28212.1081736841@sss.pgh.pa.us>
References: <1081662204.6609.72.camel@bretsony>
<20040411080932.Q83278@megazone.bigpanda.com>
<1081711155.6399.165.camel@bretsony>
<17189.1081720813@sss.pgh.pa.us>
<1081724318.2628.20.camel@bretsony>
<28212.1081736841@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Bret Hughes <bhughes@elevating.com> writes:
> > FWIW I tried to use alter table but could never get the parser to accept
> > $1 as a constraint name. I used single and double quotes as well as a
> > lame attempt \$1.
>
> Hm, "$1" works for me ...
Hm, this reminds me. When I was first learning this stuff I was stymied by the
same issue. It took me quite a while to figure out how to drop constraints
because of the quoting issue.
Of course now it seems obvious, but for someone just starting it adds another
roadblock. Is there a reason postgres goes out of its way to pick names that
will be harder to work with than necessary?
Or is it considered a good thing on the theory that if it's hard to reference
it's also hard to accidentally use such names in conflicting ways?
Perhaps names like _1 _2 ... would be easier to handle?
Or perhaps making $ not require quoting would be helpful?
--
greg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, bhughes@elevating.com, sszabo@megazone.bigpanda.com
Subject: Re: trigger/for key help
In-Reply-To: <873c78e6wf.fsf@stark.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox