sf_hidden_query.patch
application/octet-stream
Filename: sf_hidden_query.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/bin/psql/command.c | 11 | 0 |
*** a/src/bin/psql/command.c
--- b/src/bin/psql/command.c
***************
*** 2554,2579 **** lookup_function_oid(PGconn *conn, const char *desc, Oid *foid)
static bool
get_create_function_cmd(PGconn *conn, Oid oid, PQExpBuffer buf)
{
! bool result = true;
PQExpBuffer query;
PGresult *res;
query = createPQExpBuffer();
printfPQExpBuffer(query, "SELECT pg_catalog.pg_get_functiondef(%u)", oid);
! res = PQexec(conn, query->data);
! if (PQresultStatus(res) == PGRES_TUPLES_OK && PQntuples(res) == 1)
! {
! resetPQExpBuffer(buf);
! appendPQExpBufferStr(buf, PQgetvalue(res, 0, 0));
! }
! else
{
! minimal_error_message(res);
! result = false;
}
- PQclear(res);
destroyPQExpBuffer(query);
return result;
--- 2554,2579 ----
static bool
get_create_function_cmd(PGconn *conn, Oid oid, PQExpBuffer buf)
{
! bool result = false;
PQExpBuffer query;
PGresult *res;
query = createPQExpBuffer();
printfPQExpBuffer(query, "SELECT pg_catalog.pg_get_functiondef(%u)", oid);
! res = PSQLexec(query->data, false);
! if (res)
{
! if (PQresultStatus(res) == PGRES_TUPLES_OK && PQntuples(res) == 1)
! {
! resetPQExpBuffer(buf);
! appendPQExpBufferStr(buf, PQgetvalue(res, 0, 0));
! result = true;
! }
!
! PQclear(res);
}
destroyPQExpBuffer(query);
return result;