From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: dblink - custom datatypes NOW work :) |
Date: | 2004-02-23 03:15:07 |
Message-ID: | 20327.1077506107@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-patches |
Joe Conway <mail(at)joeconway(dot)com> writes:
> I'd like to consider the attached a bugfix and apply for the upcoming
> 7.3.6 and 7.4.2 releases, as well as cvs tip. Any comments/objections?
Two nitpicks (each applying in 2 places):
> ! if (!rsinfo)
> ! ereport(ERROR,
> ! (errcode(ERRCODE_SYNTAX_ERROR),
> ! errmsg("returning setof record is not " \
> ! "allowed in this context")));
> !
First, testing for null rsinfo isn't sufficient, since the resultinfo
mechanism could be used for other things; you need an IsA test too.
Second, is "syntax error" really the most appropriate classification for
this? Compare the code in functions.c:
ReturnSetInfo *rsi = (ReturnSetInfo *) fcinfo->resultinfo;
if (rsi && IsA(rsi, ReturnSetInfo))
rsi->isDone = ExprEndResult;
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("set-valued function called in context that cannot accept a set")));
(Also, the errmsg text seems a bit out of line with the wording of
comparable errors, but I can't offer better text offhand.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-02-23 04:32:00 | Re: [GENERAL] dblink: rollback transaction |
Previous Message | Joe Conway | 2004-02-23 02:03:08 | Re: [GENERAL] dblink: rollback transaction |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-02-23 03:41:40 | Re: Too-many-files errors on OS X |
Previous Message | Joe Conway | 2004-02-23 01:21:23 | Re: dblink - custom datatypes NOW work :) |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-02-23 04:32:00 | Re: [GENERAL] dblink: rollback transaction |
Previous Message | Joe Conway | 2004-02-23 02:03:08 | Re: [GENERAL] dblink: rollback transaction |