Re: [HACKERS] Parser bug (?)

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] Parser bug (?)
Дата
Msg-id 3673C1BA.BFDA7A8F@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: [HACKERS] Parser bug (?)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
> Is this fixed?

No, not yet. Put it on the "show stopper" list for v6.4.1...

The explanation is that CHAR is a "keyword" so is passed from the
scanner to the parser explicitly, which then makes sure that the various
legal forms of char type declarations get translated into the internal
bpchar type. 

However, tokens surrounded by double quotes are passed as IDENTs, which
bypasses this mechanism completely.

I'll look at modifying pg_dump to leave out the double quotes on type
fields unless there is mixed or upper case. Also, I'll look at having
some automatic conversions between bpchar and char (though this might
not be available for v6.4.1 since it may require catalog changes).
                 - Tom

> > This looks like a parser bug in 6.4.  I found it while trying to run
> > pg_upgrade:
> > bray=> create table junk ("singleton" "char" default 'M');
> > ERROR:  DEFAULT: const type mismatched
> > pg_dump puts all type names in double quotes, which triggers this 
> > bug when pg_upgrade is run, with the result that the upgrade fails.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] ecpg man page
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] memory destruction in 6.4