Re: review: psql: edit function, show function commands patch
От | Tom Lane |
---|---|
Тема | Re: review: psql: edit function, show function commands patch |
Дата | |
Msg-id | 25003.1280630801@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: review: psql: edit function, show function commands patch (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > I took a look at this tonight and am a bit mystified by the following bit: > + /* > + * PL doesn't calculate first row of function's body > + * when first row is empty. So checks first row, and > + * correct lineno when it is necessary. > + */ > Is that true of any PL, or just some particular PL? plpgsql has an old bit of logic that deliberately ignores an initial newline in the function body: /*---------- * Hack: skip any initial newline, so that in the common coding layout * CREATE FUNCTION ...AS $$ * code body * $$ LANGUAGE plpgsql; * we will think "line 1" is what the programmer thinksof as line 1. *---------- */ if (*cur_line_start == '\r') cur_line_start++; if (*cur_line_start =='\n') cur_line_start++; None of the other standard PLs do that AFAIK. > Is it documented in our documentation? I don't think so. regards, tom lane
В списке pgsql-hackers по дате отправления: