PostgreSQL Source Code git master
Loading...
Searching...
No Matches
makefuncs.h File Reference
#include "nodes/execnodes.h"
#include "nodes/parsenodes.h"
Include dependency graph for makefuncs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

A_Expr * makeA_Expr (A_Expr_Kind kind, List *name, Node *lexpr, Node *rexpr, int location)
 
A_Expr * makeSimpleA_Expr (A_Expr_Kind kind, char *name, Node *lexpr, Node *rexpr, int location)
 
Var * makeVar (int varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup)
 
Var * makeVarFromTargetEntry (int varno, TargetEntry *tle)
 
Var * makeWholeRowVar (RangeTblEntry *rte, int varno, Index varlevelsup, bool allowScalar)
 
TargetEntry * makeTargetEntry (Expr *expr, AttrNumber resno, char *resname, bool resjunk)
 
TargetEntry * flatCopyTargetEntry (TargetEntry *src_tle)
 
FromExpr * makeFromExpr (List *fromlist, Node *quals)
 
Const * makeConst (Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
 
Const * makeNullConst (Oid consttype, int32 consttypmod, Oid constcollid)
 
Node * makeBoolConst (bool value, bool isnull)
 
Expr * makeBoolExpr (BoolExprType boolop, List *args, int location)
 
Alias * makeAlias (const char *aliasname, List *colnames)
 
RelabelType * makeRelabelType (Expr *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat)
 
RangeVar * makeRangeVar (char *schemaname, char *relname, int location)
 
Constraint * makeNotNullConstraint (String *colname)
 
TypeName * makeTypeName (char *typnam)
 
TypeName * makeTypeNameFromNameList (List *names)
 
TypeName * makeTypeNameFromOid (Oid typeOid, int32 typmod)
 
ColumnDef * makeColumnDef (const char *colname, Oid typeOid, int32 typmod, Oid collOid)
 
FuncExpr * makeFuncExpr (Oid funcid, Oid rettype, List *args, Oid funccollid, Oid inputcollid, CoercionForm fformat)
 
FuncCall * makeFuncCall (List *name, List *args, CoercionForm funcformat, int location)
 
Expr * make_opclause (Oid opno, Oid opresulttype, bool opretset, Expr *leftop, Expr *rightop, Oid opcollid, Oid inputcollid)
 
Expr * make_andclause (List *andclauses)
 
Expr * make_orclause (List *orclauses)
 
Expr * make_notclause (Expr *notclause)
 
Node * make_and_qual (Node *qual1, Node *qual2)
 
Expr * make_ands_explicit (List *andclauses)
 
List * make_ands_implicit (Expr *clause)
 
IndexInfo * makeIndexInfo (int numattrs, int numkeyattrs, Oid amoid, List *expressions, List *predicates, bool unique, bool nulls_not_distinct, bool isready, bool concurrent, bool summarizing, bool withoutoverlaps)
 
Node * makeStringConst (char *str, int location)
 
DefElem * makeDefElem (char *name, Node *arg, int location)
 
DefElem * makeDefElemExtended (char *nameSpace, char *name, Node *arg, DefElemAction defaction, int location)
 
GroupingSet * makeGroupingSet (GroupingSetKind kind, List *content, int location)
 
VacuumRelation * makeVacuumRelation (RangeVar *relation, Oid oid, List *va_cols)
 
JsonFormat * makeJsonFormat (JsonFormatType type, JsonEncoding encoding, int location)
 
JsonValueExpr * makeJsonValueExpr (Expr *raw_expr, Expr *formatted_expr, JsonFormat *format)
 
Node * makeJsonKeyValue (Node *key, Node *value)
 
Node * makeJsonIsPredicate (Node *expr, JsonFormat *format, JsonValueType item_type, bool unique_keys, Oid exprBaseType, int location)
 
JsonBehavior * makeJsonBehavior (JsonBehaviorType btype, Node *expr, int location)
 
JsonTablePath * makeJsonTablePath (Const *pathvalue, char *pathname)
 
JsonTablePathSpec * makeJsonTablePathSpec (char *string, char *name, int string_location, int name_location)
 
Node * makeJsonTableDefaultPlan (JsonTablePlanJoinType join_type, int location)
 
Node * makeJsonTableSimplePlan (char *pathname, int location)
 
Node * makeJsonTableJoinedPlan (JsonTablePlanJoinType type, Node *plan1, Node *plan2, int location)
 

Function Documentation

◆ flatCopyTargetEntry()

TargetEntry * flatCopyTargetEntry ( TargetEntry *  src_tle)
extern

Definition at line 322 of file makefuncs.c.

323{
325
327 memcpy(tle, src_tle, sizeof(TargetEntry));
328 return tle;
329}
#define Assert(condition)
Definition c.h:1002
memcpy(sums, checksumBaseOffsets, sizeof(checksumBaseOffsets))
#define IsA(nodeptr, _type_)
Definition nodes.h:162
#define makeNode(_type_)
Definition nodes.h:159
static int fb(int x)

References Assert, fb(), IsA, makeNode, and memcpy().

Referenced by expand_insert_targetlist(), process_matched_tle(), rewriteTargetListIU(), set_dummy_tlist_references(), and set_upper_references().

◆ make_and_qual()

Node * make_and_qual ( Node *  qual1,
Node *  qual2 
)
extern

Definition at line 780 of file makefuncs.c.

781{
782 if (qual1 == NULL)
783 return qual2;
784 if (qual2 == NULL)
785 return qual1;
787}
Expr * make_andclause(List *andclauses)
Definition makefuncs.c:727
#define list_make2(x1, x2)
Definition pg_list.h:246
Definition nodes.h:133

References fb(), list_make2, and make_andclause().

Referenced by AddQual(), subquery_push_qual(), and transform_MERGE_to_join().

◆ make_andclause()

Expr * make_andclause ( List *  andclauses)
extern

◆ make_ands_explicit()

Expr * make_ands_explicit ( List *  andclauses)
extern

Definition at line 799 of file makefuncs.c.

800{
801 if (andclauses == NIL)
802 return (Expr *) makeBoolConst(true, false);
803 else if (list_length(andclauses) == 1)
804 return (Expr *) linitial(andclauses);
805 else
807}
Node * makeBoolConst(bool value, bool isnull)
Definition makefuncs.c:408
static int list_length(const List *l)
Definition pg_list.h:152
#define NIL
Definition pg_list.h:68
#define linitial(l)
Definition pg_list.h:178

References fb(), linitial, list_length(), make_andclause(), makeBoolConst(), and NIL.

Referenced by ATExecAttachPartition(), check_default_partition_contents(), convert_EXISTS_to_ANY(), create_bitmap_subplan(), ExecInitCheck(), extract_or_clause(), get_proposed_default_constraint(), get_qual_for_list(), get_relation_info(), infer_arbiter_indexes(), show_qual(), SplitPartitionMoveRows(), and UpdateIndexRelation().

◆ make_ands_implicit()

List * make_ands_implicit ( Expr *  clause)
extern

Definition at line 810 of file makefuncs.c.

811{
812 /*
813 * NB: because the parser sets the qual field to NULL in a query that has
814 * no WHERE clause, we must consider a NULL input clause as TRUE, even
815 * though one might more reasonably think it FALSE.
816 */
817 if (clause == NULL)
818 return NIL; /* NULL -> NIL list == TRUE */
819 else if (is_andclause(clause))
820 return ((BoolExpr *) clause)->args;
821 else if (IsA(clause, Const) &&
822 !((Const *) clause)->constisnull &&
823 DatumGetBool(((Const *) clause)->constvalue))
824 return NIL; /* constant TRUE input -> NIL list */
825 else
826 return list_make1(clause);
827}
static bool is_andclause(const void *clause)
Definition nodeFuncs.h:107
#define list_make1(x1)
Definition pg_list.h:244
static bool DatumGetBool(Datum X)
Definition postgres.h:100

References DatumGetBool(), fb(), is_andclause(), IsA, list_make1, and NIL.

Referenced by apply_child_basequals(), ConstraintImpliedByRelConstraint(), convert_EXISTS_to_ANY(), cost_subplan(), DefineIndex(), DoCopy(), get_proposed_default_constraint(), get_relation_constraints(), get_relation_info(), index_create_copy(), infer_arbiter_indexes(), preprocess_expression(), RelationGetIndexPredicate(), test_predtest(), and TriggerEnabled().

◆ make_notclause()

Expr * make_notclause ( Expr *  notclause)
extern

Definition at line 759 of file makefuncs.c.

760{
761 BoolExpr *expr = makeNode(BoolExpr);
762
763 expr->boolop = NOT_EXPR;
764 expr->args = list_make1(notclause);
765 expr->location = -1;
766 return (Expr *) expr;
767}
@ NOT_EXPR
Definition primnodes.h:945

References BoolExpr::args, BoolExpr::boolop, fb(), list_make1, BoolExpr::location, makeNode, and NOT_EXPR.

Referenced by eval_const_expressions_mutator(), and negate_clause().

◆ make_opclause()

Expr * make_opclause ( Oid  opno,
Oid  opresulttype,
bool  opretset,
Expr *  leftop,
Expr *  rightop,
Oid  opcollid,
Oid  inputcollid 
)
extern

Definition at line 701 of file makefuncs.c.

704{
705 OpExpr *expr = makeNode(OpExpr);
706
707 expr->opno = opno;
708 expr->opfuncid = InvalidOid;
709 expr->opresulttype = opresulttype;
710 expr->opretset = opretset;
711 expr->opcollid = opcollid;
712 expr->inputcollid = inputcollid;
713 if (rightop)
714 expr->args = list_make2(leftop, rightop);
715 else
716 expr->args = list_make1(leftop);
717 expr->location = -1;
718 return (Expr *) expr;
719}
#define InvalidOid
Oid opno
Definition primnodes.h:835
List * args
Definition primnodes.h:853
ParseLoc location
Definition primnodes.h:856

References OpExpr::args, fb(), InvalidOid, list_make1, list_make2, OpExpr::location, makeNode, and OpExpr::opno.

Referenced by build_bound_expr(), build_implied_join_equality(), convert_EXISTS_to_ANY(), create_one_window_path(), expand_indexqual_rowcompare(), make_partition_op_expr(), match_boolean_index_clause(), match_clause_to_partition_key(), match_network_subset(), match_pattern_prefix(), operator_predicate_proof(), process_implied_equality(), and rewriteSearchAndCycle().

◆ make_orclause()

◆ makeA_Expr()

A_Expr * makeA_Expr ( A_Expr_Kind  kind,
List *  name,
Node *  lexpr,
Node *  rexpr,
int  location 
)
extern

Definition at line 30 of file makefuncs.c.

32{
34
35 a->kind = kind;
36 a->name = name;
37 a->lexpr = lexpr;
38 a->rexpr = rexpr;
39 a->location = location;
40 return a;
41}
int a
Definition isn.c:73
const char * name

References a, makeNode, and name.

◆ makeAlias()

◆ makeBoolConst()

Node * makeBoolConst ( bool  value,
bool  isnull 
)
extern

Definition at line 408 of file makefuncs.c.

409{
410 /* note that pg_type.h hardwires size of bool as 1 ... duplicate it */
411 return (Node *) makeConst(BOOLOID, -1, InvalidOid, 1,
412 BoolGetDatum(value), isnull, true);
413}
static struct @175 value
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
Definition makefuncs.c:350
static Datum BoolGetDatum(bool X)
Definition postgres.h:112

References BoolGetDatum(), fb(), InvalidOid, makeConst(), and value.

Referenced by add_base_clause_to_rel(), add_join_clause_to_rels(), create_append_plan(), eval_const_expressions_mutator(), find_duplicate_ors(), find_simplified_clause(), generate_query_for_empty_path_pattern(), get_qual_for_range(), make_ands_explicit(), make_row_distinct_op(), match_boolean_index_clause(), match_boolean_partition_clause(), negate_clause(), process_duplicate_ors(), and reconsider_outer_join_clauses().

◆ makeBoolExpr()

◆ makeColumnDef()

ColumnDef * makeColumnDef ( const char *  colname,
Oid  typeOid,
int32  typmod,
Oid  collOid 
)
extern

Definition at line 565 of file makefuncs.c.

566{
568
569 n->colname = pstrdup(colname);
570 n->typeName = makeTypeNameFromOid(typeOid, typmod);
571 n->inhcount = 0;
572 n->is_local = true;
573 n->is_not_null = false;
574 n->is_from_type = false;
575 n->storage = 0;
576 n->raw_default = NULL;
577 n->cooked_default = NULL;
578 n->collClause = NULL;
579 n->collOid = collOid;
580 n->constraints = NIL;
581 n->fdwoptions = NIL;
582 n->location = -1;
583
584 return n;
585}
TypeName * makeTypeNameFromOid(Oid typeOid, int32 typmod)
Definition makefuncs.c:547
bool is_not_null
Definition parsenodes.h:776
CollateClause * collClause
Definition parsenodes.h:786
List * constraints
Definition parsenodes.h:788
Node * cooked_default
Definition parsenodes.h:781
char * colname
Definition parsenodes.h:771
TypeName * typeName
Definition parsenodes.h:772
bool is_from_type
Definition parsenodes.h:777
List * fdwoptions
Definition parsenodes.h:789
Node * raw_default
Definition parsenodes.h:780
char storage
Definition parsenodes.h:778
bool is_local
Definition parsenodes.h:775
int16 inhcount
Definition parsenodes.h:774
ParseLoc location
Definition parsenodes.h:790

References ColumnDef::collClause, ColumnDef::collOid, ColumnDef::colname, ColumnDef::constraints, ColumnDef::cooked_default, fb(), ColumnDef::fdwoptions, ColumnDef::inhcount, ColumnDef::is_from_type, ColumnDef::is_local, ColumnDef::is_not_null, ColumnDef::location, makeNode, makeTypeNameFromOid(), NIL, pstrdup(), ColumnDef::raw_default, ColumnDef::storage, and ColumnDef::typeName.

Referenced by create_ctas_nodata(), DefineSequence(), DefineVirtualRelation(), getAttributesList(), intorel_startup(), MergeAttributes(), transformOfType(), and transformTableLikeClause().

◆ makeConst()

Const * makeConst ( Oid  consttype,
int32  consttypmod,
Oid  constcollid,
int  constlen,
Datum  constvalue,
bool  constisnull,
bool  constbyval 
)
extern

Definition at line 350 of file makefuncs.c.

357{
359
360 /*
361 * If it's a varlena value, force it to be in non-expanded (non-toasted)
362 * format; this avoids any possible dependency on external values and
363 * improves consistency of representation, which is important for equal().
364 */
365 if (!constisnull && constlen == -1)
367
368 cnst->consttype = consttype;
369 cnst->consttypmod = consttypmod;
370 cnst->constcollid = constcollid;
371 cnst->constlen = constlen;
372 cnst->constvalue = constvalue;
373 cnst->constisnull = constisnull;
374 cnst->constbyval = constbyval;
375 cnst->location = -1; /* "unknown" */
376
377 return cnst;
378}
#define PG_DETOAST_DATUM(datum)
Definition fmgr.h:240
#define PointerGetDatum(X)
Definition postgres.h:354

References fb(), makeNode, PG_DETOAST_DATUM, and PointerGetDatum.

Referenced by add_security_quals(), add_with_check_options(), array_subscript_transform(), build_bound_expr(), build_coercion_expression(), build_minmax_path(), check_parent_values_in_new_partitions(), check_sql_stmt_retval(), coerce_null_to_domain(), create_final_distinct_paths(), create_partial_distinct_paths(), eval_const_expressions_mutator(), evaluate_expr(), expand_insert_targetlist(), get_qual_for_hash(), get_qual_for_list(), get_typdefault(), GetJsonBehaviorConst(), getJsonEncodingConst(), InsertOneProargdefaultsValue(), make_const(), make_SAOP_expr(), makeBoolConst(), makeJsonTablePathScan(), makeNullConst(), match_clause_to_partition_key(), match_network_subset(), pattern_fixed_prefix(), RelationGetDummyIndexExpressions(), rewriteSearchAndCycle(), scalararraysel(), set_fn_opclass_options(), string_to_bytea_const(), string_to_const(), transformJsonArrayQueryConstructor(), and transformJsonBehavior().

◆ makeDefElem()

◆ makeDefElemExtended()

DefElem * makeDefElemExtended ( char *  nameSpace,
char *  name,
Node *  arg,
DefElemAction  defaction,
int  location 
)
extern

Definition at line 655 of file makefuncs.c.

657{
658 DefElem *res = makeNode(DefElem);
659
660 res->defnamespace = nameSpace;
661 res->defname = name;
662 res->arg = arg;
663 res->defaction = defaction;
664 res->location = location;
665
666 return res;
667}

References arg, DefElem::arg, DefElem::defaction, DefElem::defname, DefElem::defnamespace, fb(), DefElem::location, makeNode, and name.

◆ makeFromExpr()

◆ makeFuncCall()

FuncCall * makeFuncCall ( List *  name,
List *  args,
CoercionForm  funcformat,
int  location 
)
extern

Definition at line 676 of file makefuncs.c.

677{
679
680 n->funcname = name;
681 n->args = args;
682 n->agg_order = NIL;
683 n->agg_filter = NULL;
684 n->over = NULL;
685 n->agg_within_group = false;
686 n->agg_star = false;
687 n->agg_distinct = false;
688 n->func_variadic = false;
689 n->funcformat = funcformat;
690 n->location = location;
691 return n;
692}
bool agg_within_group
Definition parsenodes.h:461
CoercionForm funcformat
Definition parsenodes.h:465
Node * agg_filter
Definition parsenodes.h:458
List * agg_order
Definition parsenodes.h:457
List * funcname
Definition parsenodes.h:455
List * args
Definition parsenodes.h:456
bool agg_star
Definition parsenodes.h:462
bool agg_distinct
Definition parsenodes.h:463
ParseLoc location
Definition parsenodes.h:466
bool func_variadic
Definition parsenodes.h:464
struct WindowDef * over
Definition parsenodes.h:459

References FuncCall::agg_distinct, FuncCall::agg_filter, FuncCall::agg_order, FuncCall::agg_star, FuncCall::agg_within_group, FuncCall::args, fb(), FuncCall::func_variadic, FuncCall::funcformat, FuncCall::funcname, FuncCall::location, makeNode, name, NIL, and FuncCall::over.

Referenced by test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformColumnDefinition(), and transformRangeFunction().

◆ makeFuncExpr()

FuncExpr * makeFuncExpr ( Oid  funcid,
Oid  rettype,
List *  args,
Oid  funccollid,
Oid  inputcollid,
CoercionForm  fformat 
)
extern

Definition at line 594 of file makefuncs.c.

596{
597 FuncExpr *funcexpr;
598
599 funcexpr = makeNode(FuncExpr);
600 funcexpr->funcid = funcid;
601 funcexpr->funcresulttype = rettype;
602 funcexpr->funcretset = false; /* only allowed case here */
603 funcexpr->funcvariadic = false; /* only allowed case here */
604 funcexpr->funcformat = fformat;
605 funcexpr->funccollid = funccollid;
606 funcexpr->inputcollid = inputcollid;
607 funcexpr->args = args;
608 funcexpr->location = -1;
609
610 return funcexpr;
611}
ParseLoc location
Definition primnodes.h:790
Oid funcid
Definition primnodes.h:770
List * args
Definition primnodes.h:788

References FuncExpr::args, fb(), FuncExpr::funcid, FuncExpr::location, and makeNode.

Referenced by build_aggregate_deserialfn_expr(), build_aggregate_finalfn_expr(), build_aggregate_serialfn_expr(), build_aggregate_transfn_expr(), build_coercion_expression(), coerceJsonFuncExpr(), get_qual_for_hash(), make_path_cat_expr(), makeJsonByteaToTextConversion(), rewriteSearchAndCycle(), transformForPortionOfClause(), and transformJsonValueExpr().

◆ makeGroupingSet()

GroupingSet * makeGroupingSet ( GroupingSetKind  kind,
List *  content,
int  location 
)
extern

Definition at line 892 of file makefuncs.c.

893{
895
896 n->kind = kind;
897 n->content = content;
898 n->location = location;
899 return n;
900}
List * content
ParseLoc location

References GroupingSet::content, GroupingSet::location, and makeNode.

Referenced by flatten_grouping_sets(), transformGroupClause(), and transformGroupingSet().

◆ makeIndexInfo()

IndexInfo * makeIndexInfo ( int  numattrs,
int  numkeyattrs,
Oid  amoid,
List *  expressions,
List *  predicates,
bool  unique,
bool  nulls_not_distinct,
bool  isready,
bool  concurrent,
bool  summarizing,
bool  withoutoverlaps 
)
extern

Definition at line 834 of file makefuncs.c.

838{
840
845 n->ii_Unique = unique;
846 n->ii_NullsNotDistinct = nulls_not_distinct;
848 n->ii_CheckedUnchanged = false;
849 n->ii_IndexUnchanged = false;
850 n->ii_Concurrent = concurrent;
853
854 /* summarizing indexes cannot contain non-key attributes */
856
857 /* expressions */
858 n->ii_Expressions = expressions;
860
861 /* predicates */
864
865 /* exclusion constraints */
869
870 /* speculative inserts */
871 n->ii_UniqueOps = NULL;
872 n->ii_UniqueProcs = NULL;
874
875 /* initialize index-build state to default */
876 n->ii_BrokenHotChain = false;
877 n->ii_ParallelWorkers = 0;
878
879 /* set up for possible use by index AM */
880 n->ii_Am = amoid;
881 n->ii_AmCache = NULL;
883
884 return n;
885}
MemoryContext CurrentMemoryContext
Definition mcxt.c:161
bool ii_Unique
Definition execnodes.h:214
uint16 * ii_ExclusionStrats
Definition execnodes.h:206
bool ii_BrokenHotChain
Definition execnodes.h:226
int ii_NumIndexAttrs
Definition execnodes.h:181
void * ii_AmCache
Definition execnodes.h:237
bool ii_CheckedUnchanged
Definition execnodes.h:220
Oid * ii_UniqueOps
Definition execnodes.h:209
ExprState * ii_PredicateState
Definition execnodes.h:199
Oid * ii_ExclusionOps
Definition execnodes.h:202
bool ii_NullsNotDistinct
Definition execnodes.h:216
int ii_ParallelWorkers
Definition execnodes.h:232
bool ii_Concurrent
Definition execnodes.h:224
uint16 * ii_UniqueStrats
Definition execnodes.h:211
int ii_NumIndexKeyAttrs
Definition execnodes.h:183
List * ii_ExpressionsState
Definition execnodes.h:194
List * ii_Expressions
Definition execnodes.h:192
bool ii_WithoutOverlaps
Definition execnodes.h:230
bool ii_IndexUnchanged
Definition execnodes.h:222
Oid * ii_ExclusionProcs
Definition execnodes.h:204
bool ii_Summarizing
Definition execnodes.h:228
Oid * ii_UniqueProcs
Definition execnodes.h:210
MemoryContext ii_Context
Definition execnodes.h:240
bool ii_ReadyForInserts
Definition execnodes.h:218
List * ii_Predicate
Definition execnodes.h:197

References Assert, CurrentMemoryContext, fb(), IndexInfo::ii_Am, IndexInfo::ii_AmCache, IndexInfo::ii_BrokenHotChain, IndexInfo::ii_CheckedUnchanged, IndexInfo::ii_Concurrent, IndexInfo::ii_Context, IndexInfo::ii_ExclusionOps, IndexInfo::ii_ExclusionProcs, IndexInfo::ii_ExclusionStrats, IndexInfo::ii_Expressions, IndexInfo::ii_ExpressionsState, IndexInfo::ii_IndexUnchanged, IndexInfo::ii_NullsNotDistinct, IndexInfo::ii_NumIndexAttrs, IndexInfo::ii_NumIndexKeyAttrs, IndexInfo::ii_ParallelWorkers, IndexInfo::ii_Predicate, IndexInfo::ii_PredicateState, IndexInfo::ii_ReadyForInserts, IndexInfo::ii_Summarizing, IndexInfo::ii_Unique, IndexInfo::ii_UniqueOps, IndexInfo::ii_UniqueProcs, IndexInfo::ii_UniqueStrats, IndexInfo::ii_WithoutOverlaps, makeNode, and NIL.

Referenced by BuildDummyIndexInfo(), BuildIndexInfo(), CheckIndexCompatible(), DefineIndex(), and index_create_copy().

◆ makeJsonBehavior()

JsonBehavior * makeJsonBehavior ( JsonBehaviorType  btype,
Node *  expr,
int  location 
)
extern

Definition at line 955 of file makefuncs.c.

956{
958
959 behavior->btype = btype;
960 behavior->expr = expr;
961 behavior->location = location;
962
963 return behavior;
964}
ParseLoc location
Definition primnodes.h:1819
JsonBehaviorType btype
Definition primnodes.h:1816

References JsonBehavior::btype, JsonBehavior::expr, JsonBehavior::location, and makeNode.

Referenced by transformJsonBehavior().

◆ makeJsonFormat()

JsonFormat * makeJsonFormat ( JsonFormatType  type,
JsonEncoding  encoding,
int  location 
)
extern

Definition at line 922 of file makefuncs.c.

923{
925
926 jf->format_type = type;
927 jf->encoding = encoding;
928 jf->location = location;
929
930 return jf;
931}
static char * encoding
Definition initdb.c:139
const char * type

References encoding, fb(), makeNode, and type.

Referenced by transformJsonOutput(), transformJsonReturning(), transformJsonSerializeExpr(), and transformJsonTableColumn().

◆ makeJsonIsPredicate()

Node * makeJsonIsPredicate ( Node *  expr,
JsonFormat *  format,
JsonValueType  item_type,
bool  unique_keys,
Oid  exprBaseType,
int  location 
)
extern

Definition at line 1040 of file makefuncs.c.

1042{
1044
1045 Assert(expr != NULL);
1046
1047 n->expr = expr;
1048 n->format = format;
1049 n->item_type = item_type;
1050 n->unique_keys = unique_keys;
1051 n->exprBaseType = exprBaseType;
1052 n->location = location;
1053
1054 return (Node *) n;
1055}
static char format
JsonFormat * format
Definition primnodes.h:1761
JsonValueType item_type
Definition primnodes.h:1762
ParseLoc location
Definition primnodes.h:1765

References Assert, JsonIsPredicate::expr, JsonIsPredicate::exprBaseType, fb(), format, JsonIsPredicate::format, JsonIsPredicate::item_type, JsonIsPredicate::location, makeNode, and JsonIsPredicate::unique_keys.

Referenced by transformJsonIsPredicate().

◆ makeJsonKeyValue()

Node * makeJsonKeyValue ( Node *  key,
Node *  value 
)
extern

Definition at line 1025 of file makefuncs.c.

1026{
1028
1029 n->key = (Expr *) key;
1031
1032 return (Node *) n;
1033}
#define castNode(_type_, nodeptr)
Definition nodes.h:180
JsonValueExpr * value

References castNode, JsonKeyValue::key, makeNode, JsonKeyValue::value, and value.

◆ makeJsonTableDefaultPlan()

Node * makeJsonTableDefaultPlan ( JsonTablePlanJoinType  join_type,
int  location 
)
extern

Definition at line 972 of file makefuncs.c.

973{
975
977 n->join_type = join_type;
978 n->location = location;
979
980 return (Node *) n;
981}
@ JSTP_DEFAULT
JsonTablePlanJoinType join_type
JsonTablePlanType plan_type

References JsonTablePlanSpec::join_type, JSTP_DEFAULT, JsonTablePlanSpec::location, makeNode, and JsonTablePlanSpec::plan_type.

◆ makeJsonTableJoinedPlan()

Node * makeJsonTableJoinedPlan ( JsonTablePlanJoinType  type,
Node *  plan1,
Node *  plan2,
int  location 
)
extern

Definition at line 1006 of file makefuncs.c.

1008{
1010
1012 n->join_type = type;
1013 n->plan1 = castNode(JsonTablePlanSpec, plan1);
1014 n->plan2 = castNode(JsonTablePlanSpec, plan2);
1015 n->location = location;
1016
1017 return (Node *) n;
1018}
@ JSTP_JOINED
struct JsonTablePlanSpec * plan2
struct JsonTablePlanSpec * plan1

References castNode, JsonTablePlanSpec::join_type, JSTP_JOINED, JsonTablePlanSpec::location, makeNode, JsonTablePlanSpec::plan1, JsonTablePlanSpec::plan2, JsonTablePlanSpec::plan_type, and type.

◆ makeJsonTablePath()

JsonTablePath * makeJsonTablePath ( Const *  pathvalue,
char *  pathname 
)
extern

Definition at line 1083 of file makefuncs.c.

1084{
1086
1088 path->value = pathvalue;
1089 path->name = pathname;
1090
1091 return path;
1092}
Const * value
Definition primnodes.h:1897

References Assert, fb(), IsA, makeNode, JsonTablePath::name, and JsonTablePath::value.

Referenced by makeJsonTablePathScan().

◆ makeJsonTablePathSpec()

JsonTablePathSpec * makeJsonTablePathSpec ( char *  string,
char *  name,
int  string_location,
int  name_location 
)
extern

Definition at line 1062 of file makefuncs.c.

1064{
1066
1067 Assert(string != NULL);
1068 pathspec->string = makeStringConst(string, string_location);
1069 if (name != NULL)
1070 pathspec->name = pstrdup(name);
1071
1072 pathspec->name_location = name_location;
1073 pathspec->location = string_location;
1074
1075 return pathspec;
1076}
Node * makeStringConst(char *str, int location)
Definition makefuncs.c:618
ParseLoc name_location

References Assert, fb(), JsonTablePathSpec::location, makeNode, makeStringConst(), name, JsonTablePathSpec::name, JsonTablePathSpec::name_location, pstrdup(), and JsonTablePathSpec::string.

◆ makeJsonTableSimplePlan()

Node * makeJsonTableSimplePlan ( char *  pathname,
int  location 
)
extern

Definition at line 989 of file makefuncs.c.

990{
992
994 n->pathname = pathname;
995 n->location = location;
996
997 return (Node *) n;
998}
@ JSTP_SIMPLE

References JSTP_SIMPLE, JsonTablePlanSpec::location, makeNode, JsonTablePlanSpec::pathname, and JsonTablePlanSpec::plan_type.

◆ makeJsonValueExpr()

JsonValueExpr * makeJsonValueExpr ( Expr *  raw_expr,
Expr *  formatted_expr,
JsonFormat *  format 
)
extern

Definition at line 938 of file makefuncs.c.

940{
942
943 jve->raw_expr = raw_expr;
944 jve->formatted_expr = formatted_expr;
945 jve->format = format;
946
947 return jve;
948}

References fb(), format, and makeNode.

Referenced by eval_const_expressions_mutator(), transformJsonArrayQueryConstructor(), transformJsonParseArg(), and transformJsonTableColumn().

◆ makeNotNullConstraint()

Constraint * makeNotNullConstraint ( String *  colname)
extern

Definition at line 493 of file makefuncs.c.

494{
495 Constraint *notnull;
496
497 notnull = makeNode(Constraint);
498 notnull->contype = CONSTR_NOTNULL;
499 notnull->conname = NULL;
500 notnull->is_no_inherit = false;
501 notnull->deferrable = false;
502 notnull->initdeferred = false;
503 notnull->location = -1;
504 notnull->keys = list_make1(colname);
505 notnull->is_enforced = true;
506 notnull->skip_validation = false;
507 notnull->initially_valid = true;
508
509 return notnull;
510}
@ CONSTR_NOTNULL
bool initdeferred
ParseLoc location
List * keys
ConstrType contype
bool is_no_inherit
bool is_enforced
bool initially_valid
bool skip_validation
bool deferrable
char * conname

References Constraint::conname, CONSTR_NOTNULL, Constraint::contype, Constraint::deferrable, fb(), Constraint::initdeferred, Constraint::initially_valid, Constraint::is_enforced, Constraint::is_no_inherit, Constraint::keys, list_make1, Constraint::location, makeNode, and Constraint::skip_validation.

Referenced by ATExecSetNotNull(), ATPrepAddPrimaryKey(), transformColumnDefinition(), and transformIndexConstraint().

◆ makeNullConst()

Const * makeNullConst ( Oid  consttype,
int32  consttypmod,
Oid  constcollid 
)
extern

Definition at line 388 of file makefuncs.c.

389{
390 int16 typLen;
391 bool typByVal;
392
393 get_typlenbyval(consttype, &typLen, &typByVal);
394 return makeConst(consttype,
397 (int) typLen,
398 (Datum) 0,
399 true,
400 typByVal);
401}
int16_t int16
Definition c.h:678
void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval)
Definition lsyscache.c:2565
uint64_t Datum
Definition postgres.h:70

