Thread: strange context message in spi.c?
Hi
I am found strange switch:
<--><-->switch (carg->mode)
<--><-->{
<--><--><-->case RAW_PARSE_PLPGSQL_EXPR:
<--><--><--><-->errcontext("SQL expression \"%s\"", query);
<--><--><--><-->break;
<--><--><-->case RAW_PARSE_PLPGSQL_ASSIGN1:
<--><--><-->case RAW_PARSE_PLPGSQL_ASSIGN2:
<--><--><-->case RAW_PARSE_PLPGSQL_ASSIGN3:
<--><--><--><-->errcontext("PL/pgSQL assignment \"%s\"", query);
<--><--><--><-->break;
<--><--><-->default:
<--><--><--><-->errcontext("SQL statement \"%s\"", query);
<--><--><--><-->break;
<--><-->}
<--><-->{
<--><--><-->case RAW_PARSE_PLPGSQL_EXPR:
<--><--><--><-->errcontext("SQL expression \"%s\"", query);
<--><--><--><-->break;
<--><--><-->case RAW_PARSE_PLPGSQL_ASSIGN1:
<--><--><-->case RAW_PARSE_PLPGSQL_ASSIGN2:
<--><--><-->case RAW_PARSE_PLPGSQL_ASSIGN3:
<--><--><--><-->errcontext("PL/pgSQL assignment \"%s\"", query);
<--><--><--><-->break;
<--><--><-->default:
<--><--><--><-->errcontext("SQL statement \"%s\"", query);
<--><--><--><-->break;
<--><-->}
Is the message "SQL expression ..." for RAW_PLPGSQL_EXPR correct?
Should there be a "PL/pgSQL expression" instead?
Regards
Pavel
> On 13 Jun 2024, at 19:21, Pavel Stehule <pavel.stehule@gmail.com> wrote: > Is the message "SQL expression ..." for RAW_PLPGSQL_EXPR correct? That indeed seems incorrect. > Should there be a "PL/pgSQL expression" instead? I think that would make more sense. -- Daniel Gustafsson
Hi
čt 13. 6. 2024 v 20:56 odesílatel Daniel Gustafsson <daniel@yesql.se> napsal:
> On 13 Jun 2024, at 19:21, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> Is the message "SQL expression ..." for RAW_PLPGSQL_EXPR correct?
That indeed seems incorrect.
> Should there be a "PL/pgSQL expression" instead?
I think that would make more sense.
here is the patch
Regards
Pavel
--
Daniel Gustafsson
Attachment
Hi! Looks good to me!
Best regards, Stepan Neretin.
Best regards, Stepan Neretin.
> On 24 Jun 2024, at 11:14, Stepan Neretin <sncfmgg@gmail.com> wrote: > > Hi! Looks good to me! Thanks for review. I have this on my TODO for when the tree branches, it doesn't seem like anything worth squeezing in before then. -- Daniel Gustafsson