I am transitioning from MS-SQL to Postgresql. In
evaluting how to bring over MS-SQL Stored Procedures,
I have looked at the CREATE FUNCTION capability of pg.
I have a few questions
(A) does pg support IF/THEN/ELSE logic in the
created functions? I have not seen it anywhere.
(B) does pg support anything like @@ERROR? For instance,
I want the next sql line in the function to be
different depending of the result of the last.
Any tips are appreciated.