strange context message in spi.c?

Started by Pavel Stehulealmost 2 years ago7 messageshackers
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

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

#2Daniel Gustafsson
daniel@yesql.se
In reply to: Pavel Stehule (#1)
Re: strange context message in spi.c?

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

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Daniel Gustafsson (#2)
Re: strange context message in spi.c?

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

Show quoted text

--
Daniel Gustafsson

Attachments:

0001-fix-mesleading-info-about-expression-context.patchtext/x-patch; charset=US-ASCII; name=0001-fix-mesleading-info-about-expression-context.patchDownload+9-10
#4Stepan Neretin
sncfmgg@gmail.com
In reply to: Pavel Stehule (#3)
Re: strange context message in spi.c?

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

#5Daniel Gustafsson
daniel@yesql.se
In reply to: Stepan Neretin (#4)
Re: strange context message in spi.c?

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

#6Umar Hayat
postgresql.wizard@gmail.com
In reply to: Daniel Gustafsson (#5)
Re: strange context message in spi.c?

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

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Umar Hayat (#6)
Re: strange context message in spi.c?

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