1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Check number of parameters in RAISE statement at compile time.

The number of % parameter markers in RAISE statement should match the number
of parameters given. We used to check that at execution time, but we have
all the information needed at compile time, so let's check it at compile
time instead. It's generally better to find mistakes earlier.

Marko Tiikkaja, reviewed by Fabien Coelho
This commit is contained in:
Heikki Linnakangas
2014-09-02 15:53:06 +03:00
parent f8f4227976
commit c1008f0037
5 changed files with 68 additions and 17 deletions

View File

@ -3403,6 +3403,9 @@ RAISE ;
Inside the format string, <literal>%</literal> is replaced by the
string representation of the next optional argument's value. Write
<literal>%%</literal> to emit a literal <literal>%</literal>.
The number of arguments must match the number of <literal>%</>
placeholders in the format string, or an error is raised during
the compilation of the function.
</para>
<para>