References fb(), get_typlenbyval(), and makeConst().

Referenced by adjust_appendrel_attrs_mutator(), ATExecAddColumn(), build_subplan(), BuildOnConflictExcludedTargetlist(), coerce_record_to_complex(), eval_const_expressions_mutator(), evaluate_function(), ExecInitExprRec(), expandRTE(), expandTupleDesc(), generate_query_for_empty_path_pattern(), remove_unused_subquery_outputs(), replace_property_refs_mutator(), rewriteValuesRTE(), rewriteValuesRTEToNulls(), set_plan_refs(), and transformAssignedExpr().

◆ makeRangeVar()

RangeVar * makeRangeVar ( char *  schemaname,
char *  relname,
int  location 
)
extern

Definition at line 473 of file makefuncs.c.

474{
476
477 r->catalogname = NULL;
478 r->schemaname = schemaname;
479 r->relname = relname;
480 r->inh = true;
482 r->alias = NULL;
483 r->location = location;
484
485 return r;
486}
NameData relname
Definition pg_class.h:40
char * relname
Definition primnodes.h:84
bool inh
Definition primnodes.h:87
Alias * alias
Definition primnodes.h:93
char relpersistence
Definition primnodes.h:90
char * catalogname
Definition primnodes.h:78
ParseLoc location
Definition primnodes.h:96
char * schemaname
Definition primnodes.h:81

