Re: Equivalent function not found for ERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Equivalent function not found for ERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
Date: 2017-03-28 19:48:46
Message-ID: 70d46dcd-8dae-4c0f-fffa-0488b02b38f2@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/27/2017 3:59 AM, MAJUMDER, SAYAN wrote:
>
> I am new to postgresql and presently we are migrating from sql server
> to postgresql.
>
> We have certain functions in sql server such as
> ERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE(). I am unable to find
> any equivalent
>
> functions in postgresql. Kindly help me. Thanks in advance. Its urgent.
>

I'm not familiar with those functions in Microsoft SQL Server, however
see the various result functions in
https://www.postgresql.org/docs/current/static/libpq-exec.html such as
PQresultStatus, PQresultErrorMessage, PQresultErrorField, etc, to get
the error results of a query executed via the standard libpq API.

If you are using a different API to access postgres, then you'd need to
look into that API's error return functions.

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2017-03-28 19:51:25 Re: Equivalent function not found for ERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
Previous Message Tom Lane 2017-03-28 18:23:58 Re: Issue in autovacuum