mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Run pgindent on the changes of the previous patch.
This step can be checked mechanically. Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com> Discussion: https://postgr.es/m/2976982.1748049023@sss.pgh.pa.us
This commit is contained in:
@ -875,8 +875,8 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res)
|
|||||||
is_sql_cmd = true;
|
is_sql_cmd = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* need a tuple descriptor representing one TEXT column to return
|
* need a tuple descriptor representing one TEXT column to return the
|
||||||
* the command status string as our result tuple
|
* command status string as our result tuple
|
||||||
*/
|
*/
|
||||||
tupdesc = CreateTemplateTupleDesc(1);
|
tupdesc = CreateTemplateTupleDesc(1);
|
||||||
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
|
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
|
||||||
|
@ -999,9 +999,9 @@ pgfdw_report_error(int elevel, PGresult *res, PGconn *conn,
|
|||||||
sqlstate = ERRCODE_CONNECTION_FAILURE;
|
sqlstate = ERRCODE_CONNECTION_FAILURE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we don't get a message from the PGresult, try the PGconn. This
|
* If we don't get a message from the PGresult, try the PGconn. This is
|
||||||
* is needed because for connection-level failures, PQgetResult may
|
* needed because for connection-level failures, PQgetResult may just
|
||||||
* just return NULL, not a PGresult at all.
|
* return NULL, not a PGresult at all.
|
||||||
*/
|
*/
|
||||||
if (message_primary == NULL)
|
if (message_primary == NULL)
|
||||||
message_primary = pchomp(PQerrorMessage(conn));
|
message_primary = pchomp(PQerrorMessage(conn));
|
||||||
|
@ -3617,9 +3617,9 @@ get_remote_estimate(const char *sql, PGconn *conn,
|
|||||||
pgfdw_report_error(ERROR, res, conn, sql);
|
pgfdw_report_error(ERROR, res, conn, sql);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extract cost numbers for topmost plan node. Note we search for a
|
* Extract cost numbers for topmost plan node. Note we search for a left
|
||||||
* left paren from the end of the line to avoid being confused by
|
* paren from the end of the line to avoid being confused by other uses of
|
||||||
* other uses of parentheses.
|
* parentheses.
|
||||||
*/
|
*/
|
||||||
line = PQgetvalue(res, 0, 0);
|
line = PQgetvalue(res, 0, 0);
|
||||||
p = strrchr(line, '(');
|
p = strrchr(line, '(');
|
||||||
@ -4332,8 +4332,8 @@ store_returning_result(PgFdwModifyState *fmstate,
|
|||||||
fmstate->temp_cxt);
|
fmstate->temp_cxt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The returning slot will not necessarily be suitable to store
|
* The returning slot will not necessarily be suitable to store heaptuples
|
||||||
* heaptuples directly, so allow for conversion.
|
* directly, so allow for conversion.
|
||||||
*/
|
*/
|
||||||
ExecForceStoreHeapTuple(newtup, slot, true);
|
ExecForceStoreHeapTuple(newtup, slot, true);
|
||||||
}
|
}
|
||||||
@ -5206,8 +5206,8 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
|
|||||||
PQclear(res);
|
PQclear(res);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine the fetch size. The default is arbitrary, but shouldn't
|
* Determine the fetch size. The default is arbitrary, but shouldn't be
|
||||||
* be enormous.
|
* enormous.
|
||||||
*/
|
*/
|
||||||
fetch_size = 100;
|
fetch_size = 100;
|
||||||
foreach(lc, server->options)
|
foreach(lc, server->options)
|
||||||
@ -5245,9 +5245,9 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
|
|||||||
CHECK_FOR_INTERRUPTS();
|
CHECK_FOR_INTERRUPTS();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX possible future improvement: if rowstoskip is large, we
|
* XXX possible future improvement: if rowstoskip is large, we could
|
||||||
* could issue a MOVE rather than physically fetching the rows,
|
* issue a MOVE rather than physically fetching the rows, then just
|
||||||
* then just adjust rowstoskip and samplerows appropriately.
|
* adjust rowstoskip and samplerows appropriately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Fetch some rows */
|
/* Fetch some rows */
|
||||||
@ -5438,23 +5438,21 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
|
|||||||
resetStringInfo(&buf);
|
resetStringInfo(&buf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fetch all table data from this schema, possibly restricted by
|
* Fetch all table data from this schema, possibly restricted by EXCEPT or
|
||||||
* EXCEPT or LIMIT TO. (We don't actually need to pay any attention
|
* LIMIT TO. (We don't actually need to pay any attention to EXCEPT/LIMIT
|
||||||
* to EXCEPT/LIMIT TO here, because the core code will filter the
|
* TO here, because the core code will filter the statements we return
|
||||||
* statements we return according to those lists anyway. But it
|
* according to those lists anyway. But it should save a few cycles to
|
||||||
* should save a few cycles to not process excluded tables in the
|
* not process excluded tables in the first place.)
|
||||||
* first place.)
|
|
||||||
*
|
*
|
||||||
* Import table data for partitions only when they are explicitly
|
* Import table data for partitions only when they are explicitly
|
||||||
* specified in LIMIT TO clause. Otherwise ignore them and only
|
* specified in LIMIT TO clause. Otherwise ignore them and only include
|
||||||
* include the definitions of the root partitioned tables to allow
|
* the definitions of the root partitioned tables to allow access to the
|
||||||
* access to the complete remote data set locally in the schema
|
* complete remote data set locally in the schema imported.
|
||||||
* imported.
|
|
||||||
*
|
*
|
||||||
* Note: because we run the connection with search_path restricted to
|
* Note: because we run the connection with search_path restricted to
|
||||||
* pg_catalog, the format_type() and pg_get_expr() outputs will always
|
* pg_catalog, the format_type() and pg_get_expr() outputs will always
|
||||||
* include a schema name for types/functions in other schemas, which
|
* include a schema name for types/functions in other schemas, which is
|
||||||
* is what we want.
|
* what we want.
|
||||||
*/
|
*/
|
||||||
appendStringInfoString(&buf,
|
appendStringInfoString(&buf,
|
||||||
"SELECT relname, "
|
"SELECT relname, "
|
||||||
@ -5595,8 +5593,7 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Add column_name option so that renaming the foreign table's
|
* Add column_name option so that renaming the foreign table's
|
||||||
* column doesn't break the association to the underlying
|
* column doesn't break the association to the underlying column.
|
||||||
* column.
|
|
||||||
*/
|
*/
|
||||||
appendStringInfoString(&buf, " OPTIONS (column_name ");
|
appendStringInfoString(&buf, " OPTIONS (column_name ");
|
||||||
deparseStringLiteral(&buf, attname);
|
deparseStringLiteral(&buf, attname);
|
||||||
@ -5631,9 +5628,9 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
|
|||||||
strcmp(PQgetvalue(res, i, 0), tablename) == 0);
|
strcmp(PQgetvalue(res, i, 0), tablename) == 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add server name and table-level options. We specify remote
|
* Add server name and table-level options. We specify remote schema
|
||||||
* schema and table name as options (the latter to ensure that
|
* and table name as options (the latter to ensure that renaming the
|
||||||
* renaming the foreign table doesn't break the association).
|
* foreign table doesn't break the association).
|
||||||
*/
|
*/
|
||||||
appendStringInfo(&buf, "\n) SERVER %s\nOPTIONS (",
|
appendStringInfo(&buf, "\n) SERVER %s\nOPTIONS (",
|
||||||
quote_identifier(server->servername));
|
quote_identifier(server->servername));
|
||||||
|
@ -291,8 +291,8 @@ libpqsrv_get_result_last(PGconn *conn, uint32 wait_event_info)
|
|||||||
break; /* query is complete, or failure */
|
break; /* query is complete, or failure */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Emulate PQexec()'s behavior of returning the last result when
|
* Emulate PQexec()'s behavior of returning the last result when there
|
||||||
* there are many.
|
* are many.
|
||||||
*/
|
*/
|
||||||
PQclear(lastResult);
|
PQclear(lastResult);
|
||||||
lastResult = result;
|
lastResult = result;
|
||||||
|
Reference in New Issue
Block a user