Re: dblink - custom datatypes NOW work :)

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-24 06:11:19
Message-ID: 403AEB07.2080109@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Tom Lane wrote:
> Two nitpicks (each applying in 2 places):

> 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?

> (Also, the errmsg text seems a bit out of line with the wording of
> comparable errors, but I can't offer better text offhand.)

Thanks for the feedback, Tom. Here's what I ended up with:

if (!rsinfo || !IsA(rsinfo, ReturnSetInfo))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("function returning record called in context "
"that cannot accept type record")));

Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2004-02-24 06:19:13 Re: [GENERAL] dblink: rollback transaction
Previous Message Tom Lane 2004-02-24 05:58:13 Re: Create Schema functionality question

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2004-02-24 07:57:10 Re: Pl/Java - next step?
Previous Message Tom Lane 2004-02-24 05:13:50 Re: user defined function in CHECK constraint

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2004-02-24 06:19:13 Re: [GENERAL] dblink: rollback transaction
Previous Message Tom Lane 2004-02-24 03:41:26 Re: client_encoding in dump file