References RangeVar::alias, RangeVar::catalogname, fb(), RangeVar::inh, RangeVar::location, makeNode, relname, RangeVar::relname, RangeVar::relpersistence, and RangeVar::schemaname.

Referenced by AlterTableNamespace(), ATParseTransformCmd(), attribute_statistics_update(), autovacuum_do_vac_analyze(), boot_openrel(), BootstrapToastTable(), DoCopy(), ExpandColumnRefStar(), extended_statistics_update(), fetch_relation_list(), generateSerialExtraStmts(), logicalrep_rel_open(), LookupTypeNameExtended(), makeRangeVarFromNameList(), pg_clear_attribute_stats(), pg_clear_extended_stats(), plpgsql_parse_cwordtype(), relation_statistics_update(), transformAlterTableStmt(), and transformColumnRef().

◆ makeRelabelType()

RelabelType * makeRelabelType ( Expr *  arg,
Oid  rtype,
int32  rtypmod,
Oid  rcollid,
CoercionForm  rformat 
)
extern

Definition at line 453 of file makefuncs.c.

455{
457
458 r->arg = arg;
459 r->resulttype = rtype;
460 r->resulttypmod = rtypmod;
461 r->resultcollid = rcollid;
462 r->relabelformat = rformat;
463 r->location = -1;
464
465 return r;
466}
ParseLoc location
Definition primnodes.h:1208

