Re: ecpg - GRANT bug

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: ecpg - GRANT bug
Date: 2001-10-16 09:27:42
Message-ID: 15307.64910.421696.852199@elsick.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Lee Kindness writes:
> Patch below, it changes:
> 1. A number of mmerror(ET_ERROR) to mmerror(ET_NOTICE), passing on
> the (currently) unsupported options to the backend with warning.
> 2. Standardises warning messages in such cases.
> 3. Corrects typo in passing of 'CREATE FUNCTION/INOUT' parameter.

And the patch below corrects a pet peeve I have with ecpg, all errors
and warnings are output with a line number one less than reality...

Lee.

*** ./interfaces/ecpg/preproc/preproc.y.orig Tue Oct 16 10:19:27 2001
--- ./interfaces/ecpg/preproc/preproc.y Tue Oct 16 10:19:49 2001
***************
*** 36,49 ****
switch(type)
{
case ET_NOTICE:
! fprintf(stderr, "%s:%d: WARNING: %s\n", input_filename, yylineno, error);
break;
case ET_ERROR:
! fprintf(stderr, "%s:%d: ERROR: %s\n", input_filename, yylineno, error);
ret_value = PARSE_ERROR;
break;
case ET_FATAL:
! fprintf(stderr, "%s:%d: ERROR: %s\n", input_filename, yylineno, error);
exit(PARSE_ERROR);
}
}
--- 36,52 ----
switch(type)
{
case ET_NOTICE:
! fprintf(stderr, "%s:%d: WARNING: %s\n", input_filename,
! yylineno + 1, error);
break;
case ET_ERROR:
! fprintf(stderr, "%s:%d: ERROR: %s\n", input_filename,
! yylineno + 1, error);
ret_value = PARSE_ERROR;
break;
case ET_FATAL:
! fprintf(stderr, "%s:%d: ERROR: %s\n", input_filename,
! yylineno + 1, error);
exit(PARSE_ERROR);
}
}

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John Summerfield 2001-10-16 12:32:29 Re: SQLCODE==-209
Previous Message Lee Kindness 2001-10-16 09:16:38 Re: ecpg - GRANT bug

Browse pgsql-hackers by date

  From Date Subject
Next Message Lincoln Yeoh 2001-10-16 09:52:19 Re: Pre-forking backend
Previous Message Lee Kindness 2001-10-16 09:16:38 Re: ecpg - GRANT bug