Обсуждение: Patch for Re: [HACKERS] Bug of PL/pgSQL parser
I send a simple patch for PL/pgSQL parser which allow now to use whitespaces in identifers of any kind(table names,attributenames,variables ...) in Pl/pgSQL procedural language.Explicit definition of bug can be found in Re: [HACKERS] Bug of PL/pgSQL parser
I assume this completes the TODO item: o Fix PL/PgSQL to handle quoted mixed-case identifiers It is quite a bit of lex code, but I assume it was required. No one else was able to fix this item. Your patch has been added to the PostgreSQL unapplied patches list at: http://candle.pha.pa.us/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --------------------------------------------------------------------------- eutm wrote: > I send a simple patch for PL/pgSQL parser which allow now to use whitespaces in identifers of any kind(table names,attributenames,variables ...) in Pl/pgSQL procedural language.Explicit definition of bug can be found in > Re: [HACKERS] Bug of PL/pgSQL parser > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes: > I assume this completes the TODO item: > o Fix PL/PgSQL to handle quoted mixed-case identifiers It would if it worked, but it doesn't --- for one thing, it seems to allow empty identifiers (surely {DQUOTE}* should be {DQUOTE}+). I'm not convinced it parses identifiers the same as the main scanner does anyway. Why not just lift the flex code for identifiers out of parser/scan.l? regards, tom lane
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > I assume this completes the TODO item: > > o Fix PL/PgSQL to handle quoted mixed-case identifiers > > It would if it worked, but it doesn't --- for one thing, it seems > to allow empty identifiers (surely {DQUOTE}* should be {DQUOTE}+). > I'm not convinced it parses identifiers the same as the main scanner > does anyway. Why not just lift the flex code for identifiers > out of parser/scan.l? I would love to know why doing this TODO item is so hard. Every time I ask Jan, he says it is very hard and it never gets done. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes: > I would love to know why doing this TODO item is so hard. Every time I > ask Jan, he says it is very hard and it never gets done. It doesn't look that hard to me, but I haven't tried yet ... regards, tom lane