References arg, RelabelType::arg, fb(), RelabelType::location, makeNode, and RelabelType::resulttype.

Referenced by assign_hypothetical_collations(), buildMergedJoinVar(), coerce_type(), and make_partition_op_expr().

◆ makeSimpleA_Expr()

A_Expr * makeSimpleA_Expr ( A_Expr_Kind  kind,
char *  name,
Node *  lexpr,
Node *  rexpr,
int  location 
)
extern

Definition at line 48 of file makefuncs.c.

50{
52
53 a->kind = kind;
54 a->name = list_make1(makeString(name));
55 a->lexpr = lexpr;
56 a->rexpr = rexpr;
57 a->location = location;
58 return a;
59}
String * makeString(char *str)
Definition value.c:63

References a, list_make1, makeNode, makeString(), and name.

Referenced by test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformAExprBetween(), transformCaseExpr(), and transformJoinUsingClause().

◆ makeStringConst()

Node * makeStringConst ( char *  str,
int  location 
)
extern

Definition at line 618 of file makefuncs.c.

619{
621
622 n->val.sval.type = T_String;
623 n->val.sval.sval = str;
624 n->location = location;
625
626 return (Node *) n;
627}
const char * str
union ValUnion val
Definition parsenodes.h:391
ParseLoc location
Definition parsenodes.h:393
char * sval
Definition value.h:68
String sval
Definition parsenodes.h:382

