MCPcopy Create free account
hub / github.com/apache/cloudberry / PQerrorMessage

Function PQerrorMessage

src/interfaces/libpq/fe-connect.c:6985–7000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6983}
6984
6985char *
6986PQerrorMessage(const PGconn *conn)
6987{
6988 if (!conn)
6989 return libpq_gettext("connection pointer is NULL\n");
6990
6991 /*
6992 * The errorMessage buffer might be marked "broken" due to having
6993 * previously failed to allocate enough memory for the message. In that
6994 * case, tell the application we ran out of memory.
6995 */
6996 if (PQExpBufferBroken(&conn->errorMessage))
6997 return libpq_gettext("out of memory\n");
6998
6999 return conn->errorMessage.data;
7000}
7001
7002/*
7003 * In Windows, socket values are unsigned, and an invalid socket value

Callers 15

GetConnectionFunction · 0.85
connect_pg_serverFunction · 0.85
pgfdw_report_errorFunction · 0.85
vacuumloFunction · 0.85
pg_attribute_noreturnFunction · 0.85
dblink_get_connFunction · 0.85
dblink_connectFunction · 0.85
dblink_send_queryFunction · 0.85
storeQueryResultFunction · 0.85
dblink_error_messageFunction · 0.85
dblink_res_errorFunction · 0.85
sql_connFunction · 0.85

Calls 1

libpq_gettextFunction · 0.85

Tested by 15

mainFunction · 0.68
run_permutationFunction · 0.68
try_complete_stepFunction · 0.68
escape_literalFunction · 0.68
escape_identifierFunction · 0.68
escape_string_connFunction · 0.68
test_one_vectorFunction · 0.68
mainFunction · 0.68
test_multi_pipelinesFunction · 0.68
test_nosyncFunction · 0.68
test_pipeline_abortFunction · 0.68