Re: elog() error, trying CURENT OF with foreign table

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog() error, trying CURENT OF with foreign table
Date: 2013-04-19 14:29:48
Message-ID: CA+TgmoZOGynVEy=zyb6-Wi1SdidcdbTFVw_X=8NdKpSdjru-dw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 19, 2013 at 10:24 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Fri, Apr 19, 2013 at 10:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Yeah, that's an unimplemented feature.
>
>> So, should we just make that an
>> ereport(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), ...) instead of
>> elog()?
>
> I'm not that excited about the errcode; if we're going to do anything,
> changing the message text seems more important. Perhaps we could have
> it say "WHERE CURRENT OF is not supported for this table type"? That's
> jumping to conclusions about why the expression didn't get converted,
> but at least for this case it'd be a more useful user-facing message.

Yeah, it's probably good to improve the error message, too; and that
suggestion seems as good as any. But I still think it should be
ereport if it's user-facing.

My main concern was actually whether we ought to be detecting this
earlier in the process, before it gets as far as the executor. I
haven't scrutinized the code though so have no particular reason to
believe it's not OK as-is.

--
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 Tom Lane 2013-04-19 14:46:43 Re: elog() error, trying CURENT OF with foreign table
Previous Message Tom Lane 2013-04-19 14:24:20 Re: elog() error, trying CURENT OF with foreign table