References fb(), A_Const::location, makeNode, str, ValUnion::sval, String::sval, and A_Const::val.

Referenced by makeJsonTablePathSpec(), and transformJsonTableColumn().

◆ makeTargetEntry()

TargetEntry * makeTargetEntry ( Expr *  expr,
AttrNumber  resno,
char *  resname,
bool  resjunk 
)
extern

Definition at line 289 of file makefuncs.c.

293{
295
296 tle->expr = expr;
297 tle->resno = resno;
298 tle->resname = resname;
299
300 /*
301 * We always set these fields to 0. If the caller wants to change them he
302 * must do so explicitly. Few callers do that, so omitting these
303 * arguments reduces the chance of error.
304 */
305 tle->ressortgroupref = 0;
306 tle->resorigtbl = InvalidOid;
307 tle->resorigcol = 0;
308
309 tle->resjunk = resjunk;
310
311 return tle;
312}

References fb(), InvalidOid, and makeNode.

Referenced by add_row_identity_var(), add_to_flat_tlist(), ApplyRetrieveRule(), build_index_tlist(), build_minmax_path(), build_path_tlist(), build_physical_tlist(), build_remote_returning(), BuildOnConflictExcludedTargetlist(), check_sql_stmt_retval(), coerce_fn_result_column(), constructSetOpTargetlist(), convert_combining_aggrefs(), convert_EXISTS_to_ANY(), create_nestloop_plan(), create_unique_paths(), determineRecursiveColTypes(), ExecInitSubPlan(), expand_inherited_rtentry(), expand_insert_targetlist(), expand_virtual_generated_columns(), expandNSItemAttrs(), ExpandRowReference(), foreign_grouping_ok(), generate_append_tlist(), generate_setop_tlist(), generate_union_from_pathqueries(), get_generated_columns(), make_tlist_from_pathtarget(), prepare_sort_from_pathkeys(), preprocess_targetlist(), pull_up_constant_function(), pull_up_simple_values(), rebuild_fdw_scan_tlist(), rewriteSearchAndCycle(), rewriteTargetListIU(), transformAggregateCall(), transformForPortionOfClause(), transformInsertStmt(), transformMergeStmt(), transformMultiAssignRef(), transformRangeGraphTable(), transformReturnStmt(), transformSetOperationStmt(), and transformTargetEntry().

