|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "common/hashfn.h"#include "fmgr.h"#include "funcapi.h"#include "pg_stash_advice.h"#include "utils/builtins.h"#include "utils/tuplestore.h"#include "lib/simplehash.h"
Go to the source code of this file.
Data Structures | |
| struct | pgsa_stash_count |
Macros | |
| #define | SH_PREFIX pgsa_stash_count_table |
| #define | SH_ELEMENT_TYPE pgsa_stash_count |
| #define | SH_KEY_TYPE uint64 |
| #define | SH_KEY pgsa_stash_id |
| #define | SH_HASH_KEY(tb, key) hash_bytes((const unsigned char *) &(key), sizeof(uint64)) |
| #define | SH_EQUAL(tb, a, b) (a == b) |
| #define | SH_SCOPE static inline |
| #define | SH_DEFINE |
| #define | SH_DECLARE |
Typedefs | |
| typedef struct pgsa_stash_count | pgsa_stash_count |
| #define SH_DECLARE |
Definition at line 42 of file stashfuncs.c.
| #define SH_DEFINE |
Definition at line 41 of file stashfuncs.c.
| #define SH_ELEMENT_TYPE pgsa_stash_count |
Definition at line 35 of file stashfuncs.c.
Definition at line 38 of file stashfuncs.c.
| #define SH_KEY pgsa_stash_id |
Definition at line 37 of file stashfuncs.c.
Definition at line 36 of file stashfuncs.c.
| #define SH_PREFIX pgsa_stash_count_table |
Definition at line 34 of file stashfuncs.c.
Definition at line 40 of file stashfuncs.c.
| Datum pg_create_advice_stash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 49 of file stashfuncs.c.
References fb(), pgsa_shared_state::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_TEXT_PP, PG_RETURN_VOID, pgsa_attach(), pgsa_check_stash_name(), pgsa_create_stash(), pgsa_entry_dshash, pgsa_state, text_to_cstring(), and unlikely.
| Datum pg_drop_advice_stash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 66 of file stashfuncs.c.
References fb(), pgsa_shared_state::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_TEXT_PP, PG_RETURN_VOID, pgsa_attach(), pgsa_check_stash_name(), pgsa_drop_stash(), pgsa_entry_dshash, pgsa_state, text_to_cstring(), and unlikely.
| PG_FUNCTION_INFO_V1 | ( | pg_create_advice_stash | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_drop_advice_stash | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_get_advice_stash_contents | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_get_advice_stashes | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_set_stashed_advice | ) |
| Datum pg_get_advice_stash_contents | ( | PG_FUNCTION_ARGS | ) |
Definition at line 142 of file stashfuncs.c.
References pgsa_entry::advice_string, Assert, CStringGetTextDatum, CurrentMemoryContext, dsa_get_address(), dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), ereport, errcode(), errmsg, ERROR, fb(), InitMaterializedSRF(), Int64GetDatum(), InvalidDsaPointer, pgsa_entry::key, pgsa_stash_name::name, PG_ARGISNULL, PG_GETARG_TEXT_PP, pgsa_attach(), pgsa_check_stash_name(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_lookup_stash_id(), pgsa_stash_dshash, pgsa_entry_key::pgsa_stash_id, psprintf(), pstrdup(), pgsa_entry_key::queryId, text_to_cstring(), tuplestore_putvalues(), unlikely, and values.
| Datum pg_get_advice_stashes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 83 of file stashfuncs.c.
References CStringGetTextDatum, CurrentMemoryContext, dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), fb(), InitMaterializedSRF(), Int64GetDatum(), pgsa_entry::key, pgsa_attach(), pgsa_entry_dshash, pgsa_stash_dshash, pgsa_entry_key::pgsa_stash_id, tuplestore_putvalues(), unlikely, and values.
| Datum pg_set_stashed_advice | ( | PG_FUNCTION_ARGS | ) |
Definition at line 262 of file stashfuncs.c.
References ereport, errcode(), errmsg, ERROR, fb(), pgsa_shared_state::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), PG_ARGISNULL, PG_GETARG_INT64, PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_VOID, pgsa_attach(), pgsa_check_stash_name(), pgsa_clear_advice_string(), pgsa_entry_dshash, pgsa_set_advice_string(), pgsa_state, text_to_cstring(), and unlikely.