Обсуждение: Equivalent function not found forERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
Equivalent function not found forERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
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.
Re: Equivalent function not found forERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
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
Re: Equivalent function not found forERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
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.
Re: Equivalent function not found for ERROR_PROCEDURE(),ERROR_LINE(),ERROR_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.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.
Re: Equivalent function not found forERROR_PROCEDURE(),ERROR_LINE(),ERROR_MESSAGE().
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.klaver@aklaver.com