◆ makeTypeName()

TypeName * makeTypeName ( char *  typnam)
extern

Definition at line 519 of file makefuncs.c.

520{
522}
TypeName * makeTypeNameFromNameList(List *names)
Definition makefuncs.c:531

References fb(), list_make1, makeString(), and makeTypeNameFromNameList().

Referenced by plpgsql_parse_wordrowtype().

◆ makeTypeNameFromNameList()

◆ makeTypeNameFromOid()

TypeName * makeTypeNameFromOid ( Oid  typeOid,
int32  typmod 
)
extern

Definition at line 547 of file makefuncs.c.

548{
550
551 n->typeOid = typeOid;
552 n->typemod = typmod;
553 n->location = -1;
554 return n;
555}
Oid typeOid
Definition parsenodes.h:290

References TypeName::location, makeNode, TypeName::typemod, and TypeName::typeOid.

Referenced by generateSerialExtraStmts(), makeColumnDef(), and transformAlterTableStmt().

◆ makeVacuumRelation()

VacuumRelation * makeVacuumRelation ( RangeVar *  relation,
Oid  oid,
List *  va_cols 
)
extern

Definition at line 907 of file makefuncs.c.

908{
910
911 v->relation = relation;
912 v->oid = oid;
913 v->va_cols = va_cols;
914 return v;
915}
RangeVar * relation

