diff options
Diffstat (limited to 'src/include/utils/elog.h')
| -rw-r--r-- | src/include/utils/elog.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index e9f2b0e879..4a2d26ddb9 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.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/utils/elog.h,v 1.71 2004/07/31 00:45:43 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.72 2004/07/31 23:04:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -61,6 +61,10 @@ (PGSIXBIT(ch1) + (PGSIXBIT(ch2) << 6) + (PGSIXBIT(ch3) << 12) + \ (PGSIXBIT(ch4) << 18) + (PGSIXBIT(ch5) << 24)) +/* These macros depend on the fact that '0' becomes a zero in SIXBIT */ +#define ERRCODE_TO_CATEGORY(ec) ((ec) & ((1 << 12) - 1)) +#define ERRCODE_IS_CATEGORY(ec) (((ec) & ~((1 << 12) - 1)) == 0) + /* SQLSTATE codes for errors are defined in a separate file */ #include "utils/errcodes.h" |
