PostgreSQL Source Code  git master
libpq_pipeline.c File Reference
#include "postgres_fe.h"
#include <sys/select.h>
#include <sys/time.h>
#include "catalog/pg_type_d.h"
#include "common/fe_memutils.h"
#include "libpq-fe.h"
#include "pg_getopt.h"
#include "portability/instr_time.h"
Include dependency graph for libpq_pipeline.c:

Go to the source code of this file.

Macros

#define pg_debug(...)
 
#define MAXINTLEN   12
 
#define MAXINT8LEN   20
 
#define pg_fatal(...)   pg_fatal_impl(__LINE__, __VA_ARGS__)
 

Enumerations

enum  PipelineInsertStep {
  BI_BEGIN_TX , BI_DROP_TABLE , BI_CREATE_TABLE , BI_PREPARE ,
  BI_INSERT_ROWS , BI_COMMIT_TX , BI_SYNC , BI_DONE
}
 

Functions

static void exit_nicely (PGconn *conn)
 
static void pg_attribute_noreturn () pg_fatal_impl(int line
 
static void const char pg_attribute_printf (2, 3)
 
static bool process_result (PGconn *conn, PGresult *res, int results, int numsent)
 
static void const char fflush (stdout)
 
 fprintf (stderr, "\n%s:%d: ", progname, line)
 
 va_start (args, fmt)
 
 vfprintf (stderr, fmt, args)
 
 va_end (args)
 
 Assert (fmt[strlen(fmt) - 1] !='\n')
 
 fprintf (stderr, "\n")
 
 exit (1)
 
static void test_disallowed_in_pipeline (PGconn *conn)
 
static void test_multi_pipelines (PGconn *conn)
 
static void test_nosync (PGconn *conn)
 
static void test_pipeline_abort (PGconn *conn)
 
static void test_pipelined_insert (PGconn *conn, int n_rows)
 
static void test_prepared (PGconn *conn)
 
static void notice_processor (void *arg, const char *message)
 
static void test_pipeline_idle (PGconn *conn)
 
static void test_simple_pipeline (PGconn *conn)
 
static void test_singlerowmode (PGconn *conn)
 
static void test_transaction (PGconn *conn)
 
static void test_uniqviol (PGconn *conn)
 
static void usage (const char *progname)
 
static void print_test_list (void)
 
int main (int argc, char **argv)
 

Variables

static void const char * fmt
 
const char *const progname = "libpq_pipeline"
 
char * tracefile = NULL
 
static const char *const drop_table_sql
 
static const char *const create_table_sql
 
static const char *const insert_sql
 
static const char *const insert_sql2
 

Macro Definition Documentation

◆ MAXINT8LEN

#define MAXINT8LEN   20

Definition at line 58 of file libpq_pipeline.c.

◆ MAXINTLEN

#define MAXINTLEN   12

Definition at line 57 of file libpq_pipeline.c.

◆ pg_debug

#define pg_debug (   ...)

Definition at line 43 of file libpq_pipeline.c.

◆ pg_fatal

#define pg_fatal (   ...)    pg_fatal_impl(__LINE__, __VA_ARGS__)

Definition at line 70 of file libpq_pipeline.c.

Enumeration Type Documentation

◆ PipelineInsertStep

Enumerator
BI_BEGIN_TX 
BI_DROP_TABLE 
BI_CREATE_TABLE 
BI_PREPARE 
BI_INSERT_ROWS 
BI_COMMIT_TX 
BI_SYNC 
BI_DONE 

Definition at line 633 of file libpq_pipeline.c.

634 {
635  BI_BEGIN_TX,
638  BI_PREPARE,
640  BI_COMMIT_TX,
641  BI_SYNC,
642  BI_DONE
643 };
@ BI_INSERT_ROWS
@ BI_BEGIN_TX
@ BI_CREATE_TABLE
@ BI_PREPARE
@ BI_DROP_TABLE
@ BI_SYNC
@ BI_DONE
@ BI_COMMIT_TX

Function Documentation

◆ Assert()

Assert ( fmt [strlen(fmt) - 1] = '\n')

Referenced by _bt_afternewitemoff(), _bt_begin_parallel(), _bt_binsrch(), _bt_binsrch_insert(), _bt_binsrch_posting(), _bt_bottomupdel_finish_pending(), _bt_bottomupdel_pass(), _bt_buildadd(), _bt_check_natts(), _bt_check_rowcompare(), _bt_check_unique(), _bt_checkkeys(), _bt_clear_incomplete_split(), _bt_compare(), _bt_compare_scankey_args(), _bt_deadblocks(), _bt_dedup_finish_pending(), _bt_dedup_pass(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_delete_or_dedup_one_page(), _bt_delitems_cmp(), _bt_delitems_delete(), _bt_delitems_delete_check(), _bt_delitems_update(), _bt_delitems_vacuum(), _bt_doinsert(), _bt_endpoint(), _bt_find_extreme_element(), _bt_findinsertloc(), _bt_findsplitloc(), _bt_finish_split(), _bt_first(), _bt_fix_scankey_strategy(), _bt_form_posting(), _bt_getbuf(), _bt_getroot(), _bt_getrootheight(), _bt_insert_parent(), _bt_insertonpg(), _bt_interval_edges(), _bt_keep_natts(), _bt_killitems(), _bt_load(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_mark_scankey_required(), _bt_metaversion(), _bt_mkscankey(), _bt_newroot(), _bt_pagedel(), _bt_parallel_build_main(), _bt_pendingfsm_add(), _bt_pendingfsm_finalize(), _bt_preprocess_array_keys(), _bt_preprocess_keys(), _bt_readpage(), _bt_recsplitloc(), _bt_relandgetbuf(), _bt_restore_array_keys(), _bt_restore_meta(), _bt_rightsib_halfdeadflag(), _bt_saveitem(), _bt_search(), _bt_search_insert(), _bt_set_cleanup_info(), _bt_setuppostingitems(), _bt_simpledel_pass(), _bt_slideleft(), _bt_sort_dedup_finish_pending(), _bt_split(), _bt_start_array_keys(), _bt_steppage(), _bt_swap_posting(), _bt_truncate(), _bt_unlink_halfdead_page(), _bt_update_posting(), _bt_upgrademetapage(), _bt_uppershutdown(), _equalList(), _h_indexbuild(), _hash_addovflpage(), _hash_binsearch(), _hash_binsearch_last(), _hash_doinsert(), _hash_expandtable(), _hash_finish_split(), _hash_first(), _hash_freeovflpage(), _hash_getbucketbuf_from_hashkey(), _hash_getcachedmetap(), _hash_init_metabuffer(), _hash_kill_items(), _hash_load_qualified_items(), _hash_pgaddtup(), _hash_readnext(), _hash_readpage(), _hash_readprev(), _hash_splitbucket(), _hash_squeezebucket(), _int_matchsel(), _mdfd_getseg(), _mdfd_openseg(), _soundex(), _SPI_execute_plan(), _SPI_find_ENR_by_name(), _SPI_make_plan_non_temp(), _SPI_prepare_plan(), _SPI_save_plan(), _tarReadRaw(), _tarWriteHeader(), _tarWritePadding(), AbortBufferIO(), AbortOutOfAnyTransaction(), AbortStrongLockAcquire(), AbortTransaction(), AbsoluteConfigLocation(), accum_sum_carry(), accum_sum_final(), accum_sum_rescale(), accumArrayResult(), accumArrayResultArr(), aclparse(), aclupdate(), acquire_inherited_sample_rows(), acquire_sample_rows(), AcquireRewriteLocks(), activate_interpreter(), ActivateCommitTs(), add_abs(), add_child_join_rel_equivalences(), add_child_rel_equivalences(), add_eq_member(), add_exact_object_address(), add_foreign_final_paths(), add_foreign_grouping_paths(), add_foreign_ordered_paths(), add_guc_variable(), add_join_rel(), add_local_reloption(), add_merged_range_bounds(), add_module_to_inline_search_path(), add_object_address(), add_part_relids(), add_partial_path(), add_paths_to_append_rel(), add_paths_to_grouping_rel(), add_paths_with_pathkeys_for_rel(), add_row_identity_columns(), add_row_identity_var(), add_rtes_to_flat_rtable(), add_vars_to_targetlist(), addArcs(), AddCatcacheInvalidationMessage(), addConstrChildIdxDeps(), AddEventToPendingNotifies(), addFkRecurseReferencing(), AddInvalidationMessage(), addItemPointersToLeafTuple(), addItemsToLeaf(), addOrReplaceTuple(), AddPendingSync(), AddQual(), addRangeTableEntry(), addRangeTableEntryForCTE(), addRangeTableEntryForENR(), addRangeTableEntryForFunction(), addRangeTableEntryForJoin(), addRangeTableEntryForRelation(), addRangeTableEntryForSubquery(), addRangeTableEntryForTableFunc(), addRangeTableEntryForValues(), AddRelationNewConstraints(), addressOK(), AddRoleMems(), addTargetToSortList(), AddWaitEventToSet(), adjacent_cmp_bounds(), adjust_appendrel_attrs(), adjust_appendrel_attrs_mutator(), adjust_inherited_attnums(), adjust_partition_colnos(), adjust_partition_colnos_using_map(), adjust_paths_for_srfs(), advance_windowaggregate(), advance_windowaggregate_base(), advanceConnectionState(), AdvanceNextFullTransactionIdPastXid(), AdvanceXLInsertBuffer(), afterTriggerAddEvent(), AfterTriggerBeginXact(), afterTriggerDeleteHeadEventChunk(), AfterTriggerEndQuery(), AfterTriggerEndSubXact(), AfterTriggerEnlargeQueryState(), AfterTriggerFireDeferred(), afterTriggerInvokeEvents(), AfterTriggerSaveEvent(), agg_refill_hash_table(), agg_retrieve_direct(), AggregateCreate(), alloc_object(), AllocateVfd(), AllocSetAlloc(), AllocSetContextCreateInternal(), AllocSetDelete(), AllocSetFree(), AllocSetFreeIndex(), AllocSetGetChunkContext(), AllocSetGetChunkSpace(), AllocSetIsEmpty(), AllocSetRealloc(), AllocSetReset(), AllocSetStats(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterPolicy(), AlterPublicationOptions(), AlterRelationNamespaceInternal(), AlterSchemaOwner_internal(), AlterSeqNamespaces(), AlterSequence(), AlterStatistics(), AlterSubscription(), AlterSystemSetConfigFile(), AlterTableNamespaceInternal(), analyze_row_processor(), analyzeCTE(), analyzeCTETargetList(), append_pathkeys(), appendBinaryStringInfo(), appendBinaryStringInfoNT(), appendElement(), appendGroupByClause(), AppendInvalidationMessageSubGroup(), appendJSONKeyValue(), appendKey(), AppendSeconds(), appendStringInfoRegexpSubstr(), appendStringInfoStringQuoted(), appendStringInfoVA(), AppendStringToManifest(), appendValue(), apply_child_basequals(), apply_error_callback(), apply_handle_stream_stop(), apply_handle_tuple_routing(), apply_handle_update(), apply_scanjoin_target_to_paths(), apply_tlist_labeling(), apply_typmod_special(), ApplyLauncherMain(), applyLockingClause(), ApplyLogicalMappingFile(), applyRemoteGucs(), ApplyRetrieveRule(), approximate_joinrel_size(), apw_load_buffers(), array_agg_array_finalfn(), array_agg_finalfn(), array_bitmap_copy(), array_cmp(), array_create_iterator(), array_dim_to_json(), array_dim_to_jsonb(), array_fill_internal(), array_get_element_expanded(), array_out(), array_prepend(), array_set_element_expanded(), array_set_slice(), array_subscript_fetch(), array_subscript_fetch_slice(), array_subscript_transform(), ArrayCastAndSet(), ArrayGetNItems(), ascii(), AssertChangeLsnOrder(), AssertCheckExpandedRanges(), AssertCheckRanges(), AssertTXNLsnOrder(), assign_aggregate_collations(), assign_collations_walker(), assign_hypothetical_collations(), assign_param_for_placeholdervar(), assign_record_type_identifier(), assign_record_type_typmod(), assign_record_var(), assign_simple_var(), AssignDumpId(), AssignTransactionId(), asyncQueueAdvance(), asyncQueueAdvanceTail(), asyncQueueFillWarning(), asyncQueueNotificationToEntry(), asyncQueuePageDiff(), asyncQueueReadAllNotifications(), asyncQueueUnregister(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), AtCleanup_Memory(), AtCleanup_Portals(), ATColumnChangeRequiresRewrite(), AtCommit_Memory(), ATDetachCheckNoForeignKeyRefs(), AtEOSubXact_cleanup(), AtEOSubXact_Inval(), AtEOSubXact_PgStat_DroppedStats(), AtEOSubXact_PgStat_Relations(), AtEOSubXact_RelationCache(), AtEOXact_Buffers(), AtEOXact_cleanup(), AtEOXact_GUC(), AtEOXact_Inval(), AtEOXact_PgStat(), AtEOXact_PgStat_Relations(), AtEOXact_RelationCache(), AtEOXact_RelationMap(), AtEOXact_SMgr(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIndex(), ATExecAddIndexConstraint(), ATExecAddStatistics(), ATExecAlterColumnType(), ATExecAttachPartition(), ATExecCmd(), ATExecDropColumn(), ATExecSetStatistics(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), AtPrepare_PgStat(), AtPrepare_PgStat_Relations(), AtPrepare_PredicateLocks(), ATPrepCmd(), ATPrepDropNotNull(), ATRewriteTable(), AtStart_Memory(), AtStart_ResourceOwner(), AtSubAbort_Memory(), AtSubAbort_Snapshot(), AtSubCleanup_Memory(), AtSubCommit_childXids(), AtSubCommit_Memory(), AtSubCommit_Notify(), AtSubStart_Memory(), AtSubStart_ResourceOwner(), attach_internal(), AttachSerializableXact(), ATTypedTableRecursion(), auth_peer(), autoprewarm_database_main(), AutoVacuumShmemInit(), AuxiliaryProcessMain(), AuxiliaryProcKill(), BackgroundWorkerShmemInit(), BarrierArriveAndDetachExceptLast(), BarrierArriveAndWait(), BarrierAttach(), BarrierDetachImpl(), base_yylex(), BaseBackup(), BaseInit(), bbsink_archive_contents(), bbsink_begin_archive(), bbsink_begin_backup(), bbsink_begin_manifest(), bbsink_cleanup(), bbsink_end_archive(), bbsink_end_backup(), bbsink_end_manifest(), bbsink_forward_archive_contents(), bbsink_forward_begin_archive(), bbsink_forward_begin_backup(), bbsink_forward_begin_manifest(), bbsink_forward_cleanup(), bbsink_forward_end_archive(), bbsink_forward_end_backup(), bbsink_forward_end_manifest(), bbsink_forward_manifest_contents(), bbsink_gzip_new(), bbsink_lz4_new(), bbsink_manifest_contents(), bbsink_progress_new(), bbsink_server_begin_archive(), bbsink_server_begin_manifest(), bbsink_throttle_new(), bbsink_zstd_new(), bbstreamer_buffer_bytes(), bbstreamer_content(), bbstreamer_extractor_content(), bbstreamer_extractor_finalize(), bbstreamer_finalize(), bbstreamer_free(), bbstreamer_gzip_decompressor_new(), bbstreamer_lz4_compressor_new(), bbstreamer_lz4_decompressor_new(), bbstreamer_plain_writer_free(), bbstreamer_recovery_injector_content(), bbstreamer_tar_archiver_content(), bbstreamer_tar_header(), bbstreamer_tar_parser_content(), bbstreamer_tar_terminator_content(), bbstreamer_zstd_compressor_new(), bbstreamer_zstd_decompressor_new(), be_gssapi_read(), be_gssapi_write(), be_lo_from_bytea(), be_lo_open(), be_lo_put(), be_tls_open_server(), BecomeLockGroupLeader(), BecomeLockGroupMember(), begin_cb_wrapper(), begin_prepare_cb_wrapper(), BeginCopyFrom(), BeginCopyTo(), beginmerge(), BeginStrongLockAcquire(), BgBufferSync(), binaryheap_first(), binaryheap_remove_first(), binaryheap_replace_first(), bitmap_hash(), bitmap_match(), BitmapHeapNext(), blbulkdelete(), blinsert(), BlockSampler_Next(), bloom_init(), BloomFillMetapage(), BloomInitMetapage(), BloomPageAddItem(), bootstrap_signals(), BootStrapCLOG(), BootstrapModeMain(), BootStrapMultiXact(), BootStrapSUBTRANS(), BootStrapXLOG(), bottomup_nblocksfavorable(), bottomup_sort_and_shrink(), bounds_adjacent(), bpchar(), brin_bloom_add_value(), brin_bloom_consistent(), brin_bloom_get_ndistinct(), brin_bloom_union(), brin_doinsert(), brin_doupdate(), brin_evacuate_page(), brin_form_tuple(), brin_free_desc(), brin_getinsertbuffer(), brin_inclusion_add_value(), brin_inclusion_consistent(), brin_inclusion_union(), brin_minmax_add_value(), brin_minmax_consistent(), brin_minmax_multi_add_value(), brin_minmax_multi_consistent(), brin_minmax_multi_distance_float4(), brin_minmax_multi_distance_float8(), brin_minmax_multi_distance_inet(), brin_minmax_multi_distance_int2(), brin_minmax_multi_distance_int4(), brin_minmax_multi_distance_int8(), brin_minmax_multi_distance_interval(), brin_minmax_multi_distance_macaddr(), brin_minmax_multi_distance_macaddr8(), brin_minmax_multi_distance_numeric(), brin_minmax_multi_distance_pg_lsn(), brin_minmax_multi_distance_tid(), brin_minmax_multi_distance_time(), brin_minmax_multi_distance_timestamp(), brin_minmax_multi_distance_timetz(), brin_minmax_multi_distance_uuid(), brin_minmax_multi_serialize(), brin_minmax_multi_union(), brin_minmax_union(), brin_range_deserialize(), brin_range_serialize(), brin_xlog_createidx(), brin_xlog_insert_update(), brin_xlog_revmap_extend(), brinbuild(), brincostestimate(), bringetbitmap(), brinGetTupleForHeapBlock(), brinRevmapExtend(), brinsummarize(), bt_check_every_level(), bt_check_level_from_leftmost(), bt_child_check(), bt_downlink_missing_check(), bt_normalize_tuple(), bt_page_print_tuples(), bt_posting_plain_tuple(), bt_rootdescend(), bt_tuple_present_callback(), btbeginscan(), btcostestimate(), BTPageGetDeleteXid(), BTPageIsRecyclable(), btparallelrescan(), btree_xlog_dedup(), btree_xlog_insert(), btree_xlog_split(), btree_xlog_unlink_page(), BTreeShmemInit(), BTreeTupleGetHeapTIDCareful(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNPosting(), BTreeTupleGetPostingOffset(), BTreeTupleSetNAtts(), BTreeTupleSetPosting(), btvacuumcleanup(), btvacuumpage(), BufferAlloc(), BufferGetBlock(), BufferGetBlockNumber(), BufferGetLSNAtomic(), BufferGetTag(), BufferIsPermanent(), BufferIsValid(), BufferSync(), BufFileAppend(), BufFileCreateTemp(), BufFileDumpBuffer(), BufFileExportFileSet(), BufFileFlush(), BufFileRead(), BufFileSize(), BufFileWrite(), BufTableInsert(), build_attnums_array(), build_backup_content(), build_child_join_rel(), build_client_first_message(), build_coercion_expression(), build_column_frequencies(), build_distances(), build_distinct_groups(), build_function_result_tupdesc_d(), build_function_result_tupdesc_t(), build_guc_variables(), build_hash_table(), build_hash_tables(), build_index_paths(), build_join_rel(), build_join_rel_hash(), build_joinrel_partition_info(), build_merged_partition_bounds(), build_minmax_path(), build_partition_pathkeys(), build_pertrans_for_aggref(), build_regexp_match_result(), build_regexp_split_result(), build_reloptions(), build_remote_returning(), build_replindex_scan_key(), build_row_from_vars(), build_simple_rel(), build_sorted_items(), build_subplan(), build_test_match_result(), BuildCachedPlan(), BuildDescFromLists(), BuildIndexValueDescription(), buildMatViewRefreshDependencies(), buildNSItemFromLists(), buildNSItemFromTupleDesc(), buildRelationAliases(), BuildSpeculativeIndexInfo(), buildSubPlanHash(), BuildTupleHashTableExt(), buildVarFromNSColumn(), buildWorkerCommand(), bytea_string_agg_finalfn(), cache_lookup(), cache_reduce_memory(), cache_store_tuple(), CachedPlanAllowsSimpleValidityCheck(), CachedPlanGetTargetList(), CachedPlanIsSimplyValid(), CachedPlanIsValid(), CachedPlanSetParentContext(), calc_hist_selectivity(), calc_inet_union_params(), calc_inet_union_params_indexed(), calc_length_hist_frac(), calc_nestloop_required_outer(), calc_non_nestloop_required_outer(), calcstrlen(), CallSyscacheCallbacks(), can_minmax_aggs(), canonicalize_path(), canonicalize_qual(), CatalogCacheComputeTupleHashValue(), CatalogCacheCreateEntry(), CatalogCacheInitializeCache(), CatalogIndexInsert(), CatCacheFreeKeys(), CatCacheInvalidate(), CatCacheRemoveCList(), CatCacheRemoveCTup(), change_cb_wrapper(), ChangeToDataDir(), ChangeVarNodes_walker(), char2wchar(), check_agglevels_and_constraints(), check_circularity(), check_cluster_versions(), check_for_freed_segments_locked(), check_foreign_key(), check_generic_type_consistency(), check_index_predicates(), check_new_partition_bound(), check_null_keys(), check_of_type(), check_publications(), check_publications_origin(), check_relation_privileges(), check_sql_fn_retval(), check_srf_call_placement(), check_timezone_abbreviations(), check_ungrouped_columns_walker(), CheckCachedPlan(), checkclass_str(), checkDataDir(), CheckDateTokenTables(), CheckDeadLock(), CheckForBufferLeaks(), CheckForLocalBufferLeaks(), CheckForSerializableConflictOut(), CheckIndexCompatible(), checkMatch(), checkMembershipInCurrentExtension(), CheckMyDatabase(), CheckOpSlotCompatibility(), CheckPWChallengeAuth(), CheckRADIUSAuth(), CheckRecoveryConflictDeadlock(), CheckRecoveryConsistency(), checkRuleResultList(), CheckSASLAuth(), CheckSelectLocking(), checkSplitConditions(), CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), checkTempNamespaceStatus(), checkWellFormedRecursion(), choose_bitmap_and(), choose_next_subplan_for_leader(), choose_next_subplan_for_worker(), choose_next_subplan_locally(), cidr_set_masklen_internal(), classify_matching_subplans(), clean_NOT_intree(), clean_stopword_intree(), CleanQuerytext(), cleanup_output_dirs(), cleanup_rel_sync_cache(), CleanupInvalidationState(), CleanUpLock(), CleanupProcSignalState(), CleanupTempFiles(), ClearOldPredicateLocks(), ClientAuthentication(), clog_redo(), CloneArchive(), CloneForeignKeyConstraints(), close_destination_dir(), closeAllVfds(), CloseMatViewIncrementalMaintenance(), ClosePipeFromProgram(), ClosePipeToProgram(), cluster(), cluster_rel(), cmpcmdflag(), coerce_function_result_tuple(), CollationCreate(), collectMatchesForHeapRow(), commandError(), CommandIsReadOnly(), commit_cb_wrapper(), commit_prepared_cb_wrapper(), commit_ts_redo(), CommitTransaction(), CommitTransactionCommand(), CommitTsShmemInit(), commute_restrictinfo(), comp_keyword_case_hook(), compact_palloc0(), CompactCheckpointerRequestQueue(), compactify_ranges(), compactify_tuples(), compareJsonbContainers(), comparetup_index_btree(), comparetup_index_hash(), compile_database_list(), compile_pltcl_function(), compile_relation_list_one_db(), complete_pending_request(), CompleteCachedPlan(), compute_array_stats(), compute_expr_stats(), compute_new_xmax_infomask(), compute_parallel_delay(), compute_partition_bounds(), compute_partition_hash_value(), compute_range_stats(), compute_return_type(), compute_scalar_stats(), compute_tsvector_stats(), computeDistance(), ComputeIndexAttrs(), ComputePartitionAttrs(), ComputeXidHorizons(), concat_internal(), conditional_stack_set_paren_depth(), conditional_stack_set_query_len(), ConditionalLockBuffer(), ConditionalLockBufferForCleanup(), ConditionalXactLockTableWait(), ConditionVariableBroadcast(), ConditionVariableTimedSleep(), ConnectDatabase(), connectDatabase(), connectOptions2(), consider_abort_common(), consider_groupingsets_paths(), consider_parallel_nestloop(), ConstraintSetParentConstraint(), ConstructTupleDescriptor(), contain_agg_clause_walker(), contain_outer_selfref(), convert_ANY_sublink_to_join(), convert_combining_aggrefs(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), convert_int_from_base_unit(), convert_prep_stmt_params(), convert_real_from_base_unit(), convert_string_datum(), convert_subquery_pathkeys(), convert_tuples_by_name_attrmap(), convertJsonbArray(), ConvertTimeZoneAbbrevs(), convertToJsonb(), cookDefault(), copy_plpgsql_datums(), copy_replication_slot(), copy_table(), copy_table_data(), CopyCachedPlan(), CopyConversionError(), CopyErrorData(), CopyFrom(), CopyGetData(), CopyLoadInputBuf(), CopyLoadRawBuf(), CopyMultiInsertBufferCleanup(), CopyMultiInsertBufferFlush(), CopyMultiInsertInfoNextFreeSlot(), CopyMultiInsertInfoStore(), CopyReadAttributesCSV(), CopyReadLine(), CopySnapshot(), CopyXLogRecordToWAL(), cost_agg(), cost_append(), cost_bitmap_heap_scan(), cost_ctescan(), cost_functionscan(), cost_gather_merge(), cost_incremental_sort(), cost_index(), cost_namedtuplestorescan(), cost_resultscan(), cost_samplescan(), cost_seqscan(), cost_subqueryscan(), cost_tablefuncscan(), cost_tidrangescan(), cost_tidscan(), cost_valuesscan(), count_distinct_groups(), count_nulls(), create_append_path(), create_append_plan(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_ctescan_plan(), create_final_distinct_paths(), create_foreign_modify(), create_foreign_upper_path(), create_foreignscan_path(), create_foreignscan_plan(), create_functionscan_plan(), create_gather_merge_path(), create_gather_merge_plan(), create_gather_path(), create_gating_plan(), create_groupingsets_path(), create_groupingsets_plan(), create_hash_bounds(), create_hashjoin_plan(), create_index_paths(), create_indexscan_plan(), create_internal(), create_lateral_join_info(), create_LifetimeEnd(), create_list_bounds(), create_logical_replication_slot(), create_material_path(), create_memoize_path(), create_memoize_plan(), create_merge_append_path(), create_merge_append_plan(), create_mergejoin_plan(), create_minmaxagg_plan(), create_modifytable_path(), create_namedtuplestorescan_plan(), create_ordered_paths(), create_ordinary_grouping_paths(), create_partial_grouping_paths(), create_partitionwise_grouping_paths(), create_physical_replication_slot(), create_plan(), create_plan_recurse(), create_projection_path(), create_projection_plan(), create_range_bounds(), create_resultscan_plan(), create_samplescan_plan(), create_seqscan_plan(), create_subqueryscan_plan(), create_tablefuncscan_plan(), create_target(), create_tidrangescan_plan(), create_tidscan_plan(), create_toast_table(), create_unique_path(), create_unique_plan(), create_valuesscan_plan(), create_windowagg_path(), create_windowagg_plan(), create_worktablescan_plan(), CreateAnonymousSegment(), CreateAuxProcessResourceOwner(), CreateBackupStreamer(), CreateCachedPlan(), CreateConstraintEntry(), CreateDatabaseUsingWalLog(), createdb(), CreateFunction(), CreateLocalPredicateLockHash(), CreateOneShotCachedPlan(), CreateParallelContext(), CreatePartitionPruneState(), createPartitions(), CreatePortal(), CreateProceduralLanguage(), CreateReplicationSlot(), CreateRestartPoint(), CreateStatistics(), CreateSubscription(), CreateTemplateTupleDesc(), CreateTriggerFiringOn(), createViewAsClause(), dataBeginPlaceToPage(), dataBeginPlaceToPageLeaf(), DataChecksumsEnabled(), dataFindChildPtr(), dataGetLeftMostPage(), dataLeafPageGetUncompressed(), dataLocateItem(), dataPlaceToPageLeafRecompress(), dataPlaceToPageLeafSplit(), date_cmp_timestamp_internal(), datum_to_json(), datum_to_jsonb(), datum_write(), DatumGetAnyArrayP(), DatumGetEOHP(), DatumGetExpandedArray(), DatumGetExpandedArrayX(), DatumGetExpandedRecord(), datumGetSize(), datumRestore(), dbase_redo(), DCH_cache_getnew(), DCH_from_char(), dclist_count(), dclist_delete_from(), dclist_has_next(), dclist_has_prev(), dclist_head_element_off(), dclist_head_node(), dclist_insert_after(), dclist_insert_before(), dclist_is_empty(), dclist_move_head(), dclist_move_tail(), dclist_next_node(), dclist_pop_head_node(), dclist_prev_node(), dclist_push_head(), dclist_push_tail(), dclist_tail_element_off(), dclist_tail_node(), dead_items_alloc(), DeadLockCheck(), decide_file_action(), decimalLength(), DeCloneArchive(), decode_varbyte(), DecodeDelete(), DecodeInterval(), DecodeMultiInsert(), decodePageSplitRecord(), DecodeXLogRecord(), DecodeXLogTuple(), deconstruct_array(), deconstruct_jointree(), deconstruct_recurse(), decr_dcc_refcount(), DecrementParentLocks(), DecrTupleDescRefCount(), default_threadlock(), define_custom_variable(), DefineAggregate(), DefineAttr(), DefineIndex(), DefineRange(), DefineRelation(), DefineSequence(), DefineType(), DefineVirtualRelation(), Delete(), delete_item(), DeleteChildTargetLocks(), DeleteExpandedObject(), DeleteLockTarget(), DeleteSecurityLabel(), DelRoleMems(), deparse_context_for_plan_tree(), deparseAggref(), deparseColumnRef(), deparseDirectUpdateSql(), deparseDistinctExpr(), deparseFromExpr(), deparseFromExprForRel(), deparseOpExpr(), deparseRangeTblRef(), deparseScalarArrayOpExpr(), deparseSelectStmtForRel(), deparseSortGroupClause(), deparseSubqueryTargetList(), dependencies_clauselist_selectivity(), dependency_degree(), DependencyGenerator_init(), describeOneTableDetails(), destroy_superblock(), DetachPartitionFinalize(), determineRecursiveColTypes(), detoast_attr(), detoast_attr_slice(), detoast_external_attr(), dir_close(), dir_realloc(), dir_sync(), dir_write(), disable_timeout(), disable_timeouts(), discard_query_text(), discardUntilSync(), disconnect_cached_connections(), disconnectDatabase(), DiscreteKnapsack(), DisownLatch(), dist_ppath_internal(), distribute_qual_to_rels(), distribute_row_identity_vars(), div_var(), div_var_fast(), dlist_head_element_off(), dlist_next_node(), dlist_pop_head_node(), dlist_prev_node(), dlist_tail_element_off(), do_compile(), do_connect(), do_numeric_discard(), do_pg_abort_backup(), do_pg_backup_start(), do_pg_backup_stop(), do_pset(), do_start_bgworker(), do_to_timestamp(), DoCopy(), doDeletion(), doLog(), doPickSplit(), DoPortalRunFetch(), doRetry(), double_to_shortest_decimal_buf(), DropAllPredicateLocksFromTable(), DropCachedPlan(), DropErrorMsgNonExistent(), DropErrorMsgWrongType(), DropReplicationSlot(), DropSubscription(), dsa_allocate_extended(), dsa_free(), dsa_get_address(), dsa_get_handle(), dsa_pin_mapping(), dsa_release_in_place(), dsa_unpin(), dshash_attach(), dshash_delete_current(), dshash_delete_entry(), dshash_delete_key(), dshash_destroy(), dshash_dump(), dshash_find(), dshash_find_or_insert(), dshash_get_hash_table_handle(), dshash_release_lock(), dshash_seq_next(), dsm_attach(), dsm_backend_startup(), dsm_create(), dsm_detach(), dsm_impl_op(), dsm_postmaster_startup(), dsm_segment_address(), dsm_segment_map_length(), dsm_unpin_mapping(), dsm_unpin_segment(), dummy_ssl_passwd_cb(), dumpCollation(), dumpTableData(), dumpTableSchema(), dumpTrigger(), dumptuples(), DynaHashAlloc(), EA_flatten_into(), EA_get_flat_size(), each_worker_jsonb(), ec_member_matches_indexcol(), echo_hidden_hook(), echo_hook(), eclass_useful_for_merging(), ecpg_do_prologue(), ECPGconnect(), ECPGget_desc(), editFile(), eliminate_duplicate_dependencies(), enable_statement_timeout(), enable_timeout(), EnableDisableRule(), EnablePortalManager(), EncodeDateOnly(), EncodeDateTime(), EndParallelWorkerTransaction(), EndPrepare(), EndTransactionBlock(), enforce_generic_type_consistency(), enlarge_list(), ENRMetadataGetTupDesc(), ensure_active_superblock(), ensure_free_space_in_buffer(), EnsurePortalSnapshotExists(), EnterParallelMode(), entry_alloc(), entryFindChildPtr(), entryGetItem(), entryGetLeftMostPage(), entryIsEnoughSpace(), entryLocateEntry(), entryLocateLeafEntry(), entryPreparePage(), enum_cmp_internal(), ER_flatten_into(), ER_get_flat_size(), estimate_multivariate_ndistinct(), estimate_num_groups(), estimate_path_cost_size(), EstimateSnapshotSpace(), eval_const_expressions_mutator(), eval_windowaggregates(), evalLazyFunc(), EvalPlanQual(), EvalPlanQualFetchRowMark(), EvalPlanQualSlot(), EvalPlanQualStart(), evalStandardFunc(), EventTriggerCollectAlterTableSubcmd(), EventTriggerSQLDropAddObject(), examine_expression(), examine_opclause_args(), examine_simple_variable(), examine_variable(), exec_check_assignable(), exec_check_rw_parameter(), exec_command_endif(), exec_describe_statement_message(), exec_eval_simple_expr(), exec_execute_message(), exec_move_row_from_datum(), exec_move_row_from_fields(), exec_replication_command(), exec_run_select(), exec_save_simple_expr(), exec_simple_check_plan(), exec_simple_query(), exec_stmt_assign(), exec_stmt_block(), exec_stmt_call(), exec_stmt_execsql(), exec_stmt_forc(), exec_stmt_return_query(), ExecAggTransReparent(), ExecAlterExtensionContentsStmt(), ExecAlterObjectDependsStmt(), ExecAlterObjectSchemaStmt(), ExecAlterOwnerStmt(), ExecAppend(), ExecAppendAsyncBegin(), ExecAppendAsyncEventWait(), ExecAppendAsyncGetNext(), ExecAppendAsyncRequest(), ExecARDeleteTriggers(), ExecARUpdateTriggers(), ExecASUpdateTriggers(), ExecAsyncAppendResponse(), ExecAsyncForeignScanConfigureWait(), ExecAsyncForeignScanNotify(), ExecAsyncForeignScanRequest(), ExecBitmapHeapInitializeWorker(), ExecBRDeleteTriggers(), ExecBRUpdateTriggers(), ExecBSUpdateTriggers(), ExecBuildAggTrans(), ExecBuildAggTransCall(), ExecBuildGroupingEqual(), ExecBuildParamSetEqual(), ExecBuildUpdateProjection(), ExecCallTriggerFunc(), ExecCheck(), ExecCheckPlanOutput(), ExecCheckRTPerms(), ExecCheckTupleVisible(), ExecChooseHashTableSize(), ExecCloseResultRelations(), ExecComputeSlotInfo(), ExecComputeStoredGenerated(), ExecConstraints(), ExecCopySlot(), ExecCopySlotHeapTuple(), ExecCreateTableAs(), ExecCrossPartitionUpdate(), execCurrentOf(), ExecCustomScan(), ExecDelete(), ExecDropSingleTupleTableSlot(), ExecEndAgg(), ExecEndCustomScan(), ExecEndMemoize(), ExecEvalConvertRowtype(), ExecEvalFieldSelect(), ExecEvalFuncArgs(), ExecEvalHashedScalarArrayOp(), ExecEvalMinMax(), ExecEvalParamExec(), ExecEvalStepOp(), ExecEvalWholeRowVar(), ExecEvalXmlExpr(), ExecFetchSlotHeapTuple(), ExecFetchSlotMinimalTuple(), ExecFindMatchingSubPlans(), ExecFindPartition(), ExecGetAncestorResultRels(), ExecGetJunkAttribute(), ExecGetRangeTableRelation(), ExecGetRootToChildMap(), ExecGetUpdateNewTuple(), ExecGrant_Parameter(), ExecHashIncreaseNumBatches(), ExecHashIncreaseNumBuckets(), ExecHashJoinImpl(), ExecHashRemoveNextSkewBucket(), ExecHashSkewTableInsert(), ExecHashTableCreate(), ExecHashTableDetachBatch(), ExecHashTableInsert(), ExecIncrementalSort(), ExecIndexBuildScanKeys(), ExecIndexMarkPos(), ExecIndexOnlyMarkPos(), ExecIndexOnlyRestrPos(), ExecIndexRestrPos(), ExecInitAgg(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapHeapScan(), ExecInitBitmapIndexScan(), ExecInitBitmapOr(), ExecInitCheck(), ExecInitCteScan(), ExecInitExprRec(), ExecInitForeignScan(), ExecInitFunctionResultSet(), ExecInitFunctionScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitIndexScan(), ExecInitJunkFilter(), ExecInitLimit(), ExecInitLockRows(), ExecInitMemoize(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitMergeTupleSlots(), ExecInitModifyTable(), ExecInitNamedTuplestoreScan(), ExecInitNestLoop(), ExecInitNode(), ExecInitPartitionDispatchInfo(), ExecInitPartitionInfo(), ExecInitPartitionPruning(), ExecInitProjectSet(), ExecInitQual(), ExecInitRecursiveUnion(), ExecInitResult(), ExecInitRoutingInfo(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSetOp(), ExecInitSubPlan(), ExecInitSubqueryScan(), ExecInitSubscriptingRef(), ExecInitTableFuncScan(), ExecInitUnique(), ExecInitUpdateProjection(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecInitWorkTableScan(), ExecInsert(), ExecInsertIndexTuples(), ExecInterpExpr(), ExecJustAssignVarImpl(), ExecJustAssignVarVirtImpl(), ExecJustVarVirtImpl(), ExecLimit(), ExecLockRows(), ExecMakeTableFunctionResult(), ExecMaterial(), ExecMaterialMarkPos(), ExecMaterialRestrPos(), ExecMemoize(), ExecMergeJoin(), ExecModifyTable(), ExecNestLoop(), ExecOnConflictUpdate(), ExecParallelCreateReaders(), ExecParallelHashFirstTuple(), ExecParallelHashIncreaseNumBatches(), ExecParallelHashIncreaseNumBuckets(), ExecParallelHashJoinPartitionOuter(), ExecParallelHashJoinSetUpBatches(), ExecParallelHashNextTuple(), ExecParallelHashRepartitionFirst(), ExecParallelHashTableInsert(), ExecParallelHashTableInsertCurrentBatch(), ExecParallelHashTableSetCurrentBatch(), ExecParallelHashTupleAlloc(), ExecParallelHashTuplePrealloc(), ExecParallelReinitialize(), ExecParallelReportInstrumentation(), ExecPendingInserts(), ExecProjectSRF(), ExecQual(), ExecQueryAndProcessResults(), ExecQueryUsingCursor(), ExecReadyInterpretedExpr(), ExecRefreshMatView(), ExecRenameStmt(), ExecReScanCustomScan(), ExecReScanHashJoin(), ExecRunCompiledExpr(), ExecScanFetch(), ExecScanReScan(), ExecScanSubPlan(), ExecSetParamPlan(), ExecSetParamPlanMulti(), ExecSetSlotDescriptor(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), ExecSort(), ExecStoreAllNullTuple(), ExecStoreBufferHeapTuple(), ExecStoreHeapTuple(), ExecStoreMinimalTuple(), ExecStorePinnedBufferHeapTuple(), ExecStoreVirtualTuple(), ExecSupportsMarkRestore(), execTuplesHashPrepare(), ExecTypeSetColNames(), ExecUpdate(), execute_attr_map_slot(), execute_attr_map_tuple(), execute_foreign_modify(), executeAnyItem(), ExecuteCallStmt(), executeItemOptUnwrapResult(), executeItemOptUnwrapTarget(), executeItemUnwrapTargetArray(), executeJsonPath(), executeKeyValueMethod(), executeMetaCommand(), ExecuteRecoveryCommand(), ExecuteTruncateGuts(), ExecutorRewind(), ExecVacuum(), ExecWindowAgg(), ExecWorkTableScan(), ExitParallelMode(), expand_all_col_privileges(), expand_appendrel_subquery(), expand_array(), expand_dynamic_library_name(), expand_function_arguments(), expand_grouping_sets(), expand_groupingset_node(), expand_inherited_rtentry(), expand_partitioned_rtentry(), expand_planner_arrays(), expand_single_inheritance_child(), expand_table(), expand_tuple(), expand_vacuum_rel(), ExpandAllTables(), ExpandColumnRefStar(), ExpandConstraints(), expanded_record_set_field_internal(), expanded_record_set_fields(), expanded_record_set_tuple(), expandNSItemAttrs(), expandNSItemVars(), expandRecordVariable(), ExpandRowReference(), expandRTE(), expandTupleDesc(), ExpireTreeKnownAssignedTransactionIds(), ExplainCloseWorker(), ExplainIndentText(), ExplainJSONLineEnding(), ExplainOnePlan(), ExplainOneUtility(), ExplainOpenWorker(), ExplainPrintPlan(), ExplainQuery(), ExplainTargetRel(), ExplainYAMLLineStarting(), exprCollation(), exprSetCollation(), exprType(), exprTypmod(), extendBufFile(), ExtendCommitTs(), extract_actual_join_clauses(), extract_autovac_opts(), extract_grouping_ops(), extract_lateral_references(), extract_or_clause(), extract_query_dependencies_walker(), extract_restriction_or_clauses(), extract_rollup_sets(), extract_variadic_args(), extractRelOptions(), ExtractReplicaIdentity(), fastgetattr(), FastPathGrantRelationLock(), FastPathUnGrantRelationLock(), fetch_fp_info(), fetch_more_data(), fetch_more_data_begin(), fetch_remote_table_info(), fetch_statentries_for_relation(), fetch_table_list(), fetch_tuple_flag(), FetchDynamicTimeZone(), FetchPreparedStatementResultDesc(), FetchStatementTargetList(), file_acquire_sample_rows(), file_exists(), FileClose(), FileGetRawDesc(), FileGetRawFlags(), FileGetRawMode(), FilePathName(), FilePrefetch(), FileRead(), FileSize(), FileSync(), FileTruncate(), FileWrite(), FileWriteback(), fill_expanded_ranges(), fill_hba_line(), fill_ident_line(), fill_in_constant_lengths(), fill_seq_fork_with_data(), fill_val(), fillJsonbValue(), fillQT(), FillXLogStatsRow(), filter_by_origin_cb_wrapper(), filter_prepare_cb_wrapper(), final_cost_hashjoin(), finalize_aggregates(), finalize_grouping_exprs_walker(), finalize_plan(), find_base_rel(), find_childrel_parents(), find_cols_walker(), find_dependent_phvs_walker(), find_derived_clause_for_ec_member(), find_in_dynamic_libpath(), find_lateral_references(), find_multixact_start(), find_option(), find_or_make_matching_shared_tupledesc(), find_partition_scheme(), find_placeholder_info(), find_placeholders_in_jointree(), find_update_path(), find_var_for_subquery_tle(), find_window_functions_walker(), findCollationByOid(), findeq(), findExtensionByOid(), findFuncByOid(), findIndexByOid(), findJsonbValueFromContainer(), FindLockCycleRecurse(), FindLockCycleRecurseMember(), findNamespaceByOid(), findOprByOid(), findoprnd_recurse(), findPublicationByOid(), FindReplTupleInLocalRel(), findTableByOid(), findTypeByOid(), finish_foreign_modify(), FinishPreparedTransaction(), FinishWalRecovery(), fix_alternative_subplan(), fix_append_rel_relids(), fix_expr_common(), fix_indexqual_clause(), fix_indexqual_operand(), fix_merged_indexes(), fix_scan_expr_mutator(), fix_scan_expr_walker(), flagInhIndexes(), FlagRWConflict(), FlagSxactUnsafe(), flatCopyTargetEntry(), flatten_join_alias_vars_mutator(), flatten_set_variable_args(), flatten_simple_union_all(), float_to_shortest_decimal_buf(), FlushOneBuffer(), FlushRelationsAllBuffers(), fmgr_sql(), for_each_from_setup(), foreign_grouping_ok(), foreign_join_ok(), ForeignNext(), ForgetBackgroundWorker(), ForgetPrivateRefCountEntry(), ForgetUnstartedBackgroundWorkers(), format_numeric_locale(), format_operator_extended(), format_procedure_extended(), FormIndexDatum(), FormPartitionKeyDatum(), free_plperl_function(), FreeCachedExpression(), freeHyperLogLog(), FreePageBtreeAdjustAncestorKeys(), FreePageBtreeCleanup(), FreePageBtreeConsolidate(), FreePageBtreeFindLeftSibling(), FreePageBtreeFindRightSibling(), FreePageBtreeFirstKey(), FreePageBtreeGetRecycled(), FreePageBtreeInsertInternal(), FreePageBtreeInsertLeaf(), FreePageBtreeRemove(), FreePageBtreeRemovePage(), FreePageBtreeSearch(), FreePageBtreeSearchInternal(), FreePageBtreeSearchLeaf(), FreePageBtreeSplitPage(), FreePageBtreeUpdateParentPointers(), FreePageManagerGet(), FreePageManagerGetInternal(), FreePageManagerPut(), FreePageManagerPutInternal(), FreePagePopSpanLeader(), FreeQueryDesc(), FreeSnapshot(), FreeTupleDesc(), FreezeMultiXactId(), from_char_parse_int_len(), fsm_get_avail(), fsm_get_child(), fsm_get_heap_blk(), fsm_get_parent(), fsm_set_avail(), fsm_space_avail_to_cat(), fsm_truncate_avail(), fsm_vacuum_page(), FullXidRelativeTo(), func_get_detail(), FuncnameGetCandidates(), gather_merge_init(), gather_merge_readnext(), gather_readnext(), gbt_inet_compress(), gbt_inet_consistent(), gbt_num_compress(), gbt_num_fetch(), gen_partprune_steps_internal(), gen_prune_step_op(), gen_prune_steps_from_opexps(), generate_append_tlist(), generate_base_implied_equalities(), generate_base_implied_equalities_const(), generate_base_implied_equalities_no_const(), generate_bitmap_or_paths(), generate_function_name(), generate_implied_equalities_for_column(), generate_join_implied_equalities(), generate_join_implied_equalities_for_ecs(), generate_matching_part_pairs(), generate_mergejoin_paths(), generate_normalized_query(), generate_operator_clause(), generate_orderedappend_paths(), generate_partition_qual(), generate_partitionwise_join_paths(), generate_recursion_path(), generate_setop_grouplist(), generate_setop_tlist(), generate_union_paths(), generate_useful_gather_paths(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), GenerateRecoveryConfig(), GenerationAlloc(), GenerationBlockFree(), GenerationContextCreate(), GenerationFree(), GenerationGetChunkContext(), GenerationGetChunkSpace(), GenerationIsEmpty(), GenerationRealloc(), GenerationReset(), GenerationStats(), generator_init(), generic_redo(), geqo_eval(), get_actual_clauses(), get_actual_variable_range(), get_agg_expr(), get_aggregate_argtypes(), get_appendrel_parampathinfo(), get_baserel_parampathinfo(), get_best_segment(), get_catalog_object_by_oid(), get_cheapest_parameterized_child_path(), get_code_decomposition(), get_compress_algorithm_name(), get_configdata(), get_controlfile(), get_db_info(), get_delete_query_def(), get_destination_dir(), get_eclass_for_sort_expr(), get_eclass_indexes_for_relids(), get_ENR(), get_expr_result_type(), get_from_clause_coldeflist(), get_func_arg_info(), get_func_result_name(), get_func_signature(), get_func_sql_syntax(), get_func_sql_syntax_time(), get_function_rows(), get_guc_variables(), get_hash_partition_greatest_modulus(), get_hba_options(), get_index_column_opclass(), get_insert_query_def(), get_join_index_paths(), get_joinrel_parampathinfo(), get_loop_count(), get_matching_hash_bounds(), get_matching_list_bounds(), get_matching_part_pairs(), get_matching_partitions(), get_matching_range_bounds(), get_merged_range_bounds(), get_name_for_var_field(), get_number_of_groups(), get_object_address(), get_object_namespace(), get_op_btree_interpretation(), get_parallel_object_list(), get_partition_for_tuple(), get_path_all(), get_publications_str(), get_qual_for_list(), get_qual_from_partbound(), get_range_partition(), get_range_partition_internal(), get_record_type_from_query(), get_rel_data_width(), get_rel_sync_entry(), get_relation_foreign_keys(), get_relation_info(), get_rels_with_domain(), get_replslot_index(), get_returning_data(), get_rewrite_oid(), get_rolespec_oid(), get_rolespec_tuple(), get_row_security_policies(), get_rtable_name(), get_rte_attribute_is_dropped(), get_rule_expr(), get_rule_sortgroupclause(), get_rule_windowspec(), get_segment_by_index(), get_setop_query(), get_singleton_append_subpath(), get_slru_entry(), get_steps_using_prefix(), get_steps_using_prefix_recurse(), get_switched_clauses(), get_tablespace_page_costs(), get_text_array_contents(), get_translated_update_targetlist(), get_update_query_def(), get_update_query_targetlist_def(), get_useful_ecs_for_relation(), get_variable(), get_view_query(), get_visible_ENR_metadata(), get_worker(), GetActiveSnapshot(), GetAfterTriggersTableData(), GetAfterTriggersTransitionTable(), GetAuthenticatedUserId(), GetBackgroundWorkerPid(), getBaseTypeAndTypmod(), GetBlockerStatusData(), GetCachedPlan(), getClosestMatch(), GetConfigOptionResetString(), GetConnection(), GetCTEForRTE(), GetCurrentCommandId(), GetCurrentTransactionStopTimestamp(), GetDatabasePath(), GetExistingLocalJoinPath(), getExponentialRand(), GetFlushRecPtr(), GetForeignKeyActionTriggers(), GetForeignKeyCheckTriggers(), getGaussianRand(), getid(), GetIndexInputType(), getInsertSelectQuery(), getJsonPathVariable(), getKeyJsonValueFromContainer(), GetLatestSnapshot(), GetLocalBufferStorage(), GetLockmodeName(), GetLocksMethodTable(), GetLockStatusData(), GetLockTagsMethodTable(), GetLWLockIdentifier(), GetMemoryChunkMethodID(), getMessageFromWorker(), getmissingattr(), GetMockAuthenticationNonce(), GetMultiXactIdMembers(), GetNewOidWithIndex(), GetNewRelFileNumber(), GetNewTransactionId(), GetNSItemByRangeTablePosn(), getObjectDescription(), getObjectIdentityParts(), getObjectTypeDescription(), GetOldestActiveTransactionId(), GetOldestSafeDecodingTransactionId(), GetOldSnapshotFromTimeMapping(), GetOuterUserId(), GetOverrideSearchPath(), GetParentPredicateLockTag(), GetPredicateLockStatusData(), GetPrivateRefCount(), GetPrivateRefCountEntry(), GetPubPartitionOptionRelations(), GetRealCmax(), GetRealCmin(), GetRelationPath(), GetRmgrDesc(), getRootTableInfo(), GetRTEByRangeTablePosn(), GetRunningTransactionData(), GetRunningTransactionLocks(), GetSafeSnapshot(), getScalar(), GetSchemaPublicationRelations(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), GetSessionUserId(), GetSnapshotData(), GetSnapshotDataReuse(), GetStableLatestTransactionId(), GetSubscription(), GetSysCacheOid(), GetSystemIdentifier(), GetTableAmRoutine(), GetTableInfo(), GetTempTablespaces(), GetTempToastNamespace(), getTimelineHistory(), gettimeofday(), gettoken_tsvector(), GetTransactionSnapshot(), getTransactionStatus(), GetTupleForTrigger(), GetUserId(), getVariable(), GetVirtualXIDsDelayingChkpt(), GetVisibilityMapPins(), GetWALInsertionTimeLine(), GetWALRecordInfo(), GetXLogBuffer(), GetXLogReceiptTime(), getZipfianRand(), gin_consistent_jsonb(), gin_consistent_jsonb_path(), gin_trgm_triconsistent(), gin_triconsistent_jsonb(), gin_triconsistent_jsonb_path(), ginbeginscan(), ginbulkdelete(), ginCombineData(), ginCompressPostingList(), gincost_pattern(), gincost_scalararrayopexpr(), GinDataPageAddPostingItem(), ginDeletePage(), ginFindLeafPage(), ginFindParents(), ginFinishSplit(), GinFormTuple(), ginGetBAEntry(), ginHeapTupleFastInsert(), ginInsertBAEntries(), ginInsertCleanup(), GinPageDeletePostingItem(), ginPlaceToPage(), ginPostingListDecodeAllSegments(), ginRedoDeleteListPages(), ginRedoDeletePage(), ginRedoInsert(), ginRedoInsertData(), ginRedoInsertEntry(), ginRedoInsertListPage(), ginRedoRecompress(), ginRedoUpdateMetapage(), ginRedoVacuumDataLeafPage(), ginScanToDelete(), gintuple_get_attrnum(), ginvacuumcleanup(), ginVacuumPostingTreeLeaves(), gist_box_picksplit(), gist_point_consistent(), gistbufferinginserttuples(), gistbuild(), gistchoose(), gistdeletepage(), gistdoinsert(), gistFindPath(), gistfinishsplit(), gistfixsplit(), gistGetFakeLSN(), gistGetItupFromPage(), gistindex_keytest(), gistkillitems(), gistMemorizeAllDownlinks(), GistPageGetDeleteXid(), GistPageSetDeleted(), gistPlaceItupToPage(), gistplacetopage(), gistPopItupFromNodeBuffer(), gistProcessItup(), gistprunepage(), gistRedoPageSplitRecord(), gistRedoPageUpdateRecord(), gistRelocateBuildBuffersOnSplit(), gistrescan(), gistScanPage(), gistSplit(), gistSplitByKey(), gistUserPicksplit(), gistvacuum_delete_empty_pages(), GlobalVisHorizonKindForRel(), GlobalVisTestFor(), GlobalVisTestIsRemovableFullXid(), GrantLock(), GrantLockLocal(), group_by_has_partkey(), grouping_planner(), gtsvector_same(), guc_free(), guc_realloc(), GUCArrayAdd(), GUCArrayDelete(), handle_streamed_transaction(), HandleCopyResult(), HandleSlashCmds(), HandleWalSndInitStopping(), hash_agg_enter_spill_mode(), hash_array(), hash_array_extended(), hash_create(), hash_destroy(), hash_get_shared_size(), hash_inner_and_outer(), hash_numeric(), hash_numeric_extended(), hash_object_field_end(), hash_record(), hash_record_extended(), hash_scalar(), hash_search_with_hash_value(), hash_xlog_add_ovfl_page(), hash_xlog_init_meta_page(), hash_xlog_move_page_contents(), hash_xlog_squeeze_page(), hashagg_recompile_expressions(), hashagg_spill_tuple(), hashbeginscan(), hashbucketcleanup(), hashbulkdelete(), have_partkey_equi_join(), have_relevant_eclass_joinclause(), HaveVirtualXIDsDelayingChkpt(), heap_abort_speculative(), heap_attisnull(), heap_attr_equals(), heap_beginscan(), heap_compare_slots(), heap_create(), heap_create_with_catalog(), heap_delete(), heap_fetch_toast_slice(), heap_fill_tuple(), heap_finish_speculative(), heap_force_common(), heap_freeze_execute_prepared(), heap_get_latest_tid(), heap_get_root_tuples(), heap_getsysattr(), heap_hot_search_buffer(), heap_index_delete_tuples(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_page_is_all_visible(), heap_page_prune_execute(), heap_prepare_freeze_tuple(), heap_prepare_insert(), heap_prune_chain(), heap_prune_record_dead(), heap_prune_record_prunable(), heap_prune_record_redirect(), heap_prune_record_unused(), heap_prune_satisfies_vacuum(), heap_setscanlimits(), heap_toast_delete(), heap_toast_insert_or_update(), heap_tuple_infomask_flags(), heap_tuple_would_freeze(), heap_update(), heap_vacuum_rel(), heap_xlog_freeze_cmp(), heap_xlog_freeze_plan(), heap_xlog_insert(), heap_xlog_multi_insert(), heap_xlog_prune(), heap_xlog_update(), heap_xlog_vacuum(), heapam_fetch_row_version(), heapam_index_build_range_scan(), heapam_index_fetch_tuple(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), heapam_relation_set_new_filelocator(), heapam_scan_analyze_next_tuple(), heapam_scan_bitmap_next_block(), heapam_scan_bitmap_next_tuple(), heapam_scan_sample_next_block(), heapam_scan_sample_next_tuple(), heapam_tuple_lock(), heapam_tuple_satisfies_snapshot(), HeapCheckForSerializableConflictOut(), heapgetpage(), heapgettup(), heapgettup_pagemode(), HeapTupleHeaderGetCmax(), HeapTupleHeaderGetCmin(), HeapTupleHeaderIsOnlyLocked(), HeapTupleIsSurelyDead(), HeapTupleSatisfiesDirty(), HeapTupleSatisfiesHistoricMVCC(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesNonVacuumable(), HeapTupleSatisfiesSelf(), HeapTupleSatisfiesToast(), HeapTupleSatisfiesUpdate(), HeapTupleSatisfiesVacuum(), HeapTupleSatisfiesVacuumHorizon(), hemdist(), histcontrol_hook(), histogram_selectivity(), HistoricSnapshotGetTupleCids(), hk_breadth_search(), HotStandbyActiveInReplay(), hstore_exec_setup(), hstore_from_array(), hstore_from_arrays(), hstore_from_record(), hstore_hash(), hstore_hash_extended(), hstore_subscript_fetch(), hstore_subscript_transform(), hstore_to_array_internal(), hypothetical_dense_rank_final(), hypothetical_rank_common(), identify_join_columns(), ieee_float32_to_uint32(), in_range_numeric_numeric(), inclusion_get_strategy_procinfo(), IncrBufferRefCount(), IncrTupleDescRefCount(), index_beginscan_parallel(), index_build(), index_close(), index_compute_xid_horizon_for_tuples(), index_concurrently_build(), index_concurrently_create_copy(), index_constraint_create(), index_create(), index_deform_tuple_internal(), index_delete_check_htid(), index_delete_sort_cmp(), index_drop(), index_form_tuple_context(), index_getattr(), index_getnext_slot(), index_getnext_tid(), index_getprocid(), index_getprocinfo(), index_opclass_options(), index_pages_fetched(), index_register(), index_reloptions(), index_rescan(), index_restrpos(), index_set_state_flags(), index_store_float8_orderby_distances(), index_truncate_tuple(), index_update_stats(), indexam_property(), IndexGetRelation(), IndexNextWithReorder(), IndexOnlyNext(), IndexSetParentIndex(), inet_gist_consistent(), inet_spg_choose(), inet_spg_inner_consistent(), init_params(), init_ps_display(), init_rel_sync_cache(), init_returning_filter(), init_sexpr(), init_span(), init_toast_snapshot(), initArrayResultAny(), InitAuxiliaryProcess(), InitBufferPool(), InitBufferPoolAccess(), InitCatalogCache(), InitCatalogCachePhase2(), InitCatCache(), InitCatCachePhase2(), initClosestMatch(), InitFileAccess(), initial_cost_mergejoin(), initialize_mergeclause_eclasses(), initialize_phase(), initialize_reloptions(), InitializeClientEncoding(), InitializeGUCOptions(), InitializeLatchSupport(), InitializeLatchWaitSet(), InitializeMaxBackends(), InitializeOneGUCOption(), InitializeSessionUserId(), InitializeSessionUserIdStandalone(), InitializeSystemUser(), InitializeWalConsistencyChecking(), InitLatch(), InitPartitionPruneContext(), InitPlan(), InitPostgres(), InitPostmasterDeathWatchHandle(), InitPredicateLocks(), InitProcess(), InitProcessPhase2(), InitProcGlobal(), InitRecoveryTransactionEnvironment(), InitShmemAllocation(), InitStandaloneProcess(), inittapes(), InitTemporaryFileAccess(), InitTempTableNamespace(), InitWalRecovery(), InitWalSenderSlot(), inline_set_returning_function(), Insert(), insert_item_into_bucket(), insert_new_cell(), insert_timeout(), InsertOneNull(), InsertOneValue(), InstallXLogFileSegment(), instantiate_empty_record_variable(), int2vectorrecv(), interval_support(), intorel_startup(), intset_add_member(), intset_is_member(), intset_iterate_next(), intset_update_upper(), inv_close(), inv_getsize(), inv_read(), inv_seek(), inv_tell(), inv_truncate(), inv_write(), InvalidateBuffer(), InvalidateConstraintCacheCallBack(), InvalidateOprCacheCallBack(), InvalidateOprProofCacheCallBack(), InvalidatePossiblyObsoleteSlot(), invariant_g_offset(), invariant_l_nontarget_offset(), invariant_l_offset(), invariant_leq_offset(), is_code_in_table(), is_dummy_partition(), is_libpq_option(), is_safe_append_member(), is_simple_union_all_recurse(), is_simple_values(), is_strict_saop(), is_subquery_var(), is_valid_option(), IsAffixFlagInUse(), IsBufferCleanupOK(), IsCheckpointOnSchedule(), IsFutureLSN(), IsPostmasterChildWalSender(), issue_xlog_fsync(), IsTidEqualAnyClause(), ItemPointerCopy(), ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), ItemPointerSet(), ItemPointerSetBlockNumber(), ItemPointerSetInvalid(), ItemPointerSetOffsetNumber(), itemptr_to_uint64(), iterate_word_similarity(), IteratorConcat(), iteratorFromContainer(), join_search_one_level(), json_agg_finalfn(), json_lex_string(), json_object_agg_finalfn(), jsonb_agg_finalfn(), jsonb_concat(), jsonb_delete(), jsonb_delete_array(), jsonb_delete_idx(), jsonb_delete_path(), jsonb_get_element(), jsonb_in_object_field_start(), jsonb_in_scalar(), jsonb_insert(), jsonb_object_agg_finalfn(), jsonb_set(), jsonb_strip_nulls(), jsonb_subscript_fetch(), jsonb_subscript_transform(), jsonb_to_plpython(), JsonbArraySize(), JsonbDeepContains(), JsonbExtractScalar(), JsonbToCStringWorker(), JsonbType(), JsonbValueToJsonb(), jspGetArg(), jspGetArraySubscript(), jspGetBool(), jspGetLeftArg(), jspGetNext(), jspGetNumeric(), jspGetRightArg(), jspGetString(), jspInit(), JumbleQuery(), JumbleQueryInternal(), keyGetItem(), KnownAssignedXidExists(), KnownAssignedXidsAdd(), KnownAssignedXidsCompress(), KnownAssignedXidsRemove(), KnownAssignedXidsRemovePreceding(), KnownAssignedXidsSearch(), label_sort_with_costsize(), LagTrackerRead(), lappend(), lappend_int(), lappend_oid(), lappend_xid(), lastval(), LaunchParallelWorkers(), lazy_check_wraparound_failsafe(), lazy_cleanup_all_indexes(), lazy_cleanup_one_index(), lazy_scan_heap(), lazy_scan_noprune(), lazy_scan_prune(), lazy_scan_skip(), lazy_vacuum(), lazy_vacuum_all_indexes(), lazy_vacuum_heap_page(), lazy_vacuum_heap_rel(), lazy_vacuum_one_index(), lcons(), lcons_int(), lcons_oid(), LCS_asString(), leader_takeover_tapes(), leafRepackItems(), lengthCompareJsonbStringValue(), libpq_append_conn_error(), libpq_append_error(), libpqrcv_connect(), libpqrcv_get_conninfo(), libpqrcv_get_senderinfo(), libpqrcv_readtimelinehistoryfile(), libpqrcv_startstreaming(), like_fixed_prefix(), like_regex_support(), list_cell_number(), list_concat(), list_concat_copy(), list_concat_unique(), list_concat_unique_int(), list_concat_unique_oid(), list_concat_unique_ptr(), list_copy_deep(), list_deduplicate_oid(), list_delete(), list_delete_int(), list_delete_nth_cell(), list_delete_oid(), list_delete_ptr(), list_difference(), list_difference_int(), list_difference_oid(), list_difference_ptr(), list_free_deep(), list_insert_nth(), list_insert_nth_int(), list_insert_nth_oid(), list_intersection(), list_intersection_int(), list_last_cell(), list_member(), list_member_int(), list_member_oid(), list_member_ptr(), list_member_xid(), list_nth(), list_nth_cell(), list_nth_int(), list_nth_oid(), list_union(), list_union_int(), list_union_oid(), list_union_ptr(), llvm_assert_in_fatal_section(), llvm_build_inline_plan(), llvm_compile_expr(), llvm_execute_inline_plan(), llvm_expand_funcname(), llvm_pg_var_func_type(), llvm_pg_var_type(), llvm_resolve_symbol(), llvm_shutdown(), llvm_split_symbol_name(), lnext(), lo_get_fragment_internal(), lo_import_internal(), load_hba(), load_ident(), load_relcache_init_file(), load_return_type(), load_typcache_tupdesc(), LocalBufferAlloc(), LocalProcessControlFile(), lock_twophase_postcommit(), lock_twophase_recover(), lock_twophase_standby_recover(), LockAcquireExtended(), LockBuffer(), LockBufferForCleanup(), LockCheckConflicts(), LockReassignCurrentOwner(), LockRefindAndRelease(), LockRelease(), LockReleaseAll(), LockWaiterCount(), log10Pow2(), log10Pow5(), log_heap_new_cid(), log_heap_update(), log_heap_visible(), log_newpage_buffer(), logfile_rotate_dest(), logical_heap_rewrite_flush_mappings(), LogicalConfirmReceivedLocation(), LogicalIncreaseRestartDecodingForSlot(), LogicalIncreaseXminForSlot(), logicalmsg_desc(), LogicalOutputWrite(), logicalrep_read_stream_abort(), logicalrep_read_stream_start(), logicalrep_sync_worker_count(), logicalrep_worker_attach(), logicalrep_worker_cleanup(), logicalrep_worker_find(), logicalrep_worker_launch(), logicalrep_worker_wakeup_ptr(), logicalrep_workers_find(), logicalrep_write_commit_prepared(), logicalrep_write_delete(), logicalrep_write_prepare_common(), logicalrep_write_rollback_prepared(), logicalrep_write_stream_abort(), logicalrep_write_stream_commit(), logicalrep_write_stream_start(), logicalrep_write_update(), LogicalRepSyncTableStart(), LogicalTapeBackspace(), LogicalTapeFreeze(), LogicalTapeRead(), LogicalTapeRewindForRead(), LogicalTapeSeek(), LogicalTapeTell(), LogicalTapeWrite(), LogLogicalMessage(), LogRecoveryConflict(), LogStandbySnapshot(), lookup_collation_cache(), lookup_proof_cache(), lookup_rowtype_tupdesc_internal(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), lookup_var_attr_stats(), LookupFuncNameInternal(), LookupFuncWithArgs(), LookupGXact(), LookupOpclassInfo(), LookupOperWithArgs(), LookupTupleHashEntry(), LookupTupleHashEntryHash(), LookupTypeNameExtended(), lowerstr_with_len(), lrq_alloc(), lrq_prefetch(), LruDelete(), LruInsert(), ltree_gist_alloc(), ltsGetPreallocBlock(), ltsInitReadBuffer(), LWLockAcquire(), LWLockAcquireOrWait(), LWLockAttemptLock(), LWLockConditionalAcquire(), LWLockDequeueSelf(), LWLockRelease(), LWLockUpdateVar(), LWLockWaitForVar(), LWLockWaitListUnlock(), LWLockWakeup(), main(), MainLoop(), MaintainLatestCompletedXid(), MaintainLatestCompletedXidRecovery(), MaintainOldSnapshotTimeMapping(), make_bound_box(), make_bounded_heap(), make_build_data(), make_callstmt_target(), make_datum_param(), make_expanded_record_from_datum(), make_greater_string(), make_inh_translation_list(), make_join_rel(), make_modifytable(), make_new_connection(), make_new_heap(), make_new_segment(), make_one_partition_rbound(), make_one_rel(), make_oper_cache_entry(), make_outerjoininfo(), make_partition_op_expr(), make_partition_pruneinfo(), make_partitionedrel_pruneinfo(), make_pathkeys_for_groupagg(), make_pathkeys_for_sortclauses(), make_recursive_union(), make_restrictinfo(), make_restrictinfo_internal(), make_result_opt_error(), make_ruledef(), make_scalar_key(), make_setop(), make_sort_input_target(), make_subplan(), make_trigrams(), make_tuple_from_result_row(), make_unique_from_pathkeys(), make_unique_from_sortclauses(), make_viewdef(), make_window_input_target(), makeArrayResultArr(), makeCompoundFlags(), makeDependencyGraph(), makeIndexInfo(), makeMdArrayResult(), MakeNewFileSetSegment(), makeObjectName(), makeSublist(), map_sql_identifier_to_xml_name(), map_variable_attnos_mutator(), mark_async_capable_plan(), mark_invalid_subplans_as_finished(), mark_partial_aggref(), MarkAsPrepared(), MarkAsPreparing(), MarkAsPreparingGuts(), MarkBufferDirty(), MarkBufferDirtyHint(), MarkInheritDetached(), MarkLocalBufferDirty(), MarkLockClear(), MarkPortalDone(), MarkPortalFailed(), MarkPostmasterChildActive(), MarkPostmasterChildInactive(), MarkPostmasterChildWalSender(), MarkSubxactTopXidLogged(), markVarForSelectPriv(), match_clause_to_indexcol(), match_clause_to_ordering_op(), match_clause_to_partition_key(), match_eclasses_to_foreign_key_col(), match_expr_to_partition_keys(), match_pattern_prefix(), match_unsorted_outer(), MatchNamedCall(), materializeResult(), max_parallel_hazard_test(), MaxPredicateChildLocks(), maybe_reread_subscription(), maybe_start_skipping_changes(), mcelem_tsquery_selec(), mcv_get_match_bitmap(), md5_crypt_verify(), mdcreate(), mdextend(), mdnblocks(), mdopenfork(), mdprefetch(), mdread(), mdtruncate(), mdwrite(), mdwriteback(), MemoryChunkGetBlock(), MemoryChunkGetValue(), MemoryChunkIsExternal(), MemoryChunkSetHdrMask(), MemoryChunkSetHdrMaskExternal(), MemoryContextAlloc(), MemoryContextAllocExtended(), MemoryContextAllocHuge(), MemoryContextAllocZero(), MemoryContextAllocZeroAligned(), MemoryContextAllowInCriticalSection(), MemoryContextCreate(), MemoryContextDelete(), MemoryContextDeleteChildren(), MemoryContextGetParent(), MemoryContextInit(), MemoryContextIsEmpty(), MemoryContextMemAllocated(), MemoryContextRegisterResetCallback(), MemoryContextReset(), MemoryContextResetChildren(), MemoryContextResetOnly(), MemoryContextSetIdentifier(), MemoryContextSetParent(), MemoryContextStatsInternal(), merge_default_partitions(), merge_fdw_options(), merge_list_bounds(), merge_matching_partitions(), merge_null_partitions(), merge_partition_with_dummy(), merge_range_bounds(), MergeAffix(), MergeAttributes(), MergeAttributesIntoExisting(), MergeCheckConstraint(), MergeConstraintsIntoExisting(), mergejoinscansel(), mergeonerun(), mergeruns(), mergeStates(), MergeWithExistingConstraint(), message_cb_wrapper(), minimal_tuple_from_heap_tuple(), minmax_get_strategy_procinfo(), minmax_multi_get_strategy_procinfo(), minmax_multi_init(), MJExamineQuals(), mod_m(), mode_final(), ModifyWaitEvent(), moveLeafs(), mq_putmessage(), mul_var(), mulShift(), multi_sort_init(), MultiExecParallelHash(), multirange_contains_range_internal(), multirange_get_bounds(), multirange_get_range(), multirange_overleft_range(), multirange_overright_range(), multirange_union_range_equal(), multixact_redo(), multixact_twophase_postcommit(), multixact_twophase_recover(), MultiXactAdvanceOldest(), MultiXactIdCreate(), MultiXactIdExpand(), MultiXactIdGetUpdateXid(), MultiXactShmemInit(), n_choose_k(), NamedTuplestoreScanNext(), NamespaceCreate(), network_abbrev_convert(), network_subset_support(), new_intArrayType(), new_list(), NewPrivateRefCountEntry(), next_token(), NextCopyFrom(), NextCopyFromRawFields(), NextPredXact(), nextval_internal(), NISortDictionary(), nocache_index_getattr(), nocachegetattr(), NormalTransactionIdOlder(), notification_hash(), notification_match(), NUM_cache_getnew(), numeric_abbrev_convert(), numeric_add_opt_error(), numeric_div_opt_error(), numeric_div_trunc(), numeric_log(), numeric_mul_opt_error(), numeric_power(), numeric_sign(), numeric_sign_internal(), numeric_sub_opt_error(), numeric_support(), numericvar_to_int64(), numericvar_to_uint64(), object_aclmask(), object_ownercheck(), objectNamesToOids(), OffsetVarNodes_walker(), oidvectorrecv(), on_error_rollback_hook(), OnConflict_CheckForSerializationFailure(), open_file_in_directory(), OpenTemporaryFile(), OpernameGetCandidates(), ordered_set_startup(), ordered_set_transition_multi(), OwnLatch(), p_isEOF(), p_iswhat(), packGraph(), page_header(), page_verify_redirects(), PageAddItemExtended(), PageGetItem(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageInit(), PageRepairFragmentation(), PageSetPageSizeAndVersion(), PageTruncateLinePointerArray(), PageValidateSpecialPointer(), pairingheap_first(), pairingheap_remove(), pairingheap_remove_first(), palloc(), palloc0(), palloc_extended(), parallel_restore(), parallel_vacuum_bulkdel_all_indexes(), parallel_vacuum_cleanup_all_indexes(), parallel_vacuum_end(), parallel_vacuum_init(), parallel_vacuum_main(), parallel_vacuum_process_all_indexes(), parallel_vacuum_process_unsafe_indexes(), ParallelBackupEnd(), ParallelBackupStart(), ParallelQueryMain(), ParallelSlotsGetIdle(), ParallelSlotsSetup(), ParallelWorkerMain(), ParallelWorkerReportLastRecEnd(), parse_analyze_fixedparams(), parse_analyze_varparams(), parse_analyze_withcb(), parse_datetime(), parse_hba_line(), parse_ident_line(), parse_int_param(), parse_object(), parse_output_parameters(), parse_subscription_options(), parse_tsquery(), parseCheckAggregates(), ParseFraction(), ParseFuncOrColumn(), ParseLongOption(), parseNameAndArgTypes(), parseQuery(), parseWorkerCommand(), parseWorkerResponse(), partition_bounds_copy(), partition_bounds_create(), partition_bounds_equal(), partition_bounds_merge(), PartitionDirectoryLookup(), PartitionPruneFixSubPlanMap(), partitions_are_ordered(), partkey_datum_from_expr(), path_inter(), PathNameCreateTemporaryFile(), PathNameOpenTemporaryFile(), patternsel_common(), patternToSQLRegex(), percentile_cont_final_common(), percentile_cont_multi_final_common(), percentile_disc_final(), percentile_disc_multi_final(), perform_base_backup(), perform_pruning_base_step(), perform_pruning_combine_step(), perform_pullup_replace_vars(), perform_work_item(), PerformCursorOpen(), PerformWalRecovery(), PersistHoldablePortal(), pg_atomic_fetch_sub_u32(), pg_atomic_fetch_sub_u64(), pg_atomic_sub_fetch_u32(), pg_atomic_sub_fetch_u64(), pg_b64_decode(), pg_b64_encode(), pg_backup_stop(), pg_blocking_pids(), pg_checksum_block(), pg_checksum_final(), pg_checksum_page(), pg_checksum_type_name(), pg_clean_ascii(), pg_collation_actual_version(), pg_cryptohash_error(), pg_decode_change(), pg_decode_startup(), pg_decode_stream_abort(), pg_encoding_max_length(), pg_encoding_to_char(), pg_fsync(), pg_get_constraintdef_worker(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_replication_slots(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), pg_get_wal_replay_pause_state(), pg_GSS_read(), pg_GSS_write(), pg_hmac_error(), pg_isolation_test_session_is_blocked(), pg_leftmost_one_pos32(), pg_leftmost_one_pos64(), pg_lfind32(), pg_log_generic_v(), pg_log_v(), pg_logical_replication_slot_advance(), pg_logical_slot_get_changes_guts(), pg_lsn_in_internal(), pg_newlocale_from_collation(), pg_nextpower2_32(), pg_nextpower2_64(), pg_partition_root(), pg_physical_replication_slot_advance(), pg_plan_query(), pg_pwrite_zeros(), pg_pwritev_with_retry(), pg_queue_signal(), pg_re_throw(), pg_read_binary_file_common(), pg_read_file_common(), pg_relation_filepath(), pg_replication_origin_progress(), pg_replication_slot_advance(), pg_rightmost_one_pos32(), pg_rightmost_one_pos64(), pg_SASL_init(), pg_saslprep(), pg_settings_get_flags(), pg_stat_statements_internal(), pg_stats_ext_mcvlist_items(), pg_strfromd(), pg_timer_thread(), pg_ultostr_zeropad(), pg_utf8_verifystr(), pg_verify_mbstr(), pg_verify_mbstr_len(), pg_visibility_tupdesc(), pg_xact_status(), PgArchiverMain(), pgfdw_finish_pre_commit_cleanup(), pgfdw_finish_pre_subcommit_cleanup(), pgfdw_inval_callback(), pgfdw_subxact_callback(), pgfdw_xact_callback(), pgoutput_change(), pgoutput_commit_txn(), pgoutput_row_filter(), pgoutput_row_filter_exec_expr(), pgoutput_send_begin(), pgoutput_stream_abort(), pgoutput_stream_commit(), pgoutput_stream_prepare_txn(), pgoutput_stream_start(), pgoutput_stream_stop(), PGSemaphoreCreate(), PGSharedMemoryCreate(), PGSharedMemoryNoReAttach(), PGSharedMemoryReAttach(), pgss_store(), pgstat_acquire_entry_ref(), pgstat_assoc_relation(), pgstat_attach_shmem(), pgstat_before_server_shutdown(), pgstat_begin_changecount_write(), pgstat_beinit(), pgstat_bestart(), pgstat_build_snapshot(), pgstat_build_snapshot_fixed(), pgstat_cmp_hash_key(), pgstat_database_flush_cb(), pgstat_delete_pending_entry(), pgstat_detach_shmem(), pgstat_drop_database_and_contents(), pgstat_drop_entry_internal(), pgstat_dsa_init_size(), pgstat_end_changecount_write(), pgstat_fetch_entry(), pgstat_flush_pending_entries(), pgstat_flush_wal(), pgstat_gc_entry_refs(), pgstat_get_entry_data(), pgstat_get_entry_ref(), pgstat_get_entry_ref_cached(), pgstat_get_kind_info(), pgstat_get_transactional_drops(), pgstat_hash_hash_key(), pgstat_initialize(), pgstat_need_entry_refs_gc(), pgstat_prep_pending_entry(), pgstat_progress_update_multi_param(), pgstat_progress_update_param(), pgstat_read_statsfile(), pgstat_reinit_entry(), pgstat_release_all_entry_refs(), pgstat_release_entry_ref(), pgstat_release_matching_entry_refs(), pgstat_report_analyze(), pgstat_report_autovac(), pgstat_report_bgwriter(), pgstat_report_checkpointer(), pgstat_report_recovery_conflict(), pgstat_report_stat(), pgstat_reset(), pgstat_reset_entry(), pgstat_reset_replslot(), pgstat_reset_slru(), pgstat_setup_shared_refs(), pgstat_shutdown_hook(), pgstat_snapshot_fixed(), pgstat_unlink_relation(), pgstat_write_statsfile(), pgtls_verify_peer_name_matches_certificate_guts(), pgwin32_dispatch_queued_signals(), pgwin32_ReserveSharedMemoryRegion(), pgwin32_select(), pgwin32_SharedMemoryDelete(), PhysicalConfirmReceivedLocation(), PinBuffer(), PinBuffer_Locked(), placeChar(), plan_set_operations(), plan_single_revoke(), PlanCacheComputeResultDesc(), PlanCacheObjectCallback(), PlanCacheRelCallback(), plperl_call_perl_func(), plperl_return_next_internal(), plperl_sv_to_datum(), plperl_trigger_handler(), plpgsql_append_source_text(), plpgsql_build_recfield(), plpgsql_destroy_econtext(), plpgsql_exec_trigger(), plpgsql_free_function_memory(), plpgsql_HashTableInit(), plpgsql_inline_handler(), plpgsql_ns_additem(), plpgsql_ns_pop(), plpgsql_param_compile(), plpgsql_param_eval_generic(), plpgsql_param_eval_generic_ro(), plpgsql_param_eval_recfield(), plpgsql_param_eval_var(), plpgsql_param_eval_var_ro(), plpgsql_param_fetch(), plsample_trigger_handler(), pltcl_func_handler(), pltcl_handler(), pltcl_init_tuple_store(), pltcl_trigger_handler(), PLy_abort_open_subtransactions(), PLy_cursor_plan(), PLy_cursor_query(), PLy_elog_impl(), PLy_exec_function(), PLy_exec_trigger(), PLy_generate_spi_exceptions(), PLy_global_args_pop(), PLy_input_setup_tuple(), PLy_output_setup_record(), PLy_output_setup_tuple(), PLy_procedure_call(), PLy_procedure_create(), PLy_procedure_munge_source(), PLy_spi_prepare(), PLy_traceback(), PLyDict_FromTuple(), PLyList_FromArray(), PLyMapping_ToComposite(), PLyObject_ToComposite(), PLySequence_ToComposite(), PLySequence_ToJsonbValue(), PLyUnicode_FromJsonbValue(), point_inside(), poly_contain_poly(), poly_overlap_internal(), poly_to_circle(), PopActiveSnapshot(), populate_array(), populate_array_assign_ndims(), populate_array_dim_jsonb(), populate_array_element(), populate_array_element_end(), populate_array_json(), populate_array_report_expected_array(), populate_array_scalar(), populate_domain(), populate_record_worker(), populate_recordset_object_field_end(), populate_recordset_worker(), populate_scalar(), populate_typ_list(), PortalCleanup(), PortalCreateHoldStore(), PortalDefineQuery(), PortalDrop(), PortalRun(), PortalRunFetch(), PortalRunMulti(), PortalRunSelect(), PortalRunUtility(), PortalStart(), postgres_fdw_get_connections(), postgresBeginForeignInsert(), postgresEndForeignInsert(), postgresExecForeignTruncate(), postgresExplainForeignScan(), postgresForeignAsyncConfigureWait(), postgresForeignAsyncNotify(), postgresGetForeignModifyBatchSize(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresImportForeignSchema(), postgresIterateDirectModify(), PostgresMain(), postgresPlanDirectModify(), postgresRecheckForeignScan(), PostgresSingleUserMain(), PostmasterMain(), PostmasterStateMachine(), PostPrepare_Locks(), PostPrepare_PgStat(), PostPrepare_PredicateLocks(), postprocess_setop_tlist(), postprocess_sql_command(), postquel_start(), postquel_sub_params(), pow5bits(), pow5Factor(), pq_discardbytes(), pq_endmsgread(), pq_endtypsend(), pq_getbyte(), pq_getbyte_if_available(), pq_getbytes(), pq_getmessage(), pq_init(), pq_peekbyte(), pq_putmessage_v2(), pq_set_parallel_leader(), pq_writeint16(), pq_writeint32(), pq_writeint64(), pq_writeint8(), pq_writestring(), pqAppendCmdQueueEntry(), PQconnectPoll(), pqFunctionCall3(), PQgetResult(), pqPipelineProcessQueue(), pqRecycleCmdQueueEntry(), PreCommit_CheckForSerializationFailure(), PreCommit_on_commit_actions(), predicate_classify(), predicate_implied_by_recurse(), predicate_implied_by_simple_clause(), predicate_refuted_by_recurse(), predicatelock_hash(), predicatelock_twophase_recover(), PredicateLockPageSplit(), PrefetchBuffer(), PrefetchSharedBuffer(), prefix_selectivity(), prepare_cb_wrapper(), prepare_query_params(), prepare_sort_from_pathkeys(), prepare_vacuum_command(), PrepareInvalidationState(), PrepareRedoAdd(), PrepareRedoRemove(), PrepareSortSupportFromGistIndexRel(), PrepareSortSupportFromIndexRel(), PrepareSortSupportFromOrderingOp(), PrepareToInvalidateCacheTuple(), PrepareTransaction(), PrepareTransactionBlock(), preprocess_aggref(), preprocess_aggrefs_walker(), preprocess_groupclause(), preprocess_limit(), preprocess_minmax_aggregates(), preprocess_rowmarks(), preprocess_targetlist(), PrescanPreparedTransactions(), print_expr(), print_function_arguments(), print_function_sqlbody(), PrintBufferLeakWarning(), PrintCatCacheLeakWarning(), printCrosstab(), printJsonPathItem(), printPsetInfo(), printQuery(), PrintResultInCrosstab(), printTypmod(), ProcArrayAdd(), ProcArrayApplyRecoveryInfo(), ProcArrayApplyXidAssignment(), ProcArrayClearTransaction(), ProcArrayEndTransaction(), ProcArrayEndTransactionInternal(), ProcArrayGroupClearXid(), ProcArrayInitRecovery(), ProcArrayInstallImportedXmin(), ProcArrayInstallRestoredXmin(), ProcArrayRemove(), ProcArraySetReplicationSlotXmin(), ProcedureCreate(), process_equivalence(), process_function_rte_ref(), process_implied_equality(), process_inner_partition(), process_ordered_aggregate_single(), process_outer_partition(), process_owned_by(), process_pending_request(), process_pgfdw_appname(), process_pipe_input(), process_security_barrier_quals(), process_startup_options(), process_sublinks_mutator(), process_subquery_nestloop_params(), process_syncing_tables_for_apply(), process_target_wal_block_change(), ProcessGUCArray(), processIndirection(), ProcessInterrupts(), processPendingPage(), ProcessProcSignalBarrier(), processQueryResult(), ProcessRecords(), ProcessRepliesIfAny(), ProcessSyncRequests(), ProcessTwoPhaseBuffer(), processTypesSpec(), ProcessUtility(), ProcessUtilitySlow(), ProcKill(), proclist_contains_offset(), proclist_delete_offset(), proclist_pop_head_node_offset(), proclist_push_head_offset(), proclist_push_tail_offset(), proclock_hash(), ProcLockWakeup(), ProcSignalInit(), ProcSleep(), ProcWakeup(), produce_tuple_asynchronously(), progress_report(), prune_append_rel_partitions(), pset_value_string(), pthread_barrier_wait(), PublicationAddSchemas(), PublicationAddTables(), pull_up_simple_subquery(), pull_up_simple_union_all(), pull_up_simple_values(), pull_up_subqueries(), pull_up_subqueries_recurse(), pull_var_clause(), pull_varattnos_walker(), pullup_replace_vars_subquery(), push_old_value(), push_stmt_mcontext(), PushActiveSnapshotWithLevel(), pushJsonbValue(), pushJsonbValueScalar(), pushOperator(), PutMemoryContextsStatsTupleStore(), qc_is_allowed(), qsortCompareItemPointers(), qual_is_pushdown_safe(), query_is_distinct_for(), query_planner(), query_tree_mutator_impl(), query_tree_walker_impl(), QueryRewrite(), QueuePartitionConstraintValidation(), quote_if_needed(), range_add_value(), range_adjacent_multirange_internal(), range_after_multirange_internal(), range_before_multirange_internal(), range_contains_multirange_internal(), range_deserialize(), range_gist_class_split(), range_gist_double_sorting_split(), range_gist_picksplit(), range_gist_single_sorting_split(), range_overlaps_multirange_internal(), range_overleft_multirange_internal(), range_overright_multirange_internal(), range_serialize(), rangeTableEntry_used_walker(), RangeVarGetAndCheckCreationNamespace(), RangeVarGetRelidExtended(), rank_up(), raw_heap_insert(), rbt_create(), RE_compile_and_cache(), read_binary_file(), read_client_final_message(), read_relmap_file(), read_seq_tuple(), ReadArrayStr(), ReadBuffer_common(), ReadBufferBI(), ReadCheckpointRecord(), readCommandResponse(), readMessageFromPipe(), ReadPageInternal(), ReadRecentBuffer(), ReadReplicationSlot(), readtup_datum(), ready_list_remove(), reaper(), rebuildInsertSql(), recheck_cast_function_args(), reconsider_full_join_clause(), reconsider_outer_join_clause(), record_cmp(), record_image_cmp(), recordDependencyOnCurrentExtension(), recordExtensionMembership(), RecordKnownAssignedTransactionIds(), RecordNewMultiXact(), recordSharedDependencyOn(), RecordTransactionCommit(), RecordTransactionCommitPrepared(), RecoverPreparedTransactions(), recovery_create_dbdir(), RecoveryConflictInterrupt(), recurse_push_qual(), recurse_pushdown_safe(), recurse_set_operations(), reduce_dependencies(), reduce_expanded_ranges(), reduce_outer_joins_pass2(), refresh_by_match_merge(), regcomp_auth_token(), regexec_auth_token(), regexp_fixed_prefix(), regexp_match(), register_dirty_segment(), register_ENR(), register_unlink_segment(), RegisterDynamicBackgroundWorker(), RegisterPredicateLockingXid(), RegisterTimeout(), reindex_error_callback(), reindex_one_database(), reindex_relation(), ReindexMultipleInternal(), ReindexMultipleTables(), ReindexPartitions(), ReindexRelationConcurrently(), ReinitializeParallelWorkers(), relation_close(), relation_excluded_by_constraints(), relation_has_unique_index_for(), relation_is_updatable(), relation_mark_replica_identity(), relation_needs_vacanalyze(), relation_open(), RelationBuildDesc(), RelationBuildLocalRelation(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRuleLock(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationCacheInvalidate(), RelationClearRelation(), RelationCloseSmgr(), RelationCreateStorage(), RelationDecrementReferenceCount(), RelationDestroyRelation(), RelationFindReplTupleSeq(), RelationForgetRelation(), RelationGetBufferForTuple(), RelationGetDummyIndexExpressions(), RelationGetIdentityKeyBitmap(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), RelationGetNumberOfBlocksInFork(), RelationGetPartitionDesc(), RelationGetPrimaryKeyIndex(), RelationGetReplicaIndex(), RelationIdGetRelation(), RelationIdIsInInitFile(), RelationInitIndexAccessInfo(), RelationInitLockInfo(), RelationInitTableAccessMethod(), RelationMapFinishBootstrap(), RelationPutHeapTuple(), RelationReloadIndexInfo(), RelationReloadNailed(), RelationSetNewRelfilenumber(), RelationTruncate(), ReleaseAndReadBuffer(), ReleaseBuffer(), ReleaseCachedPlan(), ReleaseCatCache(), ReleaseCatCacheList(), ReleaseCurrentSubTransaction(), ReleaseExternalFD(), ReleaseGenericPlan(), ReleaseLockIfHeld(), ReleaseLruFile(), ReleaseOneSerializableXact(), ReleasePostmasterChildSlot(), ReleasePredicateLocks(), ReleasePredXact(), ReleaseSavepoint(), RelfilenumberMapInvalidateCallback(), RelidByRelfilenumber(), relmap_redo(), relptr_store_eval(), remap_groupColIdx(), RememberSyncRequest(), RememberToFreeTupleDescAtEOX(), remove_join_clause_from_rels(), remove_rel_from_query(), remove_result_refs(), remove_target(), remove_temp(), remove_timeout_index(), remove_useless_groupby_columns(), remove_useless_result_rtes(), remove_useless_results_recurse(), RemoveFromWaitQueue(), RemoveGXact(), RemoveLocalLock(), RemoveObjects(), RemoveProcFromArray(), RemoveRelations(), RemoveRoleFromObjectPolicy(), RemoveScratchTarget(), RemoveTargetIfNoLongerUsed(), rename_constraint_internal(), RenameRelationInternal(), RenameTypeInternal(), reorder_function_arguments(), ReorderBufferAddInvalidations(), ReorderBufferAllocate(), ReorderBufferAssignChild(), ReorderBufferBuildTupleCidHash(), ReorderBufferChangeMemoryUpdate(), ReorderBufferCheckMemoryLimit(), ReorderBufferCleanupTXN(), ReorderBufferFinishPrepared(), ReorderBufferForget(), ReorderBufferGetCatalogChangesXacts(), ReorderBufferGetOldestTXN(), ReorderBufferInvalidate(), ReorderBufferIterTXNFinish(), ReorderBufferIterTXNNext(), ReorderBufferLargestTopTXN(), ReorderBufferLargestTXN(), ReorderBufferPrepare(), ReorderBufferProcessTXN(), ReorderBufferQueueChange(), ReorderBufferQueueMessage(), ReorderBufferReplay(), ReorderBufferRestoreChange(), ReorderBufferRestoreChanges(), ReorderBufferRestoreCleanup(), ReorderBufferSerializeChange(), ReorderBufferSerializeTXN(), ReorderBufferSetBaseSnapshot(), ReorderBufferStreamCommit(), ReorderBufferStreamTXN(), ReorderBufferToastAppendChunk(), ReorderBufferToastInitHash(), ReorderBufferToastReplace(), ReorderBufferTransferSnapToParent(), ReorderBufferTruncateTXN(), ReorderBufferTXNByXid(), repalloc(), repalloc_extended(), replace_nestloop_params_mutator(), replace_outer_agg(), replace_outer_grouping(), replace_outer_placeholdervar(), replace_outer_var(), replace_vars_in_jointree(), ReplicationSlotAcquire(), ReplicationSlotCleanup(), ReplicationSlotCreate(), ReplicationSlotDrop(), ReplicationSlotDropAcquired(), ReplicationSlotDropAtPubNode(), ReplicationSlotIndex(), ReplicationSlotMarkDirty(), ReplicationSlotPersist(), ReplicationSlotRelease(), ReplicationSlotReserveWal(), ReplicationSlotSave(), ReplicationSlotsComputeRequiredLSN(), ReplicationSlotsComputeRequiredXmin(), replorigin_advance(), replorigin_by_oid(), replorigin_create(), replorigin_drop_by_name(), replorigin_session_advance(), replorigin_session_get_progress(), replorigin_session_reset(), replorigin_session_setup(), report_namespace_conflict(), report_parse_error(), ReportBackgroundWorkerExit(), ReportBackgroundWorkerPID(), ReportChangedGUCOptions(), RequestNamedLWLockTranche(), RequestXLogStreaming(), ReservePrivateRefCountEntry(), ReserveXLogInsertLocation(), ReserveXLogSwitch(), ResetBackgroundWorkerCrashTimes(), ResetCatalogCache(), ResetLatch(), ResetPlanCache(), ResetSequence(), ResetUnloggedRelationsInDbspaceDir(), resize(), resize_intArrayType(), resolve_aggregate_transtype(), resolve_column_ref(), ResolveCminCmaxDuringDecoding(), ResolveRecoveryConflictWithBufferPin(), ResolveRecoveryConflictWithLock(), ResolveRecoveryConflictWithVirtualXIDs(), ResourceArrayAdd(), ResourceArrayEnlarge(), ResourceArrayInit(), ResourceArrayRemove(), ResourceOwnerDelete(), ResourceOwnerEnlargeBuffers(), ResourceOwnerForgetLock(), ResourceOwnerNewParent(), ResourceOwnerReleaseInternal(), ResourceOwnerRememberLock(), restore_toc_entries_parallel(), RestoreArchive(), RestoreArchivedFile(), RestoreComboCIDState(), RestoreGUCState(), RestorePendingSyncs(), restorePsetInfo(), RestoreReindexState(), RestoreScratchTarget(), RestoreUncommittedEnums(), ReThrowError(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), revalidate_rectypeid(), RevalidateCachedQuery(), revmap_get_buffer(), rewrite_heap_dead_tuple(), rewrite_heap_tuple(), RewriteQuery(), rewriteRuleAction(), rewriteSearchAndCycle(), rewriteTargetView(), rewriteValuesRTE(), rewriteValuesRTEToNulls(), ri_Check_Pk_Match(), RI_FKey_fk_upd_check_required(), ri_HashCompareOp(), ri_HashPreparedPlan(), ri_LoadConstraintInfo(), roles_is_member_of(), rollback_prepared_cb_wrapper(), RollbackAndReleaseCurrentSubTransaction(), RollbackToSavepoint(), rot13_passphrase(), round_var(), row_is_in_frame(), run_reindex_command(), run_ssl_passphrase_command(), RunFunctionExecuteHook(), RunFunctionExecuteHookStr(), RunIdentifySystem(), RunNamespaceSearchHook(), RunNamespaceSearchHookStr(), RunObjectDropHook(), RunObjectDropHookStr(), RunObjectPostAlterHook(), RunObjectPostAlterHookStr(), RunObjectPostCreateHook(), RunObjectPostCreateHookStr(), RunObjectTruncateHook(), RunObjectTruncateHookStr(), RWConflictExists(), SaveCachedPlan(), savePsetInfo(), scalararraysel(), scan_file(), scanGetItem(), ScanKeyEntryInitialize(), ScanQueryForLocks(), ScanSourceDatabasePgClassPage(), ScanSourceDatabasePgClassTuple(), ScheduleBufferTagForWriteback(), scram_build_secret(), scram_exchange(), scram_init(), SearchCatCacheInternal(), SearchCatCacheList(), SearchSysCache(), SearchSysCache1(), SearchSysCache2(), SearchSysCache3(), SearchSysCache4(), secure_read(), secure_write(), select_active_windows(), select_common_type(), select_common_type_from_oids(), select_outer_pathkeys_for_merge(), selectColorTrigrams(), selectnewtape(), SendCopyEnd(), sendFile(), SendRecoveryConflictWithBufferPin(), sepgsql_audit_log(), sepgsql_compute_avd(), sepgsql_compute_create(), sepgsql_fmgr_hook(), sepgsql_get_client_label(), sepgsql_object_access(), sepgsql_relation_setattr_extra(), SerialAdd(), SerialGetMinConflictCommitSeqNo(), SerialInit(), SerializeClientConnectionInfo(), SerializeGUCState(), SerializeLibraryState(), SerializeRelationMap(), SerializeSnapshot(), SerializeTransactionState(), SerializeUncommittedEnums(), SerialSetActiveSerXmin(), ServerLoop(), set_append_references(), set_append_rel_size(), set_authn_id(), set_base_rel_pathlists(), set_base_rel_sizes(), set_baserel_partition_key_exprs(), set_baserel_size_estimates(), set_cheapest(), set_cte_size_estimates(), set_deparse_context_plan(), set_errdata_field(), set_foreign_size_estimates(), set_function_size_estimates(), set_hash_references(), set_indexsafe_procflags(), set_join_column_names(), set_mergeappend_references(), set_namedtuplestore_size_estimates(), set_param_references(), set_pathtarget_cost_width(), set_plan_refs(), set_rel_consider_parallel(), set_rel_size(), set_rel_width(), set_relation_column_names(), set_relation_partition_info(), set_result_size_estimates(), set_status_by_pages(), set_subquery_pathlist(), set_subquery_size_estimates(), set_tablefunc_size_estimates(), set_using_names(), set_values_size_estimates(), SetCommitTsLimit(), SetConstraintStateAddItem(), SetCurrentStatementStartTimestamp(), SetDatabaseEncoding(), SetDatabasePath(), SetDataDir(), SetMatViewPopulatedState(), SetMessageEncoding(), SetMultiXactIdLimit(), setNamespaceForMergeWhen(), SetNewSxactGlobalXmin(), SetOffsetVacuumLimit(), SetOldSnapshotThresholdTimestamp(), setop_fill_hash_table(), SetOuterUserId(), SetParallelStartTimestamps(), setPath(), setPathArray(), setPathObject(), SetPossibleUnsafeConflict(), setRedirectionTuple(), SetReindexProcessing(), SetRelationTableSpace(), SetRemoteDestReceiverParams(), SetRWConflict(), SetSerializableTransactionSnapshot(), SetSessionAuthorization(), SetSessionUserId(), SetTempNamespaceState(), SetTempTablespaces(), SetTransactionIdLimit(), SetTransactionSnapshot(), SetTuplestoreDestReceiverParams(), Setup_AF_UNIX(), setup_param_list(), setup_simple_rel_arrays(), setup_test_matches(), SetupHistoricSnapshot(), SetupLockInTable(), SharedFileSetOnDetach(), SharedInvalBackendInit(), SharedRecordTypmodRegistryAttach(), SharedRecordTypmodRegistryInit(), shell_finish_command(), shell_run_command(), shell_send_data(), shiftList(), shiftright128(), shm_mq_attach(), shm_mq_create(), shm_mq_detach_internal(), shm_mq_inc_bytes_read(), shm_mq_receive(), shm_mq_receive_bytes(), shm_mq_send_bytes(), shm_mq_sendv(), shm_mq_set_handle(), shm_mq_set_receiver(), shm_mq_set_sender(), shm_mq_wait_for_attach(), shm_toc_attach(), shm_toc_create(), shm_toc_freespace(), shm_toc_insert(), ShmemAllocRaw(), ShmemAllocUnlocked(), ShmemInitStruct(), SHMQueueDelete(), SHMQueueElemInit(), SHMQueueEmpty(), SHMQueueInit(), SHMQueueInsertAfter(), SHMQueueInsertBefore(), SHMQueueIsDetached(), SHMQueueNext(), SHMQueuePrev(), show_context_hook(), show_eval_params(), show_modifytable_info(), shutdown_cb_wrapper(), ShutdownXLOG(), SignalBackends(), sigusr1_handler(), simple8b_encode(), SimpleLruInit(), SimpleLruReadPage(), SimpleLruWriteAll(), SimpleLruZeroPage(), SimpleXLogPageRead(), simplify_boolean_equality(), simplify_EXISTS_query(), simplify_function(), SlabAlloc(), SlabContextCreate(), SlabFree(), SlabGetChunkContext(), SlabGetChunkSpace(), SlabIsEmpty(), SlabReset(), SlabStats(), slist_delete(), slist_head_element_off(), slist_next_node(), slist_pop_head_node(), slot_attisnull(), slot_compile_deform(), slot_fill_defaults(), slot_getattr(), slot_getsomeattrs_int(), slot_getsysattr(), slot_modify_data(), slot_store_data(), SlruInternalWritePage(), SlruMayDeleteSegment(), smgr_redo(), smgrDoPendingSyncs(), smgrsetowner(), sn_scalar(), SnapBuildAddCommittedTxn(), SnapBuildBuildSnapshot(), SnapBuildCommitTxn(), SnapBuildDistributeNewCatalogSnapshot(), SnapBuildFindSnapshot(), SnapBuildFreeSnapshot(), SnapBuildGetOrBuildSnapshot(), SnapBuildInitialSnapshot(), SnapBuildRestore(), SnapBuildSerialize(), SnapBuildSnapDecRefcount(), SnapshotTooOldMagicForTest(), socket_putmessage(), socket_putmessage_noblock(), sort_bounded_heap(), sort_expanded_ranges(), sort_inner_and_outer(), SpeculativeInsertionWait(), spg_kd_choose(), spg_kd_inner_consistent(), spg_quad_choose(), spg_quad_inner_consistent(), spg_range_quad_choose(), spg_range_quad_inner_consistent(), spg_text_inner_consistent(), spg_text_leaf_consistent(), spgAddNodeAction(), spgbuild(), spgClearPendingList(), spgDeformLeafTuple(), spgdoinsert(), spgFormDeadTuple(), spgGetCache(), spgInitInnerConsistentIn(), spgInnerTest(), spgist_name_inner_consistent(), spgist_name_leaf_consistent(), SpGistGetBuffer(), SpGistInitBuffer(), SpGistPageAddNewItem(), spgLeafTest(), spgRedoAddLeaf(), spgRedoAddNode(), spgRedoPickSplit(), spgRedoVacuumLeaf(), spgRedoVacuumRedirect(), spgSplitNodeAction(), spgTestLeafTuple(), spgWalk(), SPI_connect_ext(), SPI_cursor_open_internal(), SPI_plan_get_cached_plan(), SPI_plan_get_plan_sources(), SPI_plan_is_valid(), split_array(), split_part(), SplitIdentifierString(), spool_tuples(), sql_fn_post_column_ref(), sqrt_var(), SS_process_ctes(), SSL_CTX_set_max_proto_version(), ssl_external_passwd_cb(), sslVerifyProtocolRange(), standard_ExecutorEnd(), standard_ExecutorFinish(), standard_ExecutorRun(), standard_ExecutorStart(), standard_join_search(), standard_planner(), standby_redo(), StandbyAcquireAccessExclusiveLock(), StandbyRecoverPreparedTransactions(), StandbyReleaseOldLocks(), StandbyReleaseXidEntryLocks(), StandbyTransactionIdIsPrepared(), start_table_sync(), StartBufferIO(), StartChildProcess(), StartLogicalReplication(), StartParallelWorkerTransaction(), StartReplication(), StartTransaction(), StartTransactionCommand(), startup_cb_wrapper(), StartupReplicationOrigin(), StartupXLOG(), statapprox_heap(), statext_compute_stattarget(), statext_dependencies_build(), statext_dependencies_deserialize(), statext_dependencies_serialize(), statext_mcv_build(), statext_mcv_clauselist_selectivity(), statext_mcv_deserialize(), statext_mcv_serialize(), statext_ndistinct_build(), statext_ndistinct_deserialize(), statext_ndistinct_serialize(), StatisticsGetRelation(), StatsShmemInit(), store_expanded_ranges(), storeBitmap(), StoreCatalogInheritance(), storeGettuple(), StoreIndexTuple(), StorePartitionBound(), StorePartitionKey(), storeRow(), StrategyGetBuffer(), StrategyInitialize(), stream_abort_cb_wrapper(), stream_change_cb_wrapper(), stream_close_file(), stream_commit_cb_wrapper(), stream_message_cb_wrapper(), stream_open_file(), stream_prepare_cb_wrapper(), stream_start_cb_wrapper(), stream_stop_cb_wrapper(), stream_truncate_cb_wrapper(), stream_write_change(), StreamLog(), StrictNamesCheck(), string_agg_finalfn(), string_to_datum(), strip_quotes(), sts_attach(), sts_begin_parallel_scan(), sts_initialize(), sts_puttuple(), sub_abs(), subbuild_joinrel_joinlist(), subquery_is_pushdown_safe(), substitute_libpath_macro(), substitute_phv_relids_walker(), SubTransGetParent(), SubTransGetTopmostTransaction(), SubTransSetParent(), subxact_info_add(), subxact_info_read(), subxact_info_write(), summarize_range(), swap_relation_files(), SwitchBackToLocalLatch(), SwitchToSharedLatch(), SyncRepGetNthLatestSyncRecPtr(), SyncRepQueueInsert(), SyncRepWaitForLSN(), SyncRepWakeQueue(), SyncScanShmemInit(), SysCacheGetAttr(), systable_endscan_ordered(), systable_getnext(), systable_getnext_ordered(), systable_recheck_tuple(), table_beginscan_parallel(), table_parallelscan_estimate(), table_parallelscan_initialize(), table_rescan_tidrange(), table_scan_getnextslot_tidrange(), table_scan_update_snapshot(), table_slot_callbacks(), TableCommandResultHandler(), TablespaceCreateDbspace(), tar_close(), tar_finish(), tar_open_for_write(), tar_sync(), tar_write(), tblspc_redo(), tbm_add_tuples(), tbm_begin_iterate(), tbm_create_pagetable(), tbm_find_pageentry(), tbm_intersect(), tbm_intersect_page(), tbm_iterate(), tbm_lossify(), tbm_page_is_lossy(), tbm_prepare_shared_iterate(), tbm_union(), TemporalSimplify(), TerminateBackgroundWorker(), TerminateBufferIO(), test_enc_conversion(), test_indoption(), test_pipelined_insert(), test_predtest(), test_slru_page_readonly(), test_slru_page_write(), TestForOldSnapshot(), text_format(), text_position_next(), text_position_next_internal(), text_position_setup(), tfuncFetchRows(), throttle(), TidExprListCreate(), TidListEval(), TidQualFromRestrictInfoList(), tlist_matches_tupdesc(), to_chars_df(), to_chars_f(), toast_build_flattened_tuple(), toast_compress_datum(), toast_datum_size(), toast_decompress_datum(), toast_decompress_datum_slice(), toast_fetch_datum_slice(), toast_flatten_tuple(), toast_flatten_tuple_to_datum(), toast_open_indexes(), toast_raw_datum_size(), toast_save_datum(), tokenize_auth_file(), tokenize_include_file(), TopoSort(), TParserGet(), TransactionGroupUpdateXidStatus(), TransactionIdGetCommitTsData(), TransactionIdInRecentPast(), TransactionIdIsInProgress(), TransactionIdLimitedForOldSnapshots(), TransactionIdSetCommitTs(), TransactionIdSetPageStatusInternal(), TransactionIdSetStatusBit(), TransactionIdSetTreeStatus(), TransferExpandedObject(), TransferPredicateLocksToNewTarget(), transformAExprBetween(), transformAggregateCall(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformColumnDefinition(), transformColumnRef(), transformCreateStmt(), transformCurrentOfExpr(), transformDistinctOnClause(), transformExpr(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformFrameOffset(), transformFromClauseItem(), transformFuncCall(), transformGroupClause(), transformGroupingSet(), transformIndexConstraint(), transformIndexConstraints(), transformIndirection(), transformInsertStmt(), transformMergeStmt(), transformMultiAssignRef(), transformOfType(), transformOnConflictClause(), transformOptionalSelectInto(), transformPartitionBound(), transformPartitionBoundValue(), transformPartitionCmd(), transformRangeFunction(), transformRangeSubselect(), transformRangeTableFunc(), transformSetOperationStmt(), transformSetOperationTree(), transformSubLink(), transformTargetList(), transformValuesClause(), transformWindowFuncCall(), transformWithClause(), transformXmlExpr(), transientrel_startup(), traverse_lacons(), TriggerEnabled(), trivial_subqueryscan(), truncate_cb_wrapper(), TruncateMultiXact(), try_partial_hashjoin_path(), try_partial_mergejoin_path(), try_partial_nestloop_path(), try_partitionwise_join(), try_relation_open(), tryAttachPartitionForeignKey(), TryReuseForeignKey(), TS_phrase_execute(), TS_phrase_output(), ts_setup_firstcall(), tsmatchsel(), tsqueryrecv(), tstoreStartupReceiver(), tsvector_concat(), tsvector_delete_by_indices(), tsvectorin(), tts_buffer_heap_clear(), tts_buffer_heap_copy_heap_tuple(), tts_buffer_heap_copy_minimal_tuple(), tts_buffer_heap_copyslot(), tts_buffer_heap_get_heap_tuple(), tts_buffer_heap_getsomeattrs(), tts_buffer_heap_getsysattr(), tts_buffer_heap_materialize(), tts_buffer_heap_store_tuple(), tts_heap_copy_heap_tuple(), tts_heap_get_heap_tuple(), tts_heap_getsomeattrs(), tts_heap_getsysattr(), tts_heap_materialize(), tts_minimal_getsomeattrs(), tts_minimal_getsysattr(), tts_minimal_materialize(), tts_minimal_store_tuple(), tts_virtual_copy_heap_tuple(), tts_virtual_copy_minimal_tuple(), tts_virtual_copyslot(), tts_virtual_getsysattr(), TupleDescCopyEntry(), TupleDescInitBuiltinEntry(), TupleDescInitEntry(), TupleDescInitEntryCollation(), TupleHashTableMatch(), TupleQueueReaderNext(), tuples_equal(), tuplesort_begin_cluster(), tuplesort_begin_common(), tuplesort_begin_heap(), tuplesort_begin_index_btree(), tuplesort_begin_index_gist(), tuplesort_estimate_shared(), tuplesort_gettuple_common(), tuplesort_heap_insert(), tuplesort_heap_replace_top(), tuplesort_initialize_shared(), tuplesort_markpos(), tuplesort_puttuple_common(), tuplesort_readtup_alloc(), tuplesort_rescan(), tuplesort_restorepos(), tuplesort_set_bound(), tuplesort_skiptuples(), tuplesort_sort_memtuples(), tuplesort_space_type_name(), tuplestore_copy_read_pointer(), tuplestore_gettuple(), tuplestore_puttuple_common(), tuplestore_rescan(), tuplestore_select_read_pointer(), tuplestore_skiptuples(), tuplestore_trim(), TwoPhaseGetGXact(), TwoPhaseGetXidByVirtualXID(), TwoPhaseShmemInit(), TwoPhaseTransactionGid(), TypeCacheRelCallback(), TypeCategory(), TypeShellMake(), typeStringToTypeName(), uint32_hash(), uint64_to_itemptr(), UnGrantLock(), unicode_is_normalized(), unicode_normalize(), unicode_normalize_func(), unionkey(), uniqueentry(), uniqueifyJsonbObject(), unlink_segment(), UnpinBuffer(), UnregisterSnapshotFromOwner(), update_frameheadpos(), update_frametailpos(), update_grouptailpos(), update_mergeclause_eclasses(), update_placeholder_eval_levels(), update_relispartition(), update_relstats_all_indexes(), UpdateActiveSnapshotCommandId(), updateClosestMatch(), UpdateTwoPhaseState(), UpdateXmaxHintBits(), UserAbortTransactionBlock(), vac_max_items_to_alloc_size(), vac_open_indexes(), vac_truncate_clog(), vac_update_datfrozenxid(), vacuum(), vacuum_is_permitted_for_relation(), vacuum_one_database(), vacuum_open_relation(), vacuum_rel(), vacuum_set_xid_limits(), vacuum_xid_failsafe_check(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), validArcLabel(), validatePartitionedIndex(), validateRecoveryParameters(), ValuesNext(), valueTruth(), valueTypeName(), varbit_support(), varchar_support(), VariableHasHook(), varstr_abbrev_abort(), vector8_has(), vector8_has_le(), verbosity_hook(), verifyBackupPageConsistency(), view_cols_are_auto_updatable(), VirtualXactLock(), VirtualXactLockTableCleanup(), VirtualXactLockTableInsert(), visibilitymap_clear(), visibilitymap_count(), visibilitymap_set(), wait_on_slots(), WaitEventAdjustPoll(), WaitEventSetWait(), WaitEventSetWaitBlock(), WaitForCommands(), WaitForParallelWorkersToAttach(), WaitForParallelWorkersToFinish(), WaitForProcSignalBarrier(), WaitForTerminatingWorkers(), WaitForWALToBecomeAvailable(), WaitForWorkers(), WaitLatch(), WaitLatchOrSocket(), walkStatEntryTree(), WalRcvDie(), WalRcvWaitForStartPosition(), WALRead(), WalReceiverMain(), WalSndKill(), WalSndSetState(), wchar2char(), width_bucket_array_fixed(), width_bucket_array_variable(), window_cume_dist(), window_gettupleslot(), window_percent_rank(), WinGetCurrentPosition(), WinGetFuncArgCurrent(), WinGetFuncArgInFrame(), WinGetFuncArgInPartition(), WinGetPartitionLocalMemory(), WinGetPartitionRowCount(), WinRowsArePeers(), WinSetMarkPosition(), worker_freeze_result_tape(), worker_get_identifier(), worker_nomergeruns(), worker_spi_launch(), WorkTableScanNext(), write_pipe_chunks(), write_relcache_init_file(), WritebackContextInit(), writeFragment(), writeListPage(), WriteRecoveryConfig(), writeTimeLineHistory(), writetup_datum(), xact_redo(), xact_redo_abort(), xact_redo_commit(), xactGetCommittedInvalidationMessages(), XactLockForVirtualXact(), XactLockTableWait(), XactLogAbortRecord(), XactLogCommitRecord(), XidCacheRemoveRunningXids(), XidIsConcurrent(), xidLogicalComparator(), xlog_redo(), XLogArchiveNotifySeg(), XLogBeginInsert(), XLogBeginRead(), XLogCompressBackupBlock(), XLogDecodeNextRecord(), XLogEnsureRecordSpace(), XLogFileClose(), XLogFileInit(), XLogFileInitInternal(), XLogFileRead(), XLogFindNextRecord(), XLogInitNewTimeline(), XLogInsertRecord(), XLogNextRecord(), XLogPageRead(), XLogPrefetcherNextBlock(), XLogPrefetcherReadRecord(), XLogPrefetchIncrement(), XLogReadAhead(), XLogReadBufferExtended(), XLogReadBufferForRedoExtended(), XLogReadDetermineTimeline(), XLogReaderSetDecodeBuffer(), XLogReaderValidatePageHeader(), XLogReadRecord(), XLogRecGetBlockRefInfo(), XLogRecGetFullXid(), XLogRecordAssemble(), xlogrecovery_redo(), XLogRecPtrToBytePos(), XLogRecStoreStats(), XLogRegisterBlock(), XLogRegisterBufData(), XLogRegisterBuffer(), XLogRegisterData(), XLogReleasePreviousRecord(), XLogSaveBufferForHint(), XLogSendPhysical(), XLogSetRecordFlags(), XLOGShmemInit(), XLOGShmemSize(), xlogVacuumPage(), XLogWalRcvClose(), XLogWalRcvFlush(), XLogWalRcvWrite(), XLogWrite(), xmldata_root_element_start(), XmlTableGetValue(), and XmlTableSetColumnFilter().

◆ exit()

exit ( )

Referenced by _check_database_version(), addtype(), adjleap(), adjust_data_dir(), append_database_pattern(), append_relation_pattern_helper(), append_schema_pattern(), appendPsqlMetaConnect(), appendQualifiedRelation(), appendShellString(), associate(), BaseBackup(), bootstrap_template1(), change_directory(), check_input(), check_ok(), check_prepare_conn(), check_root(), check_testspec(), CheckConnection(), CheckDataVersion(), checkInitSteps(), close_cur1(), close_file(), cluster_one_database(), compile_database_list(), compile_relation_list_one_db(), connectToServer(), create_data_directory(), create_xlog_or_symlink(), CreateBackupStreamer(), die_on_query_failure(), do_init(), do_kill(), do_logrotate(), do_promote(), do_reload(), do_restart(), do_start(), do_start_bgworker(), do_status(), do_stop(), dolink(), ecpg_filter_source(), ecpg_filter_stderr(), ecpg_start_test(), enlargeStringInfo(), ensureCleanShutdown(), error(), errstart(), executeCommand(), executeQuery(), executeQueryOrDie(), executeStatement(), exit_nicely(), find_other_exec_or_die(), findBuiltin(), FindStreamingStart(), get_control_dbstate(), get_id(), get_opts(), get_pgpid(), get_record1(), get_restricted_token(), get_su_pwd(), get_user_name_or_exit(), get_var1(), GetConnection(), getfields(), getRestoreCommand(), GetTableInfo(), GucInfoMain(), handle_args(), handle_help_version_opts(), HandleStartupProcInterrupts(), infile(), Initialize(), isolation_init(), isolation_start_test(), leapadd(), load_resultmap(), main(), make_directory(), make_temp_sockdir(), memory_exhausted(), mkdirs(), newabbr(), open_cur1(), open_result_files(), open_walfile(), ParallelBackupStart(), parse_psql_options(), parseCommandLine(), parseServiceFile(), pg_fatal(), pg_log_v(), pg_malloc_internal(), pg_realloc(), pg_strdup(), pg_wcsformat(), pgfdw_get_cleanup_result(), pgwin32_is_admin(), pnstrdup(), postprocess_sql_command(), PQprint(), printTable(), printTableAddCell(), printTableAddHeader(), proc_exit(), process_backslash_command(), psql_end_command(), psql_start_test(), pvsnprintf(), read_controlfile(), read_post_opts(), regression_main(), reindex_one_database(), report_backup_error(), report_clusters_compatible(), report_fatal_error(), report_manifest_error(), results_differ(), rewind_parseTimeLineHistory(), rpytime(), rulesub(), run_command(), run_diff(), run_permutation(), run_reindex_command(), run_schedule(), runInitSteps(), s_lock_stuck(), save_ps_display_args(), set_mode(), set_sig(), setup_data_file_paths(), setup_locale_encoding(), setup_pgdata(), SetWALFileNameForCleanup(), signal_cleanup(), spawn_process(), sql_check(), sql_conn(), sql_exec(), start_postmaster(), StartLogStreamer(), startup_hacks(), StreamLog(), syntax_error(), test_timing(), time_overflow(), TransferPredicateLocksToNewTarget(), try_complete_step(), usage(), vacuum_one_database(), wait_for_tests(), WalRcvWaitForStartPosition(), and writezone().

◆ exit_nicely()

static void exit_nicely ( PGconn conn)
static

Definition at line 61 of file libpq_pipeline.c.

62 {
63  PQfinish(conn);
64  exit(1);
65 }
void PQfinish(PGconn *conn)
Definition: fe-connect.c:4130
exit(1)
PGconn * conn
Definition: streamutil.c:54

References conn, exit(), and PQfinish().

Referenced by main(), test_nosync(), and test_pipelined_insert().

◆ fflush()

static void const char fflush ( stdout  )

Referenced by adjust_data_dir(), bootstrap_template1(), check_ok(), cluster_all_databases(), create_data_directory(), create_xlog_or_symlink(), do_copy(), do_init(), do_pg_backup_stop(), do_shell(), do_watch(), dumpnfa(), echo_hidden_command(), ecpg_log(), editFile(), ensureCleanShutdown(), errfinish(), ExceptionalCondition(), exec_command_print(), exec_command_prompt(), exec_command_write(), exec_prog(), ExecQueryTuples(), ExecQueryUsingCursor(), ExecuteRecoveryCommand(), fork_process(), get_bin_version(), get_control_data(), get_prompt(), get_su_pwd(), gets_interactive(), handleCopyIn(), handleCopyOut(), HandleSlashCmds(), header(), initialize_data_directory(), InteractiveBackend(), log_pre_callback(), main(), MainLoop(), OpenPipeStream(), openQueryOutputFile(), PageOutput(), parallel_exec_prog(), parallel_transfer_all_new_dbs(), ParallelBackupStart(), parse_required_wal(), perform_spin_delay(), pg_log_generic_v(), pg_log_v(), pg_regcomp(), pg_regexec(), pipe_read_line(), plpgsql_dumptree(), popen_check(), pprint(), PQdisplayTuples(), pqFlush(), PQprint(), PQuntrace(), print(), print_filemap(), print_msg(), PrintNotifications(), PrintQueryStatus(), PrintQueryTuples(), printVersion(), psql_end_command(), PSQLexec(), regression_main(), reindex_all_databases(), RestoreArchivedFile(), run_diff(), runPgDump(), runShellCommand(), SendQuery(), setup_config(), shell_archive_file(), simple_prompt_extended(), spawn_process(), start_postmaster(), status(), status_end(), stop_postmaster(), SysLogger_Start(), test_config_settings(), test_file_descriptor_sync(), test_non_sync(), test_open_sync(), test_sync(), vacuum_one_database(), vacuumlo(), and write_stderr().

◆ fprintf() [1/2]

fprintf ( stderr  ,
"\n"   
)

◆ fprintf() [2/2]

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1698 of file libpq_pipeline.c.

1699 {
1700  const char *conninfo = "";
1701  PGconn *conn;
1702  FILE *trace;
1703  char *testname;
1704  int numrows = 10000;
1705  PGresult *res;
1706  int c;
1707 
1708  while ((c = getopt(argc, argv, "t:r:")) != -1)
1709  {
1710  switch (c)
1711  {
1712  case 't': /* trace file */
1714  break;
1715  case 'r': /* numrows */
1716  errno = 0;
1717  numrows = strtol(optarg, NULL, 10);
1718  if (errno != 0 || numrows <= 0)
1719  {
1720  fprintf(stderr, "couldn't parse \"%s\" as a positive integer\n",
1721  optarg);
1722  exit(1);
1723  }
1724  break;
1725  }
1726  }
1727 
1728  if (optind < argc)
1729  {
1730  testname = pg_strdup(argv[optind]);
1731  optind++;
1732  }
1733  else
1734  {
1735  usage(argv[0]);
1736  exit(1);
1737  }
1738 
1739  if (strcmp(testname, "tests") == 0)
1740  {
1741  print_test_list();
1742  exit(0);
1743  }
1744 
1745  if (optind < argc)
1746  {
1747  conninfo = pg_strdup(argv[optind]);
1748  optind++;
1749  }
1750 
1751  /* Make a connection to the database */
1752  conn = PQconnectdb(conninfo);
1753  if (PQstatus(conn) != CONNECTION_OK)
1754  {
1755  fprintf(stderr, "Connection to database failed: %s\n",
1756  PQerrorMessage(conn));
1757  exit_nicely(conn);
1758  }
1759 
1760  res = PQexec(conn, "SET lc_messages TO \"C\"");
1762  pg_fatal("failed to set lc_messages: %s", PQerrorMessage(conn));
1763  res = PQexec(conn, "SET force_parallel_mode = off");
1765  pg_fatal("failed to set force_parallel_mode: %s", PQerrorMessage(conn));
1766 
1767  /* Set the trace file, if requested */
1768  if (tracefile != NULL)
1769  {
1770  if (strcmp(tracefile, "-") == 0)
1771  trace = stdout;
1772  else
1773  trace = fopen(tracefile, "w");
1774  if (trace == NULL)
1775  pg_fatal("could not open file \"%s\": %m", tracefile);
1776 
1777  /* Make it line-buffered */
1778  setvbuf(trace, NULL, PG_IOLBF, 0);
1779 
1780  PQtrace(conn, trace);
1783  }
1784 
1785  if (strcmp(testname, "disallowed_in_pipeline") == 0)
1787  else if (strcmp(testname, "multi_pipelines") == 0)
1789  else if (strcmp(testname, "nosync") == 0)
1790  test_nosync(conn);
1791  else if (strcmp(testname, "pipeline_abort") == 0)
1793  else if (strcmp(testname, "pipeline_idle") == 0)
1795  else if (strcmp(testname, "pipelined_insert") == 0)
1796  test_pipelined_insert(conn, numrows);
1797  else if (strcmp(testname, "prepared") == 0)
1799  else if (strcmp(testname, "simple_pipeline") == 0)
1801  else if (strcmp(testname, "singlerow") == 0)
1803  else if (strcmp(testname, "transaction") == 0)
1805  else if (strcmp(testname, "uniqviol") == 0)
1807  else
1808  {
1809  fprintf(stderr, "\"%s\" is not a recognized test name\n", testname);
1810  exit(1);
1811  }
1812 
1813  /* close the connection to the database and cleanup */
1814  PQfinish(conn);
1815  return 0;
1816 }
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:6743
ConnStatusType PQstatus(const PGconn *conn)
Definition: fe-connect.c:6690
PGconn * PQconnectdb(const char *conninfo)
Definition: fe-connect.c:707
ExecStatusType PQresultStatus(const PGresult *res)
Definition: fe-exec.c:3240
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:2225
void PQtrace(PGconn *conn, FILE *debug_port)
Definition: fe-trace.c:35
void PQsetTraceFlags(PGconn *conn, int flags)
Definition: fe-trace.c:64
char * pg_strdup(const char *in)
Definition: fe_memutils.c:85
@ CONNECTION_OK
Definition: libpq-fe.h:60
@ PGRES_COMMAND_OK
Definition: libpq-fe.h:97
#define PQTRACE_SUPPRESS_TIMESTAMPS
Definition: libpq-fe.h:414
#define PQTRACE_REGRESS_MODE
Definition: libpq-fe.h:416
static void usage(const char *progname)
static void print_test_list(void)
static void exit_nicely(PGconn *conn)
static void test_uniqviol(PGconn *conn)
static void test_simple_pipeline(PGconn *conn)
char * tracefile
static void test_multi_pipelines(PGconn *conn)
static void test_pipeline_idle(PGconn *conn)
static void test_nosync(PGconn *conn)
static void test_pipeline_abort(PGconn *conn)
static void test_transaction(PGconn *conn)
static void test_prepared(PGconn *conn)
static void test_singlerowmode(PGconn *conn)
fprintf(stderr, "\n%s:%d: ", progname, line)
#define pg_fatal(...)
static void test_disallowed_in_pipeline(PGconn *conn)
static void test_pipelined_insert(PGconn *conn, int n_rows)
PGDLLIMPORT int optind
Definition: getopt.c:50
int getopt(int nargc, char *const *nargv, const char *ostr)
Definition: getopt.c:71
PGDLLIMPORT char * optarg
Definition: getopt.c:52
#define PG_IOLBF
Definition: port.h:361
char * c

References conn, CONNECTION_OK, exit(), exit_nicely(), fprintf(), getopt(), optarg, optind, pg_fatal, PG_IOLBF, pg_strdup(), PGRES_COMMAND_OK, PQconnectdb(), PQerrorMessage(), PQexec(), PQfinish(), PQresultStatus(), PQsetTraceFlags(), PQstatus(), PQtrace(), PQTRACE_REGRESS_MODE, PQTRACE_SUPPRESS_TIMESTAMPS, print_test_list(), res, generate_unaccent_rules::stdout, test_disallowed_in_pipeline(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), test_uniqviol(), tracefile, and usage().

◆ notice_processor()

static void notice_processor ( void *  arg,
const char *  message 
)
static

Definition at line 986 of file libpq_pipeline.c.

987 {
988  int *n_notices = (int *) arg;
989 
990  (*n_notices)++;
991  fprintf(stderr, "NOTICE %d: %s", *n_notices, message);
992 }
void * arg

References arg, and fprintf().

Referenced by test_pipeline_idle().

◆ pg_attribute_noreturn()

static void pg_attribute_noreturn ( )
static

◆ pg_attribute_printf()

static void const char pg_attribute_printf ( ,
 
)

◆ print_test_list()

static void print_test_list ( void  )
static

Definition at line 1682 of file libpq_pipeline.c.

1683 {
1684  printf("disallowed_in_pipeline\n");
1685  printf("multi_pipelines\n");
1686  printf("nosync\n");
1687  printf("pipeline_abort\n");
1688  printf("pipeline_idle\n");
1689  printf("pipelined_insert\n");
1690  printf("prepared\n");
1691  printf("simple_pipeline\n");
1692  printf("singlerow\n");
1693  printf("transaction\n");
1694  printf("uniqviol\n");
1695 }
#define printf(...)
Definition: port.h:244

References printf.

Referenced by main().

◆ process_result()

static bool process_result ( PGconn conn,
PGresult res,
int  results,
int  numsent 
)
static

Definition at line 1622 of file libpq_pipeline.c.

1623 {
1624  PGresult *res2;
1625  bool got_error = false;
1626 
1627  if (res == NULL)
1628  pg_fatal("got unexpected NULL");
1629 
1630  switch (PQresultStatus(res))
1631  {
1632  case PGRES_FATAL_ERROR:
1633  got_error = true;
1634  fprintf(stderr, "result %d/%d (error): %s\n", results, numsent, PQerrorMessage(conn));
1635  PQclear(res);
1636 
1637  res2 = PQgetResult(conn);
1638  if (res2 != NULL)
1639  pg_fatal("expected NULL, got %s",
1640  PQresStatus(PQresultStatus(res2)));
1641  break;
1642 
1643  case PGRES_TUPLES_OK:
1644  fprintf(stderr, "result %d/%d: %s\n", results, numsent, PQgetvalue(res, 0, 0));
1645  PQclear(res);
1646 
1647  res2 = PQgetResult(conn);
1648  if (res2 != NULL)
1649  pg_fatal("expected NULL, got %s",
1650  PQresStatus(PQresultStatus(res2)));
1651  break;
1652 
1654  fprintf(stderr, "result %d/%d: pipeline aborted\n", results, numsent);
1655  res2 = PQgetResult(conn);
1656  if (res2 != NULL)
1657  pg_fatal("expected NULL, got %s",
1658  PQresStatus(PQresultStatus(res2)));
1659  break;
1660 
1661  default:
1662  pg_fatal("got unexpected %s", PQresStatus(PQresultStatus(res)));
1663  }
1664 
1665  return got_error;
1666 }
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
Definition: fe-exec.c:3705
char * PQresStatus(ExecStatusType status)
Definition: fe-exec.c:3248
PGresult * PQgetResult(PGconn *conn)
Definition: fe-exec.c:2031
@ PGRES_FATAL_ERROR
Definition: libpq-fe.h:108
@ PGRES_PIPELINE_ABORTED
Definition: libpq-fe.h:112
@ PGRES_TUPLES_OK
Definition: libpq-fe.h:100

References conn, fprintf(), pg_fatal, PGRES_FATAL_ERROR, PGRES_PIPELINE_ABORTED, PGRES_TUPLES_OK, PQclear(), PQerrorMessage(), PQgetResult(), PQgetvalue(), PQresStatus(), PQresultStatus(), and res.

Referenced by test_uniqviol().

◆ test_disallowed_in_pipeline()

static void test_disallowed_in_pipeline ( PGconn conn)
static

Definition at line 90 of file libpq_pipeline.c.

91 {
92  PGresult *res = NULL;
93 
94  fprintf(stderr, "test error cases... ");
95 
96  if (PQisnonblocking(conn))
97  pg_fatal("Expected blocking connection mode");
98 
99  if (PQenterPipelineMode(conn) != 1)
100  pg_fatal("Unable to enter pipeline mode");
101 
103  pg_fatal("Pipeline mode not activated properly");
104 
105  /* PQexec should fail in pipeline mode */
106  res = PQexec(conn, "SELECT 1");
108  pg_fatal("PQexec should fail in pipeline mode but succeeded");
109  if (strcmp(PQerrorMessage(conn),
110  "synchronous command execution functions are not allowed in pipeline mode\n") != 0)
111  pg_fatal("did not get expected error message; got: \"%s\"",
113 
114  /* PQsendQuery should fail in pipeline mode */
115  if (PQsendQuery(conn, "SELECT 1") != 0)
116  pg_fatal("PQsendQuery should fail in pipeline mode but succeeded");
117  if (strcmp(PQerrorMessage(conn),
118  "PQsendQuery not allowed in pipeline mode\n") != 0)
119  pg_fatal("did not get expected error message; got: \"%s\"",
121 
122  /* Entering pipeline mode when already in pipeline mode is OK */
123  if (PQenterPipelineMode(conn) != 1)
124  pg_fatal("re-entering pipeline mode should be a no-op but failed");
125 
126  if (PQisBusy(conn) != 0)
127  pg_fatal("PQisBusy should return 0 when idle in pipeline mode, returned 1");
128 
129  /* ok, back to normal command mode */
130  if (PQexitPipelineMode(conn) != 1)
131  pg_fatal("couldn't exit idle empty pipeline mode");
132 
134  pg_fatal("Pipeline mode not terminated properly");
135 
136  /* exiting pipeline mode when not in pipeline mode should be a no-op */
137  if (PQexitPipelineMode(conn) != 1)
138  pg_fatal("pipeline mode exit when not in pipeline mode should succeed but failed");
139 
140  /* can now PQexec again */
141  res = PQexec(conn, "SELECT 1");
143  pg_fatal("PQexec should succeed after exiting pipeline mode but failed with: %s",
145 
146  fprintf(stderr, "ok\n");
147 }
PGpipelineStatus PQpipelineStatus(const PGconn *conn)
Definition: fe-connect.c:6785
int PQexitPipelineMode(PGconn *conn)
Definition: fe-exec.c:2955
int PQenterPipelineMode(PGconn *conn)
Definition: fe-exec.c:2924
int PQsendQuery(PGconn *conn, const char *query)
Definition: fe-exec.c:1418
int PQisBusy(PGconn *conn)
Definition: fe-exec.c:2000
int PQisnonblocking(const PGconn *conn)
Definition: fe-exec.c:3812
@ PQ_PIPELINE_OFF
Definition: libpq-fe.h:158

References conn, fprintf(), pg_fatal, PGRES_FATAL_ERROR, PGRES_TUPLES_OK, PQ_PIPELINE_OFF, PQenterPipelineMode(), PQerrorMessage(), PQexec(), PQexitPipelineMode(), PQisBusy(), PQisnonblocking(), PQpipelineStatus(), PQresultStatus(), PQsendQuery(), and res.

Referenced by main().

◆ test_multi_pipelines()

static void test_multi_pipelines ( PGconn conn)
static

Definition at line 150 of file libpq_pipeline.c.

151 {
152  PGresult *res = NULL;
153  const char *dummy_params[1] = {"1"};
154  Oid dummy_param_oids[1] = {INT4OID};
155 
156  fprintf(stderr, "multi pipeline... ");
157 
158  /*
159  * Queue up a couple of small pipelines and process each without returning
160  * to command mode first.
161  */
162  if (PQenterPipelineMode(conn) != 1)
163  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
164 
165  if (PQsendQueryParams(conn, "SELECT $1", 1, dummy_param_oids,
166  dummy_params, NULL, NULL, 0) != 1)
167  pg_fatal("dispatching first SELECT failed: %s", PQerrorMessage(conn));
168 
169  if (PQpipelineSync(conn) != 1)
170  pg_fatal("Pipeline sync failed: %s", PQerrorMessage(conn));
171 
172  if (PQsendQueryParams(conn, "SELECT $1", 1, dummy_param_oids,
173  dummy_params, NULL, NULL, 0) != 1)
174  pg_fatal("dispatching second SELECT failed: %s", PQerrorMessage(conn));
175 
176  if (PQpipelineSync(conn) != 1)
177  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
178 
179  /* OK, start processing the results */
180  res = PQgetResult(conn);
181  if (res == NULL)
182  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
184 
186  pg_fatal("Unexpected result code %s from first pipeline item",
188  PQclear(res);
189  res = NULL;
190 
191  if (PQgetResult(conn) != NULL)
192  pg_fatal("PQgetResult returned something extra after first result");
193 
194  if (PQexitPipelineMode(conn) != 0)
195  pg_fatal("exiting pipeline mode after query but before sync succeeded incorrectly");
196 
197  res = PQgetResult(conn);
198  if (res == NULL)
199  pg_fatal("PQgetResult returned null when sync result expected: %s",
201 
203  pg_fatal("Unexpected result code %s instead of sync result, error: %s",
205  PQclear(res);
206 
207  /* second pipeline */
208 
209  res = PQgetResult(conn);
210  if (res == NULL)
211  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
213 
215  pg_fatal("Unexpected result code %s from second pipeline item",
217 
218  res = PQgetResult(conn);
219  if (res != NULL)
220  pg_fatal("Expected null result, got %s",
222 
223  res = PQgetResult(conn);
224  if (res == NULL)
225  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
227 
229  pg_fatal("Unexpected result code %s from second pipeline sync",
231 
232  /* We're still in pipeline mode ... */
234  pg_fatal("Fell out of pipeline mode somehow");
235 
236  /* until we end it, which we can safely do now */
237  if (PQexitPipelineMode(conn) != 1)
238  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
240 
242  pg_fatal("exiting pipeline mode didn't seem to work");
243 
244  fprintf(stderr, "ok\n");
245 }
int PQsendQueryParams(PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
Definition: fe-exec.c:1494
int PQpipelineSync(PGconn *conn)
Definition: fe-exec.c:3141
@ PGRES_PIPELINE_SYNC
Definition: libpq-fe.h:111
unsigned int Oid
Definition: postgres_ext.h:31

References conn, fprintf(), pg_fatal, PGRES_PIPELINE_SYNC, PGRES_TUPLES_OK, PQ_PIPELINE_OFF, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexitPipelineMode(), PQgetResult(), PQpipelineStatus(), PQpipelineSync(), PQresStatus(), PQresultStatus(), PQsendQueryParams(), and res.

Referenced by main().

◆ test_nosync()

static void test_nosync ( PGconn conn)
static

Definition at line 252 of file libpq_pipeline.c.

253 {
254  int numqueries = 10;
255  int results = 0;
256  int sock = PQsocket(conn);
257 
258  fprintf(stderr, "nosync... ");
259 
260  if (sock < 0)
261  pg_fatal("invalid socket");
262 
263  if (PQenterPipelineMode(conn) != 1)
264  pg_fatal("could not enter pipeline mode");
265  for (int i = 0; i < numqueries; i++)
266  {
267  fd_set input_mask;
268  struct timeval tv;
269 
270  if (PQsendQueryParams(conn, "SELECT repeat('xyzxz', 12)",
271  0, NULL, NULL, NULL, NULL, 0) != 1)
272  pg_fatal("error sending select: %s", PQerrorMessage(conn));
273  PQflush(conn);
274 
275  /*
276  * If the server has written anything to us, read (some of) it now.
277  */
278  FD_ZERO(&input_mask);
279  FD_SET(sock, &input_mask);
280  tv.tv_sec = 0;
281  tv.tv_usec = 0;
282  if (select(sock + 1, &input_mask, NULL, NULL, &tv) < 0)
283  {
284  fprintf(stderr, "select() failed: %s\n", strerror(errno));
285  exit_nicely(conn);
286  }
287  if (FD_ISSET(sock, &input_mask) && PQconsumeInput(conn) != 1)
288  pg_fatal("failed to read from server: %s", PQerrorMessage(conn));
289  }
290 
291  /* tell server to flush its output buffer */
292  if (PQsendFlushRequest(conn) != 1)
293  pg_fatal("failed to send flush request");
294  PQflush(conn);
295 
296  /* Now read all results */
297  for (;;)
298  {
299  PGresult *res;
300 
301  res = PQgetResult(conn);
302 
303  /* NULL results are only expected after TUPLES_OK */
304  if (res == NULL)
305  pg_fatal("got unexpected NULL result after %d results", results);
306 
307  /* We expect exactly one TUPLES_OK result for each query we sent */
309  {
310  PGresult *res2;
311 
312  /* and one NULL result should follow each */
313  res2 = PQgetResult(conn);
314  if (res2 != NULL)
315  pg_fatal("expected NULL, got %s",
316  PQresStatus(PQresultStatus(res2)));
317  PQclear(res);
318  results++;
319 
320  /* if we're done, we're done */
321  if (results == numqueries)
322  break;
323 
324  continue;
325  }
326 
327  /* anything else is unexpected */
328  pg_fatal("got unexpected %s\n", PQresStatus(PQresultStatus(res)));
329  }
330 
331  fprintf(stderr, "ok\n");
332 }
int PQsocket(const PGconn *conn)
Definition: fe-connect.c:6769
int PQflush(PGconn *conn)
Definition: fe-exec.c:3833
int PQconsumeInput(PGconn *conn)
Definition: fe-exec.c:1953
int PQsendFlushRequest(PGconn *conn)
Definition: fe-exec.c:3208
int i
Definition: isn.c:73
#define strerror
Definition: port.h:251
#define select(n, r, w, e, timeout)
Definition: win32_port.h:492

References conn, exit_nicely(), fprintf(), i, pg_fatal, PGRES_TUPLES_OK, PQclear(), PQconsumeInput(), PQenterPipelineMode(), PQerrorMessage(), PQflush(), PQgetResult(), PQresStatus(), PQresultStatus(), PQsendFlushRequest(), PQsendQueryParams(), PQsocket(), res, select, and strerror.

Referenced by main().

◆ test_pipeline_abort()

static void test_pipeline_abort ( PGconn conn)
static

Definition at line 344 of file libpq_pipeline.c.

345 {
346  PGresult *res = NULL;
347  const char *dummy_params[1] = {"1"};
348  Oid dummy_param_oids[1] = {INT4OID};
349  int i;
350  int gotrows;
351  bool goterror;
352 
353  fprintf(stderr, "aborted pipeline... ");
354 
357  pg_fatal("dispatching DROP TABLE failed: %s", PQerrorMessage(conn));
358 
361  pg_fatal("dispatching CREATE TABLE failed: %s", PQerrorMessage(conn));
362 
363  /*
364  * Queue up a couple of small pipelines and process each without returning
365  * to command mode first. Make sure the second operation in the first
366  * pipeline ERRORs.
367  */
368  if (PQenterPipelineMode(conn) != 1)
369  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
370 
371  dummy_params[0] = "1";
372  if (PQsendQueryParams(conn, insert_sql, 1, dummy_param_oids,
373  dummy_params, NULL, NULL, 0) != 1)
374  pg_fatal("dispatching first insert failed: %s", PQerrorMessage(conn));
375 
376  if (PQsendQueryParams(conn, "SELECT no_such_function($1)",
377  1, dummy_param_oids, dummy_params,
378  NULL, NULL, 0) != 1)
379  pg_fatal("dispatching error select failed: %s", PQerrorMessage(conn));
380 
381  dummy_params[0] = "2";
382  if (PQsendQueryParams(conn, insert_sql, 1, dummy_param_oids,
383  dummy_params, NULL, NULL, 0) != 1)
384  pg_fatal("dispatching second insert failed: %s", PQerrorMessage(conn));
385 
386  if (PQpipelineSync(conn) != 1)
387  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
388 
389  dummy_params[0] = "3";
390  if (PQsendQueryParams(conn, insert_sql, 1, dummy_param_oids,
391  dummy_params, NULL, NULL, 0) != 1)
392  pg_fatal("dispatching second-pipeline insert failed: %s",
394 
395  if (PQpipelineSync(conn) != 1)
396  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
397 
398  /*
399  * OK, start processing the pipeline results.
400  *
401  * We should get a command-ok for the first query, then a fatal error and
402  * a pipeline aborted message for the second insert, a pipeline-end, then
403  * a command-ok and a pipeline-ok for the second pipeline operation.
404  */
405  res = PQgetResult(conn);
406  if (res == NULL)
407  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
409  pg_fatal("Unexpected result status %s: %s",
412  PQclear(res);
413 
414  /* NULL result to signal end-of-results for this command */
415  if ((res = PQgetResult(conn)) != NULL)
416  pg_fatal("Expected null result, got %s",
418 
419  /* Second query caused error, so we expect an error next */
420  res = PQgetResult(conn);
421  if (res == NULL)
422  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
424  pg_fatal("Unexpected result code -- expected PGRES_FATAL_ERROR, got %s",
426  PQclear(res);
427 
428  /* NULL result to signal end-of-results for this command */
429  if ((res = PQgetResult(conn)) != NULL)
430  pg_fatal("Expected null result, got %s",
432 
433  /*
434  * pipeline should now be aborted.
435  *
436  * Note that we could still queue more queries at this point if we wanted;
437  * they'd get added to a new third pipeline since we've already sent a
438  * second. The aborted flag relates only to the pipeline being received.
439  */
441  pg_fatal("pipeline should be flagged as aborted but isn't");
442 
443  /* third query in pipeline, the second insert */
444  res = PQgetResult(conn);
445  if (res == NULL)
446  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
448  pg_fatal("Unexpected result code -- expected PGRES_PIPELINE_ABORTED, got %s",
450  PQclear(res);
451 
452  /* NULL result to signal end-of-results for this command */
453  if ((res = PQgetResult(conn)) != NULL)
454  pg_fatal("Expected null result, got %s", PQresStatus(PQresultStatus(res)));
455 
457  pg_fatal("pipeline should be flagged as aborted but isn't");
458 
459  /* Ensure we're still in pipeline */
461  pg_fatal("Fell out of pipeline mode somehow");
462 
463  /*
464  * The end of a failed pipeline is a PGRES_PIPELINE_SYNC.
465  *
466  * (This is so clients know to start processing results normally again and
467  * can tell the difference between skipped commands and the sync.)
468  */
469  res = PQgetResult(conn);
470  if (res == NULL)
471  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
473  pg_fatal("Unexpected result code from first pipeline sync\n"
474  "Expected PGRES_PIPELINE_SYNC, got %s",
476  PQclear(res);
477 
479  pg_fatal("sync should've cleared the aborted flag but didn't");
480 
481  /* We're still in pipeline mode... */
483  pg_fatal("Fell out of pipeline mode somehow");
484 
485  /* the insert from the second pipeline */
486  res = PQgetResult(conn);
487  if (res == NULL)
488  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
490  pg_fatal("Unexpected result code %s from first item in second pipeline",
492  PQclear(res);
493 
494  /* Read the NULL result at the end of the command */
495  if ((res = PQgetResult(conn)) != NULL)
496  pg_fatal("Expected null result, got %s", PQresStatus(PQresultStatus(res)));
497 
498  /* the second pipeline sync */
499  if ((res = PQgetResult(conn)) == NULL)
500  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
502  pg_fatal("Unexpected result code %s from second pipeline sync",
504  PQclear(res);
505 
506  if ((res = PQgetResult(conn)) != NULL)
507  pg_fatal("Expected null result, got %s: %s",
510 
511  /* Try to send two queries in one command */
512  if (PQsendQueryParams(conn, "SELECT 1; SELECT 2", 0, NULL, NULL, NULL, NULL, 0) != 1)
513  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
514  if (PQpipelineSync(conn) != 1)
515  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
516  goterror = false;
517  while ((res = PQgetResult(conn)) != NULL)
518  {
519  switch (PQresultStatus(res))
520  {
521  case PGRES_FATAL_ERROR:
522  if (strcmp(PQresultErrorField(res, PG_DIAG_SQLSTATE), "42601") != 0)
523  pg_fatal("expected error about multiple commands, got %s",
525  printf("got expected %s", PQerrorMessage(conn));
526  goterror = true;
527  break;
528  default:
529  pg_fatal("got unexpected status %s", PQresStatus(PQresultStatus(res)));
530  break;
531  }
532  }
533  if (!goterror)
534  pg_fatal("did not get cannot-insert-multiple-commands error");
535  res = PQgetResult(conn);
536  if (res == NULL)
537  pg_fatal("got NULL result");
539  pg_fatal("Unexpected result code %s from pipeline sync",
541  fprintf(stderr, "ok\n");
542 
543  /* Test single-row mode with an error partways */
544  if (PQsendQueryParams(conn, "SELECT 1.0/g FROM generate_series(3, -1, -1) g",
545  0, NULL, NULL, NULL, NULL, 0) != 1)
546  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
547  if (PQpipelineSync(conn) != 1)
548  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
550  goterror = false;
551  gotrows = 0;
552  while ((res = PQgetResult(conn)) != NULL)
553  {
554  switch (PQresultStatus(res))
555  {
556  case PGRES_SINGLE_TUPLE:
557  printf("got row: %s\n", PQgetvalue(res, 0, 0));
558  gotrows++;
559  break;
560  case PGRES_FATAL_ERROR:
561  if (strcmp(PQresultErrorField(res, PG_DIAG_SQLSTATE), "22012") != 0)
562  pg_fatal("expected division-by-zero, got: %s (%s)",
565  printf("got expected division-by-zero\n");
566  goterror = true;
567  break;
568  default:
569  pg_fatal("got unexpected result %s", PQresStatus(PQresultStatus(res)));
570  }
571  PQclear(res);
572  }
573  if (!goterror)
574  pg_fatal("did not get division-by-zero error");
575  if (gotrows != 3)
576  pg_fatal("did not get three rows");
577  /* the third pipeline sync */
578  if ((res = PQgetResult(conn)) == NULL)
579  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
581  pg_fatal("Unexpected result code %s from third pipeline sync",
583  PQclear(res);
584 
585  /* We're still in pipeline mode... */
587  pg_fatal("Fell out of pipeline mode somehow");
588 
589  /* until we end it, which we can safely do now */
590  if (PQexitPipelineMode(conn) != 1)
591  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
593 
595  pg_fatal("exiting pipeline mode didn't seem to work");
596 
597  /*-
598  * Since we fired the pipelines off without a surrounding xact, the results
599  * should be:
600  *
601  * - Implicit xact started by server around 1st pipeline
602  * - First insert applied
603  * - Second statement aborted xact
604  * - Third insert skipped
605  * - Sync rolled back first implicit xact
606  * - Implicit xact created by server around 2nd pipeline
607  * - insert applied from 2nd pipeline
608  * - Sync commits 2nd xact
609  *
610  * So we should only have the value 3 that we inserted.
611  */
612  res = PQexec(conn, "SELECT itemno FROM pq_pipeline_demo");
613 
615  pg_fatal("Expected tuples, got %s: %s",
617  if (PQntuples(res) != 1)
618  pg_fatal("expected 1 result, got %d", PQntuples(res));
619  for (i = 0; i < PQntuples(res); i++)
620  {
621  const char *val = PQgetvalue(res, i, 0);
622 
623  if (strcmp(val, "3") != 0)
624  pg_fatal("expected only insert with value 3, got %s", val);
625  }
626 
627  PQclear(res);
628 
629  fprintf(stderr, "ok\n");
630 }
int PQsetSingleRowMode(PGconn *conn)
Definition: fe-exec.c:1925
char * PQresultErrorMessage(const PGresult *res)
Definition: fe-exec.c:3256
int PQntuples(const PGresult *res)
Definition: fe-exec.c:3310
char * PQresultErrorField(const PGresult *res, int fieldcode)
Definition: fe-exec.c:3295
long val
Definition: informix.c:664
@ PGRES_SINGLE_TUPLE
Definition: libpq-fe.h:110
@ PQ_PIPELINE_ABORTED
Definition: libpq-fe.h:160
static const char *const create_table_sql
static const char *const insert_sql
static const char *const drop_table_sql
#define PG_DIAG_SQLSTATE
Definition: postgres_ext.h:56

References conn, create_table_sql, drop_table_sql, fprintf(), i, insert_sql, PG_DIAG_SQLSTATE, pg_fatal, PGRES_COMMAND_OK, PGRES_FATAL_ERROR, PGRES_PIPELINE_ABORTED, PGRES_PIPELINE_SYNC, PGRES_SINGLE_TUPLE, PGRES_TUPLES_OK, PQ_PIPELINE_ABORTED, PQ_PIPELINE_OFF, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexec(), PQexitPipelineMode(), PQgetResult(), PQgetvalue(), PQntuples(), PQpipelineStatus(), PQpipelineSync(), PQresStatus(), PQresultErrorField(), PQresultErrorMessage(), PQresultStatus(), PQsendQueryParams(), PQsetSingleRowMode(), printf, res, and val.

Referenced by main().

◆ test_pipeline_idle()

static void test_pipeline_idle ( PGconn conn)
static

Definition at line 996 of file libpq_pipeline.c.

997 {
998  PGresult *res;
999  int n_notices = 0;
1000 
1001  fprintf(stderr, "\npipeline idle...\n");
1002 
1004 
1005  /* Try to exit pipeline mode in pipeline-idle state */
1006  if (PQenterPipelineMode(conn) != 1)
1007  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
1008  if (PQsendQueryParams(conn, "SELECT 1", 0, NULL, NULL, NULL, NULL, 0) != 1)
1009  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
1011  res = PQgetResult(conn);
1012  if (res == NULL)
1013  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
1014  PQerrorMessage(conn));
1016  pg_fatal("unexpected result code %s from first pipeline item",
1018  PQclear(res);
1019  res = PQgetResult(conn);
1020  if (res != NULL)
1021  pg_fatal("did not receive terminating NULL");
1022  if (PQsendQueryParams(conn, "SELECT 2", 0, NULL, NULL, NULL, NULL, 0) != 1)
1023  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
1024  if (PQexitPipelineMode(conn) == 1)
1025  pg_fatal("exiting pipeline succeeded when it shouldn't");
1026  if (strncmp(PQerrorMessage(conn), "cannot exit pipeline mode",
1027  strlen("cannot exit pipeline mode")) != 0)
1028  pg_fatal("did not get expected error; got: %s",
1029  PQerrorMessage(conn));
1031  res = PQgetResult(conn);
1033  pg_fatal("unexpected result code %s from second pipeline item",
1035  PQclear(res);
1036  res = PQgetResult(conn);
1037  if (res != NULL)
1038  pg_fatal("did not receive terminating NULL");
1039  if (PQexitPipelineMode(conn) != 1)
1040  pg_fatal("exiting pipeline failed: %s", PQerrorMessage(conn));
1041 
1042  if (n_notices > 0)
1043  pg_fatal("got %d notice(s)", n_notices);
1044  fprintf(stderr, "ok - 1\n");
1045 
1046  /* Have a WARNING in the middle of a resultset */
1047  if (PQenterPipelineMode(conn) != 1)
1048  pg_fatal("entering pipeline mode failed: %s", PQerrorMessage(conn));
1049  if (PQsendQueryParams(conn, "SELECT pg_catalog.pg_advisory_unlock(1,1)", 0, NULL, NULL, NULL, NULL, 0) != 1)
1050  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
1052  res = PQgetResult(conn);
1053  if (res == NULL)
1054  pg_fatal("unexpected NULL result received");
1056  pg_fatal("unexpected result code %s", PQresStatus(PQresultStatus(res)));
1057  if (PQexitPipelineMode(conn) != 1)
1058  pg_fatal("failed to exit pipeline mode: %s", PQerrorMessage(conn));
1059  fprintf(stderr, "ok - 2\n");
1060 }
PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, PQnoticeProcessor proc, void *arg)
Definition: fe-connect.c:6911
static void notice_processor(void *arg, const char *message)

References conn, fprintf(), notice_processor(), pg_fatal, PGRES_TUPLES_OK, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexitPipelineMode(), PQgetResult(), PQresStatus(), PQresultStatus(), PQsendFlushRequest(), PQsendQueryParams(), PQsetNoticeProcessor(), and res.

Referenced by main().

◆ test_pipelined_insert()

static void test_pipelined_insert ( PGconn conn,
int  n_rows 
)
static

Definition at line 646 of file libpq_pipeline.c.

647 {
648  Oid insert_param_oids[2] = {INT4OID, INT8OID};
649  const char *insert_params[2];
650  char insert_param_0[MAXINTLEN];
651  char insert_param_1[MAXINT8LEN];
652  enum PipelineInsertStep send_step = BI_BEGIN_TX,
653  recv_step = BI_BEGIN_TX;
654  int rows_to_send,
655  rows_to_receive;
656 
657  insert_params[0] = insert_param_0;
658  insert_params[1] = insert_param_1;
659 
660  rows_to_send = rows_to_receive = n_rows;
661 
662  /*
663  * Do a pipelined insert into a table created at the start of the pipeline
664  */
665  if (PQenterPipelineMode(conn) != 1)
666  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
667 
668  while (send_step != BI_PREPARE)
669  {
670  const char *sql;
671 
672  switch (send_step)
673  {
674  case BI_BEGIN_TX:
675  sql = "BEGIN TRANSACTION";
676  send_step = BI_DROP_TABLE;
677  break;
678 
679  case BI_DROP_TABLE:
680  sql = drop_table_sql;
681  send_step = BI_CREATE_TABLE;
682  break;
683 
684  case BI_CREATE_TABLE:
685  sql = create_table_sql;
686  send_step = BI_PREPARE;
687  break;
688 
689  default:
690  pg_fatal("invalid state");
691  sql = NULL; /* keep compiler quiet */
692  }
693 
694  pg_debug("sending: %s\n", sql);
695  if (PQsendQueryParams(conn, sql,
696  0, NULL, NULL, NULL, NULL, 0) != 1)
697  pg_fatal("dispatching %s failed: %s", sql, PQerrorMessage(conn));
698  }
699 
700  Assert(send_step == BI_PREPARE);
701  pg_debug("sending: %s\n", insert_sql2);
702  if (PQsendPrepare(conn, "my_insert", insert_sql2, 2, insert_param_oids) != 1)
703  pg_fatal("dispatching PREPARE failed: %s", PQerrorMessage(conn));
704  send_step = BI_INSERT_ROWS;
705 
706  /*
707  * Now we start inserting. We'll be sending enough data that we could fill
708  * our output buffer, so to avoid deadlocking we need to enter nonblocking
709  * mode and consume input while we send more output. As results of each
710  * query are processed we should pop them to allow processing of the next
711  * query. There's no need to finish the pipeline before processing
712  * results.
713  */
714  if (PQsetnonblocking(conn, 1) != 0)
715  pg_fatal("failed to set nonblocking mode: %s", PQerrorMessage(conn));
716 
717  while (recv_step != BI_DONE)
718  {
719  int sock;
720  fd_set input_mask;
721  fd_set output_mask;
722 
723  sock = PQsocket(conn);
724 
725  if (sock < 0)
726  break; /* shouldn't happen */
727 
728  FD_ZERO(&input_mask);
729  FD_SET(sock, &input_mask);
730  FD_ZERO(&output_mask);
731  FD_SET(sock, &output_mask);
732 
733  if (select(sock + 1, &input_mask, &output_mask, NULL, NULL) < 0)
734  {
735  fprintf(stderr, "select() failed: %s\n", strerror(errno));
736  exit_nicely(conn);
737  }
738 
739  /*
740  * Process any results, so we keep the server's output buffer free
741  * flowing and it can continue to process input
742  */
743  if (FD_ISSET(sock, &input_mask))
744  {
746 
747  /* Read until we'd block if we tried to read */
748  while (!PQisBusy(conn) && recv_step < BI_DONE)
749  {
750  PGresult *res;
751  const char *cmdtag = "";
752  const char *description = "";
753  int status;
754 
755  /*
756  * Read next result. If no more results from this query,
757  * advance to the next query
758  */
759  res = PQgetResult(conn);
760  if (res == NULL)
761  continue;
762 
764  switch (recv_step)
765  {
766  case BI_BEGIN_TX:
767  cmdtag = "BEGIN";
768  recv_step++;
769  break;
770  case BI_DROP_TABLE:
771  cmdtag = "DROP TABLE";
772  recv_step++;
773  break;
774  case BI_CREATE_TABLE:
775  cmdtag = "CREATE TABLE";
776  recv_step++;
777  break;
778  case BI_PREPARE:
779  cmdtag = "";
780  description = "PREPARE";
781  recv_step++;
782  break;
783  case BI_INSERT_ROWS:
784  cmdtag = "INSERT";
785  rows_to_receive--;
786  if (rows_to_receive == 0)
787  recv_step++;
788  break;
789  case BI_COMMIT_TX:
790  cmdtag = "COMMIT";
791  recv_step++;
792  break;
793  case BI_SYNC:
794  cmdtag = "";
795  description = "SYNC";
797  recv_step++;
798  break;
799  case BI_DONE:
800  /* unreachable */
801  pg_fatal("unreachable state");
802  }
803 
804  if (PQresultStatus(res) != status)
805  pg_fatal("%s reported status %s, expected %s\n"
806  "Error message: \"%s\"",
807  description, PQresStatus(PQresultStatus(res)),
809 
810  if (strncmp(PQcmdStatus(res), cmdtag, strlen(cmdtag)) != 0)
811  pg_fatal("%s expected command tag '%s', got '%s'",
812  description, cmdtag, PQcmdStatus(res));
813 
814  pg_debug("Got %s OK\n", cmdtag[0] != '\0' ? cmdtag : description);
815 
816  PQclear(res);
817  }
818  }
819 
820  /* Write more rows and/or the end pipeline message, if needed */
821  if (FD_ISSET(sock, &output_mask))
822  {
823  PQflush(conn);
824 
825  if (send_step == BI_INSERT_ROWS)
826  {
827  snprintf(insert_param_0, MAXINTLEN, "%d", rows_to_send);
828  /* use up some buffer space with a wide value */
829  snprintf(insert_param_1, MAXINT8LEN, "%lld", 1LL << 62);
830 
831  if (PQsendQueryPrepared(conn, "my_insert",
832  2, insert_params, NULL, NULL, 0) == 1)
833  {
834  pg_debug("sent row %d\n", rows_to_send);
835 
836  rows_to_send--;
837  if (rows_to_send == 0)
838  send_step++;
839  }
840  else
841  {
842  /*
843  * in nonblocking mode, so it's OK for an insert to fail
844  * to send
845  */
846  fprintf(stderr, "WARNING: failed to send insert #%d: %s\n",
847  rows_to_send, PQerrorMessage(conn));
848  }
849  }
850  else if (send_step == BI_COMMIT_TX)
851  {
852  if (PQsendQueryParams(conn, "COMMIT",
853  0, NULL, NULL, NULL, NULL, 0) == 1)
854  {
855  pg_debug("sent COMMIT\n");
856  send_step++;
857  }
858  else
859  {
860  fprintf(stderr, "WARNING: failed to send commit: %s\n",
862  }
863  }
864  else if (send_step == BI_SYNC)
865  {
866  if (PQpipelineSync(conn) == 1)
867  {
868  fprintf(stdout, "pipeline sync sent\n");
869  send_step++;
870  }
871  else
872  {
873  fprintf(stderr, "WARNING: pipeline sync failed: %s\n",
875  }
876  }
877  }
878  }
879 
880  /* We've got the sync message and the pipeline should be done */
881  if (PQexitPipelineMode(conn) != 1)
882  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
884 
885  if (PQsetnonblocking(conn, 0) != 0)
886  pg_fatal("failed to clear nonblocking mode: %s", PQerrorMessage(conn));
887 
888  fprintf(stderr, "ok\n");
889 }
char * PQcmdStatus(PGresult *res)
Definition: fe-exec.c:3581
int PQsetnonblocking(PGconn *conn, int arg)
Definition: fe-exec.c:3773
int PQsendPrepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
Definition: fe-exec.c:1538
int PQsendQueryPrepared(PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
Definition: fe-exec.c:1635
#define MAXINT8LEN
static const char *const insert_sql2
#define MAXINTLEN
Assert(fmt[strlen(fmt) - 1] !='\n')
#define pg_debug(...)
PipelineInsertStep
static void static void status(const char *fmt,...) pg_attribute_printf(1
Definition: pg_regress.c:225
#define snprintf
Definition: port.h:238

References Assert(), BI_BEGIN_TX, BI_COMMIT_TX, BI_CREATE_TABLE, BI_DONE, BI_DROP_TABLE, BI_INSERT_ROWS, BI_PREPARE, BI_SYNC, conn, create_table_sql, drop_table_sql, exit_nicely(), fprintf(), insert_sql2, MAXINT8LEN, MAXINTLEN, pg_debug, pg_fatal, PGRES_COMMAND_OK, PGRES_PIPELINE_SYNC, PQclear(), PQcmdStatus(), PQconsumeInput(), PQenterPipelineMode(), PQerrorMessage(), PQexitPipelineMode(), PQflush(), PQgetResult(), PQisBusy(), PQpipelineSync(), PQresStatus(), PQresultStatus(), PQsendPrepare(), PQsendQueryParams(), PQsendQueryPrepared(), PQsetnonblocking(), PQsocket(), res, select, snprintf, status(), generate_unaccent_rules::stdout, and strerror.

Referenced by main().

◆ test_prepared()

static void test_prepared ( PGconn conn)
static

Definition at line 892 of file libpq_pipeline.c.

893 {
894  PGresult *res = NULL;
895  Oid param_oids[1] = {INT4OID};
896  Oid expected_oids[4];
897  Oid typ;
898 
899  fprintf(stderr, "prepared... ");
900 
901  if (PQenterPipelineMode(conn) != 1)
902  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
903  if (PQsendPrepare(conn, "select_one", "SELECT $1, '42', $1::numeric, "
904  "interval '1 sec'",
905  1, param_oids) != 1)
906  pg_fatal("preparing query failed: %s", PQerrorMessage(conn));
907  expected_oids[0] = INT4OID;
908  expected_oids[1] = TEXTOID;
909  expected_oids[2] = NUMERICOID;
910  expected_oids[3] = INTERVALOID;
911  if (PQsendDescribePrepared(conn, "select_one") != 1)
912  pg_fatal("failed to send describePrepared: %s", PQerrorMessage(conn));
913  if (PQpipelineSync(conn) != 1)
914  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
915 
916  res = PQgetResult(conn);
917  if (res == NULL)
918  pg_fatal("PQgetResult returned null");
920  pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
921  PQclear(res);
922  res = PQgetResult(conn);
923  if (res != NULL)
924  pg_fatal("expected NULL result");
925 
926  res = PQgetResult(conn);
927  if (res == NULL)
928  pg_fatal("PQgetResult returned NULL");
930  pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
931  if (PQnfields(res) != lengthof(expected_oids))
932  pg_fatal("expected %zd columns, got %d",
933  lengthof(expected_oids), PQnfields(res));
934  for (int i = 0; i < PQnfields(res); i++)
935  {
936  typ = PQftype(res, i);
937  if (typ != expected_oids[i])
938  pg_fatal("field %d: expected type %u, got %u",
939  i, expected_oids[i], typ);
940  }
941  PQclear(res);
942  res = PQgetResult(conn);
943  if (res != NULL)
944  pg_fatal("expected NULL result");
945 
946  res = PQgetResult(conn);
948  pg_fatal("expected PGRES_PIPELINE_SYNC, got %s", PQresStatus(PQresultStatus(res)));
949 
950  if (PQexitPipelineMode(conn) != 1)
951  pg_fatal("could not exit pipeline mode: %s", PQerrorMessage(conn));
952 
953  PQexec(conn, "BEGIN");
954  PQexec(conn, "DECLARE cursor_one CURSOR FOR SELECT 1");
956  if (PQsendDescribePortal(conn, "cursor_one") != 1)
957  pg_fatal("PQsendDescribePortal failed: %s", PQerrorMessage(conn));
958  if (PQpipelineSync(conn) != 1)
959  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
960  res = PQgetResult(conn);
961  if (res == NULL)
962  pg_fatal("expected NULL result");
964  pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
965 
966  typ = PQftype(res, 0);
967  if (typ != INT4OID)
968  pg_fatal("portal: expected type %u, got %u",
969  INT4OID, typ);
970  PQclear(res);
971  res = PQgetResult(conn);
972  if (res != NULL)
973  pg_fatal("expected NULL result");
974  res = PQgetResult(conn);
976  pg_fatal("expected PGRES_PIPELINE_SYNC, got %s", PQresStatus(PQresultStatus(res)));
977 
978  if (PQexitPipelineMode(conn) != 1)
979  pg_fatal("could not exit pipeline mode: %s", PQerrorMessage(conn));
980 
981  fprintf(stderr, "ok\n");
982 }
#define lengthof(array)
Definition: c.h:724
Oid PQftype(const PGresult *res, int field_num)
Definition: fe-exec.c:3548
int PQsendDescribePrepared(PGconn *conn, const char *stmt)
Definition: fe-exec.c:2454
int PQsendDescribePortal(PGconn *conn, const char *portal)
Definition: fe-exec.c:2467
int PQnfields(const PGresult *res)
Definition: fe-exec.c:3318

References conn, fprintf(), i, lengthof, pg_fatal, PGRES_COMMAND_OK, PGRES_PIPELINE_SYNC, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexec(), PQexitPipelineMode(), PQftype(), PQgetResult(), PQnfields(), PQpipelineSync(), PQresStatus(), PQresultStatus(), PQsendDescribePortal(), PQsendDescribePrepared(), PQsendPrepare(), and res.

Referenced by main().

◆ test_simple_pipeline()

static void test_simple_pipeline ( PGconn conn)
static

Definition at line 1063 of file libpq_pipeline.c.

1064 {
1065  PGresult *res = NULL;
1066  const char *dummy_params[1] = {"1"};
1067  Oid dummy_param_oids[1] = {INT4OID};
1068 
1069  fprintf(stderr, "simple pipeline... ");
1070 
1071  /*
1072  * Enter pipeline mode and dispatch a set of operations, which we'll then
1073  * process the results of as they come in.
1074  *
1075  * For a simple case we should be able to do this without interim
1076  * processing of results since our output buffer will give us enough slush
1077  * to work with and we won't block on sending. So blocking mode is fine.
1078  */
1079  if (PQisnonblocking(conn))
1080  pg_fatal("Expected blocking connection mode");
1081 
1082  if (PQenterPipelineMode(conn) != 1)
1083  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
1084 
1085  if (PQsendQueryParams(conn, "SELECT $1",
1086  1, dummy_param_oids, dummy_params,
1087  NULL, NULL, 0) != 1)
1088  pg_fatal("dispatching SELECT failed: %s", PQerrorMessage(conn));
1089 
1090  if (PQexitPipelineMode(conn) != 0)
1091  pg_fatal("exiting pipeline mode with work in progress should fail, but succeeded");
1092 
1093  if (PQpipelineSync(conn) != 1)
1094  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1095 
1096  res = PQgetResult(conn);
1097  if (res == NULL)
1098  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
1099  PQerrorMessage(conn));
1100 
1102  pg_fatal("Unexpected result code %s from first pipeline item",
1104 
1105  PQclear(res);
1106  res = NULL;
1107 
1108  if (PQgetResult(conn) != NULL)
1109  pg_fatal("PQgetResult returned something extra after first query result.");
1110 
1111  /*
1112  * Even though we've processed the result there's still a sync to come and
1113  * we can't exit pipeline mode yet
1114  */
1115  if (PQexitPipelineMode(conn) != 0)
1116  pg_fatal("exiting pipeline mode after query but before sync succeeded incorrectly");
1117 
1118  res = PQgetResult(conn);
1119  if (res == NULL)
1120  pg_fatal("PQgetResult returned null when sync result PGRES_PIPELINE_SYNC expected: %s",
1121  PQerrorMessage(conn));
1122 
1124  pg_fatal("Unexpected result code %s instead of PGRES_PIPELINE_SYNC, error: %s",
1126 
1127  PQclear(res);
1128  res = NULL;
1129 
1130  if (PQgetResult(conn) != NULL)
1131  pg_fatal("PQgetResult returned something extra after pipeline end: %s",
1133 
1134  /* We're still in pipeline mode... */
1136  pg_fatal("Fell out of pipeline mode somehow");
1137 
1138  /* ... until we end it, which we can safely do now */
1139  if (PQexitPipelineMode(conn) != 1)
1140  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
1141  PQerrorMessage(conn));
1142 
1144  pg_fatal("Exiting pipeline mode didn't seem to work");
1145 
1146  fprintf(stderr, "ok\n");
1147 }

References conn, fprintf(), pg_fatal, PGRES_PIPELINE_SYNC, PGRES_TUPLES_OK, PQ_PIPELINE_OFF, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexitPipelineMode(), PQgetResult(), PQisnonblocking(), PQpipelineStatus(), PQpipelineSync(), PQresStatus(), PQresultStatus(), PQsendQueryParams(), and res.

Referenced by main().

◆ test_singlerowmode()

static void test_singlerowmode ( PGconn conn)
static

Definition at line 1150 of file libpq_pipeline.c.

1151 {
1152  PGresult *res;
1153  int i;
1154  bool pipeline_ended = false;
1155 
1156  if (PQenterPipelineMode(conn) != 1)
1157  pg_fatal("failed to enter pipeline mode: %s",
1158  PQerrorMessage(conn));
1159 
1160  /* One series of three commands, using single-row mode for the first two. */
1161  for (i = 0; i < 3; i++)
1162  {
1163  char *param[1];
1164 
1165  param[0] = psprintf("%d", 44 + i);
1166 
1167  if (PQsendQueryParams(conn,
1168  "SELECT generate_series(42, $1)",
1169  1,
1170  NULL,
1171  (const char **) param,
1172  NULL,
1173  NULL,
1174  0) != 1)
1175  pg_fatal("failed to send query: %s",
1176  PQerrorMessage(conn));
1177  pfree(param[0]);
1178  }
1179  if (PQpipelineSync(conn) != 1)
1180  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1181 
1182  for (i = 0; !pipeline_ended; i++)
1183  {
1184  bool first = true;
1185  bool saw_ending_tuplesok;
1186  bool isSingleTuple = false;
1187 
1188  /* Set single row mode for only first 2 SELECT queries */
1189  if (i < 2)
1190  {
1191  if (PQsetSingleRowMode(conn) != 1)
1192  pg_fatal("PQsetSingleRowMode() failed for i=%d", i);
1193  }
1194 
1195  /* Consume rows for this query */
1196  saw_ending_tuplesok = false;
1197  while ((res = PQgetResult(conn)) != NULL)
1198  {
1200 
1201  if (est == PGRES_PIPELINE_SYNC)
1202  {
1203  fprintf(stderr, "end of pipeline reached\n");
1204  pipeline_ended = true;
1205  PQclear(res);
1206  if (i != 3)
1207  pg_fatal("Expected three results, got %d", i);
1208  break;
1209  }
1210 
1211  /* Expect SINGLE_TUPLE for queries 0 and 1, TUPLES_OK for 2 */
1212  if (first)
1213  {
1214  if (i <= 1 && est != PGRES_SINGLE_TUPLE)
1215  pg_fatal("Expected PGRES_SINGLE_TUPLE for query %d, got %s",
1216  i, PQresStatus(est));
1217  if (i >= 2 && est != PGRES_TUPLES_OK)
1218  pg_fatal("Expected PGRES_TUPLES_OK for query %d, got %s",
1219  i, PQresStatus(est));
1220  first = false;
1221  }
1222 
1223  fprintf(stderr, "Result status %s for query %d", PQresStatus(est), i);
1224  switch (est)
1225  {
1226  case PGRES_TUPLES_OK:
1227  fprintf(stderr, ", tuples: %d\n", PQntuples(res));
1228  saw_ending_tuplesok = true;
1229  if (isSingleTuple)
1230  {
1231  if (PQntuples(res) == 0)
1232  fprintf(stderr, "all tuples received in query %d\n", i);
1233  else
1234  pg_fatal("Expected to follow PGRES_SINGLE_TUPLE, but received PGRES_TUPLES_OK directly instead");
1235  }
1236  break;
1237 
1238  case PGRES_SINGLE_TUPLE:
1239  isSingleTuple = true;
1240  fprintf(stderr, ", %d tuple: %s\n", PQntuples(res), PQgetvalue(res, 0, 0));
1241  break;
1242 
1243  default:
1244  pg_fatal("unexpected");
1245  }
1246  PQclear(res);
1247  }
1248  if (!pipeline_ended && !saw_ending_tuplesok)
1249  pg_fatal("didn't get expected terminating TUPLES_OK");
1250  }
1251 
1252  /*
1253  * Now issue one command, get its results in with single-row mode, then
1254  * issue another command, and get its results in normal mode; make sure
1255  * the single-row mode flag is reset as expected.
1256  */
1257  if (PQsendQueryParams(conn, "SELECT generate_series(0, 0)",
1258  0, NULL, NULL, NULL, NULL, 0) != 1)
1259  pg_fatal("failed to send query: %s",
1260  PQerrorMessage(conn));
1261  if (PQsendFlushRequest(conn) != 1)
1262  pg_fatal("failed to send flush request");
1263  if (PQsetSingleRowMode(conn) != 1)
1264  pg_fatal("PQsetSingleRowMode() failed");
1265  res = PQgetResult(conn);
1266  if (res == NULL)
1267  pg_fatal("unexpected NULL");
1269  pg_fatal("Expected PGRES_SINGLE_TUPLE, got %s",
1271  res = PQgetResult(conn);
1272  if (res == NULL)
1273  pg_fatal("unexpected NULL");
1275  pg_fatal("Expected PGRES_TUPLES_OK, got %s",
1277  if (PQgetResult(conn) != NULL)
1278  pg_fatal("expected NULL result");
1279 
1280  if (PQsendQueryParams(conn, "SELECT 1",
1281  0, NULL, NULL, NULL, NULL, 0) != 1)
1282  pg_fatal("failed to send query: %s",
1283  PQerrorMessage(conn));
1284  if (PQsendFlushRequest(conn) != 1)
1285  pg_fatal("failed to send flush request");
1286  res = PQgetResult(conn);
1287  if (res == NULL)
1288  pg_fatal("unexpected NULL");
1290  pg_fatal("Expected PGRES_TUPLES_OK, got %s",
1292  if (PQgetResult(conn) != NULL)
1293  pg_fatal("expected NULL result");
1294 
1295  if (PQexitPipelineMode(conn) != 1)
1296  pg_fatal("failed to end pipeline mode: %s", PQerrorMessage(conn));
1297 
1298  fprintf(stderr, "ok\n");
1299 }
ExecStatusType
Definition: libpq-fe.h:95
void pfree(void *pointer)
Definition: mcxt.c:1306
char * psprintf(const char *fmt,...)
Definition: psprintf.c:46

References conn, fprintf(), i, pfree(), pg_fatal, PGRES_PIPELINE_SYNC, PGRES_SINGLE_TUPLE, PGRES_TUPLES_OK, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexitPipelineMode(), PQgetResult(), PQgetvalue(), PQntuples(), PQpipelineSync(), PQresStatus(), PQresultStatus(), PQsendFlushRequest(), PQsendQueryParams(), PQsetSingleRowMode(), psprintf(), and res.

Referenced by main().

◆ test_transaction()

static void test_transaction ( PGconn conn)
static

Definition at line 1306 of file libpq_pipeline.c.

1307 {
1308  PGresult *res;
1309  bool expect_null;
1310  int num_syncs = 0;
1311 
1312  res = PQexec(conn, "DROP TABLE IF EXISTS pq_pipeline_tst;"
1313  "CREATE TABLE pq_pipeline_tst (id int)");
1315  pg_fatal("failed to create test table: %s",
1316  PQerrorMessage(conn));
1317  PQclear(res);
1318 
1319  if (PQenterPipelineMode(conn) != 1)
1320  pg_fatal("failed to enter pipeline mode: %s",
1321  PQerrorMessage(conn));
1322  if (PQsendPrepare(conn, "rollback", "ROLLBACK", 0, NULL) != 1)
1323  pg_fatal("could not send prepare on pipeline: %s",
1324  PQerrorMessage(conn));
1325 
1326  if (PQsendQueryParams(conn,
1327  "BEGIN",
1328  0, NULL, NULL, NULL, NULL, 0) != 1)
1329  pg_fatal("failed to send query: %s",
1330  PQerrorMessage(conn));
1331  if (PQsendQueryParams(conn,
1332  "SELECT 0/0",
1333  0, NULL, NULL, NULL, NULL, 0) != 1)
1334  pg_fatal("failed to send query: %s",
1335  PQerrorMessage(conn));
1336 
1337  /*
1338  * send a ROLLBACK using a prepared stmt. Doesn't work because we need to
1339  * get out of the pipeline-aborted state first.
1340  */
1341  if (PQsendQueryPrepared(conn, "rollback", 0, NULL, NULL, NULL, 1) != 1)
1342  pg_fatal("failed to execute prepared: %s",
1343  PQerrorMessage(conn));
1344 
1345  /* This insert fails because we're in pipeline-aborted state */
1346  if (PQsendQueryParams(conn,
1347  "INSERT INTO pq_pipeline_tst VALUES (1)",
1348  0, NULL, NULL, NULL, NULL, 0) != 1)
1349  pg_fatal("failed to send query: %s",
1350  PQerrorMessage(conn));
1351  if (PQpipelineSync(conn) != 1)
1352  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1353  num_syncs++;
1354 
1355  /*
1356  * This insert fails even though the pipeline got a SYNC, because we're in
1357  * an aborted transaction
1358  */
1359  if (PQsendQueryParams(conn,
1360  "INSERT INTO pq_pipeline_tst VALUES (2)",
1361  0, NULL, NULL, NULL, NULL, 0) != 1)
1362  pg_fatal("failed to send query: %s",
1363  PQerrorMessage(conn));
1364  if (PQpipelineSync(conn) != 1)
1365  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1366  num_syncs++;
1367 
1368  /*
1369  * Send ROLLBACK using prepared stmt. This one works because we just did
1370  * PQpipelineSync above.
1371  */
1372  if (PQsendQueryPrepared(conn, "rollback", 0, NULL, NULL, NULL, 1) != 1)
1373  pg_fatal("failed to execute prepared: %s",
1374  PQerrorMessage(conn));
1375 
1376  /*
1377  * Now that we're out of a transaction and in pipeline-good mode, this
1378  * insert works
1379  */
1380  if (PQsendQueryParams(conn,
1381  "INSERT INTO pq_pipeline_tst VALUES (3)",
1382  0, NULL, NULL, NULL, NULL, 0) != 1)
1383  pg_fatal("failed to send query: %s",
1384  PQerrorMessage(conn));
1385  /* Send two syncs now -- match up to SYNC messages below */
1386  if (PQpipelineSync(conn) != 1)
1387  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1388  num_syncs++;
1389  if (PQpipelineSync(conn) != 1)
1390  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1391  num_syncs++;
1392 
1393  expect_null = false;
1394  for (int i = 0;; i++)
1395  {
1396  ExecStatusType restype;
1397 
1398  res = PQgetResult(conn);
1399  if (res == NULL)
1400  {
1401  printf("%d: got NULL result\n", i);
1402  if (!expect_null)
1403  pg_fatal("did not expect NULL here");
1404  expect_null = false;
1405  continue;
1406  }
1407  restype = PQresultStatus(res);
1408  printf("%d: got status %s", i, PQresStatus(restype));
1409  if (expect_null)
1410  pg_fatal("expected NULL");
1411  if (restype == PGRES_FATAL_ERROR)
1412  printf("; error: %s", PQerrorMessage(conn));
1413  else if (restype == PGRES_PIPELINE_ABORTED)
1414  {
1415  printf(": command didn't run because pipeline aborted\n");
1416  }
1417  else
1418  printf("\n");
1419  PQclear(res);
1420 
1421  if (restype == PGRES_PIPELINE_SYNC)
1422  num_syncs--;
1423  else
1424  expect_null = true;
1425  if (num_syncs <= 0)
1426  break;
1427  }
1428  if (PQgetResult(conn) != NULL)
1429  pg_fatal("returned something extra after all the syncs: %s",
1431 
1432  if (PQexitPipelineMode(conn) != 1)
1433  pg_fatal("failed to end pipeline mode: %s", PQerrorMessage(conn));
1434 
1435  /* We expect to find one tuple containing the value "3" */
1436  res = PQexec(conn, "SELECT * FROM pq_pipeline_tst");
1438  pg_fatal("failed to obtain result: %s", PQerrorMessage(conn));
1439  if (PQntuples(res) != 1)
1440  pg_fatal("did not get 1 tuple");
1441  if (strcmp(PQgetvalue(res, 0, 0), "3") != 0)
1442  pg_fatal("did not get expected tuple");
1443  PQclear(res);
1444 
1445  fprintf(stderr, "ok\n");
1446 }

References conn, fprintf(), i, pg_fatal, PGRES_COMMAND_OK, PGRES_FATAL_ERROR, PGRES_PIPELINE_ABORTED, PGRES_PIPELINE_SYNC, PGRES_TUPLES_OK, PQclear(), PQenterPipelineMode(), PQerrorMessage(), PQexec(), PQexitPipelineMode(), PQgetResult(), PQgetvalue(), PQntuples(), PQpipelineSync(), PQresStatus(), PQresultStatus(), PQsendPrepare(), PQsendQueryParams(), PQsendQueryPrepared(), printf, and res.

Referenced by main().

◆ test_uniqviol()

static void test_uniqviol ( PGconn conn)
static

Definition at line 1454 of file libpq_pipeline.c.

1455 {
1456  int sock = PQsocket(conn);
1457  PGresult *res;
1458  Oid paramTypes[2] = {INT8OID, INT8OID};
1459  const char *paramValues[2];
1460  char paramValue0[MAXINT8LEN];
1461  char paramValue1[MAXINT8LEN];
1462  int ctr = 0;
1463  int numsent = 0;
1464  int results = 0;
1465  bool read_done = false;
1466  bool write_done = false;
1467  bool error_sent = false;
1468  bool got_error = false;
1469  int switched = 0;
1470  int socketful = 0;
1471  fd_set in_fds;
1472  fd_set out_fds;
1473 
1474  fprintf(stderr, "uniqviol ...");
1475 
1476  PQsetnonblocking(conn, 1);
1477 
1478  paramValues[0] = paramValue0;
1479  paramValues[1] = paramValue1;
1480  sprintf(paramValue1, "42");
1481 
1482  res = PQexec(conn, "drop table if exists ppln_uniqviol;"
1483  "create table ppln_uniqviol(id bigint primary key, idata bigint)");
1485  pg_fatal("failed to create table: %s", PQerrorMessage(conn));
1486 
1487  res = PQexec(conn, "begin");
1489  pg_fatal("failed to begin transaction: %s", PQerrorMessage(conn));
1490 
1491  res = PQprepare(conn, "insertion",
1492  "insert into ppln_uniqviol values ($1, $2) returning id",
1493  2, paramTypes);
1494  if (res == NULL || PQresultStatus(res) != PGRES_COMMAND_OK)
1495  pg_fatal("failed to prepare query: %s", PQerrorMessage(conn));
1496 
1497  if (PQenterPipelineMode(conn) != 1)
1498  pg_fatal("failed to enter pipeline mode");
1499 
1500  while (!read_done)
1501  {
1502  /*
1503  * Avoid deadlocks by reading everything the server has sent before
1504  * sending anything. (Special precaution is needed here to process
1505  * PQisBusy before testing the socket for read-readiness, because the
1506  * socket does not turn read-ready after "sending" queries in aborted
1507  * pipeline mode.)
1508  */
1509  while (PQisBusy(conn) == 0)
1510  {
1511  bool new_error;
1512 
1513  if (results >= numsent)
1514  {
1515  if (write_done)
1516  read_done = true;
1517  break;
1518  }
1519 
1520  res = PQgetResult(conn);
1521  new_error = process_result(conn, res, results, numsent);
1522  if (new_error && got_error)
1523  pg_fatal("got two errors");
1524  got_error |= new_error;
1525  if (results++ >= numsent - 1)
1526  {
1527  if (write_done)
1528  read_done = true;
1529  break;
1530  }
1531  }
1532 
1533  if (read_done)
1534  break;
1535 
1536  FD_ZERO(&out_fds);
1537  FD_SET(sock, &out_fds);
1538 
1539  FD_ZERO(&in_fds);
1540  FD_SET(sock, &in_fds);
1541 
1542  if (select(sock + 1, &in_fds, write_done ? NULL : &out_fds, NULL, NULL) == -1)
1543  {
1544  if (errno == EINTR)
1545  continue;
1546  pg_fatal("select() failed: %m");
1547  }
1548 
1549  if (FD_ISSET(sock, &in_fds) && PQconsumeInput(conn) == 0)
1550  pg_fatal("PQconsumeInput failed: %s", PQerrorMessage(conn));
1551 
1552  /*
1553  * If the socket is writable and we haven't finished sending queries,
1554  * send some.
1555  */
1556  if (!write_done && FD_ISSET(sock, &out_fds))
1557  {
1558  for (;;)
1559  {
1560  int flush;
1561 
1562  /*
1563  * provoke uniqueness violation exactly once after having
1564  * switched to read mode.
1565  */
1566  if (switched >= 1 && !error_sent && ctr % socketful >= socketful / 2)
1567  {
1568  sprintf(paramValue0, "%d", numsent / 2);
1569  fprintf(stderr, "E");
1570  error_sent = true;
1571  }
1572  else
1573  {
1574  fprintf(stderr, ".");
1575  sprintf(paramValue0, "%d", ctr++);
1576  }
1577 
1578  if (PQsendQueryPrepared(conn, "insertion", 2, paramValues, NULL, NULL, 0) != 1)
1579  pg_fatal("failed to execute prepared query: %s", PQerrorMessage(conn));
1580  numsent++;
1581 
1582  /* Are we done writing? */
1583  if (socketful != 0 && numsent % socketful == 42 && error_sent)
1584  {
1585  if (PQsendFlushRequest(conn) != 1)
1586  pg_fatal("failed to send flush request");
1587  write_done = true;
1588  fprintf(stderr, "\ndone writing\n");
1589  PQflush(conn);
1590  break;
1591  }
1592 
1593  /* is the outgoing socket full? */
1594  flush = PQflush(conn);
1595  if (flush == -1)
1596  pg_fatal("failed to flush: %s", PQerrorMessage(conn));
1597  if (flush == 1)
1598  {
1599  if (socketful == 0)
1600  socketful = numsent;
1601  fprintf(stderr, "\nswitch to reading\n");
1602  switched++;
1603  break;
1604  }
1605  }
1606  }
1607  }
1608 
1609  if (!got_error)
1610  pg_fatal("did not get expected error");
1611 
1612  fprintf(stderr, "ok\n");
1613 }
PGresult * PQprepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
Definition: fe-exec.c:2269
static bool process_result(PGconn *conn, PGresult *res, int results, int numsent)
#define sprintf
Definition: port.h:240
#define EINTR
Definition: win32_port.h:369

References conn, EINTR, fprintf(), MAXINT8LEN, pg_fatal, PGRES_COMMAND_OK, PQconsumeInput(), PQenterPipelineMode(), PQerrorMessage(), PQexec(), PQflush(), PQgetResult(), PQisBusy(), PQprepare(), PQresultStatus(), PQsendFlushRequest(), PQsendQueryPrepared(), PQsetnonblocking(), PQsocket(), process_result(), res, select, and sprintf.

Referenced by main().

◆ usage()

static void usage ( const char *  progname)
static

Definition at line 1670 of file libpq_pipeline.c.

1671 {
1672  fprintf(stderr, "%s tests libpq's pipeline mode.\n\n", progname);
1673  fprintf(stderr, "Usage:\n");
1674  fprintf(stderr, " %s [OPTION] tests\n", progname);
1675  fprintf(stderr, " %s [OPTION] TESTNAME [CONNINFO]\n", progname);
1676  fprintf(stderr, "\nOptions:\n");
1677  fprintf(stderr, " -t TRACEFILE generate a libpq trace to TRACEFILE\n");
1678  fprintf(stderr, " -r NUMROWS use NUMROWS as the test size\n");
1679 }
const char *const progname

References fprintf(), and progname.

Referenced by main().

◆ va_end()

◆ va_start()

◆ vfprintf()

vfprintf ( stderr  ,
fmt  ,
args   
)

Variable Documentation

◆ create_table_sql

const char* const create_table_sql
static
Initial value:
=
"CREATE UNLOGGED TABLE pq_pipeline_demo(id serial primary key, itemno integer,"
"int8filler int8);"

Definition at line 48 of file libpq_pipeline.c.

Referenced by test_pipeline_abort(), and test_pipelined_insert().

◆ drop_table_sql

const char* const drop_table_sql
static
Initial value:
=
"DROP TABLE IF EXISTS pq_pipeline_demo"

Definition at line 46 of file libpq_pipeline.c.

Referenced by test_pipeline_abort(), and test_pipelined_insert().

◆ fmt

static void const char * fmt

Definition at line 29 of file libpq_pipeline.c.

Referenced by _allocAH(), ahprintf(), appendJSONKeyValueFmt(), appendPQExpBuffer(), appendPQExpBufferVA(), appendStringInfo(), appendStringInfoVA(), archprintf(), CreateArchive(), date_test_defmt(), date_test_fmt(), datetime_to_char_body(), dblink_res_error(), do_pset(), do_serialize(), do_to_timestamp(), dttofmtasc_replace(), ecpg_log(), errmsg(), errmsg_internal(), exec_prog(), executeQueryOrDie(), find_end_token(), float4_to_char(), float8_to_char(), fmtfloat(), fmtlong(), format_elog_string(), header(), int4_to_char(), int8_to_char(), interval_to_char(), libpq_append_conn_error(), libpq_append_error(), log_error(), main(), my_strftime(), numeric_to_char(), numeric_to_number(), OpenArchive(), parallel_exec_prog(), parse_datetime(), pg_fatal(), pg_fprintf(), pg_log(), pg_log_generic(), pg_log_generic_v(), pg_log_v(), pg_printf(), pg_snprintf(), pg_sprintf(), pg_strfromd(), pg_vfprintf(), pg_vprintf(), pg_vsnprintf(), pg_vsprintf(), PGTYPESdate_defmt_asc(), PGTYPEStimestamp_defmt_asc(), PGTYPEStimestamp_defmt_scan(), PLy_elog_impl(), PLy_exception_set(), pqInternalNotice(), prep_status(), prep_status_progress(), print_lo_result(), printfPQExpBuffer(), ProcessCopyOptions(), psprintf(), pvsnprintf(), px_debug(), rdefmtdate(), ReadHead(), report_backup_error(), report_fatal_error(), report_invalid_record(), report_manifest_error(), report_status(), rfmtdate(), rfmtlong(), status(), tarPrintf(), text_format(), timestamp_to_char(), timestamptz_to_char(), to_date(), to_timestamp(), warn_or_exit_horribly(), and write_stderr().

◆ insert_sql

const char* const insert_sql
static
Initial value:
=
"INSERT INTO pq_pipeline_demo(itemno) VALUES ($1)"

Definition at line 51 of file libpq_pipeline.c.

Referenced by test_pipeline_abort().

◆ insert_sql2

const char* const insert_sql2
static
Initial value:
=
"INSERT INTO pq_pipeline_demo(itemno,int8filler) VALUES ($1, $2)"

Definition at line 53 of file libpq_pipeline.c.

Referenced by test_pipelined_insert().

◆ progname

const char* const progname = "libpq_pipeline"

Definition at line 34 of file libpq_pipeline.c.

Referenced by usage().

◆ tracefile

char* tracefile = NULL

Definition at line 37 of file libpq_pipeline.c.

Referenced by main().