References makeNode, VacuumRelation::oid, VacuumRelation::relation, and VacuumRelation::va_cols.

Referenced by autovacuum_do_vac_analyze(), expand_vacuum_rel(), and get_all_vacuum_rels().

◆ makeVar()

Var * makeVar ( int  varno,
AttrNumber  varattno,
Oid  vartype,
int32  vartypmod,
Oid  varcollid,
Index  varlevelsup 
)
extern

Definition at line 66 of file makefuncs.c.

72{
73 Var *var = makeNode(Var);
74
75 var->varno = varno;
76 var->varattno = varattno;
77 var->vartype = vartype;
78 var->vartypmod = vartypmod;
79 var->varcollid = varcollid;
80 var->varlevelsup = varlevelsup;
81
82 /*
83 * Only a few callers need to make Var nodes with varreturningtype
84 * different from VAR_RETURNING_DEFAULT, non-null varnullingrels, or with
85 * varnosyn/varattnosyn different from varno/varattno. We don't provide
86 * separate arguments for them, but just initialize them to sensible
87 * default values. This reduces code clutter and chance of error for most
88 * callers.
89 */
91 var->varnullingrels = NULL;
92 var->varnosyn = (Index) varno;
93 var->varattnosyn = varattno;
94
95 /* Likewise, we just set location to "unknown" here */
96 var->location = -1;
97
98 return var;
99}
unsigned int Index
Definition c.h:757
@ VAR_RETURNING_DEFAULT
Definition primnodes.h:257
ParseLoc location
Definition primnodes.h:311
AttrNumber varattno
Definition primnodes.h:275
int varno
Definition primnodes.h:270
VarReturningType varreturningtype
Definition primnodes.h:298
Index varlevelsup
Definition primnodes.h:295

References fb(), Var::location, makeNode, VAR_RETURNING_DEFAULT, Var::varattno, Var::varlevelsup, Var::varno, and Var::varreturningtype.

Referenced by add_row_identity_columns(), ATPrepAlterColumnType(), build_edge_vertex_link_quals(), build_index_tlist(), build_physical_tlist(), build_remote_returning(), buildGroupedVar(), BuildOnConflictExcludedTargetlist(), buildVarFromNSColumn(), CreateStatistics(), eval_const_expressions_mutator(), expand_inherited_rtentry(), expand_single_inheritance_child(), expand_virtual_generated_columns(), expandNSItemVars(), expandRTE(), expandTupleDesc(), fix_indexqual_operand(), generate_append_tlist(), generate_setop_tlist(), generate_union_from_pathqueries(), get_qual_for_hash(), get_qual_for_list(), get_range_key_properties(), get_range_nulltest(), get_relation_constraints(), make_inh_translation_list(), make_path_cat_expr(), make_path_rowexpr(), makeVarFromTargetEntry(), makeWholeRowVar(), NotNullImpliedByRelConstraints(), PartConstraintImpliedByRelConstraint(), postgresAddForeignUpdateTargets(), preprocess_targetlist(), rewriteSearchAndCycle(), scanNSItemForColumn(), set_baserel_partition_key_exprs(), set_dummy_tlist_references(), set_plan_refs(), transformAssignedExpr(), transformForPortionOfClause(), and transformSetOperationStmt().

