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