diff options
| author | Tom Lane | 2003-07-24 17:52:50 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-07-24 17:52:50 +0000 |
| commit | 3ea9d0c475d9fb0375ba3ad07056c8124abe2309 (patch) | |
| tree | 32f9bc657c45339aaeed677d241fc0118dc07a07 /contrib/cube/buffer.c | |
| parent | 1bc361b3b4596980bf11f4247c9417ddf69220d0 (diff) | |
Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)
Diffstat (limited to 'contrib/cube/buffer.c')
| -rw-r--r-- | contrib/cube/buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/cube/buffer.c b/contrib/cube/buffer.c index bab7ae303c..3a1b728812 100644 --- a/contrib/cube/buffer.c +++ b/contrib/cube/buffer.c @@ -2,8 +2,6 @@ #include "postgres.h" -#include "utils/elog.h" - static char *PARSE_BUFFER; static char *PARSE_BUFFER_PTR; static unsigned int PARSE_BUFFER_SIZE; @@ -26,7 +24,10 @@ set_parse_buffer(char *s) PARSE_BUFFER = s; PARSE_BUFFER_SIZE = strlen(s); if (PARSE_BUFFER_SIZE == 0) - elog(ERROR, "cube_in: can't parse an empty string"); + ereport(ERROR, + (errcode(ERRCODE_ZERO_LENGTH_CHARACTER_STRING), + errmsg("can't parse an empty string"))); + PARSE_BUFFER_PTR = PARSE_BUFFER; SCANNER_POS = 0; } |