◆ makeVarFromTargetEntry()

Var * makeVarFromTargetEntry ( int  varno,
TargetEntry *  tle 
)
extern

Definition at line 107 of file makefuncs.c.

109{
110 return makeVar(varno,
111 tle->resno,
112 exprType((Node *) tle->expr),
113 exprTypmod((Node *) tle->expr),
114 exprCollation((Node *) tle->expr),
115 0);
116}
Var * makeVar(int varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup)
Definition makefuncs.c:66
Oid exprType(const Node *expr)
Definition nodeFuncs.c:42
int32 exprTypmod(const Node *expr)
Definition nodeFuncs.c:304
Oid exprCollation(const Node *expr)
Definition nodeFuncs.c:826

References exprCollation(), exprType(), exprTypmod(), fb(), and makeVar().

Referenced by build_physical_tlist(), coerce_fn_result_column(), generate_subquery_vars(), make_setop_translation_list(), search_indexed_tlist_for_non_var(), search_indexed_tlist_for_phv(), search_indexed_tlist_for_sortgroupref(), and transformInsertStmt().

◆ makeWholeRowVar()

Var * makeWholeRowVar ( RangeTblEntry *  rte,
int  varno,
Index  varlevelsup,
bool  allowScalar 
)
extern

Definition at line 137 of file makefuncs.c.

141{
142 Var *result;
143 Oid toid;
144 Node *fexpr;
145
146 switch (rte->rtekind)
147 {
148 case RTE_RELATION:
149 /* relation: the rowtype is a named composite type */
150 toid = get_rel_type_id(rte->relid);
151 if (!OidIsValid(toid))
154 errmsg("relation \"%s\" does not have a composite type",
155 get_rel_name(rte->relid))));
156 result = makeVar(varno,
158 toid,
159 -1,
161 varlevelsup);
162 break;
163
164 case RTE_SUBQUERY:
165
166 /*
167 * For a standard subquery, the Var should be of RECORD type.
168 * However, if we're looking at a subquery that was expanded from
169 * a view or SRF (only possible during planning), we must use the
170 * appropriate rowtype, so that the resulting Var has the same
171 * type that we would have produced from the original RTE.
172 */
173 if (OidIsValid(rte->relid))
174 {
175 /* Subquery was expanded from a view */
176 toid = get_rel_type_id(rte->relid);
177 if (!OidIsValid(toid))
180 errmsg("relation \"%s\" does not have a composite type",
181 get_rel_name(rte->relid))));
182 }
183 else if (rte->functions)
184 {
185 /*
186 * Subquery was expanded from a set-returning function. That
187 * would not have happened if there's more than one function
188 * or ordinality was requested. We also needn't worry about
189 * the allowScalar case, since the planner doesn't use that.
190 * Otherwise this must match the RTE_FUNCTION code below.
191 */
193 fexpr = ((RangeTblFunction *) linitial(rte->functions))->funcexpr;
195 if (!type_is_rowtype(toid))
196 toid = RECORDOID;
197 }
198 else
199 {
200 /* Normal subquery-in-FROM */
201 toid = RECORDOID;
202 }
203 result = makeVar(varno,
205 toid,
206 -1,
208 varlevelsup);
209 break;
210
211 case RTE_FUNCTION:
212
213 /*
214 * If there's more than one function, or ordinality is requested,
215 * force a RECORD result, since there's certainly more than one
216 * column involved and it can't be a known named type.
217 */
218 if (rte->funcordinality || list_length(rte->functions) != 1)
219 {
220 /* always produces an anonymous RECORD result */
221 result = makeVar(varno,
223 RECORDOID,
224 -1,
226 varlevelsup);
227 break;
228 }
229
230 fexpr = ((RangeTblFunction *) linitial(rte->functions))->funcexpr;
233 {
234 /* func returns composite; same as relation case */
235 result = makeVar(varno,
237 toid,
238 -1,
240 varlevelsup);
241 }
242 else if (allowScalar)
243 {
244 /* func returns scalar; just return its output as-is */
245 result = makeVar(varno,
246 1,
247 toid,
248 -1,
250 varlevelsup);
251 }
252 else
253 {
254 /* func returns scalar, but we want a composite result */
255 result = makeVar(varno,
257 RECORDOID,
258 -1,
260 varlevelsup);
261 }
262 break;
263
264 default:
265
266 /*
267 * RTE is a join, tablefunc, VALUES, CTE, etc. We represent these
268 * cases as a whole-row Var of RECORD type. (Note that in most
269 * cases the Var will be expanded to a RowExpr during planning,
270 * but that is not our concern here.)
271 */
272 result = makeVar(varno,
274 RECORDOID,
275 -1,
277 varlevelsup);
278 break;
279 }
280
281 return result;
282}
#define InvalidAttrNumber
Definition attnum.h:23
#define OidIsValid(objectId)
Definition c.h:917
uint32 result
int errcode(int sqlerrcode)
Definition elog.c:875
#define ERROR
Definition elog.h:40
#define ereport(elevel,...)
Definition elog.h:152
char * get_rel_name(Oid relid)
Definition lsyscache.c:2242
bool type_is_rowtype(Oid typid)
Definition lsyscache.c:2971
Oid get_rel_type_id(Oid relid)
Definition lsyscache.c:2293
static char * errmsg
@ RTE_SUBQUERY
@ RTE_FUNCTION
@ RTE_RELATION
unsigned int Oid

References Assert, ereport, errcode(), errmsg, ERROR, exprCollation(), exprType(), fb(), get_rel_name(), get_rel_type_id(), InvalidAttrNumber, InvalidOid, linitial, list_length(), makeVar(), OidIsValid, result, RTE_FUNCTION, RTE_RELATION, RTE_SUBQUERY, and type_is_rowtype().

Referenced by ApplyRetrieveRule(), expand_inherited_rtentry(), preprocess_targetlist(), transform_MERGE_to_join(), and transformWholeRowRef().