Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group