Thread: strange context message in spi.c?

strange context message in spi.c?

From
Pavel Stehule
Date:
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;
<--><-->}

Is the message "SQL expression ..." for RAW_PLPGSQL_EXPR correct?

Should there  be a "PL/pgSQL expression" instead?

Regards

Pavel

Re: strange context message in spi.c?

From
Daniel Gustafsson
Date:
> 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




Re: strange context message in spi.c?

From
Pavel Stehule
Date:
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

Re: strange context message in spi.c?

From
Stepan Neretin
Date:
Hi! Looks good to me! 
Best regards, Stepan Neretin.

Re: strange context message in spi.c?

From
Daniel Gustafsson
Date:
> 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




Re: strange context message in spi.c?

From
Umar Hayat
Date:
The following review has been posted through the commitfest application:
make installcheck-world:  tested, failed
Implements feature:       tested, failed
Spec compliant:           tested, failed
Documentation:            tested, failed

As tree is branched out for PG17, I guess now it's time to commit.
- No need to rebase
- make, make-check , install-check verified

The new status of this patch is: Ready for Committer

Re: strange context message in spi.c?

From
Peter Eisentraut
Date:
On 03.08.24 07:43, Umar Hayat wrote:
> The following review has been posted through the commitfest application:
> make installcheck-world:  tested, failed
> Implements feature:       tested, failed
> Spec compliant:           tested, failed
> Documentation:            tested, failed
> 
> As tree is branched out for PG17, I guess now it's time to commit.
> - No need to rebase
> - make, make-check , install-check verified
> 
> The new status of this patch is: Ready for Committer

committed