1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Be more consistent about reporting SPI errors in the various PLs.

Create a shared function to convert a SPI error code into a string
(replacing near-duplicate code in several PLs), and use it anywhere
that a SPI function call error is reported.
This commit is contained in:
Tom Lane
2004-07-31 20:55:45 +00:00
parent da4a0dab59
commit ad4d2e9711
7 changed files with 137 additions and 225 deletions

View File

@ -2,7 +2,7 @@
*
* spi.h
*
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.45 2004/07/01 00:51:41 tgl Exp $
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.46 2004/07/31 20:55:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -93,6 +93,7 @@ extern int SPI_freeplan(void *plan);
extern Oid SPI_getargtypeid(void *plan, int argIndex);
extern int SPI_getargcount(void *plan);
extern bool SPI_is_cursor_plan(void *plan);
extern const char *SPI_result_code_string(int code);
extern HeapTuple SPI_copytuple(HeapTuple tuple);
extern HeapTupleHeader SPI_returntuple(HeapTuple tuple, TupleDesc tupdesc);