1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00
Files
postgres/doc/src/sgml
Tom Lane 83a5641945 Provide more-specific error details/hints for function lookup failures.
Up to now we've contented ourselves with a one-size-fits-all error
hint when we fail to find any match to a function or procedure call.
That was mostly okay in the beginning, but it was never great, and
since the introduction of named arguments it's really not adequate.
We at least ought to distinguish "function name doesn't exist" from
"function name exists, but not with those argument names".  And the
rules for named-argument matching are arcane enough that some more
detail seems warranted if we match the argument names but the call
still doesn't work.

This patch creates a framework for dealing with these problems:
FuncnameGetCandidates and related code will now pass back a bitmask of
flags showing how far the match succeeded.  This allows a considerable
amount of granularity in the reports.  The set-bits-in-a-bitmask
approach means that when there are multiple candidate functions, the
report will reflect the match(es) that got the furthest, which seems
correct.  Also, we can avoid mentioning "maybe add casts" unless
failure to match argument types is actually the issue.

Extend the same return-a-bitmask approach to OpernameGetCandidates.
The issues around argument names don't apply to operator syntax,
but it still seems worth distinguishing between "there is no
operator of that name" and "we couldn't match the argument types".

While at it, adjust these messages and related ones to more strictly
separate "detail" from "hint", following our message style guidelines'
distinction between those.

Reported-by: Dominique Devienne <ddevienne@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/1756041.1754616558@sss.pgh.pa.us
2025-09-16 12:17:02 -04:00
..
2025-07-01 10:19:52 +02:00
2025-07-01 10:19:52 +02:00
2025-04-04 12:27:04 -04:00
2025-04-07 00:03:18 +02:00
2025-03-25 21:40:00 +13:00
2025-01-01 11:21:55 -05:00
2023-10-25 09:40:55 +09:00
2025-07-30 09:51:45 +02:00
2025-07-17 00:21:18 +02:00
2025-06-29 22:28:10 -04:00
2025-06-29 22:28:10 -04:00
2024-03-17 13:58:59 +00:00
2025-09-06 07:49:51 +09:00
2025-07-01 10:19:52 +02:00
2023-11-06 15:18:04 +01:00
2025-01-01 11:21:55 -05:00
2025-06-16 11:43:52 +02:00
2025-02-26 09:49:59 +09:00

<!-- doc/src/sgml/README.non-ASCII -->

Representation of non-ASCII characters
--------------------------------------

Find non-ASCII characters using:

        grep --recursive --color='auto' -P '[\x80-\xFF]' .

Convert to HTML4 named entity (&) escapes
-----------------------------------------

We support several output formats:

*  html (supports all Unicode characters)
*  man (supports all Unicode characters)
*  pdf (supports only Latin-1 characters)
*  info

While some output formatting tools support all Unicode characters,
others only support Latin-1 characters.  Specifically, the PDF rendering
engine can only display Latin-1 characters;  non-Latin-1 Unicode
characters are displayed as "###".

Therefore, in the SGML files, we can only use Latin-1 characters.  We
can use UTF8 representations of Latin-1 characters, or HTML entities of
Latin-1 characters, e.g., &Aacute;lvaro.

Do not use UTF numeric character escapes (&#nnn;).

When building the PDF docs, problem characters will appear as warnings.

HTML entities
        official:      http://www.w3.org/TR/html4/sgml/entities.html
        one page:      http://www.zipcon.net/~swhite/docs/computers/browsers/entities_page.html
        other lists:   http://www.zipcon.net/~swhite/docs/computers/browsers/entities.html
                       http://www.zipcon.net/~swhite/docs/computers/browsers/entities_page.html
                       https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references