Compare commits

...

2 Commits

Author SHA1 Message Date
Peter Eisentraut
541e8f14a1 Fix variable name and comment
Should match the name of the related GUC variable.

Discussion: https://www.postgresql.org/message-id/da4a680a-5d8a-4663-a5c8-a3ccbf23394a@eisentraut.org
2023-12-28 17:25:47 +01:00
Michael Paquier
f246c48ac4 doc: Mention AttributeRelationId in FDW validator function description
The documentation has been missing one value in the list of catalog OIDs
that can be given to the validator function of a FDW, as of
AttributeRelationId, when changing the attribute options of a foreign
table.

Author: Ian Lawrence Barwick
Discussion: https://postgr.es/m/CAB8KJ=i16t2yJU_Pq2Z+hnNGWFhagp_bJmzxHZu3ZkOjZm-+rQ@mail.gmail.com
Backpatch-through: 12
2023-12-28 20:09:12 +09:00
2 changed files with 16 additions and 13 deletions

View File

@ -67,13 +67,16 @@
foreign tables using the wrapper.
The validator function must be registered as taking two arguments, a
text array containing the options to be validated, and an OID
representing the type of object the options are associated with (in
the form of the OID of the system catalog the object would be stored
in, either
<literal>ForeignDataWrapperRelationId</literal>,
<literal>ForeignServerRelationId</literal>,
<literal>UserMappingRelationId</literal>,
or <literal>ForeignTableRelationId</literal>).
representing the type of object the options are associated with. The
latter corresponds to the OID of the system catalog the object
would be stored in, one of:
<itemizedlist spacing="compact">
<listitem><para><literal>AttributeRelationId</literal></para></listitem>
<listitem><para><literal>ForeignDataWrapperRelationId</literal></para></listitem>
<listitem><para><literal>ForeignServerRelationId</literal></para></listitem>
<listitem><para><literal>ForeignTableRelationId</literal></para></listitem>
<listitem><para><literal>UserMappingRelationId</literal></para></listitem>
</itemizedlist>
If no validator function is supplied, options are not checked at object
creation time or object alteration time.
</para>

View File

@ -115,8 +115,8 @@ char *Log_destination_string = NULL;
bool syslog_sequence_numbers = true;
bool syslog_split_messages = true;
/* Processed form of backtrace_symbols GUC */
static char *backtrace_symbol_list;
/* Processed form of backtrace_functions GUC */
static char *backtrace_function_list;
#ifdef HAVE_SYSLOG
@ -831,13 +831,13 @@ matches_backtrace_functions(const char *funcname)
{
const char *p;
if (!backtrace_symbol_list || funcname == NULL || funcname[0] == '\0')
if (!backtrace_function_list || funcname == NULL || funcname[0] == '\0')
return false;
p = backtrace_symbol_list;
p = backtrace_function_list;
for (;;)
{
if (*p == '\0') /* end of backtrace_symbol_list */
if (*p == '\0') /* end of backtrace_function_list */
break;
if (strcmp(funcname, p) == 0)
@ -2180,7 +2180,7 @@ check_backtrace_functions(char **newval, void **extra, GucSource source)
void
assign_backtrace_functions(const char *newval, void *extra)
{
backtrace_symbol_list = (char *) extra;
backtrace_function_list = (char *) extra;
}
/*