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

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Equivalent function not found for ERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
Date: 2017-03-28 20:27:03
Message-ID: 6417ebbe-f0a3-ff81-ba11-2416a801caab@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/28/2017 12:51 PM, Rob Sargent wrote:
> On 03/27/2017 04:59 AM, MAJUMDER, SAYAN wrote:
>>
>> Hi,
>>
>> 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.
>>
>>
>>
>> Thanks and regards,
>>
>> Sayan Majumder.
>>
>>
>>
>> This message contains information that may be privileged or
>> confidential and is the property of the Capgemini Group. It is
>> intended only for the person to whom it is addressed. If you are not
>> the intended recipient, you are not authorized to read, print, retain,
>> copy, disseminate, distribute, or use this message or any part
>> thereof. If you receive this message in error, please notify the
>> sender immediately and delete all copies of this message.
>>
>
> Seems you didn't like the "RAISE" option you were given on Stack
> Overflow. You might explain what those functions do to allow postgres
> people to recognize any potential match.

The SQL Server functions:

https://docs.microsoft.com/en-us/sql/t-sql/functions/error-procedure-transact-sql

which at a quick look seem to be a combination of:

https://www.postgresql.org/docs/9.6/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

and

https://www.postgresql.org/docs/9.6/static/plpgsql-errors-and-messages.html

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Giuseppe Sacco 2017-03-29 07:25:08 Using relations in the SELECT part
Previous Message Adrian Klaver 2017-03-28 20:19:47 Re: [REQUEST] Change Windows standard distribution to Visual Studio 2015 for PostgreSQL 10 and later