Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2
От | Tom Lane |
---|---|
Тема | Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2 |
Дата | |
Msg-id | 12752.1242928379@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2 (Steve Prentice <prentice@cisco.com>) |
Ответы |
Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v3
Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2 |
Список | pgsql-hackers |
Steve Prentice <prentice@cisco.com> writes: > This patch is intended to supplement Pavel's patch for named and mixed > notation support in 8.5. This patch makes it so a plpgsql function can > call another function with the same parameter names using the named > parameters notation. Well, plpgsql's parsing has always been a kluge, but I think this is really taking the kluge level a step too far. It's only because AS is used in so few contexts that this can even pretend to work --- but there are still an awful lot of contexts where AS is used, and will likely be more in the future. So I think it's pretty un-future-proof; and it certainly won't scale to any other contexts where we might wish that plpsql variables don't get substituted. It's probably time to bite the bullet and redo the parser as has been suggested in the past, ie fix things so that the main parser is used. Ideally I'd like to switch the name resolution priority to be more Oracle-like, but even if we don't do that it would be a great improvement to have actual syntactic knowledge behind the lookups. Just for the record, you'd have to put the same kluge into the T_RECORD and T_ROW cases if we wanted to do it like this. regards, tom lane
В списке pgsql-hackers по дате отправления: