parse_target.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*-------------------------------------------------------------------------
  2. *
  3. * parse_target.h
  4. * handle target lists
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/parser/parse_target.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef PARSE_TARGET_H
  15. #define PARSE_TARGET_H
  16. #include "parser/parse_node.h"
  17. extern List *transformTargetList(ParseState *pstate, List *targetlist,
  18. ParseExprKind exprKind);
  19. extern List *transformExpressionList(ParseState *pstate, List *exprlist,
  20. ParseExprKind exprKind, bool allowDefault);
  21. extern void resolveTargetListUnknowns(ParseState *pstate, List *targetlist);
  22. extern void markTargetListOrigins(ParseState *pstate, List *targetlist);
  23. extern TargetEntry *transformTargetEntry(ParseState *pstate,
  24. Node *node, Node *expr, ParseExprKind exprKind,
  25. char *colname, bool resjunk);
  26. extern Expr *transformAssignedExpr(ParseState *pstate, Expr *expr,
  27. ParseExprKind exprKind,
  28. const char *colname,
  29. int attrno,
  30. List *indirection,
  31. int location);
  32. extern void updateTargetListEntry(ParseState *pstate, TargetEntry *tle,
  33. char *colname, int attrno,
  34. List *indirection,
  35. int location);
  36. extern Node *transformAssignmentIndirection(ParseState *pstate,
  37. Node *basenode,
  38. const char *targetName,
  39. bool targetIsSubscripting,
  40. Oid targetTypeId,
  41. int32 targetTypMod,
  42. Oid targetCollation,
  43. List *indirection,
  44. ListCell *indirection_cell,
  45. Node *rhs,
  46. CoercionContext ccontext,
  47. int location);
  48. extern List *checkInsertTargets(ParseState *pstate, List *cols,
  49. List **attrnos);
  50. extern TupleDesc expandRecordVariable(ParseState *pstate, Var *var,
  51. int levelsup);
  52. extern char *FigureColname(Node *node);
  53. extern char *FigureIndexColname(Node *node);
  54. #endif /* PARSE_TARGET_H */