pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Re: Problem on PostgreSQL (error code, store procedures) 2+ messages / 2 participants [nested] [flat]
* Re: Problem on PostgreSQL (error code, store procedures) @ 1970-01-01 00:00 Christoph Haller <ch@rodos.fzk.de> parent: Carmen Wai <carmen_wai@yahoo.com> 0 siblings, 0 replies; 2+ messages in thread From: Christoph Haller @ 1970-01-01 00:00 UTC (permalink / raw) To: carmen_wai@yahoo.com; +Cc: pgsql-sql > > I would like to know if there are any global variables > storing the error code or the number of rows affected > after each execution of the SQL statement. You did not mention which interface you are using. In C there are functions available like extern const char *PQcmdTuples(PGresult *res); to learn about the rows affected or extern int PQntuples(PGresult *res); to learn about the number of rows found (SELECT) or extern ExecStatusType PQresultStatus(PGresult *res); to learn about the status of the SQL command. Unfortunately, there are no error codes at all. In PL/pgSQL (which I do not use) I've found GET DIAGNOSTICS variable = ROW_COUNT ; refer to plpgsql-statements.html > > Also, for Postgresql function, I have checked that I > can only call the function by: select function(parms) > or by EXECUTE PROCEDURE function(parms) in the trigger > action. I wonder whether there is any other method for > calling the function which is similar to the stored > procedures in the MS SQL server? I'm afraid NO. Regards, Christoph ^ permalink raw reply [nested|flat] 2+ messages in thread
* Problem on PostgreSQL (error code, store procedures) @ 2002-07-06 06:45 Carmen Wai <carmen_wai@yahoo.com> 0 siblings, 1 reply; 2+ messages in thread From: Carmen Wai @ 2002-07-06 06:45 UTC (permalink / raw) To: pgadmin-support@postgresql.org; pgsql-sql; pgsql-general@postgresql.org Hello, I would like to know if there are any global variables storing the error code or the number of rows affected after each execution of the SQL statement. Also, for Postgresql function, I have checked that I can only call the function by: select function(parms) or by EXECUTE PROCEDURE function(parms) in the trigger action. I wonder whether there is any other method for calling the function which is similar to the stored procedures in the MS SQL server? Thank a lot! Carmen __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-07-06 06:45 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-07-06 06:45 Problem on PostgreSQL (error code, store procedures) Carmen Wai <carmen_wai@yahoo.com> 1970-01-01 00:00 ` Christoph Haller <ch@rodos.fzk.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox