From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | meskes(at)online-club(dot)de (Dr(dot) Michael Meskes) |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Bug in gram.y? |
Date: | 1998-08-04 17:37:30 |
Message-ID: | 199808041737.NAA09615@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Mon, Aug 03, 1998 at 02:19:44PM -0400, Bruce Momjian wrote:
> > Looks fine to me:
> >
> > opt_database1: LOCATION '=' location { $$ = $3; }
> > | /*EMPTY*/ { $$ = NULL; }
> > ;
> >
> > opt_database2: ENCODING '=' encoding { $$ = $3; }
> > | /*EMPTY*/ { $$ = NULL; }
> > ;
>
> Yes, but check the code under CreatedbStmt:
>
> n->dbpath = $5;
> #ifdef MULTIBYTE
> if ($6 != NULL) {
> n->encoding = pg_char_to_encoding($6);
> if (n->encoding < 0) {
> elog(ERROR, "invalid encoding name %s", $6);
> }
> } else {
> n->encoding = GetTemplateEncoding();
> }
> #else
> elog(ERROR, "WITH ENCODING is not supported");
> #endif
> $$ = (Node *)n;
>
>
> If you have undefined MULTIBYTE you will get the WITH ENCODING error message
> despite the command being legal even without this option.
Good point. I have changed it to:
> } else {
> n->encoding = GetTemplateEncoding();
> }
> #else
> if ($6 != NULL)
^^^^^^^^^^^^^^^
> elog(ERROR, "WITH ENCODING is not supported");
> #endif
> $$ = (Node *)n;
--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
From | Date | Subject | |
---|---|---|---|
Next Message | Dr. Michael Meskes | 1998-08-04 17:49:55 | Standards question |
Previous Message | Dr. Michael Meskes | 1998-08-04 17:12:09 | Standards question |