Hi, For backward compatibility and some other reasons we want to use SQLCODE in our functions of PLPGSQL. But in Postgres Server 9.0 it gives error for SQLCODE. Is there any way to use SQLCODE in functions of PLPGSQL at the place of SQLSTATE? Also what is the datatype of SQLSTATE?