From: Joe Conway <mail@joeconway.com>
To: Sofer, Yuval <Yuval_Sofer@bmc.com>
Cc: pgsql-admin@postgresql.org, "Abraham, Danny" <danny_abraham@bmc.com>
Subject: Re: cannot get error message after dblink_exec execution
Date: Sun, 19 Aug 2007 09:50:14 -0700
Message-ID: <46C874C6.30603@joeconway.com> (raw)
In-Reply-To: <F8B9B12641FB6B4FAC761BDEF9D63B040E30A911@tlv-ex-01.adprod.bmc.com>
References: <F8B9B12641FB6B4FAC761BDEF9D63B040E30A911@tlv-ex-01.adprod.bmc.com>
Sofer, Yuval wrote:
> last_message := dblink_error_message('dbname=postgres
> user=postgres password=manager') ;
> Am I not using dblink_error_message correctly?
Yes, you are not using dblink_error_message correctly. From the docs:
==================================================================
Name
dblink_error_message -- gets last error message on the named connection
Synopsis
dblink_error_message(text connname) RETURNS text
Inputs
connname
The specific connection name to use.
Outputs
Returns last error message.
Example usage
SELECT dblink_error_message('dtest1');
==================================================================
It requires a named connection, you are trying to use an anonymous one.
HTH,
Joe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mail@joeconway.com, Yuval_Sofer@bmc.com, danny_abraham@bmc.com
Subject: Re: cannot get error message after dblink_exec execution
In-Reply-To: <46C874C6.30603@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox