PostgreSQL Source Code  git master
libpq_pipeline.c File Reference
#include "postgres_fe.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 bool process_result (PGconn *conn, PGresult *res, int results, int numsent)
 
static void pg_attribute_noreturn () pg_fatal_impl(int line
 
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 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

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
 
static void const char * fmt
 

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 620 of file libpq_pipeline.c.

621 {
622  BI_BEGIN_TX,
625  BI_PREPARE,
627  BI_COMMIT_TX,
628  BI_SYNC,
629  BI_DONE
630 };
@ 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_readnext(), _hash_readpage(), _hash_readprev(), _hash_splitbucket(), _hash_squeezebucket(), _int_matchsel(), _mdfd_getseg(), _mdfd_openseg(), _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(), 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_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_row_identity_columns(), add_row_identity_var(), add_rtes_to_flat_rtable(), add_vars_to_targetlist(), addArcs(), AddCatcacheInvalidationMessage(), addConstrChildIdxDeps(), AddEventToPendingNotifies(), 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_multilevel(), 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(), AllocSetFreeIndex(), AllocSetReset(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterPolicy(), AlterPublicationOptions(), AlterRelationNamespaceInternal(), AlterSchemaOwner_internal(), AlterSeqNamespaces(), AlterSequence(), AlterStatistics(), AlterSubscription(), AlterSystemSetConfigFile(), AlterTableNamespaceInternal(), analyze_row_processor(), analyzeCTE(), analyzeCTETargetList(), 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_DroppedStats(), AtEOXact_PgStat_Relations(), AtEOXact_RelationCache(), AtEOXact_RelationMap(), AtEOXact_SMgr(), AtEOXact_Snapshot(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIndex(), ATExecAddIndexConstraint(), ATExecAddStatistics(), ATExecAlterColumnType(), ATExecAttachPartition(), ATExecCmd(), ATExecDropColumn(), ATExecSetCompression(), ATExecSetStatistics(), ATExecSetStorage(), 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(), BufferGetBlockNumber(), BufferGetLSNAtomic(), BufferGetTag(), BufferIsPermanent(), BufferSync(), BufFileAppend(), BufFileCreateTemp(), BufFileDumpBuffer(), BufFileExportFileSet(), BufFileFlush(), BufFileRead(), BufFileSize(), BufFileWrite(), BufTableInsert(), build_attnums_array(), 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_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(), 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_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(), 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(), collectSiblingPathsInJsonTablePlan(), 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_mutable_functions_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(), convertJsonbArray(), ConvertTimeZoneAbbrevs(), convertToJsonb(), cookDefault(), copy_plpgsql_datums(), copy_replication_slot(), copy_table(), copy_table_data(), CopyCachedPlan(), CopyConversionError(), CopyErrorData(), CopyFrom(), CopyGetData(), CopyLoadInputBuf(), CopyLoadRawBuf(), CopyMultiInsertBufferCleanup(), 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(), CreateProceduralLanguage(), CreateReplicationSlot(), CreateRestartPoint(), CreateStatistics(), CreateSubscription(), 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(), 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(), DefineQueryRewrite(), 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_get_current_pos(), 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_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_detach(), 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(), 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_incremental(), 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_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(), ExecEvalJson(), ExecEvalJsonExpr(), ExecEvalJsonExprSubtrans(), ExecEvalMinMax(), ExecEvalParamExec(), ExecEvalStepOp(), ExecEvalWholeRowVar(), ExecEvalXmlExpr(), ExecFetchSlotHeapTuple(), ExecFetchSlotMinimalTuple(), ExecFindMatchingSubPlans(), ExecFindPartition(), ExecGetAncestorResultRels(), ExecGetJunkAttribute(), ExecGetRangeTableRelation(), 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(), ExecPrepareJsonItemCoercion(), 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_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(), 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_lateral_references(), find_multixact_start(), find_option(), find_or_make_matching_shared_tupledesc(), find_param_referent(), 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(), function_parse_error_transpose(), 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(), GenerationReset(), generator_init(), generic_redo(), geqo_eval(), get_actual_clauses(), get_actual_variable_range(), get_agg_expr_helper(), get_aggregate_argtypes(), get_appendrel_parampathinfo(), get_baserel_parampathinfo(), get_best_segment(), get_catalog_object_by_oid(), get_cheapest_group_keys_order(), get_cheapest_parameterized_child_path(), get_code_decomposition(), get_compress_algorithm_name(), get_configdata(), 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_function_rows(), 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_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_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(), GetBackgroundWorkerPid(), getBaseTypeAndTypmod(), GetBlockerStatusData(), GetCachedPlan(), GetConfigOptionByNum(), GetConfigOptionResetString(), GetConnection(), GetCTEForRTE(), GetCurrentCommandId(), GetDatabasePath(), GetExistingLocalJoinPath(), getExponentialRand(), GetFlushRecPtr(), GetForeignKeyActionTriggers(), GetForeignKeyCheckTriggers(), getGaussianRand(), getid(), GetIndexInputType(), getInsertSelectQuery(), getJsonPathVariable(), getKeyJsonValueFromContainer(), GetLatestSnapshot(), GetLocalBufferStorage(), GetLockmodeName(), GetLocksMethodTable(), GetLockStatusData(), GetLockTagsMethodTable(), GetLWLockIdentifier(), GetMemoryChunkContext(), getMessageFromWorker(), getmissingattr(), GetMockAuthenticationNonce(), GetMultiXactIdMembers(), GetNewOidWithIndex(), GetNewRelFileNode(), GetNewTransactionId(), GetNSItemByRangeTablePosn(), getObjectDescription(), getObjectIdentityParts(), getObjectTypeDescription(), GetOldestActiveTransactionId(), GetOldestSafeDecodingTransactionId(), GetOldSnapshotFromTimeMapping(), GetOverrideSearchPath(), GetParentPredicateLockTag(), GetPredicateLockStatusData(), GetPrivateRefCount(), GetPrivateRefCountEntry(), GetPubPartitionOptionRelations(), GetRealCmax(), GetRealCmin(), GetRelationPath(), GetRmgrDesc(), getRootTableInfo(), GetRTEByRangeTablePosn(), GetRunningTransactionData(), GetRunningTransactionLocks(), GetSafeSnapshot(), getScalar(), GetSchemaPublicationRelations(), GetSerializableTransactionSnapshot(), GetSerializableTransactionSnapshotInt(), GetSnapshotData(), GetSnapshotDataReuse(), GetStableLatestTransactionId(), GetSubscription(), GetSysCacheOid(), GetSystemIdentifier(), GetTableAmRoutine(), GetTableInfo(), GetTempTablespaces(), GetTempToastNamespace(), getTimelineHistory(), gettoken_tsvector(), GetTransactionSnapshot(), getTransactionStatus(), GetTupleForTrigger(), getVariable(), GetVirtualXIDsDelayingChkpt(), GetVisibilityMapPins(), GetWALInsertionTimeLine(), GetWALRecordInfo(), GetWALRecordsInfo(), 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(), 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_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_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_filenode(), 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(), 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(), InitFileAccess(), initial_cost_mergejoin(), initialize_environment(), initialize_mergeclause_eclasses(), initialize_phase(), initialize_reloptions(), InitializeClientEncoding(), InitializeLatchSupport(), InitializeLatchWaitSet(), InitializeMaxBackends(), InitializeOneGUCOption(), InitializeWalConsistencyChecking(), InitLatch(), InitPartitionPruneContext(), InitPlan(), InitPostgres(), InitPostmasterDeathWatchHandle(), InitPredicateLocks(), InitProcess(), InitProcessPhase2(), InitProcGlobal(), InitShmemAllocation(), InitStandaloneProcess(), inittapes(), InitTemporaryFileAccess(), InitTempTableNamespace(), InitWalRecovery(), InitWalSenderSlot(), inline_set_returning_function(), Insert(), insert_item_into_bucket(), insert_new_cell(), insert_timeout(), InsertOneNull(), 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(), 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(), JsonItemFromDatum(), JsonPathExists(), JsonPathQuery(), JsonPathValue(), JsonTableNextRow(), JsonTableResetContextItem(), jspGetArg(), jspGetArraySubscript(), jspGetBool(), jspGetLeftArg(), jspGetNext(), jspGetNumeric(), jspGetRightArg(), jspGetString(), jspInit(), jspIsMutableWalker(), JumbleQuery(), JumbleQueryInternal(), keyGetItem(), KnownAssignedXidExists(), KnownAssignedXidsAdd(), 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(), 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_freeze(), 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(), 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_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(), makeUniqueTypeName(), 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(), mcv_match_expression(), md5_crypt_verify(), mdcreate(), mdextend(), mdnblocks(), mdopenfork(), mdprefetch(), mdread(), mdtruncate(), mdwrite(), mdwriteback(), MemoryContextCreate(), MemoryContextDelete(), MemoryContextSetParent(), 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(), 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(), 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(), PageIndexMultiDelete(), PageIndexTupleDelete(), PageIndexTupleDeleteNoCompact(), PageIndexTupleOverwrite(), PageInit(), PageRepairFragmentation(), PageTruncateLinePointerArray(), PageValidateSpecialPointer(), pairingheap_first(), pairingheap_remove(), pairingheap_remove_first(), 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(), 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_start_callback(), pg_blocking_pids(), pg_checksum_block(), pg_checksum_final(), pg_checksum_page(), pg_checksum_type_name(), 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_log_generic_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_pwritev_with_retry(), pg_queue_signal(), pg_re_throw(), 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_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_transactional_drops(), 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_replslot(), pgstat_report_stat(), pgstat_reset(), pgstat_reset_entry(), 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(), 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(), PortalCreateHoldStore(), PortalDrop(), PortalRun(), PortalRunFetch(), PortalRunMulti(), PortalRunSelect(), PortalRunUtility(), PortalStart(), postgres_fdw_get_connections(), postgresBeginForeignInsert(), postgresEndForeignInsert(), postgresExecForeignTruncate(), postgresExplainForeignScan(), postgresForeignAsyncConfigureWait(), postgresForeignAsyncNotify(), postgresGetForeignModifyBatchSize(), postgresGetForeignPaths(), postgresGetForeignPlan(), postgresImportForeignSchema(), postgresIterateDirectModify(), 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(), pqRecycleCmdQueueEntry(), PreCommit_CheckForSerializationFailure(), PreCommit_on_commit_actions(), predicate_classify(), predicate_implied_by_recurse(), 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_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(), puttuple_common(), qc_is_allowed(), qsortCompareItemPointers(), qual_is_pushdown_safe(), query_is_distinct_for(), query_planner(), query_tree_mutator(), query_tree_walker(), 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_alloc(), 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(), RecoveryConflictInterrupt(), recurse_push_qual(), recurse_pushdown_safe(), recurse_set_operations(), reduce_dependencies(), reduce_expanded_ranges(), reduce_outer_joins_pass2(), refresh_by_match_merge(), 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_open(), RelationBuildDesc(), RelationBuildLocalRelation(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRuleLock(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationCacheInvalidate(), RelationClearRelation(), RelationCreateStorage(), RelationDecrementReferenceCount(), RelationDestroyRelation(), RelationFindReplTupleSeq(), RelationForgetRelation(), RelationGetBufferForTuple(), RelationGetDummyIndexExpressions(), RelationGetIdentityKeyBitmap(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), RelationGetNumberOfBlocksInFork(), RelationGetPartitionDesc(), RelationGetPrimaryKeyIndex(), RelationGetReplicaIndex(), RelationIdGetRelation(), RelationIdIsInInitFile(), RelationInitIndexAccessInfo(), RelationInitLockInfo(), RelationInitTableAccessMethod(), RelationMapFinishBootstrap(), RelationPutHeapTuple(), RelationReloadIndexInfo(), RelationReloadNailed(), RelationSetNewRelfilenode(), RelationTruncate(), ReleaseAndReadBuffer(), ReleaseBuffer(), ReleaseCachedPlan(), ReleaseCatCache(), ReleaseCatCacheList(), ReleaseCurrentSubTransaction(), ReleaseExternalFD(), ReleaseGenericPlan(), ReleaseLockIfHeld(), ReleaseLruFile(), ReleaseOneSerializableXact(), ReleasePostmasterChildSlot(), ReleasePredicateLocks(), ReleasePredXact(), ReleaseSavepoint(), RelfilenodeMapInvalidateCallback(), RelidByRelfilenode(), relmap_redo(), relptr_store_eval(), remap_groupColIdx(), RememberSyncRequest(), RememberToFreeTupleDescAtEOX(), remove_join_clause_from_rels(), remove_rel_from_query(), remove_result_refs(), remove_target(), remove_timeout_index(), remove_useless_groupby_columns(), remove_useless_result_rtes(), remove_useless_results_recurse(), RemoveFromWaitQueue(), RemoveGXact(), RemoveLocalLock(), RemoveObjects(), RemoveProcFromArray(), RemoveRelations(), RemoveRoleFromObjectPolicy(), RemoveScratchTarget(), RemoveTargetIfNoLongerUsed(), RenameRelationInternal(), RenameTypeInternal(), reorder_function_arguments(), ReorderBufferAddInvalidations(), ReorderBufferAllocate(), ReorderBufferAssignChild(), ReorderBufferBuildTupleCidHash(), ReorderBufferChangeMemoryUpdate(), ReorderBufferCheckMemoryLimit(), ReorderBufferCleanupTXN(), ReorderBufferFinishPrepared(), ReorderBufferForget(), 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_huge(), replace_domain_constraint_value(), 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(), 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(), ri_Check_Pk_Match(), RI_FKey_fk_upd_check_required(), ri_HashCompareOp(), ri_HashPreparedPlan(), ri_LoadConstraintInfo(), roles_is_member_of(), rollback_prepared_cb_wrapper(), 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(), 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(), SetMatViewPopulatedState(), SetMessageEncoding(), SetMultiXactIdLimit(), setNamespaceForMergeWhen(), SetNewSxactGlobalXmin(), SetOffsetVacuumLimit(), SetOldSnapshotThresholdTimestamp(), setop_fill_hash_table(), SetParallelStartTimestamps(), setPath(), setPathArray(), setPathObject(), SetPossibleUnsafeConflict(), setRedirectionTuple(), SetReindexProcessing(), SetRelationTableSpace(), SetRemoteDestReceiverParams(), SetRWConflict(), SetSerializableTransactionSnapshot(), SetTempNamespaceState(), SetTempTablespaces(), SetTransactionIdLimit(), SetTransactionSnapshot(), SetTuplestoreDestReceiverParams(), 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(), SlabFree(), SlabGetChunkSpace(), SlabIsEmpty(), SlabRealloc(), SlabReset(), slist_delete(), slist_head_element_off(), slist_next_node(), slist_pop_head_node(), slot_compile_deform(), slot_fill_defaults(), slot_getsomeattrs_int(), 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_external_passwd_cb(), sslVerifyProtocolRange(), standard_ExecutorEnd(), standard_ExecutorFinish(), standard_ExecutorRun(), standard_ExecutorStart(), standard_join_search(), standard_planner(), standby_redo(), StandbyAcquireAccessExclusiveLock(), StandbyRecoverPreparedTransactions(), StandbyReleaseLockList(), StandbyReleaseOldLocks(), 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(), 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_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_get_current_pos(), 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(), 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(), 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(), transformJsonConstructorRet(), transformJsonFuncExprOutput(), transformJsonTable(), transformJsonTableChildPlan(), transformJsonTableColumns(), transformMergeStmt(), transformMultiAssignRef(), 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(), TupleDescInitBuiltinEntry(), TupleHashTableMatch(), TupleQueueReaderNext(), tuples_equal(), tuplesort_begin_cluster(), tuplesort_begin_common(), tuplesort_estimate_shared(), tuplesort_gettuple_common(), tuplesort_heap_insert(), tuplesort_heap_replace_top(), tuplesort_initialize_shared(), tuplesort_markpos(), 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(), UpdateTwoPhaseState(), UpdateXmaxHintBits(), UserAbortTransactionBlock(), vac_max_items_to_alloc_size(), vac_open_indexes(), vac_truncate_clog(), vac_update_datfrozenxid(), vacuum(), vacuum_is_relation_owner(), 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(), verbosity_hook(), verifyBackupPageConsistency(), view_cols_are_auto_updatable(), VirtualXactLock(), VirtualXactLockTableCleanup(), VirtualXactLockTableInsert(), visibilitymap_clear(), visibilitymap_count(), visibilitymap_set(), wait_on_slots(), WaitEventSetWait(), 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(), and XmlTableGetValue().

◆ 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(), 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:4198
exit(1)
PGconn * conn
Definition: streamutil.c:54

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

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

◆ fflush()

◆ fprintf() [1/2]

fprintf ( stderr  ,
"\n"   
)

◆ fprintf() [2/2]

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1561 of file libpq_pipeline.c.

1562 {
1563  const char *conninfo = "";
1564  PGconn *conn;
1565  FILE *trace;
1566  char *testname;
1567  int numrows = 10000;
1568  PGresult *res;
1569  int c;
1570 
1571  while ((c = getopt(argc, argv, "t:r:")) != -1)
1572  {
1573  switch (c)
1574  {
1575  case 't': /* trace file */
1577  break;
1578  case 'r': /* numrows */
1579  errno = 0;
1580  numrows = strtol(optarg, NULL, 10);
1581  if (errno != 0 || numrows <= 0)
1582  {
1583  fprintf(stderr, "couldn't parse \"%s\" as a positive integer\n",
1584  optarg);
1585  exit(1);
1586  }
1587  break;
1588  }
1589  }
1590 
1591  if (optind < argc)
1592  {
1593  testname = pg_strdup(argv[optind]);
1594  optind++;
1595  }
1596  else
1597  {
1598  usage(argv[0]);
1599  exit(1);
1600  }
1601 
1602  if (strcmp(testname, "tests") == 0)
1603  {
1604  print_test_list();
1605  exit(0);
1606  }
1607 
1608  if (optind < argc)
1609  {
1610  conninfo = pg_strdup(argv[optind]);
1611  optind++;
1612  }
1613 
1614  /* Make a connection to the database */
1615  conn = PQconnectdb(conninfo);
1616  if (PQstatus(conn) != CONNECTION_OK)
1617  {
1618  fprintf(stderr, "Connection to database failed: %s\n",
1619  PQerrorMessage(conn));
1620  exit_nicely(conn);
1621  }
1622 
1623  res = PQexec(conn, "SET lc_messages TO \"C\"");
1625  pg_fatal("failed to set lc_messages: %s", PQerrorMessage(conn));
1626  res = PQexec(conn, "SET force_parallel_mode = off");
1628  pg_fatal("failed to set force_parallel_mode: %s", PQerrorMessage(conn));
1629 
1630  /* Set the trace file, if requested */
1631  if (tracefile != NULL)
1632  {
1633  trace = fopen(tracefile, "w");
1634  if (trace == NULL)
1635  pg_fatal("could not open file \"%s\": %m", tracefile);
1636 
1637  /* Make it line-buffered */
1638  setvbuf(trace, NULL, PG_IOLBF, 0);
1639 
1640  PQtrace(conn, trace);
1643  }
1644 
1645  if (strcmp(testname, "disallowed_in_pipeline") == 0)
1647  else if (strcmp(testname, "multi_pipelines") == 0)
1649  else if (strcmp(testname, "nosync") == 0)
1650  test_nosync(conn);
1651  else if (strcmp(testname, "pipeline_abort") == 0)
1653  else if (strcmp(testname, "pipelined_insert") == 0)
1654  test_pipelined_insert(conn, numrows);
1655  else if (strcmp(testname, "prepared") == 0)
1657  else if (strcmp(testname, "simple_pipeline") == 0)
1659  else if (strcmp(testname, "singlerow") == 0)
1661  else if (strcmp(testname, "transaction") == 0)
1663  else if (strcmp(testname, "uniqviol") == 0)
1665  else
1666  {
1667  fprintf(stderr, "\"%s\" is not a recognized test name\n", testname);
1668  exit(1);
1669  }
1670 
1671  /* close the connection to the database and cleanup */
1672  PQfinish(conn);
1673  return 0;
1674 }
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:6835
ConnStatusType PQstatus(const PGconn *conn)
Definition: fe-connect.c:6782
PGconn * PQconnectdb(const char *conninfo)
Definition: fe-connect.c:710
ExecStatusType PQresultStatus(const PGresult *res)
Definition: fe-exec.c:3265
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:2269
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_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:354
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, test_disallowed_in_pipeline(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), test_uniqviol(), tracefile, and usage().

◆ pg_attribute_noreturn()

static void pg_attribute_noreturn ( )
static

◆ print_test_list()

static void print_test_list ( void  )
static

Definition at line 1546 of file libpq_pipeline.c.

1547 {
1548  printf("disallowed_in_pipeline\n");
1549  printf("multi_pipelines\n");
1550  printf("nosync\n");
1551  printf("pipeline_abort\n");
1552  printf("pipelined_insert\n");
1553  printf("prepared\n");
1554  printf("simple_pipeline\n");
1555  printf("singlerow\n");
1556  printf("transaction\n");
1557  printf("uniqviol\n");
1558 }
#define printf(...)
Definition: port.h:231

References printf.

Referenced by main().

◆ process_result()

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

Definition at line 1486 of file libpq_pipeline.c.

1487 {
1488  PGresult *res2;
1489  bool got_error = false;
1490 
1491  if (res == NULL)
1492  pg_fatal("got unexpected NULL");
1493 
1494  switch (PQresultStatus(res))
1495  {
1496  case PGRES_FATAL_ERROR:
1497  got_error = true;
1498  fprintf(stderr, "result %d/%d (error): %s\n", results, numsent, PQerrorMessage(conn));
1499  PQclear(res);
1500 
1501  res2 = PQgetResult(conn);
1502  if (res2 != NULL)
1503  pg_fatal("expected NULL, got %s",
1504  PQresStatus(PQresultStatus(res2)));
1505  break;
1506 
1507  case PGRES_TUPLES_OK:
1508  fprintf(stderr, "result %d/%d: %s\n", results, numsent, PQgetvalue(res, 0, 0));
1509  PQclear(res);
1510 
1511  res2 = PQgetResult(conn);
1512  if (res2 != NULL)
1513  pg_fatal("expected NULL, got %s",
1514  PQresStatus(PQresultStatus(res2)));
1515  break;
1516 
1518  fprintf(stderr, "result %d/%d: pipeline aborted\n", results, numsent);
1519  res2 = PQgetResult(conn);
1520  if (res2 != NULL)
1521  pg_fatal("expected NULL, got %s",
1522  PQresStatus(PQresultStatus(res2)));
1523  break;
1524 
1525  default:
1526  pg_fatal("got unexpected %s", PQresStatus(PQresultStatus(res)));
1527  }
1528 
1529  return got_error;
1530 }
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
Definition: fe-exec.c:3730
char * PQresStatus(ExecStatusType status)
Definition: fe-exec.c:3273
PGresult * PQgetResult(PGconn *conn)
Definition: fe-exec.c:2078
@ 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 
110  /* Entering pipeline mode when already in pipeline mode is OK */
111  if (PQenterPipelineMode(conn) != 1)
112  pg_fatal("re-entering pipeline mode should be a no-op but failed");
113 
114  if (PQisBusy(conn) != 0)
115  pg_fatal("PQisBusy should return 0 when idle in pipeline mode, returned 1");
116 
117  /* ok, back to normal command mode */
118  if (PQexitPipelineMode(conn) != 1)
119  pg_fatal("couldn't exit idle empty pipeline mode");
120 
122  pg_fatal("Pipeline mode not terminated properly");
123 
124  /* exiting pipeline mode when not in pipeline mode should be a no-op */
125  if (PQexitPipelineMode(conn) != 1)
126  pg_fatal("pipeline mode exit when not in pipeline mode should succeed but failed");
127 
128  /* can now PQexec again */
129  res = PQexec(conn, "SELECT 1");
131  pg_fatal("PQexec should succeed after exiting pipeline mode but failed with: %s",
133 
134  fprintf(stderr, "ok\n");
135 }
PGpipelineStatus PQpipelineStatus(const PGconn *conn)
Definition: fe-connect.c:6877
int PQexitPipelineMode(PGconn *conn)
Definition: fe-exec.c:3007
int PQenterPipelineMode(PGconn *conn)
Definition: fe-exec.c:2975
int PQisBusy(PGconn *conn)
Definition: fe-exec.c:2047
int PQisnonblocking(const PGconn *conn)
Definition: fe-exec.c:3837
@ 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(), and res.

Referenced by main().

◆ test_multi_pipelines()

static void test_multi_pipelines ( PGconn conn)
static

Definition at line 138 of file libpq_pipeline.c.

139 {
140  PGresult *res = NULL;
141  const char *dummy_params[1] = {"1"};
142  Oid dummy_param_oids[1] = {INT4OID};
143 
144  fprintf(stderr, "multi pipeline... ");
145 
146  /*
147  * Queue up a couple of small pipelines and process each without returning
148  * to command mode first.
149  */
150  if (PQenterPipelineMode(conn) != 1)
151  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
152 
153  if (PQsendQueryParams(conn, "SELECT $1", 1, dummy_param_oids,
154  dummy_params, NULL, NULL, 0) != 1)
155  pg_fatal("dispatching first SELECT failed: %s", PQerrorMessage(conn));
156 
157  if (PQpipelineSync(conn) != 1)
158  pg_fatal("Pipeline sync failed: %s", PQerrorMessage(conn));
159 
160  if (PQsendQueryParams(conn, "SELECT $1", 1, dummy_param_oids,
161  dummy_params, NULL, NULL, 0) != 1)
162  pg_fatal("dispatching second SELECT failed: %s", PQerrorMessage(conn));
163 
164  if (PQpipelineSync(conn) != 1)
165  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
166 
167  /* OK, start processing the results */
168  res = PQgetResult(conn);
169  if (res == NULL)
170  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
172 
174  pg_fatal("Unexpected result code %s from first pipeline item",
176  PQclear(res);
177  res = NULL;
178 
179  if (PQgetResult(conn) != NULL)
180  pg_fatal("PQgetResult returned something extra after first result");
181 
182  if (PQexitPipelineMode(conn) != 0)
183  pg_fatal("exiting pipeline mode after query but before sync succeeded incorrectly");
184 
185  res = PQgetResult(conn);
186  if (res == NULL)
187  pg_fatal("PQgetResult returned null when sync result expected: %s",
189 
191  pg_fatal("Unexpected result code %s instead of sync result, error: %s",
193  PQclear(res);
194 
195  /* second pipeline */
196 
197  res = PQgetResult(conn);
198  if (res == NULL)
199  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
201 
203  pg_fatal("Unexpected result code %s from second pipeline item",
205 
206  res = PQgetResult(conn);
207  if (res != NULL)
208  pg_fatal("Expected null result, got %s",
210 
211  res = PQgetResult(conn);
212  if (res == NULL)
213  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
215 
217  pg_fatal("Unexpected result code %s from second pipeline sync",
219 
220  /* We're still in pipeline mode ... */
222  pg_fatal("Fell out of pipeline mode somehow");
223 
224  /* until we end it, which we can safely do now */
225  if (PQexitPipelineMode(conn) != 1)
226  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
228 
230  pg_fatal("exiting pipeline mode didn't seem to work");
231 
232  fprintf(stderr, "ok\n");
233 }
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:1532
int PQpipelineSync(PGconn *conn)
Definition: fe-exec.c:3164
@ 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 240 of file libpq_pipeline.c.

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

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 332 of file libpq_pipeline.c.

333 {
334  PGresult *res = NULL;
335  const char *dummy_params[1] = {"1"};
336  Oid dummy_param_oids[1] = {INT4OID};
337  int i;
338  int gotrows;
339  bool goterror;
340 
341  fprintf(stderr, "aborted pipeline... ");
342 
345  pg_fatal("dispatching DROP TABLE failed: %s", PQerrorMessage(conn));
346 
349  pg_fatal("dispatching CREATE TABLE failed: %s", PQerrorMessage(conn));
350 
351  /*
352  * Queue up a couple of small pipelines and process each without returning
353  * to command mode first. Make sure the second operation in the first
354  * pipeline ERRORs.
355  */
356  if (PQenterPipelineMode(conn) != 1)
357  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
358 
359  dummy_params[0] = "1";
360  if (PQsendQueryParams(conn, insert_sql, 1, dummy_param_oids,
361  dummy_params, NULL, NULL, 0) != 1)
362  pg_fatal("dispatching first insert failed: %s", PQerrorMessage(conn));
363 
364  if (PQsendQueryParams(conn, "SELECT no_such_function($1)",
365  1, dummy_param_oids, dummy_params,
366  NULL, NULL, 0) != 1)
367  pg_fatal("dispatching error select failed: %s", PQerrorMessage(conn));
368 
369  dummy_params[0] = "2";
370  if (PQsendQueryParams(conn, insert_sql, 1, dummy_param_oids,
371  dummy_params, NULL, NULL, 0) != 1)
372  pg_fatal("dispatching second insert failed: %s", PQerrorMessage(conn));
373 
374  if (PQpipelineSync(conn) != 1)
375  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
376 
377  dummy_params[0] = "3";
378  if (PQsendQueryParams(conn, insert_sql, 1, dummy_param_oids,
379  dummy_params, NULL, NULL, 0) != 1)
380  pg_fatal("dispatching second-pipeline insert failed: %s",
382 
383  if (PQpipelineSync(conn) != 1)
384  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
385 
386  /*
387  * OK, start processing the pipeline results.
388  *
389  * We should get a command-ok for the first query, then a fatal error and
390  * a pipeline aborted message for the second insert, a pipeline-end, then
391  * a command-ok and a pipeline-ok for the second pipeline operation.
392  */
393  res = PQgetResult(conn);
394  if (res == NULL)
395  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
397  pg_fatal("Unexpected result status %s: %s",
400  PQclear(res);
401 
402  /* NULL result to signal end-of-results for this command */
403  if ((res = PQgetResult(conn)) != NULL)
404  pg_fatal("Expected null result, got %s",
406 
407  /* Second query caused error, so we expect an error next */
408  res = PQgetResult(conn);
409  if (res == NULL)
410  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
412  pg_fatal("Unexpected result code -- expected PGRES_FATAL_ERROR, got %s",
414  PQclear(res);
415 
416  /* NULL result to signal end-of-results for this command */
417  if ((res = PQgetResult(conn)) != NULL)
418  pg_fatal("Expected null result, got %s",
420 
421  /*
422  * pipeline should now be aborted.
423  *
424  * Note that we could still queue more queries at this point if we wanted;
425  * they'd get added to a new third pipeline since we've already sent a
426  * second. The aborted flag relates only to the pipeline being received.
427  */
429  pg_fatal("pipeline should be flagged as aborted but isn't");
430 
431  /* third query in pipeline, the second insert */
432  res = PQgetResult(conn);
433  if (res == NULL)
434  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
436  pg_fatal("Unexpected result code -- expected PGRES_PIPELINE_ABORTED, got %s",
438  PQclear(res);
439 
440  /* NULL result to signal end-of-results for this command */
441  if ((res = PQgetResult(conn)) != NULL)
442  pg_fatal("Expected null result, got %s", PQresStatus(PQresultStatus(res)));
443 
445  pg_fatal("pipeline should be flagged as aborted but isn't");
446 
447  /* Ensure we're still in pipeline */
449  pg_fatal("Fell out of pipeline mode somehow");
450 
451  /*
452  * The end of a failed pipeline is a PGRES_PIPELINE_SYNC.
453  *
454  * (This is so clients know to start processing results normally again and
455  * can tell the difference between skipped commands and the sync.)
456  */
457  res = PQgetResult(conn);
458  if (res == NULL)
459  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
461  pg_fatal("Unexpected result code from first pipeline sync\n"
462  "Expected PGRES_PIPELINE_SYNC, got %s",
464  PQclear(res);
465 
467  pg_fatal("sync should've cleared the aborted flag but didn't");
468 
469  /* We're still in pipeline mode... */
471  pg_fatal("Fell out of pipeline mode somehow");
472 
473  /* the insert from the second pipeline */
474  res = PQgetResult(conn);
475  if (res == NULL)
476  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
478  pg_fatal("Unexpected result code %s from first item in second pipeline",
480  PQclear(res);
481 
482  /* Read the NULL result at the end of the command */
483  if ((res = PQgetResult(conn)) != NULL)
484  pg_fatal("Expected null result, got %s", PQresStatus(PQresultStatus(res)));
485 
486  /* the second pipeline sync */
487  if ((res = PQgetResult(conn)) == NULL)
488  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
490  pg_fatal("Unexpected result code %s from second pipeline sync",
492  PQclear(res);
493 
494  if ((res = PQgetResult(conn)) != NULL)
495  pg_fatal("Expected null result, got %s: %s",
498 
499  /* Try to send two queries in one command */
500  if (PQsendQuery(conn, "SELECT 1; SELECT 2") != 1)
501  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
502  if (PQpipelineSync(conn) != 1)
503  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
504  goterror = false;
505  while ((res = PQgetResult(conn)) != NULL)
506  {
507  switch (PQresultStatus(res))
508  {
509  case PGRES_FATAL_ERROR:
510  if (strcmp(PQresultErrorField(res, PG_DIAG_SQLSTATE), "42601") != 0)
511  pg_fatal("expected error about multiple commands, got %s",
513  printf("got expected %s", PQerrorMessage(conn));
514  goterror = true;
515  break;
516  default:
517  pg_fatal("got unexpected status %s", PQresStatus(PQresultStatus(res)));
518  break;
519  }
520  }
521  if (!goterror)
522  pg_fatal("did not get cannot-insert-multiple-commands error");
523  res = PQgetResult(conn);
524  if (res == NULL)
525  pg_fatal("got NULL result");
527  pg_fatal("Unexpected result code %s from pipeline sync",
529  fprintf(stderr, "ok\n");
530 
531  /* Test single-row mode with an error partways */
532  if (PQsendQuery(conn, "SELECT 1.0/g FROM generate_series(3, -1, -1) g") != 1)
533  pg_fatal("failed to send query: %s", PQerrorMessage(conn));
534  if (PQpipelineSync(conn) != 1)
535  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
537  goterror = false;
538  gotrows = 0;
539  while ((res = PQgetResult(conn)) != NULL)
540  {
541  switch (PQresultStatus(res))
542  {
543  case PGRES_SINGLE_TUPLE:
544  printf("got row: %s\n", PQgetvalue(res, 0, 0));
545  gotrows++;
546  break;
547  case PGRES_FATAL_ERROR:
548  if (strcmp(PQresultErrorField(res, PG_DIAG_SQLSTATE), "22012") != 0)
549  pg_fatal("expected division-by-zero, got: %s (%s)",
552  printf("got expected division-by-zero\n");
553  goterror = true;
554  break;
555  default:
556  pg_fatal("got unexpected result %s", PQresStatus(PQresultStatus(res)));
557  }
558  PQclear(res);
559  }
560  if (!goterror)
561  pg_fatal("did not get division-by-zero error");
562  if (gotrows != 3)
563  pg_fatal("did not get three rows");
564  /* the third pipeline sync */
565  if ((res = PQgetResult(conn)) == NULL)
566  pg_fatal("Unexpected NULL result: %s", PQerrorMessage(conn));
568  pg_fatal("Unexpected result code %s from third pipeline sync",
570  PQclear(res);
571 
572  /* We're still in pipeline mode... */
574  pg_fatal("Fell out of pipeline mode somehow");
575 
576  /* until we end it, which we can safely do now */
577  if (PQexitPipelineMode(conn) != 1)
578  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
580 
582  pg_fatal("exiting pipeline mode didn't seem to work");
583 
584  fprintf(stderr, "ok\n");
585 
586  /*-
587  * Since we fired the pipelines off without a surrounding xact, the results
588  * should be:
589  *
590  * - Implicit xact started by server around 1st pipeline
591  * - First insert applied
592  * - Second statement aborted xact
593  * - Third insert skipped
594  * - Sync rolled back first implicit xact
595  * - Implicit xact created by server around 2nd pipeline
596  * - insert applied from 2nd pipeline
597  * - Sync commits 2nd xact
598  *
599  * So we should only have the value 3 that we inserted.
600  */
601  res = PQexec(conn, "SELECT itemno FROM pq_pipeline_demo");
602 
604  pg_fatal("Expected tuples, got %s: %s",
606  if (PQntuples(res) != 1)
607  pg_fatal("expected 1 result, got %d", PQntuples(res));
608  for (i = 0; i < PQntuples(res); i++)
609  {
610  const char *val = PQgetvalue(res, i, 0);
611 
612  if (strcmp(val, "3") != 0)
613  pg_fatal("expected only insert with value 3, got %s", val);
614  }
615 
616  PQclear(res);
617 }
int PQsetSingleRowMode(PGconn *conn)
Definition: fe-exec.c:1972
char * PQresultErrorMessage(const PGresult *res)
Definition: fe-exec.c:3281
int PQntuples(const PGresult *res)
Definition: fe-exec.c:3335
int PQsendQuery(PGconn *conn, const char *query)
Definition: fe-exec.c:1420
char * PQresultErrorField(const PGresult *res, int fieldcode)
Definition: fe-exec.c:3320
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:57

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(), PQsendQuery(), PQsendQueryParams(), PQsetSingleRowMode(), printf, res, and val.

Referenced by main().

◆ test_pipelined_insert()

static void test_pipelined_insert ( PGconn conn,
int  n_rows 
)
static

Definition at line 633 of file libpq_pipeline.c.

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

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 879 of file libpq_pipeline.c.

880 {
881  PGresult *res = NULL;
882  Oid param_oids[1] = {INT4OID};
883  Oid expected_oids[4];
884  Oid typ;
885 
886  fprintf(stderr, "prepared... ");
887 
888  if (PQenterPipelineMode(conn) != 1)
889  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
890  if (PQsendPrepare(conn, "select_one", "SELECT $1, '42', $1::numeric, "
891  "interval '1 sec'",
892  1, param_oids) != 1)
893  pg_fatal("preparing query failed: %s", PQerrorMessage(conn));
894  expected_oids[0] = INT4OID;
895  expected_oids[1] = TEXTOID;
896  expected_oids[2] = NUMERICOID;
897  expected_oids[3] = INTERVALOID;
898  if (PQsendDescribePrepared(conn, "select_one") != 1)
899  pg_fatal("failed to send describePrepared: %s", PQerrorMessage(conn));
900  if (PQpipelineSync(conn) != 1)
901  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
902 
903  res = PQgetResult(conn);
904  if (res == NULL)
905  pg_fatal("PQgetResult returned null");
907  pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
908  PQclear(res);
909  res = PQgetResult(conn);
910  if (res != NULL)
911  pg_fatal("expected NULL result");
912 
913  res = PQgetResult(conn);
914  if (res == NULL)
915  pg_fatal("PQgetResult returned NULL");
917  pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
918  if (PQnfields(res) != lengthof(expected_oids))
919  pg_fatal("expected %d columns, got %d",
920  lengthof(expected_oids), PQnfields(res));
921  for (int i = 0; i < PQnfields(res); i++)
922  {
923  typ = PQftype(res, i);
924  if (typ != expected_oids[i])
925  pg_fatal("field %d: expected type %u, got %u",
926  i, expected_oids[i], typ);
927  }
928  PQclear(res);
929  res = PQgetResult(conn);
930  if (res != NULL)
931  pg_fatal("expected NULL result");
932 
933  res = PQgetResult(conn);
935  pg_fatal("expected PGRES_PIPELINE_SYNC, got %s", PQresStatus(PQresultStatus(res)));
936 
937  if (PQexitPipelineMode(conn) != 1)
938  pg_fatal("could not exit pipeline mode: %s", PQerrorMessage(conn));
939 
940  PQexec(conn, "BEGIN");
941  PQexec(conn, "DECLARE cursor_one CURSOR FOR SELECT 1");
943  if (PQsendDescribePortal(conn, "cursor_one") != 1)
944  pg_fatal("PQsendDescribePortal failed: %s", PQerrorMessage(conn));
945  if (PQpipelineSync(conn) != 1)
946  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
947  res = PQgetResult(conn);
948  if (res == NULL)
949  pg_fatal("expected NULL result");
951  pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
952 
953  typ = PQftype(res, 0);
954  if (typ != INT4OID)
955  pg_fatal("portal: expected type %u, got %u",
956  INT4OID, typ);
957  PQclear(res);
958  res = PQgetResult(conn);
959  if (res != NULL)
960  pg_fatal("expected NULL result");
961  res = PQgetResult(conn);
963  pg_fatal("expected PGRES_PIPELINE_SYNC, got %s", PQresStatus(PQresultStatus(res)));
964 
965  if (PQexitPipelineMode(conn) != 1)
966  pg_fatal("could not exit pipeline mode: %s", PQerrorMessage(conn));
967 
968  fprintf(stderr, "ok\n");
969 }
#define lengthof(array)
Definition: c.h:745
Oid PQftype(const PGresult *res, int field_num)
Definition: fe-exec.c:3573
int PQsendDescribePrepared(PGconn *conn, const char *stmt)
Definition: fe-exec.c:2500
int PQsendDescribePortal(PGconn *conn, const char *portal)
Definition: fe-exec.c:2513
int PQnfields(const PGresult *res)
Definition: fe-exec.c:3343

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 972 of file libpq_pipeline.c.

973 {
974  PGresult *res = NULL;
975  const char *dummy_params[1] = {"1"};
976  Oid dummy_param_oids[1] = {INT4OID};
977 
978  fprintf(stderr, "simple pipeline... ");
979 
980  /*
981  * Enter pipeline mode and dispatch a set of operations, which we'll then
982  * process the results of as they come in.
983  *
984  * For a simple case we should be able to do this without interim
985  * processing of results since our output buffer will give us enough slush
986  * to work with and we won't block on sending. So blocking mode is fine.
987  */
988  if (PQisnonblocking(conn))
989  pg_fatal("Expected blocking connection mode");
990 
991  if (PQenterPipelineMode(conn) != 1)
992  pg_fatal("failed to enter pipeline mode: %s", PQerrorMessage(conn));
993 
994  if (PQsendQueryParams(conn, "SELECT $1",
995  1, dummy_param_oids, dummy_params,
996  NULL, NULL, 0) != 1)
997  pg_fatal("dispatching SELECT failed: %s", PQerrorMessage(conn));
998 
999  if (PQexitPipelineMode(conn) != 0)
1000  pg_fatal("exiting pipeline mode with work in progress should fail, but succeeded");
1001 
1002  if (PQpipelineSync(conn) != 1)
1003  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1004 
1005  res = PQgetResult(conn);
1006  if (res == NULL)
1007  pg_fatal("PQgetResult returned null when there's a pipeline item: %s",
1008  PQerrorMessage(conn));
1009 
1011  pg_fatal("Unexpected result code %s from first pipeline item",
1013 
1014  PQclear(res);
1015  res = NULL;
1016 
1017  if (PQgetResult(conn) != NULL)
1018  pg_fatal("PQgetResult returned something extra after first query result.");
1019 
1020  /*
1021  * Even though we've processed the result there's still a sync to come and
1022  * we can't exit pipeline mode yet
1023  */
1024  if (PQexitPipelineMode(conn) != 0)
1025  pg_fatal("exiting pipeline mode after query but before sync succeeded incorrectly");
1026 
1027  res = PQgetResult(conn);
1028  if (res == NULL)
1029  pg_fatal("PQgetResult returned null when sync result PGRES_PIPELINE_SYNC expected: %s",
1030  PQerrorMessage(conn));
1031 
1033  pg_fatal("Unexpected result code %s instead of PGRES_PIPELINE_SYNC, error: %s",
1035 
1036  PQclear(res);
1037  res = NULL;
1038 
1039  if (PQgetResult(conn) != NULL)
1040  pg_fatal("PQgetResult returned something extra after pipeline end: %s",
1042 
1043  /* We're still in pipeline mode... */
1045  pg_fatal("Fell out of pipeline mode somehow");
1046 
1047  /* ... until we end it, which we can safely do now */
1048  if (PQexitPipelineMode(conn) != 1)
1049  pg_fatal("attempt to exit pipeline mode failed when it should've succeeded: %s",
1050  PQerrorMessage(conn));
1051 
1053  pg_fatal("Exiting pipeline mode didn't seem to work");
1054 
1055  fprintf(stderr, "ok\n");
1056 }

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 1059 of file libpq_pipeline.c.

1060 {
1061  PGresult *res;
1062  int i;
1063  bool pipeline_ended = false;
1064 
1065  /* 1 pipeline, 3 queries in it */
1066  if (PQenterPipelineMode(conn) != 1)
1067  pg_fatal("failed to enter pipeline mode: %s",
1068  PQerrorMessage(conn));
1069 
1070  for (i = 0; i < 3; i++)
1071  {
1072  char *param[1];
1073 
1074  param[0] = psprintf("%d", 44 + i);
1075 
1076  if (PQsendQueryParams(conn,
1077  "SELECT generate_series(42, $1)",
1078  1,
1079  NULL,
1080  (const char **) param,
1081  NULL,
1082  NULL,
1083  0) != 1)
1084  pg_fatal("failed to send query: %s",
1085  PQerrorMessage(conn));
1086  pfree(param[0]);
1087  }
1088  if (PQpipelineSync(conn) != 1)
1089  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1090 
1091  for (i = 0; !pipeline_ended; i++)
1092  {
1093  bool first = true;
1094  bool saw_ending_tuplesok;
1095  bool isSingleTuple = false;
1096 
1097  /* Set single row mode for only first 2 SELECT queries */
1098  if (i < 2)
1099  {
1100  if (PQsetSingleRowMode(conn) != 1)
1101  pg_fatal("PQsetSingleRowMode() failed for i=%d", i);
1102  }
1103 
1104  /* Consume rows for this query */
1105  saw_ending_tuplesok = false;
1106  while ((res = PQgetResult(conn)) != NULL)
1107  {
1109 
1110  if (est == PGRES_PIPELINE_SYNC)
1111  {
1112  fprintf(stderr, "end of pipeline reached\n");
1113  pipeline_ended = true;
1114  PQclear(res);
1115  if (i != 3)
1116  pg_fatal("Expected three results, got %d", i);
1117  break;
1118  }
1119 
1120  /* Expect SINGLE_TUPLE for queries 0 and 1, TUPLES_OK for 2 */
1121  if (first)
1122  {
1123  if (i <= 1 && est != PGRES_SINGLE_TUPLE)
1124  pg_fatal("Expected PGRES_SINGLE_TUPLE for query %d, got %s",
1125  i, PQresStatus(est));
1126  if (i >= 2 && est != PGRES_TUPLES_OK)
1127  pg_fatal("Expected PGRES_TUPLES_OK for query %d, got %s",
1128  i, PQresStatus(est));
1129  first = false;
1130  }
1131 
1132  fprintf(stderr, "Result status %s for query %d", PQresStatus(est), i);
1133  switch (est)
1134  {
1135  case PGRES_TUPLES_OK:
1136  fprintf(stderr, ", tuples: %d\n", PQntuples(res));
1137  saw_ending_tuplesok = true;
1138  if (isSingleTuple)
1139  {
1140  if (PQntuples(res) == 0)
1141  fprintf(stderr, "all tuples received in query %d\n", i);
1142  else
1143  pg_fatal("Expected to follow PGRES_SINGLE_TUPLE, but received PGRES_TUPLES_OK directly instead");
1144  }
1145  break;
1146 
1147  case PGRES_SINGLE_TUPLE:
1148  isSingleTuple = true;
1149  fprintf(stderr, ", %d tuple: %s\n", PQntuples(res), PQgetvalue(res, 0, 0));
1150  break;
1151 
1152  default:
1153  pg_fatal("unexpected");
1154  }
1155  PQclear(res);
1156  }
1157  if (!pipeline_ended && !saw_ending_tuplesok)
1158  pg_fatal("didn't get expected terminating TUPLES_OK");
1159  }
1160 
1161  if (PQexitPipelineMode(conn) != 1)
1162  pg_fatal("failed to end pipeline mode: %s", PQerrorMessage(conn));
1163 }
ExecStatusType
Definition: libpq-fe.h:95
void pfree(void *pointer)
Definition: mcxt.c:1175
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(), PQsendQueryParams(), PQsetSingleRowMode(), psprintf(), and res.

Referenced by main().

◆ test_transaction()

static void test_transaction ( PGconn conn)
static

Definition at line 1170 of file libpq_pipeline.c.

1171 {
1172  PGresult *res;
1173  bool expect_null;
1174  int num_syncs = 0;
1175 
1176  res = PQexec(conn, "DROP TABLE IF EXISTS pq_pipeline_tst;"
1177  "CREATE TABLE pq_pipeline_tst (id int)");
1179  pg_fatal("failed to create test table: %s",
1180  PQerrorMessage(conn));
1181  PQclear(res);
1182 
1183  if (PQenterPipelineMode(conn) != 1)
1184  pg_fatal("failed to enter pipeline mode: %s",
1185  PQerrorMessage(conn));
1186  if (PQsendPrepare(conn, "rollback", "ROLLBACK", 0, NULL) != 1)
1187  pg_fatal("could not send prepare on pipeline: %s",
1188  PQerrorMessage(conn));
1189 
1190  if (PQsendQueryParams(conn,
1191  "BEGIN",
1192  0, NULL, NULL, NULL, NULL, 0) != 1)
1193  pg_fatal("failed to send query: %s",
1194  PQerrorMessage(conn));
1195  if (PQsendQueryParams(conn,
1196  "SELECT 0/0",
1197  0, NULL, NULL, NULL, NULL, 0) != 1)
1198  pg_fatal("failed to send query: %s",
1199  PQerrorMessage(conn));
1200 
1201  /*
1202  * send a ROLLBACK using a prepared stmt. Doesn't work because we need to
1203  * get out of the pipeline-aborted state first.
1204  */
1205  if (PQsendQueryPrepared(conn, "rollback", 0, NULL, NULL, NULL, 1) != 1)
1206  pg_fatal("failed to execute prepared: %s",
1207  PQerrorMessage(conn));
1208 
1209  /* This insert fails because we're in pipeline-aborted state */
1210  if (PQsendQueryParams(conn,
1211  "INSERT INTO pq_pipeline_tst VALUES (1)",
1212  0, NULL, NULL, NULL, NULL, 0) != 1)
1213  pg_fatal("failed to send query: %s",
1214  PQerrorMessage(conn));
1215  if (PQpipelineSync(conn) != 1)
1216  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1217  num_syncs++;
1218 
1219  /*
1220  * This insert fails even though the pipeline got a SYNC, because we're in
1221  * an aborted transaction
1222  */
1223  if (PQsendQueryParams(conn,
1224  "INSERT INTO pq_pipeline_tst VALUES (2)",
1225  0, NULL, NULL, NULL, NULL, 0) != 1)
1226  pg_fatal("failed to send query: %s",
1227  PQerrorMessage(conn));
1228  if (PQpipelineSync(conn) != 1)
1229  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1230  num_syncs++;
1231 
1232  /*
1233  * Send ROLLBACK using prepared stmt. This one works because we just did
1234  * PQpipelineSync above.
1235  */
1236  if (PQsendQueryPrepared(conn, "rollback", 0, NULL, NULL, NULL, 1) != 1)
1237  pg_fatal("failed to execute prepared: %s",
1238  PQerrorMessage(conn));
1239 
1240  /*
1241  * Now that we're out of a transaction and in pipeline-good mode, this
1242  * insert works
1243  */
1244  if (PQsendQueryParams(conn,
1245  "INSERT INTO pq_pipeline_tst VALUES (3)",
1246  0, NULL, NULL, NULL, NULL, 0) != 1)
1247  pg_fatal("failed to send query: %s",
1248  PQerrorMessage(conn));
1249  /* Send two syncs now -- match up to SYNC messages below */
1250  if (PQpipelineSync(conn) != 1)
1251  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1252  num_syncs++;
1253  if (PQpipelineSync(conn) != 1)
1254  pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
1255  num_syncs++;
1256 
1257  expect_null = false;
1258  for (int i = 0;; i++)
1259  {
1260  ExecStatusType restype;
1261 
1262  res = PQgetResult(conn);
1263  if (res == NULL)
1264  {
1265  printf("%d: got NULL result\n", i);
1266  if (!expect_null)
1267  pg_fatal("did not expect NULL here");
1268  expect_null = false;
1269  continue;
1270  }
1271  restype = PQresultStatus(res);
1272  printf("%d: got status %s", i, PQresStatus(restype));
1273  if (expect_null)
1274  pg_fatal("expected NULL");
1275  if (restype == PGRES_FATAL_ERROR)
1276  printf("; error: %s", PQerrorMessage(conn));
1277  else if (restype == PGRES_PIPELINE_ABORTED)
1278  {
1279  printf(": command didn't run because pipeline aborted\n");
1280  }
1281  else
1282  printf("\n");
1283  PQclear(res);
1284 
1285  if (restype == PGRES_PIPELINE_SYNC)
1286  num_syncs--;
1287  else
1288  expect_null = true;
1289  if (num_syncs <= 0)
1290  break;
1291  }
1292  if (PQgetResult(conn) != NULL)
1293  pg_fatal("returned something extra after all the syncs: %s",
1295 
1296  if (PQexitPipelineMode(conn) != 1)
1297  pg_fatal("failed to end pipeline mode: %s", PQerrorMessage(conn));
1298 
1299  /* We expect to find one tuple containing the value "3" */
1300  res = PQexec(conn, "SELECT * FROM pq_pipeline_tst");
1302  pg_fatal("failed to obtain result: %s", PQerrorMessage(conn));
1303  if (PQntuples(res) != 1)
1304  pg_fatal("did not get 1 tuple");
1305  if (strcmp(PQgetvalue(res, 0, 0), "3") != 0)
1306  pg_fatal("did not get expected tuple");
1307  PQclear(res);
1308 
1309  fprintf(stderr, "ok\n");
1310 }

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 1318 of file libpq_pipeline.c.

1319 {
1320  int sock = PQsocket(conn);
1321  PGresult *res;
1322  Oid paramTypes[2] = {INT8OID, INT8OID};
1323  const char *paramValues[2];
1324  char paramValue0[MAXINT8LEN];
1325  char paramValue1[MAXINT8LEN];
1326  int ctr = 0;
1327  int numsent = 0;
1328  int results = 0;
1329  bool read_done = false;
1330  bool write_done = false;
1331  bool error_sent = false;
1332  bool got_error = false;
1333  int switched = 0;
1334  int socketful = 0;
1335  fd_set in_fds;
1336  fd_set out_fds;
1337 
1338  fprintf(stderr, "uniqviol ...");
1339 
1340  PQsetnonblocking(conn, 1);
1341 
1342  paramValues[0] = paramValue0;
1343  paramValues[1] = paramValue1;
1344  sprintf(paramValue1, "42");
1345 
1346  res = PQexec(conn, "drop table if exists ppln_uniqviol;"
1347  "create table ppln_uniqviol(id bigint primary key, idata bigint)");
1349  pg_fatal("failed to create table: %s", PQerrorMessage(conn));
1350 
1351  res = PQexec(conn, "begin");
1353  pg_fatal("failed to begin transaction: %s", PQerrorMessage(conn));
1354 
1355  res = PQprepare(conn, "insertion",
1356  "insert into ppln_uniqviol values ($1, $2) returning id",
1357  2, paramTypes);
1358  if (res == NULL || PQresultStatus(res) != PGRES_COMMAND_OK)
1359  pg_fatal("failed to prepare query: %s", PQerrorMessage(conn));
1360 
1361  if (PQenterPipelineMode(conn) != 1)
1362  pg_fatal("failed to enter pipeline mode");
1363 
1364  while (!read_done)
1365  {
1366  /*
1367  * Avoid deadlocks by reading everything the server has sent before
1368  * sending anything. (Special precaution is needed here to process
1369  * PQisBusy before testing the socket for read-readiness, because the
1370  * socket does not turn read-ready after "sending" queries in aborted
1371  * pipeline mode.)
1372  */
1373  while (PQisBusy(conn) == 0)
1374  {
1375  bool new_error;
1376 
1377  if (results >= numsent)
1378  {
1379  if (write_done)
1380  read_done = true;
1381  break;
1382  }
1383 
1384  res = PQgetResult(conn);
1385  new_error = process_result(conn, res, results, numsent);
1386  if (new_error && got_error)
1387  pg_fatal("got two errors");
1388  got_error |= new_error;
1389  if (results++ >= numsent - 1)
1390  {
1391  if (write_done)
1392  read_done = true;
1393  break;
1394  }
1395  }
1396 
1397  if (read_done)
1398  break;
1399 
1400  FD_ZERO(&out_fds);
1401  FD_SET(sock, &out_fds);
1402 
1403  FD_ZERO(&in_fds);
1404  FD_SET(sock, &in_fds);
1405 
1406  if (select(sock + 1, &in_fds, write_done ? NULL : &out_fds, NULL, NULL) == -1)
1407  {
1408  if (errno == EINTR)
1409  continue;
1410  pg_fatal("select() failed: %m");
1411  }
1412 
1413  if (FD_ISSET(sock, &in_fds) && PQconsumeInput(conn) == 0)
1414  pg_fatal("PQconsumeInput failed: %s", PQerrorMessage(conn));
1415 
1416  /*
1417  * If the socket is writable and we haven't finished sending queries,
1418  * send some.
1419  */
1420  if (!write_done && FD_ISSET(sock, &out_fds))
1421  {
1422  for (;;)
1423  {
1424  int flush;
1425 
1426  /*
1427  * provoke uniqueness violation exactly once after having
1428  * switched to read mode.
1429  */
1430  if (switched >= 1 && !error_sent && ctr % socketful >= socketful / 2)
1431  {
1432  sprintf(paramValue0, "%d", numsent / 2);
1433  fprintf(stderr, "E");
1434  error_sent = true;
1435  }
1436  else
1437  {
1438  fprintf(stderr, ".");
1439  sprintf(paramValue0, "%d", ctr++);
1440  }
1441 
1442  if (PQsendQueryPrepared(conn, "insertion", 2, paramValues, NULL, NULL, 0) != 1)
1443  pg_fatal("failed to execute prepared query: %s", PQerrorMessage(conn));
1444  numsent++;
1445 
1446  /* Are we done writing? */
1447  if (socketful != 0 && numsent % socketful == 42 && error_sent)
1448  {
1449  if (PQsendFlushRequest(conn) != 1)
1450  pg_fatal("failed to send flush request");
1451  write_done = true;
1452  fprintf(stderr, "\ndone writing\n");
1453  PQflush(conn);
1454  break;
1455  }
1456 
1457  /* is the outgoing socket full? */
1458  flush = PQflush(conn);
1459  if (flush == -1)
1460  pg_fatal("failed to flush: %s", PQerrorMessage(conn));
1461  if (flush == 1)
1462  {
1463  if (socketful == 0)
1464  socketful = numsent;
1465  fprintf(stderr, "\nswitch to reading\n");
1466  switched++;
1467  break;
1468  }
1469  }
1470  }
1471  }
1472 
1473  if (!got_error)
1474  pg_fatal("did not get expected error");
1475 
1476  fprintf(stderr, "ok\n");
1477 }
PGresult * PQprepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
Definition: fe-exec.c:2313
static bool process_result(PGconn *conn, PGresult *res, int results, int numsent)
#define sprintf
Definition: port.h:227
#define EINTR
Definition: win32_port.h:351

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 1534 of file libpq_pipeline.c.

1535 {
1536  fprintf(stderr, "%s tests libpq's pipeline mode.\n\n", progname);
1537  fprintf(stderr, "Usage:\n");
1538  fprintf(stderr, " %s [OPTION] tests\n", progname);
1539  fprintf(stderr, " %s [OPTION] TESTNAME [CONNINFO]\n", progname);
1540  fprintf(stderr, "\nOptions:\n");
1541  fprintf(stderr, " -t TRACEFILE generate a libpq trace to TRACEFILE\n");
1542  fprintf(stderr, " -r NUMROWS use NUMROWS as the test size\n");
1543 }
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

void const char* fmt

Definition at line 73 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(), main(), my_strftime(), numeric_to_char(), numeric_to_number(), OpenArchive(), parallel_exec_prog(), parse_datetime(), pg_attribute_printf(), 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().