diff options
| author | Tom Lane | 2004-07-31 07:39:21 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-07-31 07:39:21 +0000 |
| commit | beda4814c12d8dc8dc455cb96f0b1055fb149ecb (patch) | |
| tree | 968f682e5a52be375ff0684bac85c87a968c0544 /src/include | |
| parent | b5d2821929e69ef1c8a690d886e12b1ef8498a3b (diff) | |
plpgsql does exceptions.
There are still some things that need refinement; in particular I fear
that the recognized set of error condition names probably has little in
common with what Oracle recognizes. But it's a start.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/xact.h | 6 | ||||
| -rw-r--r-- | src/include/utils/errcodes.h | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 7bf92b0153..532dcf51b0 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.67 2004/07/27 05:11:24 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.68 2004/07/31 07:39:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -107,7 +107,9 @@ extern void UserAbortTransactionBlock(void); extern void ReleaseSavepoint(List *options); extern void DefineSavepoint(char *name); extern void RollbackToSavepoint(List *options); -extern void RollbackAndReleaseSavepoint(List *options); +extern void BeginInternalSubTransaction(char *name); +extern void ReleaseCurrentSubTransaction(void); +extern void RollbackAndReleaseCurrentSubTransaction(void); extern bool IsSubTransaction(void); extern bool IsTransactionBlock(void); extern bool IsTransactionOrTransactionBlock(void); diff --git a/src/include/utils/errcodes.h b/src/include/utils/errcodes.h index f3ac7f6c0b..a695b90a2e 100644 --- a/src/include/utils/errcodes.h +++ b/src/include/utils/errcodes.h @@ -11,7 +11,7 @@ * * Copyright (c) 2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/utils/errcodes.h,v 1.13 2004/07/27 05:11:35 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/errcodes.h,v 1.14 2004/07/31 07:39:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -326,6 +326,10 @@ #define ERRCODE_CONFIG_FILE_ERROR MAKE_SQLSTATE('F','0', '0','0','0') #define ERRCODE_LOCK_FILE_EXISTS MAKE_SQLSTATE('F','0', '0','0','1') +/* Class P0 - PL/pgSQL Error (PostgreSQL-specific error class) */ +#define ERRCODE_PLPGSQL_ERROR MAKE_SQLSTATE('P','0', '0','0','0') +#define ERRCODE_RAISE_EXCEPTION MAKE_SQLSTATE('P','0', '0','0','1') + /* Class XX - Internal Error (PostgreSQL-specific error class) */ /* (this is for "can't-happen" conditions and software bugs) */ #define ERRCODE_INTERNAL_ERROR MAKE_SQLSTATE('X','X', '0','0','0') |
