public inbox for [email protected]  
help / color / mirror / Atom feed
dblink_get_result returns NULL if remote query throws error
3+ messages / 2 participants
[nested] [flat]

* dblink_get_result returns NULL if remote query throws error
@ 2018-09-25 15:41 PG Doc comments form <[email protected]>
  2018-09-25 17:06 ` Re: dblink_get_result returns NULL if remote query throws error Joe Conway <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2018-09-25 15:41 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.3/static/contrib-dblink-get-result.html
Description:

Please consider clarifying this page:
https://www.postgresql.org/docs/current/static/contrib-dblink-get-result.html
to state that if you call 
select dblink_get_result ('mylink',false), you will receive back a NULL if
the remote query threw an error. It is not clear on the page. At least an
example would be nice.

Thanks!


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: dblink_get_result returns NULL if remote query throws error
  2018-09-25 15:41 dblink_get_result returns NULL if remote query throws error PG Doc comments form <[email protected]>
@ 2018-09-25 17:06 ` Joe Conway <[email protected]>
  2018-09-25 18:52   ` Re: dblink_get_result returns NULL if remote query throws error Joe Conway <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Joe Conway @ 2018-09-25 17:06 UTC (permalink / raw)
  To: [email protected]; [email protected]

On 09/25/2018 11:41 AM, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/9.3/static/contrib-dblink-get-result.html
> Description:
> 
> Please consider clarifying this page:
> https://www.postgresql.org/docs/current/static/contrib-dblink-get-result.html
> to state that if you call 
> select dblink_get_result ('mylink',false), you will receive back a NULL if
> the remote query threw an error. It is not clear on the page. At least an
> example would be nice.

I will look at this as well as the similar one from a month+ ago that
has been languishing in my inbox.

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



Attachments:

  [application/pgp-signature] signature.asc (819B, 2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: dblink_get_result returns NULL if remote query throws error
  2018-09-25 15:41 dblink_get_result returns NULL if remote query throws error PG Doc comments form <[email protected]>
  2018-09-25 17:06 ` Re: dblink_get_result returns NULL if remote query throws error Joe Conway <[email protected]>
@ 2018-09-25 18:52   ` Joe Conway <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Joe Conway @ 2018-09-25 18:52 UTC (permalink / raw)
  To: [email protected]; [email protected]

On 09/25/2018 01:06 PM, Joe Conway wrote:
> On 09/25/2018 11:41 AM, PG Doc comments form wrote:
>> The following documentation comment has been logged on the website:
>> 
>> Page: https://www.postgresql.org/docs/9.3/static/contrib-dblink-get-result.html
>> Description:
>> 
>> Please consider clarifying this page:
>> https://www.postgresql.org/docs/current/static/contrib-dblink-get-result.html
>> to state that if you call 
>> select dblink_get_result ('mylink',false), you will receive back a NULL if
>> the remote query threw an error. It is not clear on the page. At least an
>> example would be nice.
> 
> I will look at this as well as the similar one from a month+ ago that
> has been languishing in my inbox.

Actually, the doc page says this:

8<--------------
fail_on_error

    If true (the default when omitted) then an error thrown on the
remote side of the connection causes an error to also be thrown locally.
If false, the remote error is locally reported as a NOTICE, and the
function returns no rows.
8<--------------

The case you describe does *not* return NULL, it returns no rows, which
is exactly what the above says. I don't see anything needing fixing. If
you have evidence otherwise, please provide an example.

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



Attachments:

  [application/pgp-signature] signature.asc (819B, 2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-09-25 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-25 15:41 dblink_get_result returns NULL if remote query throws error PG Doc comments form <[email protected]>
2018-09-25 17:06 ` Joe Conway <[email protected]>
2018-09-25 18:52   ` Joe Conway <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox