From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bret Hughes <bhughes(at)elevating(dot)com>, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, postgresql sql list <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: trigger/for key help |
Date: | 2004-04-13 06:20:00 |
Message-ID: | 873c78e6wf.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Bret Hughes <bhughes(at)elevating(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2004-04-13 08:31:09 | Re: cursors and for loops? |
Previous Message | CoL | 2004-04-12 22:21:01 | Re: Function for numbering rows? |