Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

parse_query.h

Blame
    • Bruce Momjian's avatar
      63df35e2
      This patch changes quite a few instances of references of Oid's · 63df35e2
      Bruce Momjian authored
      as ints and longs.  Touches on quite a few function args as
      well.  Most other files look ok as far as Oids go...still checking
      though...
      
      Since Oids are type'd as unsigned ints, they should prolly be used
      with the %ud format string in elog and sprintf messages.  Not sure
      what kind of strangeness that could produce.
      
      Darren King
      63df35e2
      History
      This patch changes quite a few instances of references of Oid's
      Bruce Momjian authored
      as ints and longs.  Touches on quite a few function args as
      well.  Most other files look ok as far as Oids go...still checking
      though...
      
      Since Oids are type'd as unsigned ints, they should prolly be used
      with the %ud format string in elog and sprintf messages.  Not sure
      what kind of strangeness that could produce.
      
      Darren King
    parse_query.h 2.54 KiB
     /*-------------------------------------------------------------------------
     *
     * parse_query.h--
     *    prototypes for parse_query.c.
     *
     *
     * Copyright (c) 1994, Regents of the University of California
     *
     * $Id: parse_query.h,v 1.7 1996/11/30 18:07:02 momjian Exp $
     *
     *-------------------------------------------------------------------------
     */
    #ifndef PARSE_QUERY_H
    #define PARSE_QUERY_H
    
    #include <parser/catalog_utils.h>
    #include <parser/parse_state.h>
    #include <nodes/parsenodes.h>
    
    typedef struct QueryTreeList {
      int len; /* number of queries */
      Query** qtrees;
    } QueryTreeList;
    
    extern RangeTblEntry *refnameRangeTableEntry(List *rtable, char *refname);
    extern RangeTblEntry *colnameRangeTableEntry(ParseState *pstate, char *colname);
    extern int refnameRangeTablePosn(List *rtable, char *refname);
    extern RangeTblEntry *addRangeTableEntry(ParseState *pstate,
    					  char *relname, char *refname,
    					  bool inh, bool inFromCl,
    					  TimeRange *timeRange);
    extern List *expandAll(ParseState *pstate, char *relname, char *refname,
    							int *this_resno);
    extern TimeQual makeTimeRange(char *datestring1, char *datestring2,
    			      int timecode);
    extern Expr *make_op(char *opname, Node *ltree, Node *rtree);
    
    extern Oid find_atttype(Oid relid, char *attrname);
    extern Var *make_var(ParseState *pstate, 
    		     char *relname, char *attrname, Oid *type_id);
    extern ArrayRef *make_array_ref(Node *array, List *indirection);
    extern ArrayRef *make_array_set(Expr *target_expr, List *upperIndexpr,
    			 List *lowerIndexpr, Expr *expr);
    extern Const *make_const(Value *value);
    
    extern void param_type_init(Oid* typev, int nargs);
    extern Oid param_type(int t);
    
    /* parser.c (was ylib.c) */
    extern QueryTreeList *parser(char *str, Oid *typev, int nargs);
    extern Node *parser_typecast(Value *expr, TypeName *typename, int typlen);
    extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen);
    extern Aggreg *ParseAgg(char *aggname, Oid basetype, Node *target);
    extern void handleTargetColname(ParseState *pstate, char **resname,
    					char *refname, char *colname);
    extern void checkTargetTypes(ParseState *pstate, char *target_colname,
    					char *refname, char *colname);
    
    /*
     * analyze.c
     */
    
    #if 0
    extern List *p_rtable;
    extern int NumLevels;
    #endif
    
    Oid exprType(Node *expr);
    ParseState* makeParseState(void);
    QueryTreeList *parse_analyze(List *querytree_list);
    
    /* define in parse_query.c, used in gram.y */
    extern Oid *param_type_info;
    extern int pfunc_num_args;
    
    /* useful macros */
    #define ISCOMPLEX(type) (typeid_get_relid(type) ? true : false)
    
    #endif /* PARSE_QUERY_H */