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

Function unpack_sql_state

src/backend/utils/error/elog.c:3619–3633  ·  view source on GitHub ↗

* Unpack MAKE_SQLSTATE code. Note that this returns a pointer to a * static buffer. */

Source from the content-addressed store, hash-verified

3617 * static buffer.
3618 */
3619char *
3620unpack_sql_state(int sql_state)
3621{
3622 static char buf[12];
3623 int i;
3624
3625 for (i = 0; i < 5; i++)
3626 {
3627 buf[i] = PGUNSIXBIT(sql_state);
3628 sql_state >>= 6;
3629 }
3630
3631 buf[i] = '\0';
3632 return buf;
3633}
3634
3635#define WRITE_PIPE_CHUNK_TIMEOUT 1000
3636

Callers 10

log_line_prefixFunction · 0.70
write_csvlogFunction · 0.70
write_syslogger_in_csvFunction · 0.70
exec_stmt_blockFunction · 0.50
exec_stmt_getdiagFunction · 0.50
exec_stmt_raiseFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected