Re: and it's not a bunny rabbit, either

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: and it's not a bunny rabbit, either
Date: 2011-01-03 15:21:44
Message-ID: AANLkTi=XDowvzV=R3Zi0+9-kB0_hNYoHtskHNZe_upM3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 2, 2011 at 4:45 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On lör, 2011-01-01 at 17:21 -0500, Robert Haas wrote:
>> > I don't see anything wrong with having 20 or 30 messages of variants of
>> >
>> > "foo cannot be used on bar"
>> >
>> > without placeholders.
>>
>> Well, that's OK with me.  It seems a little grotty, but manageably so.
>>  Questions:
>>
>> 1. Should we try to include the name of the object?  If so, how?
>
> Hmm.  There is a bit of a difference in my mind between, say,
>
>    constraints cannot be used on sequences
>
>    constraint "foo" cannot be used on sequence "bar"
>
> the latter leaving open the question whether some other combination
> might work.

Yeah, that's no good. Maybe there's a good way to clear things up
with an errdetail(), though I'm having a hard time thinking how to
phrase it.

ERROR: sequence "%s" does not support the requested operation
DETAIL: Constraints are not supported on sequences.

ERROR: constraints are not supported on sequences
DETAIL: "%s" is a sequence.

ERROR: "%s" is a sequence
DETAIL: Constraints and sequences are like water and oil, dude.

>> 2. Can we have a variant with an SQL-command-fragment parameter?
>>
>> %s cannot be used on views
>> where %s might be CLUSTER, DROP COLUMN, etc.
>
> That's OK; we do that in several other places.

Cool.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-01-03 15:25:28 Scanning pg_tablespace from walsender
Previous Message Andres Freund 2011-01-03 15:03:58 Re: [PATCH] V3: Idle in transaction cancellation