packages feed

hssqlppp 0.0.6 → 0.0.7

raw patch · 48 files changed

+14197/−10318 lines, 48 files

Files

+ Database/HsSqlPpp/Ast/Annotation.lhs view
@@ -0,0 +1,25 @@+Copyright 2009 Jake Wheat++This is the public module to the annotation data types and support+functions (not including those that depend on the ast data types).++> {- | Contains the annotation data types and a few auxiliary functions.+> -}++> module Database.HsSqlPpp.Ast.Annotation+>     (+>      -- * Annotation data types+>      Annotation+>     ,AnnotationElement(..)+>      -- * Statement info+>      -- | This is the main annotation attached to each statement. Early days at the moment+>      -- but will be expanded to provide any type errors lurking inside a statement, any useful+>      -- types, e.g. the types of each select and subselect/sub query in a statement,+>      -- any changes to the catalog the statement makes, and possibly much more information.+>     ,StatementInfo(..)+>     ,stripAnnotations+>     ,updateAnnotation+>     ,getAnnotation+>     ) where++> import Database.HsSqlPpp.AstInternals.AstAnnotation
+ Database/HsSqlPpp/Ast/Annotator.lhs view
@@ -0,0 +1,44 @@+Copyright 2009 Jake Wheat++This is the public module for the type checking functionality.++> {- | Contains the data types and functions for annotating+>  an ast and working with annotated trees, including the+>  representations of SQL data types.+>+> Annotations:+>+> * are attached to some of the ast node data types, but not quite all of them;+>+> * types annotations are attached to most nodes during type checking;+>+> * type errors are attached to the lowest down node that the type error is detected at;+>+> * nodes who fail the type check or whose type depends on a node with a type error are+>   given the type 'TypeCheckFailed';+>+> * each statement has an additional 'StatementInfo' annotation attached to it;+>+> * the parser fills in the source position annotation in every annotatable ast node.+>+> -}+> module Database.HsSqlPpp.Ast.Annotator+>     (+>      -- * Annotation functions+>      annotateAst+>     ,annotateAstEnv+>     ,annotateExpression+>     ,annotateAstsEnv+>     ,annotateAstEnvEnv+>      -- * Annotated tree utils+>     ,getTopLevelTypes+>     ,getTopLevelInfos+>     ,getTopLevelEnvUpdates+>     ,getTypeErrors+>     ,getStatementAnnotations+>     ) where++> import Database.HsSqlPpp.AstInternals.AstInternal+> import Database.HsSqlPpp.AstInternals.AstAnnotation+> import Database.HsSqlPpp.AstInternals.AnnotationUtils+
+ Database/HsSqlPpp/Ast/Ast.lhs view
@@ -0,0 +1,76 @@+Copyright 2009 Jake Wheat++This is the public module for the ast nodes.++> {- | This module contains the ast node data types. They are very+>      permissive, in that they allow a lot of invalid SQL to be+>      represented. The type checking process should catch+>      all invalid trees, but doesn't quite manage at the moment. -}+> module Database.HsSqlPpp.Ast.Ast+>     (+>      -- * Main nodes+>      StatementList+>     ,Statement (..)+>     ,Expression (..)+>     ,SelectExpression (..)+>      -- * Components+>      -- ** Selects+>     ,SelectList (..)+>     ,SelectItem (..)+>     ,TableRef (..)+>     ,JoinExpression (..)+>     ,JoinType (..)+>     ,Natural (..)+>     ,CombineType (..)+>     ,Direction (..)+>     ,Distinct (..)+>     ,InList (..)+>      -- ** dml+>     ,SetClause (..)+>     ,CopySource (..)+>     ,RestartIdentity (..)+>      -- ** ddl+>     ,AttributeDef (..)+>     ,RowConstraint (..)+>     ,Constraint (..)+>     ,TypeAttributeDef (..)+>     ,TypeName (..)+>     ,DropType (..)+>     ,IfExists (..)+>     ,Cascade (..)+>      -- ** functions+>     ,FnBody (..)+>     ,ParamDef (..)+>     ,VarDef (..)+>     ,RaiseType (..)+>     ,Volatility (..)+>     ,Language (..)+>      -- ** typedefs+>     ,ExpressionListStatementListPairList+>     ,ExpressionListStatementListPair+>     ,ExpressionList+>     ,StringList+>     ,ParamDefList+>     ,AttributeDefList+>     ,ConstraintList+>     ,TypeAttributeDefList+>     ,StringStringListPairList+>     ,StringStringListPair+>     ,ExpressionStatementListPairList+>     ,SetClauseList+>     ,CaseExpressionListExpressionPairList+>     ,MaybeExpression+>     ,MaybeBoolExpression+>     ,MaybeTableRef+>     ,ExpressionListList+>     ,SelectItemList+>     ,OnExpr+>     ,RowConstraintList+>     ,VarDefList+>     ,ExpressionStatementListPair+>     ,CaseExpressionListExpressionPair+>     ,CaseExpressionList+>     ) where++> import Database.HsSqlPpp.AstInternals.AstInternal+
+ Database/HsSqlPpp/Ast/Environment.lhs view
@@ -0,0 +1,65 @@+Copyright 2009 Jake Wheat++This is the public api to the environment data type, it just forwards+the public part of EnvironmentInternal, which is the module used by+the type checking code.++> {- | This module contains the environment data types and a helper functions.+>    You almost certainly will never have to do anything with Environments apart+>    from read them from a database to supply to the annotation function. If you+>    only need to type check against the default template1 catalog, then you+>    don't even need to do this - is you use the annotation function with+>    no Environment parameter, it uses the default template1 catalog.+>+>    The environment data type serves the following purposes:+>+>  * Contains all the catalog information needed to type check against+>     an existing database.+>+>  * A copy of the catalog information from a default template1+>    database is included - 'defaultTemplate1Environment', at some+>    point this might be used to allow typechecking sql code against+>    this catalog without having an available PostGreSQL install.+>+>  * It is used internally to keep track of updates to the catalog+>     whilst running an annotation process (e.g. so that a select can+>     type check against a create table given in the same source). It+>     is also used to track other identifier types, such as attribute+>     references in select expressions, and argument and variable+>     types inside create function statements.+>+>  You can see what kind of stuff is contained in the Environment type+>  by looking at the 'EnvironmentUpdate' type.+> -}++> module Database.HsSqlPpp.Ast.Environment+>     (+>      -- * Data types+>      Environment+>      -- ** Updates+>     ,EnvironmentUpdate(..)+>      -- ** bits and pieces+>     ,QualifiedIDs+>     ,CastContext(..)+>     ,CompositeFlavour(..)+>     ,CompositeDef+>     ,FunctionPrototype+>     ,DomainDefinition+>     ,FunFlav(..)+>      -- * 'Environment' values+>     ,emptyEnvironment+>     ,defaultEnvironment+>     ,defaultTemplate1Environment+>      -- * Functions+>     ,readEnvironmentFromDatabase+>     ,updateEnvironment+>     --,destructEnvironment+>      -- * operator utils+>     ,OperatorType(..)+>     ,getOperatorType+>     ,isOperatorName+>     ) where++> import Database.HsSqlPpp.AstInternals.EnvironmentInternal+> import Database.HsSqlPpp.AstInternals.EnvironmentReader+> import Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment
+ Database/HsSqlPpp/Ast/SqlTypes.lhs view
@@ -0,0 +1,24 @@+Copyright 2009 Jake Wheat++This is the public module to the SQL data types, mainly from TypeType.+++> {- | Contains the SQL data types, type errors, and a few supporting+>      functions.+> -}++> module Database.HsSqlPpp.Ast.SqlTypes+>     (+>      -- * SQL types+>      Type (..)+>     ,PseudoType (..)+>      -- * type aliases+>      -- | aliases for all the sql types with multiple names+>      -- these give you the canonical names+>     ,typeSmallInt,typeBigInt,typeInt,typeNumeric,typeFloat4+>     ,typeFloat8,typeVarChar,typeChar,typeBool+>      -- * Type errors+>     ,TypeError (..)+>     ) where++> import Database.HsSqlPpp.AstInternals.TypeType
+ Database/HsSqlPpp/AstInternals/AnnotationUtils.lhs view
@@ -0,0 +1,25 @@+Copyright 2009 Jake Wheat++This module contains some utilities and generic code for working with+asts and annotations which depend on the ast types.++> {-# OPTIONS_HADDOCK hide #-}++> module Database.HsSqlPpp.AstInternals.AnnotationUtils+>     (+>      getStatementAnnotations+>     ) where++> import Data.Generics++> import Database.HsSqlPpp.AstInternals.AstInternal+> import Database.HsSqlPpp.AstInternals.AstAnnotation++> -- | Run through the ast and return all the annotations attached to+> --   a Statement node.+> getStatementAnnotations :: Data a => a -> [Annotation]+> getStatementAnnotations st =+>     everything (++) (mkQ [] ga) st+>     where+>       ga :: Statement -> [Annotation]+>       ga s = [getAnnotation s]
+ Database/HsSqlPpp/AstInternals/AstAnnotation.lhs view
@@ -0,0 +1,210 @@+Copyright 2009 Jake Wheat++The annotation data types and utilities for working with them.++Annotations are used to store source positions, types, errors,+warnings, environment deltas, information, and other stuff a client might+want to use when looking at an ast. Internal annotations which are+used in the type-checking/ annotation process use the attribute+grammar code and aren't exposed.++> {-# LANGUAGE ExistentialQuantification, DeriveDataTypeable,ScopedTypeVariables,+>   RankNTypes,FlexibleContexts #-}+> {-# OPTIONS_HADDOCK hide #-}++> module Database.HsSqlPpp.AstInternals.AstAnnotation+>     (+>      Annotation+>     ,AnnotationElement(..)+>     --,stripAnnotations+>     ,getTopLevelTypes+>     ,getTopLevelInfos+>     ,getTopLevelEnvUpdates+>     ,getTypeAnnotation+>     ,getTypeErrors+>     ,stripAnnotations+>     ,updateAnnotation+>     ,getAnnotation+>     ,getAnnotations+>     --,getTypeErrors+>     --,pack+>     ,StatementInfo(..)+>     ,getSIAnnotation+>     ) where++> import Data.Generics+> import Data.Maybe+> import Control.Arrow++> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.AstInternals.EnvironmentInternal++> -- | Annotation type - one of these is attached to most of the+> -- data types used in the ast.+> type Annotation = [AnnotationElement]++> -- | the elements of an annotation. Source positions are generated by+> -- the parser, the rest come from the separate ast annotation process.+> data AnnotationElement = SourcePos String Int Int+>                        | TypeAnnotation Type+>                        | TypeErrorA TypeError+>                        | StatementInfoA StatementInfo+>                        | EnvUpdates [EnvironmentUpdate]+>                          deriving (Eq, Show,Typeable,Data)++Use syb to pull annotation values from an ast.++I like to cut and paste code from the internet which I don't+understand, then keep changing it till it compiles and passes the tests.+++> -- | run through the ast, and pull the type annotation from each+> -- of the top level items.+> getTopLevelTypes :: Data a => [a] -> [Type]+> getTopLevelTypes st =+>     getTopLevelXs typeAnnot st+>     where+>       typeAnnot :: Annotation -> [Type]+>       typeAnnot (x:xs) = case x of+>                                 TypeAnnotation t -> [t]+>                                 _ -> typeAnnot xs+>       typeAnnot [] = [TypeCheckFailed] -- error "couldn't find type annotation"++> getTopLevelXs :: forall a b a1.+>                  (Data a1, Typeable b) =>+>                 (b -> [a]) -> a1 -> [a]+> getTopLevelXs st = everythingOne (++) $ mkQ [] st+++> getTypeAnnotation :: Data a => a -> Type+> getTypeAnnotation st =+>     case getTopLevelX typeAnnot st of+>       x:_ -> x+>       [] -> TypeCheckFailed+>     where+>       typeAnnot :: Annotation -> [Type]+>       typeAnnot (x:xs) = case x of+>                                 TypeAnnotation t -> [t]+>                                 _ -> typeAnnot xs+>       typeAnnot [] = [TypeCheckFailed]++> getTopLevelX :: forall a b a1.+>                 (Data a1, Typeable b) =>+>                (b -> [a]) -> a1 -> [a]+> getTopLevelX p = everythingOne (++) (mkQ [] p)+++ > everythingTwo :: (r -> r -> r) -> GenericQ r -> GenericQ r+ > everythingTwo k f x+ >  = foldl k (f x) (gmapQ (everythingOne k f) x)++> everythingZero :: (r -> r -> r) -> GenericQ r -> GenericQ r+> everythingZero k f x+>  = foldl k (f x) (gmapQ f x)++> everythingOne :: (r -> r -> r) -> GenericQ r -> GenericQ r+> everythingOne k f x+>  = foldl k (f x) (gmapQ (everythingZero k f) x)++> getSIAnnotation :: Annotation -> [Maybe StatementInfo]+> getSIAnnotation (x:xs) = case x of+>                                 StatementInfoA t -> [Just t]+>                                 _ -> getSIAnnotation xs+> getSIAnnotation []  = [Nothing]++> getEuAnnotation :: Annotation -> [[EnvironmentUpdate]]+> getEuAnnotation (x:xs) = case x of+>                                 EnvUpdates t -> t:getEuAnnotation xs+>                                 _ -> getEuAnnotation xs+> getEuAnnotation [] = []+++> -- | Run through the ast given and return a list of statementinfos+> -- from the top level items.+> getTopLevelInfos :: Data a => [a] -> [Maybe StatementInfo]+> getTopLevelInfos = getTopLevelXs getSIAnnotation++> getTopLevelEnvUpdates ::  Data a => [a] -> [[EnvironmentUpdate]]+> getTopLevelEnvUpdates = getTopLevelXs getEuAnnotation++> data StatementInfo = DefaultStatementInfo Type+>                    | SelectInfo Type+>                    | InsertInfo String Type+>                    | UpdateInfo String Type+>                    | DeleteInfo String+>                      deriving (Eq,Show,Typeable,Data)++todo:+add environment deltas to statementinfo++question:+if a node has no source position e.g. the all in select all or select+   distinct may correspond to a token or may be synthesized as the+   default if neither all or distinct is present. Should this have the+   source position of where the token would have appeared, should it+   inherit it from its parent, should there be a separate ctor to+   represent a fake node with no source position?+++hack job, often not interested in the source positions when testing+the asts produced, so this function will reset all the source+positions to empty ("", 0, 0) so we can compare them for equality, etc.+without having to get the positions correct.++> -- | strip all the annotations from a tree. E.g. can be used to compare+> -- two asts are the same, ignoring any source position annotation differences.+> stripAnnotations :: (Data a) => a -> a+> stripAnnotations = everywhere (mkT stripAn)+>                    where+>                      stripAn :: [AnnotationElement] -> [AnnotationElement]+>                      stripAn _ = []+++> -- | runs through the ast given and returns a list of all the type errors+> -- in the ast. Recurses into all ast nodes to find type errors.+> -- This is the function to use to see if an ast has passed the type checking process.+> -- Returns a Maybe SourcePos and the list of type errors for each node which has one or+> -- more type errors.+> getTypeErrors :: (Data a) => a -> [(Maybe AnnotationElement,[TypeError])]+> getTypeErrors sts =+>     filter (\(_,te) -> not $ null te) $ map (gtsp &&& gte) $ getAnnotations sts+>     where+>       gte (a:as) = case a of+>                     TypeErrorA e -> e:gte as+>                     _ -> gte as+>       gte _ = []++>       gtsp (a:as) = case a of+>                     s@(SourcePos _ _ _) -> Just s+>                     _ -> gtsp as+>       gtsp _ = Nothing++++> updateAnnotation :: forall a.(Data a) =>+>                   (Annotation -> Annotation) -> a -> a+> updateAnnotation f = oneLevel (mkT f)++> oneLevel :: (forall a.Data a => a -> a)+>          -> (forall a.Data a => a -> a)+> oneLevel f = gmapT f++> getAnnotation :: forall a.(Data a) => a -> Annotation+> getAnnotation a =+>   case oneLevelQ (mkQ [] f) a of+>     an:_ -> an+>     [] -> []+>   where+>     f :: Annotation -> Annotation+>     f = id++> oneLevelQ :: forall a.Data a => forall u. (forall d. (Data d) => d -> u) -> a -> [u]+> oneLevelQ = gmapQ+++> getAnnotations :: forall a.(Data a) =>+>                   a -> [Annotation]+> getAnnotations = listifyWholeLists (\(_::Annotation) -> True)++> listifyWholeLists :: Typeable b => ([b] -> Bool) -> GenericQ [[b]]+> listifyWholeLists blp = flip (synthesize id (.) (mkQ id (\bl _ -> if blp bl then (bl:) else id))) []
+ Database/HsSqlPpp/AstInternals/AstInternal.ag view
@@ -0,0 +1,668 @@+{-+Copyright 2009 Jake Wheat++This file contains the ast nodes, and the api functions to pass an ast+and get back type information.++It uses the Utrecht University Attribute Grammar system:++http://www.cs.uu.nl/wiki/bin/view/HUT/AttributeGrammarSystem+http://www.haskell.org/haskellwiki/The_Monad.Reader/Issue4/Why_Attribute_Grammars_Matter++The attr and sem definitions are in TypeChecking.ag, which is included+into this file.++These ast nodes are both used as the result of successful parsing, and+as the input to the type checker (and the output from the type+checker), and the pretty printer.++= compiling++use++uuagc  -dcfwsp --cycle --genlinepragmas AstInternal.ag++to generate a new AstInternal.hs from this file (cycle will check for+cycles - it's bad if you get any of these, and genlinepragmas mean+that you'll be able to view the original source ag positions when+there are errors or warnings compiling the generated hs file, which+you want much more often than not).++(install uuagc with+cabal install uuagc+)++-}+MODULE {Database.HsSqlPpp.AstInternals.AstInternal}+{+    -- {-# LANGUAGE DeriveDataTypeable,RankNTypes,ScopedTypeVariables #-}+    -- {-# OPTIONS_HADDOCK hide  #-}+    --from the ag files:+    --ast nodes+    Statement (..)+   ,SelectExpression (..)+   ,FnBody (..)+   ,SetClause (..)+   ,TableRef (..)+   ,JoinExpression (..)+   ,JoinType (..)+   ,SelectList (..)+   ,SelectItem (..)+   ,CopySource (..)+   ,AttributeDef (..)+   ,RowConstraint (..)+   ,Constraint (..)+   ,TypeAttributeDef (..)+   ,ParamDef (..)+   ,VarDef (..)+   ,RaiseType (..)+   ,CombineType (..)+   ,Volatility (..)+   ,Language (..)+   ,TypeName (..)+   ,DropType (..)+   ,Cascade (..)+   ,Direction (..)+   ,Distinct (..)+   ,Natural (..)+   ,IfExists (..)+   ,RestartIdentity (..)+   ,Expression (..)+   ,InList (..)+   ,StatementList+   ,ExpressionListStatementListPairList+   ,ExpressionListStatementListPair+   ,ExpressionList+   ,StringList+   ,ParamDefList+   ,AttributeDefList+   ,ConstraintList+   ,TypeAttributeDefList+   ,StringStringListPairList+   ,StringStringListPair+   ,ExpressionStatementListPairList+   ,SetClauseList+   ,CaseExpressionListExpressionPairList+   ,MaybeExpression+   ,MaybeTableRef+   ,ExpressionListList+   ,SelectItemList+   ,OnExpr+   ,RowConstraintList+   ,VarDefList+   ,ExpressionStatementListPair+   ,CaseExpressionListExpressionPair+   ,CaseExpressionList+   ,MaybeBoolExpression+   -- annotations+   ,annotateAst+   ,annotateAstEnv+   ,annotateExpression+   ,annotateAstsEnv+   ,annotateAstEnvEnv+}++{+import Data.Maybe+import Data.List+import Debug.Trace+import Control.Monad.Error+import Control.Arrow+import Data.Either+import Control.Applicative+import Data.Generics++import Database.HsSqlPpp.AstInternals.TypeType+import Database.HsSqlPpp.AstInternals.TypeConversion+import Database.HsSqlPpp.AstInternals.TypeCheckingH+import Database.HsSqlPpp.AstInternals.AstAnnotation+import Database.HsSqlPpp.AstInternals.EnvironmentInternal+import Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment+import Database.HsSqlPpp.Utils+}++{-+================================================================================++SQL top level statements++everything is chucked in here: dml, ddl, plpgsql statements++-}++DATA Statement++--queries++    | SelectStatement ann:Annotation ex:SelectExpression++-- dml++    --table targetcolumns insertdata(values or select statement) returning+    | Insert ann:Annotation+             table : String+             targetCols : StringList+             insData : SelectExpression+             returning : (Maybe SelectList)+    --tablename setitems where returning+    | Update ann:Annotation+             table : String+             assigns : SetClauseList+             whr : MaybeBoolExpression+             returning : (Maybe SelectList)+    --tablename, where, returning+    | Delete ann:Annotation+             table : String+             whr : MaybeBoolExpression+             returning : (Maybe SelectList)+    --tablename column names, from+    | Copy ann:Annotation+           table : String+           targetCols : StringList+           source : CopySource+    --represents inline data for copy statement+    | CopyData ann:Annotation insData : String+    | Truncate ann:Annotation+               tables: StringList+               restartIdentity : RestartIdentity+               cascade : Cascade++-- ddl++    | CreateTable ann:Annotation+                  name : String+                  atts : AttributeDefList+                  cons : ConstraintList+    | CreateTableAs ann:Annotation+                    name : String+                    expr : SelectExpression+    | CreateView ann:Annotation+                 name : String+                 expr : SelectExpression+    | CreateType ann:Annotation+                 name : String+                 atts : TypeAttributeDefList+    -- language name args rettype bodyquoteused body vol+    | CreateFunction ann:Annotation+                     lang : Language+                     name : String+                     params : ParamDefList+                     rettype : TypeName+                     bodyQuote : String+                     body : FnBody+                     vol : Volatility+    -- name type checkexpression+    | CreateDomain ann:Annotation+                   name : String+                   typ : TypeName+                   check : MaybeBoolExpression+    -- ifexists (name,argtypes)* cascadeorrestrict+    | DropFunction ann:Annotation+                   ifE : IfExists+                   sigs : StringStringListPairList+                   cascade : Cascade+    -- ifexists names cascadeorrestrict+    | DropSomething ann:Annotation+                    dropType : DropType+                    ifE : IfExists+                    names : StringList+                    cascade : Cascade+    | Assignment ann:Annotation+                 target : String+                 value : Expression+    | Return ann:Annotation+             value : (MaybeExpression)+    | ReturnNext ann:Annotation+                 expr : Expression+    | ReturnQuery ann:Annotation+                  sel : SelectExpression+    | Raise ann:Annotation+            level : RaiseType+            message : String+            args : ExpressionList+    | NullStatement ann:Annotation+    | Perform ann:Annotation+              expr : Expression+    | Execute ann:Annotation+              expr : Expression+    | ExecuteInto ann:Annotation+                  expr : Expression+                  targets : StringList+    | ForSelectStatement ann:Annotation+                         var : String+                         sel : SelectExpression+                         sts : StatementList+    | ForIntegerStatement ann:Annotation+                          var : String+                          from : Expression+                          to : Expression+                          sts : StatementList+    | WhileStatement ann:Annotation+                     expr : Expression+                     sts : StatementList+    | ContinueStatement ann:Annotation+    --variable, list of when parts, else part+    | CaseStatement ann:Annotation+                    val : Expression+                    cases : ExpressionListStatementListPairList+                    els : StatementList+    --list is+    --first if (condition, statements):elseifs(condition, statements)+    --last bit is else statements+    | If ann:Annotation+         cases : ExpressionStatementListPairList+         els : StatementList++-- =============================================================================++--Statement components++-- maybe this should be called relation valued expression?+DATA SelectExpression+    | Select ann:Annotation+             selDistinct : Distinct+             selSelectList : SelectList+             selTref : MaybeTableRef+             selWhere : MaybeBoolExpression+             selGroupBy : ExpressionList+             selHaving : MaybeBoolExpression+             selOrderBy : ExpressionList+             selDir : Direction+             selLimit : MaybeExpression+             selOffset : MaybeExpression+    | CombineSelect ann:Annotation+                    ctype : CombineType+                    sel1 : SelectExpression+                    sel2 : SelectExpression+    | Values ann:Annotation+             vll:ExpressionListList++TYPE MaybeTableRef = MAYBE TableRef+TYPE MaybeExpression = MAYBE Expression+TYPE MaybeBoolExpression = MAYBE Expression++DATA FnBody | SqlFnBody ann:Annotation sts : StatementList+            | PlpgsqlFnBody ann:Annotation vars:VarDefList sts : StatementList++DATA SetClause | SetClause ann:Annotation att:String val:Expression+               | RowSetClause ann:Annotation atts:StringList vals:ExpressionList++DATA TableRef | Tref ann:Annotation+                     tbl:String+              | TrefAlias ann:Annotation+                          tbl : String+                          alias : String+              | JoinedTref ann:Annotation+                           tbl : TableRef+                           nat : Natural+                           joinType : JoinType+                           tbl1 : TableRef+                           onExpr : OnExpr+              | SubTref ann:Annotation+                        sel : SelectExpression+                        alias : String+              | TrefFun ann:Annotation+                        fn:Expression+              | TrefFunAlias ann:Annotation+                             fn:Expression+                             alias:String++TYPE OnExpr = MAYBE JoinExpression++DATA JoinExpression | JoinOn ann:Annotation Expression+                    | JoinUsing ann:Annotation StringList++DATA JoinType | Inner | LeftOuter| RightOuter | FullOuter | Cross++-- select columns, into columns++DATA SelectList | SelectList ann:Annotation items:SelectItemList StringList++DATA SelectItem | SelExp ann:Annotation ex:Expression+                | SelectItem ann:Annotation ex:Expression name:String++DATA CopySource | CopyFilename String+                | Stdin++--name type default null constraint++DATA AttributeDef | AttributeDef ann:Annotation+                                 name : String+                                 typ : TypeName+                                 def: MaybeExpression+                                 cons : RowConstraintList++--Constraints which appear attached to an individual field++DATA RowConstraint | NullConstraint ann:Annotation+                   | NotNullConstraint ann:Annotation+                   | RowCheckConstraint ann:Annotation Expression+                   | RowUniqueConstraint ann:Annotation+                   | RowPrimaryKeyConstraint ann:Annotation+                   | RowReferenceConstraint ann:Annotation+                                            table : String+                                            att : (Maybe String)+                                            onUpdate : Cascade+                                            onDelete : Cascade++--constraints which appear on a separate row in the create table++DATA Constraint | UniqueConstraint ann:Annotation StringList+                | PrimaryKeyConstraint ann:Annotation StringList+                | CheckConstraint ann:Annotation Expression+                  -- sourcecols targettable targetcols ondelete onupdate+                | ReferenceConstraint ann:Annotation+                                      atts : StringList+                                      table : String+                                      tableAtts : StringList+                                      onUpdate : Cascade+                                      onDelete : Cascade++DATA TypeAttributeDef | TypeAttDef ann:Annotation+                                   name : String+                                   typ : TypeName++DATA ParamDef | ParamDef ann:Annotation name:String typ:TypeName+              | ParamDefTp ann:Annotation typ:TypeName++DATA VarDef | VarDef ann:Annotation+                     name : String+                     typ : TypeName+                     value : (Maybe Expression)++DATA RaiseType | RNotice | RException | RError++DATA CombineType | Except | Union | Intersect | UnionAll++DATA Volatility | Volatile | Stable | Immutable++DATA Language | Sql | Plpgsql++DATA TypeName | SimpleTypeName ann:Annotation tn:String+              | PrecTypeName ann:Annotation tn:String prec:Integer+              | ArrayTypeName ann:Annotation typ:TypeName+              | SetOfTypeName ann:Annotation typ:TypeName++DATA DropType | Table+              | Domain+              | View+              | Type++DATA Cascade | Cascade | Restrict++DATA Direction | Asc | Desc++DATA Distinct | Distinct | Dupes++DATA Natural | Natural | Unnatural++DATA IfExists | Require | IfExists++DATA RestartIdentity | RestartIdentity | ContinueIdentity++{-+================================================================================++Expressions++Similarly to the statement type, all expressions are chucked into one+even though there are many restrictions on which expressions can+appear in different places.  Maybe this should be called scalar+expression?++-}+DATA Expression | IntegerLit ann:Annotation i:Integer+                | FloatLit ann:Annotation d:Double+                | StringLit ann:Annotation+                            quote : String+                            value : String+                | NullLit ann:Annotation+                | BooleanLit ann:Annotation b:Bool+                | PositionalArg ann:Annotation p:Integer+                | Cast ann:Annotation+                       expr:Expression+                       tn:TypeName+                | Identifier ann:Annotation+                             i:String+                | Case ann:Annotation+                       cases : CaseExpressionListExpressionPairList+                       els : MaybeExpression+                | CaseSimple ann:Annotation+                             value : Expression+                             cases : CaseExpressionListExpressionPairList+                             els : MaybeExpression+                | Exists ann:Annotation+                         sel : SelectExpression+                | FunCall ann:Annotation+                          funName:String+                          args:ExpressionList+                | InPredicate ann:Annotation+                              expr:Expression+                              i:Bool+                              list:InList+                  -- windowfn selectitem partitionby orderby orderbyasc?+                | WindowFn ann:Annotation+                           fn : Expression+                           partitionBy : ExpressionList+                           orderBy : ExpressionList+                           dir : Direction+                | ScalarSubQuery ann:Annotation+                                 sel : SelectExpression++DATA InList | InList ann:Annotation exprs : ExpressionList+            | InSelect ann:Annotation sel : SelectExpression+++{-++list of expression flavours from postgresql with the equivalents in this ast+pg                                here+--                                ----+constant/literal                  integerlit, floatlit, unknownstringlit, nulllit, boollit+column reference                  identifier+positional parameter reference    positionalarg+subscripted expression            funcall+field selection expression        identifier+operator invocation               funcall+function call                     funcall+aggregate expression              funcall+window function call              windowfn+type cast                         cast+scalar subquery                   scalarsubquery+array constructor                 funcall+row constructor                   funall++Anything that is represented in the ast as some sort of name plus a+list of expressions as arguments is treated as the same type of node:+FunCall.++This includes+symbol operators+regular function calls+keyword operators e.g. and, like (ones which can be parsed as normal+  syntactic operators)+unusual syntax operators, e.g. between+unusual syntax function calls e.g. substring(x from 5 for 3)+arrayctors e.g. array[3,5,6]+rowctors e.g. ROW (2,4,6)+array subscripting++list of keyword operators (regular prefix, infix and postfix):+and, or, not+is null, is not null, isnull, notnull+is distinct from, is not distinct from+is true, is not true,is false, is not false, is unknown, is not unknown+like, not like, ilike, not ilike+similar to, not similar to+in, not in (don't include these here since the argument isn't always an expr)++unusual syntax operators and fn calls+between, not between, between symmetric+overlay, substring, trim+any, some, all++Most of unusual syntax forms and keywords operators are not yet+supported, so this is mainly a todo list.++Keyword operators are encoded with the function name as a ! followed+by a string+e.g.+operator 'and' -> FunCall "!and" ...+see keywordOperatorTypes value in AstUtils.lhs for the list of+currently supported keyword operators.++-}++-- some list nodes, not sure if all of these are needed as separately+-- named node types++TYPE ExpressionList = [Expression]+TYPE ExpressionListList = [ExpressionList]+TYPE StringList = [String]+TYPE SetClauseList = [SetClause]+TYPE AttributeDefList = [AttributeDef]+TYPE ConstraintList = [Constraint]+TYPE TypeAttributeDefList = [TypeAttributeDef]+TYPE ParamDefList = [ParamDef]+TYPE StringStringListPair = (String,StringList)+TYPE StringStringListPairList = [StringStringListPair]+TYPE ExpressionListStatementListPair = (ExpressionList,StatementList)+TYPE ExpressionListStatementListPairList = [ExpressionListStatementListPair]+TYPE ExpressionStatementListPair = (Expression, StatementList)+TYPE ExpressionStatementListPairList = [ExpressionStatementListPair]+TYPE VarDefList = [VarDef]+TYPE SelectItemList = [SelectItem]+TYPE RowConstraintList = [RowConstraint]+TYPE CaseExpressionListExpressionPair = (CaseExpressionList,Expression)+TYPE CaseExpressionList = [Expression]+TYPE CaseExpressionListExpressionPairList = [CaseExpressionListExpressionPair]+TYPE StatementList = [Statement]++-- Add a root data type so we can put initial values for inherited+-- attributes in the section which defines and uses those attributes+-- rather than in the sem_ calls++DATA Root | Root statements:StatementList+DERIVING Root: Show++-- use an expression root also to support type checking,+-- etc., individual expressions++DATA ExpressionRoot | ExpressionRoot expr:Expression+DERIVING ExpressionRoot: Show++{-+================================================================================++=some basic bookkeeping++attributes which every node has+-}++SET AllNodes = Statement SelectExpression FnBody SetClause TableRef+               JoinExpression JoinType+               SelectList SelectItem CopySource AttributeDef RowConstraint+               Constraint TypeAttributeDef ParamDef VarDef RaiseType+               CombineType Volatility Language TypeName DropType Cascade+               Direction Distinct Natural IfExists RestartIdentity+               Expression InList MaybeExpression MaybeBoolExpression+               ExpressionList ExpressionListList StringList SetClauseList+               AttributeDefList ConstraintList TypeAttributeDefList+               ParamDefList StringStringListPair StringStringListPairList+               StatementList ExpressionListStatementListPair+               ExpressionListStatementListPairList ExpressionStatementListPair+               ExpressionStatementListPairList VarDefList SelectItemList+               RowConstraintList CaseExpressionListExpressionPair+               CaseExpressionListExpressionPairList CaseExpressionList+               MaybeTableRef TableRef OnExpr++DERIVING AllNodes: Show,Eq,Typeable,Data+++INCLUDE "TypeChecking.ag"++{-++================================================================================++used to use record syntax to try to insulate code from field changes,+and not have to write out loads of nothings and [] for simple selects,+but don't know how to create haskell named records from uuagc DATA+things++makeSelect :: Statement+makeSelect = Select Dupes (SelectList [SelExp (Identifier "*")] [])+                   Nothing Nothing [] Nothing [] Asc Nothing Nothing+++================================================================================++= annotation functions++-}+{+-- | Takes an ast, and adds annotations, including types, type errors,+-- and statement info. Type checks against defaultEnv.+annotateAst :: StatementList -> StatementList+annotateAst = annotateAstEnv defaultTemplate1Environment+++-- | As annotateAst but you supply an environment to check+-- against. See Environment module for how to read an Environment from+-- an existing database so you can type check against it.+annotateAstEnv :: Environment -> StatementList -> StatementList+annotateAstEnv env sts =+    let t = sem_Root (Root sts)+        ta = wrap_Root t Inh_Root {env_Inh_Root = env}+        tl = annotatedTree_Syn_Root ta+   in case tl of+         Root r -> r++-- | Type check multiple asts, allowing type checking references in later+--   files to definitions in earlier files.+annotateAstsEnv :: Environment -> [StatementList] -> [StatementList]+annotateAstsEnv env sts =+    annInt env sts []+    where+      annInt e (s:ss) ress =+          let (e1,res) = annotateAstEnvEnv e s+          in annInt e1 ss (res:ress)+      annInt _ [] ress = reverse ress++-- | Type check an ast, and return the resultant Environment as well+--   as the annotated ast.+annotateAstEnvEnv :: Environment -> StatementList -> (Environment,StatementList)+annotateAstEnvEnv env sts =+    let t = sem_Root (Root sts)+        ta = wrap_Root t Inh_Root {env_Inh_Root = env}+        tl = annotatedTree_Syn_Root ta+        env1 = producedEnv_Syn_Root ta+   in case tl of+         Root r -> (env1,r)++-- | Testing utility, mainly used to check an expression for type errors+-- or to get its type.+annotateExpression :: Environment -> Expression -> Expression+annotateExpression env ex =+    let t = sem_ExpressionRoot (ExpressionRoot ex)+        rt = (annotatedTree_Syn_ExpressionRoot+              (wrap_ExpressionRoot t Inh_ExpressionRoot {env_Inh_ExpressionRoot = env}))+    in case rt of+         ExpressionRoot e -> e++}++{-++Future plans:++Investigate how much mileage can get out of making these nodes the+parse tree nodes, and using a separate ast. Hinges on how much extra+value can get from making the types more restrictive for the ast nodes+compared to the parse tree. Starting to think this won't be worth it.++Would like to turn this back into regular Haskell file, maybe could+use AspectAG instead of uuagc to make this happen?+++-}
+ Database/HsSqlPpp/AstInternals/AstInternal.hs view
@@ -0,0 +1,8793 @@+{-# OPTIONS_HADDOCK hide  #-}++-- UUAGC 0.9.10 (AstInternal.ag)+module Database.HsSqlPpp.AstInternals.AstInternal(+    -- {-# LANGUAGE DeriveDataTypeable,RankNTypes,ScopedTypeVariables #-}+    -- {-# OPTIONS_HADDOCK hide  #-}+    --from the ag files:+    --ast nodes+    Statement (..)+   ,SelectExpression (..)+   ,FnBody (..)+   ,SetClause (..)+   ,TableRef (..)+   ,JoinExpression (..)+   ,JoinType (..)+   ,SelectList (..)+   ,SelectItem (..)+   ,CopySource (..)+   ,AttributeDef (..)+   ,RowConstraint (..)+   ,Constraint (..)+   ,TypeAttributeDef (..)+   ,ParamDef (..)+   ,VarDef (..)+   ,RaiseType (..)+   ,CombineType (..)+   ,Volatility (..)+   ,Language (..)+   ,TypeName (..)+   ,DropType (..)+   ,Cascade (..)+   ,Direction (..)+   ,Distinct (..)+   ,Natural (..)+   ,IfExists (..)+   ,RestartIdentity (..)+   ,Expression (..)+   ,InList (..)+   ,StatementList+   ,ExpressionListStatementListPairList+   ,ExpressionListStatementListPair+   ,ExpressionList+   ,StringList+   ,ParamDefList+   ,AttributeDefList+   ,ConstraintList+   ,TypeAttributeDefList+   ,StringStringListPairList+   ,StringStringListPair+   ,ExpressionStatementListPairList+   ,SetClauseList+   ,CaseExpressionListExpressionPairList+   ,MaybeExpression+   ,MaybeTableRef+   ,ExpressionListList+   ,SelectItemList+   ,OnExpr+   ,RowConstraintList+   ,VarDefList+   ,ExpressionStatementListPair+   ,CaseExpressionListExpressionPair+   ,CaseExpressionList+   ,MaybeBoolExpression+   -- annotations+   ,annotateAst+   ,annotateAstEnv+   ,annotateExpression+   ,annotateAstsEnv+   ,annotateAstEnvEnv+) where++import Data.Maybe+import Data.List+import Debug.Trace+import Control.Monad.Error+import Control.Arrow+import Data.Either+import Control.Applicative+import Data.Generics++import Database.HsSqlPpp.AstInternals.TypeType+import Database.HsSqlPpp.AstInternals.TypeConversion+import Database.HsSqlPpp.AstInternals.TypeCheckingH+import Database.HsSqlPpp.AstInternals.AstAnnotation+import Database.HsSqlPpp.AstInternals.EnvironmentInternal+import Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment+import Database.HsSqlPpp.Utils++{-# LINE 603 "AstInternal.ag" #-}++-- | Takes an ast, and adds annotations, including types, type errors,+-- and statement info. Type checks against defaultEnv.+annotateAst :: StatementList -> StatementList+annotateAst = annotateAstEnv defaultTemplate1Environment+++-- | As annotateAst but you supply an environment to check+-- against. See Environment module for how to read an Environment from+-- an existing database so you can type check against it.+annotateAstEnv :: Environment -> StatementList -> StatementList+annotateAstEnv env sts =+    let t = sem_Root (Root sts)+        ta = wrap_Root t Inh_Root {env_Inh_Root = env}+        tl = annotatedTree_Syn_Root ta+   in case tl of+         Root r -> r++-- | Type check multiple asts, allowing type checking references in later+--   files to definitions in earlier files.+annotateAstsEnv :: Environment -> [StatementList] -> [StatementList]+annotateAstsEnv env sts =+    annInt env sts []+    where+      annInt e (s:ss) ress =+          let (e1,res) = annotateAstEnvEnv e s+          in annInt e1 ss (res:ress)+      annInt _ [] ress = reverse ress++-- | Type check an ast, and return the resultant Environment as well+--   as the annotated ast.+annotateAstEnvEnv :: Environment -> StatementList -> (Environment,StatementList)+annotateAstEnvEnv env sts =+    let t = sem_Root (Root sts)+        ta = wrap_Root t Inh_Root {env_Inh_Root = env}+        tl = annotatedTree_Syn_Root ta+        env1 = producedEnv_Syn_Root ta+   in case tl of+         Root r -> (env1,r)++-- | Testing utility, mainly used to check an expression for type errors+-- or to get its type.+annotateExpression :: Environment -> Expression -> Expression+annotateExpression env ex =+    let t = sem_ExpressionRoot (ExpressionRoot ex)+        rt = (annotatedTree_Syn_ExpressionRoot+              (wrap_ExpressionRoot t Inh_ExpressionRoot {env_Inh_ExpressionRoot = env}))+    in case rt of+         ExpressionRoot e -> e++{-# LINE 141 "AstInternal.hs" #-}++{-# LINE 68 "./TypeChecking.ag" #-}++annTypesAndErrors :: Data a => a -> Type -> [TypeError]+                  -> Maybe [AnnotationElement] -> a+annTypesAndErrors item nt errs add =+    updateAnnotation modifier item+    where+      modifier = (([TypeAnnotation nt] ++ fromMaybe [] add +++       map TypeErrorA errs) ++)++{-# LINE 153 "AstInternal.hs" #-}++{-# LINE 421 "./TypeChecking.ag" #-}++getTbCols c = unwrapSetOfComposite (getTypeAnnotation c)+{-# LINE 158 "AstInternal.hs" #-}++{-# LINE 496 "./TypeChecking.ag" #-}+++getFnType :: Environment -> String -> Expression -> Either [TypeError] Type+getFnType env alias =+    either Left (Right . snd) . getFunIdens env alias++getFunIdens :: Environment -> String -> Expression -> Either [TypeError] (String,Type)+getFunIdens env alias fnVal =+   case fnVal of+       FunCall _ f _ ->+           let correlationName = if alias /= ""+                                   then alias+                                   else f+           in Right (correlationName, case getTypeAnnotation fnVal of+                SetOfType (CompositeType t) -> getCompositeType t+                SetOfType x -> UnnamedCompositeType [(correlationName,x)]+                y -> UnnamedCompositeType [(correlationName,y)])+       x -> Left [ContextError "FunCall"]+   where+     getCompositeType t =+                    case getAttrs env [Composite+                                      ,TableComposite+                                      ,ViewComposite] t of+                      Just (_,_,a@(UnnamedCompositeType _), _) -> a+                      _ -> UnnamedCompositeType []+{-# LINE 186 "AstInternal.hs" #-}++{-# LINE 547 "./TypeChecking.ag" #-}+++fixStar :: Expression -> Expression+fixStar =+    everywhere (mkT fixStar')+    where+      fixStar' :: Annotation -> Annotation+      fixStar' a =+          if TypeAnnotation TypeCheckFailed `elem` a+              && any (\an ->+                       case an of+                         TypeErrorA (UnrecognisedIdentifier x) |+                           let (_,iden) = splitIdentifier x+                           in iden == "*" -> True+                         _ -> False) a+             then filter (\an -> case an of+                                   TypeAnnotation TypeCheckFailed -> False+                                   TypeErrorA (UnrecognisedIdentifier _) -> False+                                   _ -> True) a+             else a+{-# LINE 209 "AstInternal.hs" #-}++{-# LINE 633 "./TypeChecking.ag" #-}++fixedValue :: a -> a -> a -> a+fixedValue a _ _ = a+{-# LINE 215 "AstInternal.hs" #-}++{-# LINE 667 "./TypeChecking.ag" #-}++getCAtts t =+    case t of+      SetOfType (UnnamedCompositeType t) -> t+      _ -> []+{-# LINE 223 "AstInternal.hs" #-}++{-# LINE 746 "./TypeChecking.ag" #-}++getRowTypes :: [Type] -> [Type]+getRowTypes [RowCtor ts] = ts+getRowTypes ts = ts+{-# LINE 230 "AstInternal.hs" #-}+-- AttributeDef ------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         attrName             : String+         namedType            : Type+   alternatives:+      alternative AttributeDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         child def            : MaybeExpression +         child cons           : RowConstraintList +         visit 0:+            local annotatedTree : _+-}+data AttributeDef  = AttributeDef (Annotation) (String) (TypeName) (MaybeExpression) (RowConstraintList) +                   deriving ( Data,Eq,Show,Typeable)+-- cata+sem_AttributeDef :: AttributeDef  ->+                    T_AttributeDef +sem_AttributeDef (AttributeDef _ann _name _typ _def _cons )  =+    (sem_AttributeDef_AttributeDef _ann _name (sem_TypeName _typ ) (sem_MaybeExpression _def ) (sem_RowConstraintList _cons ) )+-- semantic domain+type T_AttributeDef  = Environment ->+                       ( AttributeDef,String,Type)+data Inh_AttributeDef  = Inh_AttributeDef {env_Inh_AttributeDef :: Environment}+data Syn_AttributeDef  = Syn_AttributeDef {annotatedTree_Syn_AttributeDef :: AttributeDef,attrName_Syn_AttributeDef :: String,namedType_Syn_AttributeDef :: Type}+wrap_AttributeDef :: T_AttributeDef  ->+                     Inh_AttributeDef  ->+                     Syn_AttributeDef +wrap_AttributeDef sem (Inh_AttributeDef _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType) =+             (sem _lhsIenv )+     in  (Syn_AttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType ))+sem_AttributeDef_AttributeDef :: Annotation ->+                                 String ->+                                 T_TypeName  ->+                                 T_MaybeExpression  ->+                                 T_RowConstraintList  ->+                                 T_AttributeDef +sem_AttributeDef_AttributeDef ann_ name_ typ_ def_ cons_  =+    (\ _lhsIenv ->+         (let _consOenv :: Environment+              _defOenv :: Environment+              _typOenv :: Environment+              _consIannotatedTree :: RowConstraintList+              _defIannotatedTree :: MaybeExpression+              _defIexprType :: (Maybe Type)+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: AttributeDef+              _lhsOattrName :: String+              _lhsOnamedType :: Type+              -- copy rule (down)+              _consOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 292 "AstInternal.hs" #-}+              -- copy rule (down)+              _defOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 297 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 302 "AstInternal.hs" #-}+              ( _consIannotatedTree) =+                  (cons_ _consOenv )+              ( _defIannotatedTree,_defIexprType) =+                  (def_ _defOenv )+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  AttributeDef ann_ name_ _typIannotatedTree _defIannotatedTree _consIannotatedTree+                  {-# LINE 313 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 318 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 784, column 7)+              _lhsOattrName =+                  {-# LINE 784 "./TypeChecking.ag" #-}+                  name_+                  {-# LINE 323 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 785, column 7)+              _lhsOnamedType =+                  {-# LINE 785 "./TypeChecking.ag" #-}+                  _typInamedType+                  {-# LINE 328 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType)))+-- AttributeDefList --------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         attrs                : [(String, Type)]+   alternatives:+      alternative Cons:+         child hd             : AttributeDef +         child tl             : AttributeDefList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type AttributeDefList  = [(AttributeDef)]+-- cata+sem_AttributeDefList :: AttributeDefList  ->+                        T_AttributeDefList +sem_AttributeDefList list  =+    (Prelude.foldr sem_AttributeDefList_Cons sem_AttributeDefList_Nil (Prelude.map sem_AttributeDef list) )+-- semantic domain+type T_AttributeDefList  = Environment ->+                           ( AttributeDefList,([(String, Type)]))+data Inh_AttributeDefList  = Inh_AttributeDefList {env_Inh_AttributeDefList :: Environment}+data Syn_AttributeDefList  = Syn_AttributeDefList {annotatedTree_Syn_AttributeDefList :: AttributeDefList,attrs_Syn_AttributeDefList :: [(String, Type)]}+wrap_AttributeDefList :: T_AttributeDefList  ->+                         Inh_AttributeDefList  ->+                         Syn_AttributeDefList +wrap_AttributeDefList sem (Inh_AttributeDefList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOattrs) =+             (sem _lhsIenv )+     in  (Syn_AttributeDefList _lhsOannotatedTree _lhsOattrs ))+sem_AttributeDefList_Cons :: T_AttributeDef  ->+                             T_AttributeDefList  ->+                             T_AttributeDefList +sem_AttributeDefList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: AttributeDefList+              _tlIattrs :: ([(String, Type)])+              _hdIannotatedTree :: AttributeDef+              _hdIattrName :: String+              _hdInamedType :: Type+              _lhsOannotatedTree :: AttributeDefList+              _lhsOattrs :: ([(String, Type)])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 384 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 389 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIattrs) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIattrName,_hdInamedType) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 398 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 403 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 790, column 12)+              _lhsOattrs =+                  {-# LINE 790 "./TypeChecking.ag" #-}+                  (_hdIattrName, _hdInamedType) : _tlIattrs+                  {-# LINE 408 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrs)))+sem_AttributeDefList_Nil :: T_AttributeDefList +sem_AttributeDefList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: AttributeDefList+              _lhsOattrs :: ([(String, Type)])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 419 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 424 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 791, column 11)+              _lhsOattrs =+                  {-# LINE 791 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 429 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrs)))+-- Cascade -----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cascade:+         visit 0:+            local annotatedTree : _+      alternative Restrict:+         visit 0:+            local annotatedTree : _+-}+data Cascade  = Cascade +              | Restrict +              deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Cascade :: Cascade  ->+               T_Cascade +sem_Cascade (Cascade )  =+    (sem_Cascade_Cascade )+sem_Cascade (Restrict )  =+    (sem_Cascade_Restrict )+-- semantic domain+type T_Cascade  = Environment ->+                  ( Cascade)+data Inh_Cascade  = Inh_Cascade {env_Inh_Cascade :: Environment}+data Syn_Cascade  = Syn_Cascade {annotatedTree_Syn_Cascade :: Cascade}+wrap_Cascade :: T_Cascade  ->+                Inh_Cascade  ->+                Syn_Cascade +wrap_Cascade sem (Inh_Cascade _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Cascade _lhsOannotatedTree ))+sem_Cascade_Cascade :: T_Cascade +sem_Cascade_Cascade  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Cascade+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Cascade+                  {-# LINE 476 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 481 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Cascade_Restrict :: T_Cascade +sem_Cascade_Restrict  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Cascade+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Restrict+                  {-# LINE 491 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 496 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- CaseExpressionList ------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : Expression +         child tl             : CaseExpressionList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type CaseExpressionList  = [(Expression)]+-- cata+sem_CaseExpressionList :: CaseExpressionList  ->+                          T_CaseExpressionList +sem_CaseExpressionList list  =+    (Prelude.foldr sem_CaseExpressionList_Cons sem_CaseExpressionList_Nil (Prelude.map sem_Expression list) )+-- semantic domain+type T_CaseExpressionList  = Environment ->+                             ( CaseExpressionList)+data Inh_CaseExpressionList  = Inh_CaseExpressionList {env_Inh_CaseExpressionList :: Environment}+data Syn_CaseExpressionList  = Syn_CaseExpressionList {annotatedTree_Syn_CaseExpressionList :: CaseExpressionList}+wrap_CaseExpressionList :: T_CaseExpressionList  ->+                           Inh_CaseExpressionList  ->+                           Syn_CaseExpressionList +wrap_CaseExpressionList sem (Inh_CaseExpressionList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_CaseExpressionList _lhsOannotatedTree ))+sem_CaseExpressionList_Cons :: T_Expression  ->+                               T_CaseExpressionList  ->+                               T_CaseExpressionList +sem_CaseExpressionList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: CaseExpressionList+              _hdIannotatedTree :: Expression+              _hdIliftedColumnName :: String+              _lhsOannotatedTree :: CaseExpressionList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 548 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 553 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIliftedColumnName) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 562 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 567 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_CaseExpressionList_Nil :: T_CaseExpressionList +sem_CaseExpressionList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CaseExpressionList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 577 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 582 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- CaseExpressionListExpressionPair ----------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Tuple:+         child x1             : CaseExpressionList +         child x2             : Expression +         visit 0:+            local annotatedTree : _+-}+type CaseExpressionListExpressionPair  = ( (CaseExpressionList),(Expression))+-- cata+sem_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair  ->+                                        T_CaseExpressionListExpressionPair +sem_CaseExpressionListExpressionPair ( x1,x2)  =+    (sem_CaseExpressionListExpressionPair_Tuple (sem_CaseExpressionList x1 ) (sem_Expression x2 ) )+-- semantic domain+type T_CaseExpressionListExpressionPair  = Environment ->+                                           ( CaseExpressionListExpressionPair)+data Inh_CaseExpressionListExpressionPair  = Inh_CaseExpressionListExpressionPair {env_Inh_CaseExpressionListExpressionPair :: Environment}+data Syn_CaseExpressionListExpressionPair  = Syn_CaseExpressionListExpressionPair {annotatedTree_Syn_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair}+wrap_CaseExpressionListExpressionPair :: T_CaseExpressionListExpressionPair  ->+                                         Inh_CaseExpressionListExpressionPair  ->+                                         Syn_CaseExpressionListExpressionPair +wrap_CaseExpressionListExpressionPair sem (Inh_CaseExpressionListExpressionPair _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_CaseExpressionListExpressionPair _lhsOannotatedTree ))+sem_CaseExpressionListExpressionPair_Tuple :: T_CaseExpressionList  ->+                                              T_Expression  ->+                                              T_CaseExpressionListExpressionPair +sem_CaseExpressionListExpressionPair_Tuple x1_ x2_  =+    (\ _lhsIenv ->+         (let _x2Oenv :: Environment+              _x1Oenv :: Environment+              _x2IannotatedTree :: Expression+              _x2IliftedColumnName :: String+              _x1IannotatedTree :: CaseExpressionList+              _lhsOannotatedTree :: CaseExpressionListExpressionPair+              -- copy rule (down)+              _x2Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 631 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 636 "AstInternal.hs" #-}+              ( _x2IannotatedTree,_x2IliftedColumnName) =+                  (x2_ _x2Oenv )+              ( _x1IannotatedTree) =+                  (x1_ _x1Oenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 645 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 650 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- CaseExpressionListExpressionPairList ------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : CaseExpressionListExpressionPair +         child tl             : CaseExpressionListExpressionPairList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type CaseExpressionListExpressionPairList  = [(CaseExpressionListExpressionPair)]+-- cata+sem_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList  ->+                                            T_CaseExpressionListExpressionPairList +sem_CaseExpressionListExpressionPairList list  =+    (Prelude.foldr sem_CaseExpressionListExpressionPairList_Cons sem_CaseExpressionListExpressionPairList_Nil (Prelude.map sem_CaseExpressionListExpressionPair list) )+-- semantic domain+type T_CaseExpressionListExpressionPairList  = Environment ->+                                               ( CaseExpressionListExpressionPairList)+data Inh_CaseExpressionListExpressionPairList  = Inh_CaseExpressionListExpressionPairList {env_Inh_CaseExpressionListExpressionPairList :: Environment}+data Syn_CaseExpressionListExpressionPairList  = Syn_CaseExpressionListExpressionPairList {annotatedTree_Syn_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList}+wrap_CaseExpressionListExpressionPairList :: T_CaseExpressionListExpressionPairList  ->+                                             Inh_CaseExpressionListExpressionPairList  ->+                                             Syn_CaseExpressionListExpressionPairList +wrap_CaseExpressionListExpressionPairList sem (Inh_CaseExpressionListExpressionPairList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_CaseExpressionListExpressionPairList _lhsOannotatedTree ))+sem_CaseExpressionListExpressionPairList_Cons :: T_CaseExpressionListExpressionPair  ->+                                                 T_CaseExpressionListExpressionPairList  ->+                                                 T_CaseExpressionListExpressionPairList +sem_CaseExpressionListExpressionPairList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: CaseExpressionListExpressionPairList+              _hdIannotatedTree :: CaseExpressionListExpressionPair+              _lhsOannotatedTree :: CaseExpressionListExpressionPairList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 701 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 706 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 715 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 720 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_CaseExpressionListExpressionPairList_Nil :: T_CaseExpressionListExpressionPairList +sem_CaseExpressionListExpressionPairList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 730 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 735 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- CombineType -------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Except:+         visit 0:+            local annotatedTree : _+      alternative Intersect:+         visit 0:+            local annotatedTree : _+      alternative Union:+         visit 0:+            local annotatedTree : _+      alternative UnionAll:+         visit 0:+            local annotatedTree : _+-}+data CombineType  = Except +                  | Intersect +                  | Union +                  | UnionAll +                  deriving ( Data,Eq,Show,Typeable)+-- cata+sem_CombineType :: CombineType  ->+                   T_CombineType +sem_CombineType (Except )  =+    (sem_CombineType_Except )+sem_CombineType (Intersect )  =+    (sem_CombineType_Intersect )+sem_CombineType (Union )  =+    (sem_CombineType_Union )+sem_CombineType (UnionAll )  =+    (sem_CombineType_UnionAll )+-- semantic domain+type T_CombineType  = Environment ->+                      ( CombineType)+data Inh_CombineType  = Inh_CombineType {env_Inh_CombineType :: Environment}+data Syn_CombineType  = Syn_CombineType {annotatedTree_Syn_CombineType :: CombineType}+wrap_CombineType :: T_CombineType  ->+                    Inh_CombineType  ->+                    Syn_CombineType +wrap_CombineType sem (Inh_CombineType _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_CombineType _lhsOannotatedTree ))+sem_CombineType_Except :: T_CombineType +sem_CombineType_Except  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Except+                  {-# LINE 794 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 799 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_CombineType_Intersect :: T_CombineType +sem_CombineType_Intersect  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Intersect+                  {-# LINE 809 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 814 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_CombineType_Union :: T_CombineType +sem_CombineType_Union  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Union+                  {-# LINE 824 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 829 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_CombineType_UnionAll :: T_CombineType +sem_CombineType_UnionAll  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  UnionAll+                  {-# LINE 839 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 844 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- Constraint --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative CheckConstraint:+         child ann            : {Annotation}+         child expression     : Expression +         visit 0:+            local annotatedTree : _+      alternative PrimaryKeyConstraint:+         child ann            : {Annotation}+         child stringList     : StringList +         visit 0:+            local annotatedTree : _+      alternative ReferenceConstraint:+         child ann            : {Annotation}+         child atts           : StringList +         child table          : {String}+         child tableAtts      : StringList +         child onUpdate       : Cascade +         child onDelete       : Cascade +         visit 0:+            local annotatedTree : _+      alternative UniqueConstraint:+         child ann            : {Annotation}+         child stringList     : StringList +         visit 0:+            local annotatedTree : _+-}+data Constraint  = CheckConstraint (Annotation) (Expression) +                 | PrimaryKeyConstraint (Annotation) (StringList) +                 | ReferenceConstraint (Annotation) (StringList) (String) (StringList) (Cascade) (Cascade) +                 | UniqueConstraint (Annotation) (StringList) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Constraint :: Constraint  ->+                  T_Constraint +sem_Constraint (CheckConstraint _ann _expression )  =+    (sem_Constraint_CheckConstraint _ann (sem_Expression _expression ) )+sem_Constraint (PrimaryKeyConstraint _ann _stringList )  =+    (sem_Constraint_PrimaryKeyConstraint _ann (sem_StringList _stringList ) )+sem_Constraint (ReferenceConstraint _ann _atts _table _tableAtts _onUpdate _onDelete )  =+    (sem_Constraint_ReferenceConstraint _ann (sem_StringList _atts ) _table (sem_StringList _tableAtts ) (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )+sem_Constraint (UniqueConstraint _ann _stringList )  =+    (sem_Constraint_UniqueConstraint _ann (sem_StringList _stringList ) )+-- semantic domain+type T_Constraint  = Environment ->+                     ( Constraint)+data Inh_Constraint  = Inh_Constraint {env_Inh_Constraint :: Environment}+data Syn_Constraint  = Syn_Constraint {annotatedTree_Syn_Constraint :: Constraint}+wrap_Constraint :: T_Constraint  ->+                   Inh_Constraint  ->+                   Syn_Constraint +wrap_Constraint sem (Inh_Constraint _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Constraint _lhsOannotatedTree ))+sem_Constraint_CheckConstraint :: Annotation ->+                                  T_Expression  ->+                                  T_Constraint +sem_Constraint_CheckConstraint ann_ expression_  =+    (\ _lhsIenv ->+         (let _expressionOenv :: Environment+              _expressionIannotatedTree :: Expression+              _expressionIliftedColumnName :: String+              _lhsOannotatedTree :: Constraint+              -- copy rule (down)+              _expressionOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 920 "AstInternal.hs" #-}+              ( _expressionIannotatedTree,_expressionIliftedColumnName) =+                  (expression_ _expressionOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  CheckConstraint ann_ _expressionIannotatedTree+                  {-# LINE 927 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 932 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Constraint_PrimaryKeyConstraint :: Annotation ->+                                       T_StringList  ->+                                       T_Constraint +sem_Constraint_PrimaryKeyConstraint ann_ stringList_  =+    (\ _lhsIenv ->+         (let _stringListOenv :: Environment+              _stringListIannotatedTree :: StringList+              _stringListIstrings :: ([String])+              _lhsOannotatedTree :: Constraint+              -- copy rule (down)+              _stringListOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 947 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIstrings) =+                  (stringList_ _stringListOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  PrimaryKeyConstraint ann_ _stringListIannotatedTree+                  {-# LINE 954 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 959 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Constraint_ReferenceConstraint :: Annotation ->+                                      T_StringList  ->+                                      String ->+                                      T_StringList  ->+                                      T_Cascade  ->+                                      T_Cascade  ->+                                      T_Constraint +sem_Constraint_ReferenceConstraint ann_ atts_ table_ tableAtts_ onUpdate_ onDelete_  =+    (\ _lhsIenv ->+         (let _onDeleteOenv :: Environment+              _onDeleteIannotatedTree :: Cascade+              _onUpdateOenv :: Environment+              _onUpdateIannotatedTree :: Cascade+              _tableAttsOenv :: Environment+              _tableAttsIannotatedTree :: StringList+              _tableAttsIstrings :: ([String])+              _attsOenv :: Environment+              _attsIannotatedTree :: StringList+              _attsIstrings :: ([String])+              _lhsOannotatedTree :: Constraint+              -- copy rule (down)+              _onDeleteOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 985 "AstInternal.hs" #-}+              ( _onDeleteIannotatedTree) =+                  (onDelete_ _onDeleteOenv )+              -- copy rule (down)+              _onUpdateOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 992 "AstInternal.hs" #-}+              ( _onUpdateIannotatedTree) =+                  (onUpdate_ _onUpdateOenv )+              -- copy rule (down)+              _tableAttsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 999 "AstInternal.hs" #-}+              ( _tableAttsIannotatedTree,_tableAttsIstrings) =+                  (tableAtts_ _tableAttsOenv )+              -- copy rule (down)+              _attsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1006 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIstrings) =+                  (atts_ _attsOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ReferenceConstraint ann_ _attsIannotatedTree table_ _tableAttsIannotatedTree _onUpdateIannotatedTree _onDeleteIannotatedTree+                  {-# LINE 1013 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1018 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Constraint_UniqueConstraint :: Annotation ->+                                   T_StringList  ->+                                   T_Constraint +sem_Constraint_UniqueConstraint ann_ stringList_  =+    (\ _lhsIenv ->+         (let _stringListOenv :: Environment+              _stringListIannotatedTree :: StringList+              _stringListIstrings :: ([String])+              _lhsOannotatedTree :: Constraint+              -- copy rule (down)+              _stringListOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1033 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIstrings) =+                  (stringList_ _stringListOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  UniqueConstraint ann_ _stringListIannotatedTree+                  {-# LINE 1040 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1045 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- ConstraintList ----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : Constraint +         child tl             : ConstraintList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type ConstraintList  = [(Constraint)]+-- cata+sem_ConstraintList :: ConstraintList  ->+                      T_ConstraintList +sem_ConstraintList list  =+    (Prelude.foldr sem_ConstraintList_Cons sem_ConstraintList_Nil (Prelude.map sem_Constraint list) )+-- semantic domain+type T_ConstraintList  = Environment ->+                         ( ConstraintList)+data Inh_ConstraintList  = Inh_ConstraintList {env_Inh_ConstraintList :: Environment}+data Syn_ConstraintList  = Syn_ConstraintList {annotatedTree_Syn_ConstraintList :: ConstraintList}+wrap_ConstraintList :: T_ConstraintList  ->+                       Inh_ConstraintList  ->+                       Syn_ConstraintList +wrap_ConstraintList sem (Inh_ConstraintList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_ConstraintList _lhsOannotatedTree ))+sem_ConstraintList_Cons :: T_Constraint  ->+                           T_ConstraintList  ->+                           T_ConstraintList +sem_ConstraintList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: ConstraintList+              _hdIannotatedTree :: Constraint+              _lhsOannotatedTree :: ConstraintList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1096 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1101 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 1110 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1115 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_ConstraintList_Nil :: T_ConstraintList +sem_ConstraintList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: ConstraintList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 1125 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1130 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- CopySource --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative CopyFilename:+         child string         : {String}+         visit 0:+            local annotatedTree : _+      alternative Stdin:+         visit 0:+            local annotatedTree : _+-}+data CopySource  = CopyFilename (String) +                 | Stdin +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_CopySource :: CopySource  ->+                  T_CopySource +sem_CopySource (CopyFilename _string )  =+    (sem_CopySource_CopyFilename _string )+sem_CopySource (Stdin )  =+    (sem_CopySource_Stdin )+-- semantic domain+type T_CopySource  = Environment ->+                     ( CopySource)+data Inh_CopySource  = Inh_CopySource {env_Inh_CopySource :: Environment}+data Syn_CopySource  = Syn_CopySource {annotatedTree_Syn_CopySource :: CopySource}+wrap_CopySource :: T_CopySource  ->+                   Inh_CopySource  ->+                   Syn_CopySource +wrap_CopySource sem (Inh_CopySource _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_CopySource _lhsOannotatedTree ))+sem_CopySource_CopyFilename :: String ->+                               T_CopySource +sem_CopySource_CopyFilename string_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CopySource+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  CopyFilename string_+                  {-# LINE 1179 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1184 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_CopySource_Stdin :: T_CopySource +sem_CopySource_Stdin  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: CopySource+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Stdin+                  {-# LINE 1194 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1199 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- Direction ---------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Asc:+         visit 0:+            local annotatedTree : _+      alternative Desc:+         visit 0:+            local annotatedTree : _+-}+data Direction  = Asc +                | Desc +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Direction :: Direction  ->+                 T_Direction +sem_Direction (Asc )  =+    (sem_Direction_Asc )+sem_Direction (Desc )  =+    (sem_Direction_Desc )+-- semantic domain+type T_Direction  = Environment ->+                    ( Direction)+data Inh_Direction  = Inh_Direction {env_Inh_Direction :: Environment}+data Syn_Direction  = Syn_Direction {annotatedTree_Syn_Direction :: Direction}+wrap_Direction :: T_Direction  ->+                  Inh_Direction  ->+                  Syn_Direction +wrap_Direction sem (Inh_Direction _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Direction _lhsOannotatedTree ))+sem_Direction_Asc :: T_Direction +sem_Direction_Asc  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Direction+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Asc+                  {-# LINE 1246 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1251 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Direction_Desc :: T_Direction +sem_Direction_Desc  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Direction+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Desc+                  {-# LINE 1261 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1266 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- Distinct ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Distinct:+         visit 0:+            local annotatedTree : _+      alternative Dupes:+         visit 0:+            local annotatedTree : _+-}+data Distinct  = Distinct +               | Dupes +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Distinct :: Distinct  ->+                T_Distinct +sem_Distinct (Distinct )  =+    (sem_Distinct_Distinct )+sem_Distinct (Dupes )  =+    (sem_Distinct_Dupes )+-- semantic domain+type T_Distinct  = Environment ->+                   ( Distinct)+data Inh_Distinct  = Inh_Distinct {env_Inh_Distinct :: Environment}+data Syn_Distinct  = Syn_Distinct {annotatedTree_Syn_Distinct :: Distinct}+wrap_Distinct :: T_Distinct  ->+                 Inh_Distinct  ->+                 Syn_Distinct +wrap_Distinct sem (Inh_Distinct _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Distinct _lhsOannotatedTree ))+sem_Distinct_Distinct :: T_Distinct +sem_Distinct_Distinct  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Distinct+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Distinct+                  {-# LINE 1313 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1318 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Distinct_Dupes :: T_Distinct +sem_Distinct_Dupes  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Distinct+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Dupes+                  {-# LINE 1328 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1333 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- DropType ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Domain:+         visit 0:+            local annotatedTree : _+      alternative Table:+         visit 0:+            local annotatedTree : _+      alternative Type:+         visit 0:+            local annotatedTree : _+      alternative View:+         visit 0:+            local annotatedTree : _+-}+data DropType  = Domain +               | Table +               | Type +               | View +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_DropType :: DropType  ->+                T_DropType +sem_DropType (Domain )  =+    (sem_DropType_Domain )+sem_DropType (Table )  =+    (sem_DropType_Table )+sem_DropType (Type )  =+    (sem_DropType_Type )+sem_DropType (View )  =+    (sem_DropType_View )+-- semantic domain+type T_DropType  = Environment ->+                   ( DropType)+data Inh_DropType  = Inh_DropType {env_Inh_DropType :: Environment}+data Syn_DropType  = Syn_DropType {annotatedTree_Syn_DropType :: DropType}+wrap_DropType :: T_DropType  ->+                 Inh_DropType  ->+                 Syn_DropType +wrap_DropType sem (Inh_DropType _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_DropType _lhsOannotatedTree ))+sem_DropType_Domain :: T_DropType +sem_DropType_Domain  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Domain+                  {-# LINE 1392 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1397 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_DropType_Table :: T_DropType +sem_DropType_Table  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Table+                  {-# LINE 1407 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1412 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_DropType_Type :: T_DropType +sem_DropType_Type  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Type+                  {-# LINE 1422 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1427 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_DropType_View :: T_DropType +sem_DropType_View  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  View+                  {-# LINE 1437 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1442 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- Expression --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         liftedColumnName     : String+   alternatives:+      alternative BooleanLit:+         child ann            : {Annotation}+         child b              : {Bool}+         visit 0:+            local tpe         : _+            local backTree    : _+      alternative Case:+         child ann            : {Annotation}+         child cases          : CaseExpressionListExpressionPairList +         child els            : MaybeExpression +         visit 0:+            local backTree    : _+            local thenTypes   : _+            local whenTypes   : _+            local tpe         : _+      alternative CaseSimple:+         child ann            : {Annotation}+         child value          : Expression +         child cases          : CaseExpressionListExpressionPairList +         child els            : MaybeExpression +         visit 0:+            local backTree    : _+            local thenTypes   : _+            local whenTypes   : _+            local tpe         : _+      alternative Cast:+         child ann            : {Annotation}+         child expr           : Expression +         child tn             : TypeName +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative Exists:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative FloatLit:+         child ann            : {Annotation}+         child d              : {Double}+         visit 0:+            local tpe         : _+            local backTree    : _+      alternative FunCall:+         child ann            : {Annotation}+         child funName        : {String}+         child args           : ExpressionList +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative Identifier:+         child ann            : {Annotation}+         child i              : {String}+         visit 0:+            local backTree    : _+            local tpe         : _+      alternative InPredicate:+         child ann            : {Annotation}+         child expr           : Expression +         child i              : {Bool}+         child list           : InList +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative IntegerLit:+         child ann            : {Annotation}+         child i              : {Integer}+         visit 0:+            local tpe         : _+            local backTree    : _+      alternative NullLit:+         child ann            : {Annotation}+         visit 0:+            local tpe         : _+            local backTree    : _+      alternative PositionalArg:+         child ann            : {Annotation}+         child p              : {Integer}+         visit 0:+            local annotatedTree : _+      alternative ScalarSubQuery:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative StringLit:+         child ann            : {Annotation}+         child quote          : {String}+         child value          : {String}+         visit 0:+            local tpe         : _+            local backTree    : _+      alternative WindowFn:+         child ann            : {Annotation}+         child fn             : Expression +         child partitionBy    : ExpressionList +         child orderBy        : ExpressionList +         child dir            : Direction +         visit 0:+            local annotatedTree : _+-}+data Expression  = BooleanLit (Annotation) (Bool) +                 | Case (Annotation) (CaseExpressionListExpressionPairList) (MaybeExpression) +                 | CaseSimple (Annotation) (Expression) (CaseExpressionListExpressionPairList) (MaybeExpression) +                 | Cast (Annotation) (Expression) (TypeName) +                 | Exists (Annotation) (SelectExpression) +                 | FloatLit (Annotation) (Double) +                 | FunCall (Annotation) (String) (ExpressionList) +                 | Identifier (Annotation) (String) +                 | InPredicate (Annotation) (Expression) (Bool) (InList) +                 | IntegerLit (Annotation) (Integer) +                 | NullLit (Annotation) +                 | PositionalArg (Annotation) (Integer) +                 | ScalarSubQuery (Annotation) (SelectExpression) +                 | StringLit (Annotation) (String) (String) +                 | WindowFn (Annotation) (Expression) (ExpressionList) (ExpressionList) (Direction) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Expression :: Expression  ->+                  T_Expression +sem_Expression (BooleanLit _ann _b )  =+    (sem_Expression_BooleanLit _ann _b )+sem_Expression (Case _ann _cases _els )  =+    (sem_Expression_Case _ann (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )+sem_Expression (CaseSimple _ann _value _cases _els )  =+    (sem_Expression_CaseSimple _ann (sem_Expression _value ) (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )+sem_Expression (Cast _ann _expr _tn )  =+    (sem_Expression_Cast _ann (sem_Expression _expr ) (sem_TypeName _tn ) )+sem_Expression (Exists _ann _sel )  =+    (sem_Expression_Exists _ann (sem_SelectExpression _sel ) )+sem_Expression (FloatLit _ann _d )  =+    (sem_Expression_FloatLit _ann _d )+sem_Expression (FunCall _ann _funName _args )  =+    (sem_Expression_FunCall _ann _funName (sem_ExpressionList _args ) )+sem_Expression (Identifier _ann _i )  =+    (sem_Expression_Identifier _ann _i )+sem_Expression (InPredicate _ann _expr _i _list )  =+    (sem_Expression_InPredicate _ann (sem_Expression _expr ) _i (sem_InList _list ) )+sem_Expression (IntegerLit _ann _i )  =+    (sem_Expression_IntegerLit _ann _i )+sem_Expression (NullLit _ann )  =+    (sem_Expression_NullLit _ann )+sem_Expression (PositionalArg _ann _p )  =+    (sem_Expression_PositionalArg _ann _p )+sem_Expression (ScalarSubQuery _ann _sel )  =+    (sem_Expression_ScalarSubQuery _ann (sem_SelectExpression _sel ) )+sem_Expression (StringLit _ann _quote _value )  =+    (sem_Expression_StringLit _ann _quote _value )+sem_Expression (WindowFn _ann _fn _partitionBy _orderBy _dir )  =+    (sem_Expression_WindowFn _ann (sem_Expression _fn ) (sem_ExpressionList _partitionBy ) (sem_ExpressionList _orderBy ) (sem_Direction _dir ) )+-- semantic domain+type T_Expression  = Environment ->+                     ( Expression,String)+data Inh_Expression  = Inh_Expression {env_Inh_Expression :: Environment}+data Syn_Expression  = Syn_Expression {annotatedTree_Syn_Expression :: Expression,liftedColumnName_Syn_Expression :: String}+wrap_Expression :: T_Expression  ->+                   Inh_Expression  ->+                   Syn_Expression +wrap_Expression sem (Inh_Expression _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOliftedColumnName) =+             (sem _lhsIenv )+     in  (Syn_Expression _lhsOannotatedTree _lhsOliftedColumnName ))+sem_Expression_BooleanLit :: Annotation ->+                             Bool ->+                             T_Expression +sem_Expression_BooleanLit ann_ b_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- "./TypeChecking.ag"(line 108, column 19)+              _tpe =+                  {-# LINE 108 "./TypeChecking.ag" #-}+                  Right typeBool+                  {-# LINE 1628 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 100, column 9)+              _backTree =+                  {-# LINE 100 "./TypeChecking.ag" #-}+                  BooleanLit ann_ b_+                  {-# LINE 1633 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1641 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 1646 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_Case :: Annotation ->+                       T_CaseExpressionListExpressionPairList  ->+                       T_MaybeExpression  ->+                       T_Expression +sem_Expression_Case ann_ cases_ els_  =+    (\ _lhsIenv ->+         (let _elsOenv :: Environment+              _casesOenv :: Environment+              _elsIannotatedTree :: MaybeExpression+              _elsIexprType :: (Maybe Type)+              _casesIannotatedTree :: CaseExpressionListExpressionPairList+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _elsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1665 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1670 "AstInternal.hs" #-}+              ( _elsIannotatedTree,_elsIexprType) =+                  (els_ _elsOenv )+              ( _casesIannotatedTree) =+                  (cases_ _casesOenv )+              -- "./TypeChecking.ag"(line 198, column 9)+              _backTree =+                  {-# LINE 198 "./TypeChecking.ag" #-}+                  Case ann_ _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 1679 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 184, column 9)+              _thenTypes =+                  {-# LINE 184 "./TypeChecking.ag" #-}+                  map getTypeAnnotation $+                      (map snd $ _casesIannotatedTree) +++                        maybeToList _elsIannotatedTree+                  {-# LINE 1686 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 182, column 9)+              _whenTypes =+                  {-# LINE 182 "./TypeChecking.ag" #-}+                  map getTypeAnnotation $ concatMap fst $+                  _casesIannotatedTree+                  {-# LINE 1692 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 190, column 9)+              _tpe =+                  {-# LINE 190 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed _whenTypes     $ do+                     when (any (/= typeBool) _whenTypes    ) $+                       Left [WrongTypes typeBool _whenTypes    ]+                     chainTypeCheckFailed _thenTypes     $+                              resolveResultSetType+                                _lhsIenv+                                _thenTypes+                  {-# LINE 1703 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1711 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 1716 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_CaseSimple :: Annotation ->+                             T_Expression  ->+                             T_CaseExpressionListExpressionPairList  ->+                             T_MaybeExpression  ->+                             T_Expression +sem_Expression_CaseSimple ann_ value_ cases_ els_  =+    (\ _lhsIenv ->+         (let _elsOenv :: Environment+              _casesOenv :: Environment+              _valueOenv :: Environment+              _elsIannotatedTree :: MaybeExpression+              _elsIexprType :: (Maybe Type)+              _casesIannotatedTree :: CaseExpressionListExpressionPairList+              _valueIannotatedTree :: Expression+              _valueIliftedColumnName :: String+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _elsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1739 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1744 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1749 "AstInternal.hs" #-}+              ( _elsIannotatedTree,_elsIexprType) =+                  (els_ _elsOenv )+              ( _casesIannotatedTree) =+                  (cases_ _casesOenv )+              ( _valueIannotatedTree,_valueIliftedColumnName) =+                  (value_ _valueOenv )+              -- "./TypeChecking.ag"(line 212, column 9)+              _backTree =+                  {-# LINE 212 "./TypeChecking.ag" #-}+                  CaseSimple ann_ _valueIannotatedTree _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 1760 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 184, column 9)+              _thenTypes =+                  {-# LINE 184 "./TypeChecking.ag" #-}+                  map getTypeAnnotation $+                      (map snd $ _casesIannotatedTree) +++                        maybeToList _elsIannotatedTree+                  {-# LINE 1767 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 182, column 9)+              _whenTypes =+                  {-# LINE 182 "./TypeChecking.ag" #-}+                  map getTypeAnnotation $ concatMap fst $+                  _casesIannotatedTree+                  {-# LINE 1773 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 203, column 9)+              _tpe =+                  {-# LINE 203 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed _whenTypes     $ do+                  checkWhenTypes <- resolveResultSetType+                                         _lhsIenv+                                         (getTypeAnnotation _valueIannotatedTree: _whenTypes    )+                  chainTypeCheckFailed _thenTypes     $+                             resolveResultSetType+                                      _lhsIenv+                                      _thenTypes+                  {-# LINE 1785 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1793 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  _valueIliftedColumnName+                  {-# LINE 1798 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_Cast :: Annotation ->+                       T_Expression  ->+                       T_TypeName  ->+                       T_Expression +sem_Expression_Cast ann_ expr_ tn_  =+    (\ _lhsIenv ->+         (let _tnOenv :: Environment+              _exprOenv :: Environment+              _tnIannotatedTree :: TypeName+              _tnInamedType :: Type+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _tnOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1818 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1823 "AstInternal.hs" #-}+              ( _tnIannotatedTree,_tnInamedType) =+                  (tn_ _tnOenv )+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- "./TypeChecking.ag"(line 121, column 12)+              _backTree =+                  {-# LINE 121 "./TypeChecking.ag" #-}+                  Cast ann_ _exprIannotatedTree _tnIannotatedTree+                  {-# LINE 1832 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 120, column 12)+              _tpe =+                  {-# LINE 120 "./TypeChecking.ag" #-}+                  Right $ _tnInamedType+                  {-# LINE 1837 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1845 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 649, column 10)+              _lhsOliftedColumnName =+                  {-# LINE 649 "./TypeChecking.ag" #-}+                  case _tnIannotatedTree of+                    SimpleTypeName _ tn -> tn+                    _ -> ""+                  {-# LINE 1852 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_Exists :: Annotation ->+                         T_SelectExpression  ->+                         T_Expression +sem_Expression_Exists ann_ sel_  =+    (\ _lhsIenv ->+         (let _selOenv :: Environment+              _selIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _selOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1867 "AstInternal.hs" #-}+              ( _selIannotatedTree) =+                  (sel_ _selOenv )+              -- "./TypeChecking.ag"(line 229, column 9)+              _backTree =+                  {-# LINE 229 "./TypeChecking.ag" #-}+                  Exists ann_ _selIannotatedTree+                  {-# LINE 1874 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 228, column 9)+              _tpe =+                  {-# LINE 228 "./TypeChecking.ag" #-}+                  Right typeBool+                  {-# LINE 1879 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1887 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 1892 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_FloatLit :: Annotation ->+                           Double ->+                           T_Expression +sem_Expression_FloatLit ann_ d_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- "./TypeChecking.ag"(line 107, column 17)+              _tpe =+                  {-# LINE 107 "./TypeChecking.ag" #-}+                  Right typeNumeric+                  {-# LINE 1905 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 98, column 9)+              _backTree =+                  {-# LINE 98 "./TypeChecking.ag" #-}+                  FloatLit ann_ d_+                  {-# LINE 1910 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1918 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 1923 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_FunCall :: Annotation ->+                          String ->+                          T_ExpressionList  ->+                          T_Expression +sem_Expression_FunCall ann_ funName_ args_  =+    (\ _lhsIenv ->+         (let _argsOenv :: Environment+              _argsIannotatedTree :: ExpressionList+              _argsItypeList :: ([Type])+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _argsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 1940 "AstInternal.hs" #-}+              ( _argsIannotatedTree,_argsItypeList) =+                  (args_ _argsOenv )+              -- "./TypeChecking.ag"(line 166, column 9)+              _backTree =+                  {-# LINE 166 "./TypeChecking.ag" #-}+                  FunCall ann_ funName_ _argsIannotatedTree+                  {-# LINE 1947 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 161, column 9)+              _tpe =+                  {-# LINE 161 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed _argsItypeList $+                    typeCheckFunCall+                      _lhsIenv+                      funName_+                      _argsItypeList+                  {-# LINE 1956 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1964 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 645, column 13)+              _lhsOliftedColumnName =+                  {-# LINE 645 "./TypeChecking.ag" #-}+                  if isOperatorName funName_+                     then ""+                     else funName_+                  {-# LINE 1971 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_Identifier :: Annotation ->+                             String ->+                             T_Expression +sem_Expression_Identifier ann_ i_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- "./TypeChecking.ag"(line 224, column 9)+              _backTree =+                  {-# LINE 224 "./TypeChecking.ag" #-}+                  Identifier ann_ i_+                  {-# LINE 1984 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 222, column 9)+              _tpe =+                  {-# LINE 222 "./TypeChecking.ag" #-}+                  let (correlationName,iden) = splitIdentifier i_+                  in envLookupID _lhsIenv correlationName iden+                  {-# LINE 1990 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 1998 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 644, column 16)+              _lhsOliftedColumnName =+                  {-# LINE 644 "./TypeChecking.ag" #-}+                  i_+                  {-# LINE 2003 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_InPredicate :: Annotation ->+                              T_Expression  ->+                              Bool ->+                              T_InList  ->+                              T_Expression +sem_Expression_InPredicate ann_ expr_ i_ list_  =+    (\ _lhsIenv ->+         (let _listOenv :: Environment+              _exprOenv :: Environment+              _listIannotatedTree :: InList+              _listIlistType :: (Either [TypeError] Type)+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _listOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2024 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2029 "AstInternal.hs" #-}+              ( _listIannotatedTree,_listIlistType) =+                  (list_ _listOenv )+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- "./TypeChecking.ag"(line 262, column 9)+              _backTree =+                  {-# LINE 262 "./TypeChecking.ag" #-}+                  InPredicate ann_ _exprIannotatedTree i_ _listIannotatedTree+                  {-# LINE 2038 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 256, column 9)+              _tpe =+                  {-# LINE 256 "./TypeChecking.ag" #-}+                  do+                    lt <- _listIlistType+                    ty <- resolveResultSetType+                            _lhsIenv+                            [getTypeAnnotation _exprIannotatedTree, lt]+                    return typeBool+                  {-# LINE 2048 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 2056 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  _exprIliftedColumnName+                  {-# LINE 2061 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_IntegerLit :: Annotation ->+                             Integer ->+                             T_Expression +sem_Expression_IntegerLit ann_ i_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- "./TypeChecking.ag"(line 105, column 19)+              _tpe =+                  {-# LINE 105 "./TypeChecking.ag" #-}+                  Right typeInt+                  {-# LINE 2074 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 94, column 9)+              _backTree =+                  {-# LINE 94 "./TypeChecking.ag" #-}+                  IntegerLit ann_ i_+                  {-# LINE 2079 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 2087 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 2092 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_NullLit :: Annotation ->+                          T_Expression +sem_Expression_NullLit ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- "./TypeChecking.ag"(line 110, column 16)+              _tpe =+                  {-# LINE 110 "./TypeChecking.ag" #-}+                  Right UnknownStringLit+                  {-# LINE 2104 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 102, column 9)+              _backTree =+                  {-# LINE 102 "./TypeChecking.ag" #-}+                  NullLit ann_+                  {-# LINE 2109 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 2117 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 2122 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_PositionalArg :: Annotation ->+                                Integer ->+                                T_Expression +sem_Expression_PositionalArg ann_ p_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  PositionalArg ann_ p_+                  {-# LINE 2135 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2140 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 2145 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_ScalarSubQuery :: Annotation ->+                                 T_SelectExpression  ->+                                 T_Expression +sem_Expression_ScalarSubQuery ann_ sel_  =+    (\ _lhsIenv ->+         (let _selOenv :: Environment+              _selIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _selOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2160 "AstInternal.hs" #-}+              ( _selIannotatedTree) =+                  (sel_ _selOenv )+              -- "./TypeChecking.ag"(line 249, column 9)+              _backTree =+                  {-# LINE 249 "./TypeChecking.ag" #-}+                  ScalarSubQuery ann_ _selIannotatedTree+                  {-# LINE 2167 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 240, column 9)+              _tpe =+                  {-# LINE 240 "./TypeChecking.ag" #-}+                  let selType = getTypeAnnotation _selIannotatedTree+                  in chainTypeCheckFailed [selType]+                       $ do+                         f <- map snd <$> unwrapSetOfComposite selType+                         case length f of+                              0 -> Left [InternalError "no columns in scalar subquery?"]+                              1 -> Right $ head f+                              _ -> Right $ RowCtor f+                  {-# LINE 2179 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 2187 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 2192 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_StringLit :: Annotation ->+                            String ->+                            String ->+                            T_Expression +sem_Expression_StringLit ann_ quote_ value_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- "./TypeChecking.ag"(line 106, column 18)+              _tpe =+                  {-# LINE 106 "./TypeChecking.ag" #-}+                  Right UnknownStringLit+                  {-# LINE 2206 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 96, column 9)+              _backTree =+                  {-# LINE 96 "./TypeChecking.ag" #-}+                  StringLit ann_ quote_ value_+                  {-# LINE 2211 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 83, column 9)+              _lhsOannotatedTree =+                  {-# LINE 83 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 2219 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 2224 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+sem_Expression_WindowFn :: Annotation ->+                           T_Expression  ->+                           T_ExpressionList  ->+                           T_ExpressionList  ->+                           T_Direction  ->+                           T_Expression +sem_Expression_WindowFn ann_ fn_ partitionBy_ orderBy_ dir_  =+    (\ _lhsIenv ->+         (let _orderByOenv :: Environment+              _partitionByOenv :: Environment+              _fnOenv :: Environment+              _dirOenv :: Environment+              _dirIannotatedTree :: Direction+              _orderByIannotatedTree :: ExpressionList+              _orderByItypeList :: ([Type])+              _partitionByIannotatedTree :: ExpressionList+              _partitionByItypeList :: ([Type])+              _fnIannotatedTree :: Expression+              _fnIliftedColumnName :: String+              _lhsOannotatedTree :: Expression+              _lhsOliftedColumnName :: String+              -- copy rule (down)+              _orderByOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2251 "AstInternal.hs" #-}+              -- copy rule (down)+              _partitionByOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2256 "AstInternal.hs" #-}+              -- copy rule (down)+              _fnOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2261 "AstInternal.hs" #-}+              -- copy rule (down)+              _dirOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2266 "AstInternal.hs" #-}+              ( _dirIannotatedTree) =+                  (dir_ _dirOenv )+              ( _orderByIannotatedTree,_orderByItypeList) =+                  (orderBy_ _orderByOenv )+              ( _partitionByIannotatedTree,_partitionByItypeList) =+                  (partitionBy_ _partitionByOenv )+              ( _fnIannotatedTree,_fnIliftedColumnName) =+                  (fn_ _fnOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  WindowFn ann_ _fnIannotatedTree _partitionByIannotatedTree _orderByIannotatedTree _dirIannotatedTree+                  {-# LINE 2279 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2284 "AstInternal.hs" #-}+              -- use rule "./TypeChecking.ag"(line 631, column 37)+              _lhsOliftedColumnName =+                  {-# LINE 631 "./TypeChecking.ag" #-}+                  _fnIliftedColumnName+                  {-# LINE 2289 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))+-- ExpressionList ----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         typeList             : [Type]+   alternatives:+      alternative Cons:+         child hd             : Expression +         child tl             : ExpressionList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type ExpressionList  = [(Expression)]+-- cata+sem_ExpressionList :: ExpressionList  ->+                      T_ExpressionList +sem_ExpressionList list  =+    (Prelude.foldr sem_ExpressionList_Cons sem_ExpressionList_Nil (Prelude.map sem_Expression list) )+-- semantic domain+type T_ExpressionList  = Environment ->+                         ( ExpressionList,([Type]))+data Inh_ExpressionList  = Inh_ExpressionList {env_Inh_ExpressionList :: Environment}+data Syn_ExpressionList  = Syn_ExpressionList {annotatedTree_Syn_ExpressionList :: ExpressionList,typeList_Syn_ExpressionList :: [Type]}+wrap_ExpressionList :: T_ExpressionList  ->+                       Inh_ExpressionList  ->+                       Syn_ExpressionList +wrap_ExpressionList sem (Inh_ExpressionList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOtypeList) =+             (sem _lhsIenv )+     in  (Syn_ExpressionList _lhsOannotatedTree _lhsOtypeList ))+sem_ExpressionList_Cons :: T_Expression  ->+                           T_ExpressionList  ->+                           T_ExpressionList +sem_ExpressionList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: ExpressionList+              _tlItypeList :: ([Type])+              _hdIannotatedTree :: Expression+              _hdIliftedColumnName :: String+              _lhsOannotatedTree :: ExpressionList+              _lhsOtypeList :: ([Type])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2344 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2349 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlItypeList) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIliftedColumnName) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 2358 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2363 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 289, column 12)+              _lhsOtypeList =+                  {-# LINE 289 "./TypeChecking.ag" #-}+                  getTypeAnnotation _hdIannotatedTree : _tlItypeList+                  {-# LINE 2368 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOtypeList)))+sem_ExpressionList_Nil :: T_ExpressionList +sem_ExpressionList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: ExpressionList+              _lhsOtypeList :: ([Type])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2379 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2384 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 290, column 11)+              _lhsOtypeList =+                  {-# LINE 290 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2389 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOtypeList)))+-- ExpressionListList ------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         typeListList         : [[Type]]+   alternatives:+      alternative Cons:+         child hd             : ExpressionList +         child tl             : ExpressionListList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type ExpressionListList  = [(ExpressionList)]+-- cata+sem_ExpressionListList :: ExpressionListList  ->+                          T_ExpressionListList +sem_ExpressionListList list  =+    (Prelude.foldr sem_ExpressionListList_Cons sem_ExpressionListList_Nil (Prelude.map sem_ExpressionList list) )+-- semantic domain+type T_ExpressionListList  = Environment ->+                             ( ExpressionListList,([[Type]]))+data Inh_ExpressionListList  = Inh_ExpressionListList {env_Inh_ExpressionListList :: Environment}+data Syn_ExpressionListList  = Syn_ExpressionListList {annotatedTree_Syn_ExpressionListList :: ExpressionListList,typeListList_Syn_ExpressionListList :: [[Type]]}+wrap_ExpressionListList :: T_ExpressionListList  ->+                           Inh_ExpressionListList  ->+                           Syn_ExpressionListList +wrap_ExpressionListList sem (Inh_ExpressionListList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOtypeListList) =+             (sem _lhsIenv )+     in  (Syn_ExpressionListList _lhsOannotatedTree _lhsOtypeListList ))+sem_ExpressionListList_Cons :: T_ExpressionList  ->+                               T_ExpressionListList  ->+                               T_ExpressionListList +sem_ExpressionListList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: ExpressionListList+              _tlItypeListList :: ([[Type]])+              _hdIannotatedTree :: ExpressionList+              _hdItypeList :: ([Type])+              _lhsOannotatedTree :: ExpressionListList+              _lhsOtypeListList :: ([[Type]])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2444 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2449 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlItypeListList) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdItypeList) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 2458 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2463 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 296, column 12)+              _lhsOtypeListList =+                  {-# LINE 296 "./TypeChecking.ag" #-}+                  _hdItypeList : _tlItypeListList+                  {-# LINE 2468 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOtypeListList)))+sem_ExpressionListList_Nil :: T_ExpressionListList +sem_ExpressionListList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: ExpressionListList+              _lhsOtypeListList :: ([[Type]])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2479 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2484 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 297, column 11)+              _lhsOtypeListList =+                  {-# LINE 297 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2489 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOtypeListList)))+-- ExpressionListStatementListPair -----------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Tuple:+         child x1             : ExpressionList +         child x2             : StatementList +         visit 0:+            local annotatedTree : _+-}+type ExpressionListStatementListPair  = ( (ExpressionList),(StatementList))+-- cata+sem_ExpressionListStatementListPair :: ExpressionListStatementListPair  ->+                                       T_ExpressionListStatementListPair +sem_ExpressionListStatementListPair ( x1,x2)  =+    (sem_ExpressionListStatementListPair_Tuple (sem_ExpressionList x1 ) (sem_StatementList x2 ) )+-- semantic domain+type T_ExpressionListStatementListPair  = Environment ->+                                          ( ExpressionListStatementListPair)+data Inh_ExpressionListStatementListPair  = Inh_ExpressionListStatementListPair {env_Inh_ExpressionListStatementListPair :: Environment}+data Syn_ExpressionListStatementListPair  = Syn_ExpressionListStatementListPair {annotatedTree_Syn_ExpressionListStatementListPair :: ExpressionListStatementListPair}+wrap_ExpressionListStatementListPair :: T_ExpressionListStatementListPair  ->+                                        Inh_ExpressionListStatementListPair  ->+                                        Syn_ExpressionListStatementListPair +wrap_ExpressionListStatementListPair sem (Inh_ExpressionListStatementListPair _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_ExpressionListStatementListPair _lhsOannotatedTree ))+sem_ExpressionListStatementListPair_Tuple :: T_ExpressionList  ->+                                             T_StatementList  ->+                                             T_ExpressionListStatementListPair +sem_ExpressionListStatementListPair_Tuple x1_ x2_  =+    (\ _lhsIenv ->+         (let _x2Oenv :: Environment+              _x1Oenv :: Environment+              _x2OenvUpdates :: ([EnvironmentUpdate])+              _x2IannotatedTree :: StatementList+              _x2IproducedEnv :: Environment+              _x1IannotatedTree :: ExpressionList+              _x1ItypeList :: ([Type])+              _lhsOannotatedTree :: ExpressionListStatementListPair+              -- copy rule (down)+              _x2Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2540 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2545 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 346, column 13)+              _x2OenvUpdates =+                  {-# LINE 346 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2550 "AstInternal.hs" #-}+              ( _x2IannotatedTree,_x2IproducedEnv) =+                  (x2_ _x2Oenv _x2OenvUpdates )+              ( _x1IannotatedTree,_x1ItypeList) =+                  (x1_ _x1Oenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 2559 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2564 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- ExpressionListStatementListPairList -------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : ExpressionListStatementListPair +         child tl             : ExpressionListStatementListPairList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type ExpressionListStatementListPairList  = [(ExpressionListStatementListPair)]+-- cata+sem_ExpressionListStatementListPairList :: ExpressionListStatementListPairList  ->+                                           T_ExpressionListStatementListPairList +sem_ExpressionListStatementListPairList list  =+    (Prelude.foldr sem_ExpressionListStatementListPairList_Cons sem_ExpressionListStatementListPairList_Nil (Prelude.map sem_ExpressionListStatementListPair list) )+-- semantic domain+type T_ExpressionListStatementListPairList  = Environment ->+                                              ( ExpressionListStatementListPairList)+data Inh_ExpressionListStatementListPairList  = Inh_ExpressionListStatementListPairList {env_Inh_ExpressionListStatementListPairList :: Environment}+data Syn_ExpressionListStatementListPairList  = Syn_ExpressionListStatementListPairList {annotatedTree_Syn_ExpressionListStatementListPairList :: ExpressionListStatementListPairList}+wrap_ExpressionListStatementListPairList :: T_ExpressionListStatementListPairList  ->+                                            Inh_ExpressionListStatementListPairList  ->+                                            Syn_ExpressionListStatementListPairList +wrap_ExpressionListStatementListPairList sem (Inh_ExpressionListStatementListPairList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_ExpressionListStatementListPairList _lhsOannotatedTree ))+sem_ExpressionListStatementListPairList_Cons :: T_ExpressionListStatementListPair  ->+                                                T_ExpressionListStatementListPairList  ->+                                                T_ExpressionListStatementListPairList +sem_ExpressionListStatementListPairList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: ExpressionListStatementListPairList+              _hdIannotatedTree :: ExpressionListStatementListPair+              _lhsOannotatedTree :: ExpressionListStatementListPairList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2615 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2620 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 2629 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2634 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_ExpressionListStatementListPairList_Nil :: T_ExpressionListStatementListPairList +sem_ExpressionListStatementListPairList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: ExpressionListStatementListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2644 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2649 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- ExpressionRoot ----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative ExpressionRoot:+         child expr           : Expression +         visit 0:+            local annotatedTree : _+-}+data ExpressionRoot  = ExpressionRoot (Expression) +                     deriving ( Show)+-- cata+sem_ExpressionRoot :: ExpressionRoot  ->+                      T_ExpressionRoot +sem_ExpressionRoot (ExpressionRoot _expr )  =+    (sem_ExpressionRoot_ExpressionRoot (sem_Expression _expr ) )+-- semantic domain+type T_ExpressionRoot  = Environment ->+                         ( ExpressionRoot)+data Inh_ExpressionRoot  = Inh_ExpressionRoot {env_Inh_ExpressionRoot :: Environment}+data Syn_ExpressionRoot  = Syn_ExpressionRoot {annotatedTree_Syn_ExpressionRoot :: ExpressionRoot}+wrap_ExpressionRoot :: T_ExpressionRoot  ->+                       Inh_ExpressionRoot  ->+                       Syn_ExpressionRoot +wrap_ExpressionRoot sem (Inh_ExpressionRoot _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_ExpressionRoot _lhsOannotatedTree ))+sem_ExpressionRoot_ExpressionRoot :: T_Expression  ->+                                     T_ExpressionRoot +sem_ExpressionRoot_ExpressionRoot expr_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: ExpressionRoot+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2695 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ExpressionRoot _exprIannotatedTree+                  {-# LINE 2702 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2707 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- ExpressionStatementListPair ---------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Tuple:+         child x1             : Expression +         child x2             : StatementList +         visit 0:+            local annotatedTree : _+-}+type ExpressionStatementListPair  = ( (Expression),(StatementList))+-- cata+sem_ExpressionStatementListPair :: ExpressionStatementListPair  ->+                                   T_ExpressionStatementListPair +sem_ExpressionStatementListPair ( x1,x2)  =+    (sem_ExpressionStatementListPair_Tuple (sem_Expression x1 ) (sem_StatementList x2 ) )+-- semantic domain+type T_ExpressionStatementListPair  = Environment ->+                                      ( ExpressionStatementListPair)+data Inh_ExpressionStatementListPair  = Inh_ExpressionStatementListPair {env_Inh_ExpressionStatementListPair :: Environment}+data Syn_ExpressionStatementListPair  = Syn_ExpressionStatementListPair {annotatedTree_Syn_ExpressionStatementListPair :: ExpressionStatementListPair}+wrap_ExpressionStatementListPair :: T_ExpressionStatementListPair  ->+                                    Inh_ExpressionStatementListPair  ->+                                    Syn_ExpressionStatementListPair +wrap_ExpressionStatementListPair sem (Inh_ExpressionStatementListPair _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_ExpressionStatementListPair _lhsOannotatedTree ))+sem_ExpressionStatementListPair_Tuple :: T_Expression  ->+                                         T_StatementList  ->+                                         T_ExpressionStatementListPair +sem_ExpressionStatementListPair_Tuple x1_ x2_  =+    (\ _lhsIenv ->+         (let _x2Oenv :: Environment+              _x1Oenv :: Environment+              _x2OenvUpdates :: ([EnvironmentUpdate])+              _x2IannotatedTree :: StatementList+              _x2IproducedEnv :: Environment+              _x1IannotatedTree :: Expression+              _x1IliftedColumnName :: String+              _lhsOannotatedTree :: ExpressionStatementListPair+              -- copy rule (down)+              _x2Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2758 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2763 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 348, column 13)+              _x2OenvUpdates =+                  {-# LINE 348 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2768 "AstInternal.hs" #-}+              ( _x2IannotatedTree,_x2IproducedEnv) =+                  (x2_ _x2Oenv _x2OenvUpdates )+              ( _x1IannotatedTree,_x1IliftedColumnName) =+                  (x1_ _x1Oenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 2777 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2782 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- ExpressionStatementListPairList -----------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : ExpressionStatementListPair +         child tl             : ExpressionStatementListPairList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type ExpressionStatementListPairList  = [(ExpressionStatementListPair)]+-- cata+sem_ExpressionStatementListPairList :: ExpressionStatementListPairList  ->+                                       T_ExpressionStatementListPairList +sem_ExpressionStatementListPairList list  =+    (Prelude.foldr sem_ExpressionStatementListPairList_Cons sem_ExpressionStatementListPairList_Nil (Prelude.map sem_ExpressionStatementListPair list) )+-- semantic domain+type T_ExpressionStatementListPairList  = Environment ->+                                          ( ExpressionStatementListPairList)+data Inh_ExpressionStatementListPairList  = Inh_ExpressionStatementListPairList {env_Inh_ExpressionStatementListPairList :: Environment}+data Syn_ExpressionStatementListPairList  = Syn_ExpressionStatementListPairList {annotatedTree_Syn_ExpressionStatementListPairList :: ExpressionStatementListPairList}+wrap_ExpressionStatementListPairList :: T_ExpressionStatementListPairList  ->+                                        Inh_ExpressionStatementListPairList  ->+                                        Syn_ExpressionStatementListPairList +wrap_ExpressionStatementListPairList sem (Inh_ExpressionStatementListPairList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_ExpressionStatementListPairList _lhsOannotatedTree ))+sem_ExpressionStatementListPairList_Cons :: T_ExpressionStatementListPair  ->+                                            T_ExpressionStatementListPairList  ->+                                            T_ExpressionStatementListPairList +sem_ExpressionStatementListPairList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: ExpressionStatementListPairList+              _hdIannotatedTree :: ExpressionStatementListPair+              _lhsOannotatedTree :: ExpressionStatementListPairList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2833 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2838 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 2847 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2852 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_ExpressionStatementListPairList_Nil :: T_ExpressionStatementListPairList +sem_ExpressionStatementListPairList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: ExpressionStatementListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2862 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2867 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- FnBody ------------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative PlpgsqlFnBody:+         child ann            : {Annotation}+         child vars           : VarDefList +         child sts            : StatementList +         visit 0:+            local annotatedTree : _+      alternative SqlFnBody:+         child ann            : {Annotation}+         child sts            : StatementList +         visit 0:+            local annotatedTree : _+-}+data FnBody  = PlpgsqlFnBody (Annotation) (VarDefList) (StatementList) +             | SqlFnBody (Annotation) (StatementList) +             deriving ( Data,Eq,Show,Typeable)+-- cata+sem_FnBody :: FnBody  ->+              T_FnBody +sem_FnBody (PlpgsqlFnBody _ann _vars _sts )  =+    (sem_FnBody_PlpgsqlFnBody _ann (sem_VarDefList _vars ) (sem_StatementList _sts ) )+sem_FnBody (SqlFnBody _ann _sts )  =+    (sem_FnBody_SqlFnBody _ann (sem_StatementList _sts ) )+-- semantic domain+type T_FnBody  = Environment ->+                 ( FnBody)+data Inh_FnBody  = Inh_FnBody {env_Inh_FnBody :: Environment}+data Syn_FnBody  = Syn_FnBody {annotatedTree_Syn_FnBody :: FnBody}+wrap_FnBody :: T_FnBody  ->+               Inh_FnBody  ->+               Syn_FnBody +wrap_FnBody sem (Inh_FnBody _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_FnBody _lhsOannotatedTree ))+sem_FnBody_PlpgsqlFnBody :: Annotation ->+                            T_VarDefList  ->+                            T_StatementList  ->+                            T_FnBody +sem_FnBody_PlpgsqlFnBody ann_ vars_ sts_  =+    (\ _lhsIenv ->+         (let _varsOenv :: Environment+              _varsIannotatedTree :: VarDefList+              _varsIdefs :: ([(String,Type)])+              _stsOenv :: Environment+              _stsOenvUpdates :: ([EnvironmentUpdate])+              _stsIannotatedTree :: StatementList+              _stsIproducedEnv :: Environment+              _lhsOannotatedTree :: FnBody+              -- copy rule (down)+              _varsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2929 "AstInternal.hs" #-}+              ( _varsIannotatedTree,_varsIdefs) =+                  (vars_ _varsOenv )+              -- "./TypeChecking.ag"(line 938, column 9)+              _stsOenv =+                  {-# LINE 938 "./TypeChecking.ag" #-}+                  fromRight _lhsIenv $ updateEnvironment _lhsIenv [EnvStackIDs [("", _varsIdefs)]]+                  {-# LINE 2936 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 350, column 31)+              _stsOenvUpdates =+                  {-# LINE 350 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2941 "AstInternal.hs" #-}+              ( _stsIannotatedTree,_stsIproducedEnv) =+                  (sts_ _stsOenv _stsOenvUpdates )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  PlpgsqlFnBody ann_ _varsIannotatedTree _stsIannotatedTree+                  {-# LINE 2948 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2953 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_FnBody_SqlFnBody :: Annotation ->+                        T_StatementList  ->+                        T_FnBody +sem_FnBody_SqlFnBody ann_ sts_  =+    (\ _lhsIenv ->+         (let _stsOenv :: Environment+              _stsOenvUpdates :: ([EnvironmentUpdate])+              _stsIannotatedTree :: StatementList+              _stsIproducedEnv :: Environment+              _lhsOannotatedTree :: FnBody+              -- copy rule (down)+              _stsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 2969 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 350, column 31)+              _stsOenvUpdates =+                  {-# LINE 350 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 2974 "AstInternal.hs" #-}+              ( _stsIannotatedTree,_stsIproducedEnv) =+                  (sts_ _stsOenv _stsOenvUpdates )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  SqlFnBody ann_ _stsIannotatedTree+                  {-# LINE 2981 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2986 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- IfExists ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative IfExists:+         visit 0:+            local annotatedTree : _+      alternative Require:+         visit 0:+            local annotatedTree : _+-}+data IfExists  = IfExists +               | Require +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_IfExists :: IfExists  ->+                T_IfExists +sem_IfExists (IfExists )  =+    (sem_IfExists_IfExists )+sem_IfExists (Require )  =+    (sem_IfExists_Require )+-- semantic domain+type T_IfExists  = Environment ->+                   ( IfExists)+data Inh_IfExists  = Inh_IfExists {env_Inh_IfExists :: Environment}+data Syn_IfExists  = Syn_IfExists {annotatedTree_Syn_IfExists :: IfExists}+wrap_IfExists :: T_IfExists  ->+                 Inh_IfExists  ->+                 Syn_IfExists +wrap_IfExists sem (Inh_IfExists _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_IfExists _lhsOannotatedTree ))+sem_IfExists_IfExists :: T_IfExists +sem_IfExists_IfExists  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: IfExists+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  IfExists+                  {-# LINE 3033 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3038 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_IfExists_Require :: T_IfExists +sem_IfExists_Require  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: IfExists+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Require+                  {-# LINE 3048 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3053 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- InList ------------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         listType             : Either [TypeError] Type+   alternatives:+      alternative InList:+         child ann            : {Annotation}+         child exprs          : ExpressionList +         visit 0:+            local annotatedTree : _+      alternative InSelect:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local annotatedTree : _+-}+data InList  = InList (Annotation) (ExpressionList) +             | InSelect (Annotation) (SelectExpression) +             deriving ( Data,Eq,Show,Typeable)+-- cata+sem_InList :: InList  ->+              T_InList +sem_InList (InList _ann _exprs )  =+    (sem_InList_InList _ann (sem_ExpressionList _exprs ) )+sem_InList (InSelect _ann _sel )  =+    (sem_InList_InSelect _ann (sem_SelectExpression _sel ) )+-- semantic domain+type T_InList  = Environment ->+                 ( InList,(Either [TypeError] Type))+data Inh_InList  = Inh_InList {env_Inh_InList :: Environment}+data Syn_InList  = Syn_InList {annotatedTree_Syn_InList :: InList,listType_Syn_InList :: Either [TypeError] Type}+wrap_InList :: T_InList  ->+               Inh_InList  ->+               Syn_InList +wrap_InList sem (Inh_InList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOlistType) =+             (sem _lhsIenv )+     in  (Syn_InList _lhsOannotatedTree _lhsOlistType ))+sem_InList_InList :: Annotation ->+                     T_ExpressionList  ->+                     T_InList +sem_InList_InList ann_ exprs_  =+    (\ _lhsIenv ->+         (let _exprsOenv :: Environment+              _exprsIannotatedTree :: ExpressionList+              _exprsItypeList :: ([Type])+              _lhsOannotatedTree :: InList+              _lhsOlistType :: (Either [TypeError] Type)+              -- copy rule (down)+              _exprsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3111 "AstInternal.hs" #-}+              ( _exprsIannotatedTree,_exprsItypeList) =+                  (exprs_ _exprsOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  InList ann_ _exprsIannotatedTree+                  {-# LINE 3118 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3123 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 269, column 9)+              _lhsOlistType =+                  {-# LINE 269 "./TypeChecking.ag" #-}+                  resolveResultSetType+                    _lhsIenv+                    _exprsItypeList+                  {-# LINE 3130 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType)))+sem_InList_InSelect :: Annotation ->+                       T_SelectExpression  ->+                       T_InList +sem_InList_InSelect ann_ sel_  =+    (\ _lhsIenv ->+         (let _selOenv :: Environment+              _selIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: InList+              _lhsOlistType :: (Either [TypeError] Type)+              -- copy rule (down)+              _selOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3145 "AstInternal.hs" #-}+              ( _selIannotatedTree) =+                  (sel_ _selOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  InSelect ann_ _selIannotatedTree+                  {-# LINE 3152 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3157 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 273, column 9)+              _lhsOlistType =+                  {-# LINE 273 "./TypeChecking.ag" #-}+                  do+                    attrs <-  map snd <$> (unwrapSetOfComposite $+                                let a = getTypeAnnotation _selIannotatedTree+                                in                                      a)+                    typ <- case length attrs of+                                 0 -> Left [InternalError "got subquery with no columns? in inselect"]+                                 1 -> Right $ head attrs+                                 _ -> Right $ RowCtor attrs+                    chainTypeCheckFailed attrs $ Right typ+                  {-# LINE 3170 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType)))+-- JoinExpression ----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative JoinOn:+         child ann            : {Annotation}+         child expression     : Expression +         visit 0:+            local annotatedTree : _+      alternative JoinUsing:+         child ann            : {Annotation}+         child stringList     : StringList +         visit 0:+            local annotatedTree : _+-}+data JoinExpression  = JoinOn (Annotation) (Expression) +                     | JoinUsing (Annotation) (StringList) +                     deriving ( Data,Eq,Show,Typeable)+-- cata+sem_JoinExpression :: JoinExpression  ->+                      T_JoinExpression +sem_JoinExpression (JoinOn _ann _expression )  =+    (sem_JoinExpression_JoinOn _ann (sem_Expression _expression ) )+sem_JoinExpression (JoinUsing _ann _stringList )  =+    (sem_JoinExpression_JoinUsing _ann (sem_StringList _stringList ) )+-- semantic domain+type T_JoinExpression  = Environment ->+                         ( JoinExpression)+data Inh_JoinExpression  = Inh_JoinExpression {env_Inh_JoinExpression :: Environment}+data Syn_JoinExpression  = Syn_JoinExpression {annotatedTree_Syn_JoinExpression :: JoinExpression}+wrap_JoinExpression :: T_JoinExpression  ->+                       Inh_JoinExpression  ->+                       Syn_JoinExpression +wrap_JoinExpression sem (Inh_JoinExpression _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_JoinExpression _lhsOannotatedTree ))+sem_JoinExpression_JoinOn :: Annotation ->+                             T_Expression  ->+                             T_JoinExpression +sem_JoinExpression_JoinOn ann_ expression_  =+    (\ _lhsIenv ->+         (let _expressionOenv :: Environment+              _expressionIannotatedTree :: Expression+              _expressionIliftedColumnName :: String+              _lhsOannotatedTree :: JoinExpression+              -- copy rule (down)+              _expressionOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3226 "AstInternal.hs" #-}+              ( _expressionIannotatedTree,_expressionIliftedColumnName) =+                  (expression_ _expressionOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  JoinOn ann_ _expressionIannotatedTree+                  {-# LINE 3233 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3238 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_JoinExpression_JoinUsing :: Annotation ->+                                T_StringList  ->+                                T_JoinExpression +sem_JoinExpression_JoinUsing ann_ stringList_  =+    (\ _lhsIenv ->+         (let _stringListOenv :: Environment+              _stringListIannotatedTree :: StringList+              _stringListIstrings :: ([String])+              _lhsOannotatedTree :: JoinExpression+              -- copy rule (down)+              _stringListOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3253 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIstrings) =+                  (stringList_ _stringListOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  JoinUsing ann_ _stringListIannotatedTree+                  {-# LINE 3260 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3265 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- JoinType ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cross:+         visit 0:+            local annotatedTree : _+      alternative FullOuter:+         visit 0:+            local annotatedTree : _+      alternative Inner:+         visit 0:+            local annotatedTree : _+      alternative LeftOuter:+         visit 0:+            local annotatedTree : _+      alternative RightOuter:+         visit 0:+            local annotatedTree : _+-}+data JoinType  = Cross +               | FullOuter +               | Inner +               | LeftOuter +               | RightOuter +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_JoinType :: JoinType  ->+                T_JoinType +sem_JoinType (Cross )  =+    (sem_JoinType_Cross )+sem_JoinType (FullOuter )  =+    (sem_JoinType_FullOuter )+sem_JoinType (Inner )  =+    (sem_JoinType_Inner )+sem_JoinType (LeftOuter )  =+    (sem_JoinType_LeftOuter )+sem_JoinType (RightOuter )  =+    (sem_JoinType_RightOuter )+-- semantic domain+type T_JoinType  = Environment ->+                   ( JoinType)+data Inh_JoinType  = Inh_JoinType {env_Inh_JoinType :: Environment}+data Syn_JoinType  = Syn_JoinType {annotatedTree_Syn_JoinType :: JoinType}+wrap_JoinType :: T_JoinType  ->+                 Inh_JoinType  ->+                 Syn_JoinType +wrap_JoinType sem (Inh_JoinType _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_JoinType _lhsOannotatedTree ))+sem_JoinType_Cross :: T_JoinType +sem_JoinType_Cross  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Cross+                  {-# LINE 3330 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3335 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_JoinType_FullOuter :: T_JoinType +sem_JoinType_FullOuter  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  FullOuter+                  {-# LINE 3345 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3350 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_JoinType_Inner :: T_JoinType +sem_JoinType_Inner  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Inner+                  {-# LINE 3360 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3365 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_JoinType_LeftOuter :: T_JoinType +sem_JoinType_LeftOuter  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  LeftOuter+                  {-# LINE 3375 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3380 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_JoinType_RightOuter :: T_JoinType +sem_JoinType_RightOuter  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RightOuter+                  {-# LINE 3390 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3395 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- Language ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Plpgsql:+         visit 0:+            local annotatedTree : _+      alternative Sql:+         visit 0:+            local annotatedTree : _+-}+data Language  = Plpgsql +               | Sql +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Language :: Language  ->+                T_Language +sem_Language (Plpgsql )  =+    (sem_Language_Plpgsql )+sem_Language (Sql )  =+    (sem_Language_Sql )+-- semantic domain+type T_Language  = Environment ->+                   ( Language)+data Inh_Language  = Inh_Language {env_Inh_Language :: Environment}+data Syn_Language  = Syn_Language {annotatedTree_Syn_Language :: Language}+wrap_Language :: T_Language  ->+                 Inh_Language  ->+                 Syn_Language +wrap_Language sem (Inh_Language _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Language _lhsOannotatedTree ))+sem_Language_Plpgsql :: T_Language +sem_Language_Plpgsql  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Language+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Plpgsql+                  {-# LINE 3442 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3447 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Language_Sql :: T_Language +sem_Language_Sql  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Language+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Sql+                  {-# LINE 3457 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3462 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- MaybeBoolExpression -----------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Just:+         child just           : Expression +      alternative Nothing:+         visit 0:+            local annotatedTree : _+-}+type MaybeBoolExpression  = (Maybe (Expression))+-- cata+sem_MaybeBoolExpression :: MaybeBoolExpression  ->+                           T_MaybeBoolExpression +sem_MaybeBoolExpression (Prelude.Just x )  =+    (sem_MaybeBoolExpression_Just (sem_Expression x ) )+sem_MaybeBoolExpression Prelude.Nothing  =+    sem_MaybeBoolExpression_Nothing+-- semantic domain+type T_MaybeBoolExpression  = Environment ->+                              ( MaybeBoolExpression)+data Inh_MaybeBoolExpression  = Inh_MaybeBoolExpression {env_Inh_MaybeBoolExpression :: Environment}+data Syn_MaybeBoolExpression  = Syn_MaybeBoolExpression {annotatedTree_Syn_MaybeBoolExpression :: MaybeBoolExpression}+wrap_MaybeBoolExpression :: T_MaybeBoolExpression  ->+                            Inh_MaybeBoolExpression  ->+                            Syn_MaybeBoolExpression +wrap_MaybeBoolExpression sem (Inh_MaybeBoolExpression _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_MaybeBoolExpression _lhsOannotatedTree ))+sem_MaybeBoolExpression_Just :: T_Expression  ->+                                T_MaybeBoolExpression +sem_MaybeBoolExpression_Just just_  =+    (\ _lhsIenv ->+         (let _justOenv :: Environment+              _justIannotatedTree :: Expression+              _justIliftedColumnName :: String+              _lhsOannotatedTree :: MaybeBoolExpression+              -- copy rule (down)+              _justOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3510 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIliftedColumnName) =+                  (just_ _justOenv )+              -- "./TypeChecking.ag"(line 960, column 9)+              _lhsOannotatedTree =+                  {-# LINE 960 "./TypeChecking.ag" #-}+                  if getTypeAnnotation _justIannotatedTree `notElem` [typeBool, TypeCheckFailed]+                    then Just $ updateAnnotation ((TypeErrorA ExpressionMustBeBool) :)+                                  _justIannotatedTree+                    else Just $ _justIannotatedTree+                  {-# LINE 3520 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_MaybeBoolExpression_Nothing :: T_MaybeBoolExpression +sem_MaybeBoolExpression_Nothing  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: MaybeBoolExpression+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 3530 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3535 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- MaybeExpression ---------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         exprType             : Maybe Type+   alternatives:+      alternative Just:+         child just           : Expression +         visit 0:+            local annotatedTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+-}+type MaybeExpression  = (Maybe (Expression))+-- cata+sem_MaybeExpression :: MaybeExpression  ->+                       T_MaybeExpression +sem_MaybeExpression (Prelude.Just x )  =+    (sem_MaybeExpression_Just (sem_Expression x ) )+sem_MaybeExpression Prelude.Nothing  =+    sem_MaybeExpression_Nothing+-- semantic domain+type T_MaybeExpression  = Environment ->+                          ( MaybeExpression,(Maybe Type))+data Inh_MaybeExpression  = Inh_MaybeExpression {env_Inh_MaybeExpression :: Environment}+data Syn_MaybeExpression  = Syn_MaybeExpression {annotatedTree_Syn_MaybeExpression :: MaybeExpression,exprType_Syn_MaybeExpression :: Maybe Type}+wrap_MaybeExpression :: T_MaybeExpression  ->+                        Inh_MaybeExpression  ->+                        Syn_MaybeExpression +wrap_MaybeExpression sem (Inh_MaybeExpression _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOexprType) =+             (sem _lhsIenv )+     in  (Syn_MaybeExpression _lhsOannotatedTree _lhsOexprType ))+sem_MaybeExpression_Just :: T_Expression  ->+                            T_MaybeExpression +sem_MaybeExpression_Just just_  =+    (\ _lhsIenv ->+         (let _justOenv :: Environment+              _justIannotatedTree :: Expression+              _justIliftedColumnName :: String+              _lhsOannotatedTree :: MaybeExpression+              _lhsOexprType :: (Maybe Type)+              -- copy rule (down)+              _justOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3587 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIliftedColumnName) =+                  (just_ _justOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 3594 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3599 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 969, column 12)+              _lhsOexprType =+                  {-# LINE 969 "./TypeChecking.ag" #-}+                  Just $ getTypeAnnotation _justIannotatedTree+                  {-# LINE 3604 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOexprType)))+sem_MaybeExpression_Nothing :: T_MaybeExpression +sem_MaybeExpression_Nothing  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: MaybeExpression+              _lhsOexprType :: (Maybe Type)+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 3615 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3620 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 970, column 15)+              _lhsOexprType =+                  {-# LINE 970 "./TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 3625 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOexprType)))+-- MaybeTableRef -----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         idens                : [(String,([(String,Type)],[(String,Type)]))]+         joinIdens            : [String]+   alternatives:+      alternative Just:+         child just           : TableRef +         visit 0:+            local annotatedTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+-}+type MaybeTableRef  = (Maybe (TableRef))+-- cata+sem_MaybeTableRef :: MaybeTableRef  ->+                     T_MaybeTableRef +sem_MaybeTableRef (Prelude.Just x )  =+    (sem_MaybeTableRef_Just (sem_TableRef x ) )+sem_MaybeTableRef Prelude.Nothing  =+    sem_MaybeTableRef_Nothing+-- semantic domain+type T_MaybeTableRef  = Environment ->+                        ( MaybeTableRef,([(String,([(String,Type)],[(String,Type)]))]),([String]))+data Inh_MaybeTableRef  = Inh_MaybeTableRef {env_Inh_MaybeTableRef :: Environment}+data Syn_MaybeTableRef  = Syn_MaybeTableRef {annotatedTree_Syn_MaybeTableRef :: MaybeTableRef,idens_Syn_MaybeTableRef :: [(String,([(String,Type)],[(String,Type)]))],joinIdens_Syn_MaybeTableRef :: [String]}+wrap_MaybeTableRef :: T_MaybeTableRef  ->+                      Inh_MaybeTableRef  ->+                      Syn_MaybeTableRef +wrap_MaybeTableRef sem (Inh_MaybeTableRef _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens) =+             (sem _lhsIenv )+     in  (Syn_MaybeTableRef _lhsOannotatedTree _lhsOidens _lhsOjoinIdens ))+sem_MaybeTableRef_Just :: T_TableRef  ->+                          T_MaybeTableRef +sem_MaybeTableRef_Just just_  =+    (\ _lhsIenv ->+         (let _justOenv :: Environment+              _justIannotatedTree :: TableRef+              _justIidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _justIjoinIdens :: ([String])+              _lhsOannotatedTree :: MaybeTableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- copy rule (down)+              _justOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3680 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIidens,_justIjoinIdens) =+                  (just_ _justOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 3687 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3692 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOidens =+                  {-# LINE 425 "./TypeChecking.ag" #-}+                  _justIidens+                  {-# LINE 3697 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOjoinIdens =+                  {-# LINE 426 "./TypeChecking.ag" #-}+                  _justIjoinIdens+                  {-# LINE 3702 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+sem_MaybeTableRef_Nothing :: T_MaybeTableRef +sem_MaybeTableRef_Nothing  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: MaybeTableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 3714 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3719 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 525, column 9)+              _lhsOidens =+                  {-# LINE 525 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 3724 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 526, column 9)+              _lhsOjoinIdens =+                  {-# LINE 526 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 3729 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+-- Natural -----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Natural:+         visit 0:+            local annotatedTree : _+      alternative Unnatural:+         visit 0:+            local annotatedTree : _+-}+data Natural  = Natural +              | Unnatural +              deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Natural :: Natural  ->+               T_Natural +sem_Natural (Natural )  =+    (sem_Natural_Natural )+sem_Natural (Unnatural )  =+    (sem_Natural_Unnatural )+-- semantic domain+type T_Natural  = Environment ->+                  ( Natural)+data Inh_Natural  = Inh_Natural {env_Inh_Natural :: Environment}+data Syn_Natural  = Syn_Natural {annotatedTree_Syn_Natural :: Natural}+wrap_Natural :: T_Natural  ->+                Inh_Natural  ->+                Syn_Natural +wrap_Natural sem (Inh_Natural _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Natural _lhsOannotatedTree ))+sem_Natural_Natural :: T_Natural +sem_Natural_Natural  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Natural+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Natural+                  {-# LINE 3776 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3781 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Natural_Unnatural :: T_Natural +sem_Natural_Unnatural  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Natural+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Unnatural+                  {-# LINE 3791 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3796 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- OnExpr ------------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Just:+         child just           : JoinExpression +         visit 0:+            local annotatedTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+-}+type OnExpr  = (Maybe (JoinExpression))+-- cata+sem_OnExpr :: OnExpr  ->+              T_OnExpr +sem_OnExpr (Prelude.Just x )  =+    (sem_OnExpr_Just (sem_JoinExpression x ) )+sem_OnExpr Prelude.Nothing  =+    sem_OnExpr_Nothing+-- semantic domain+type T_OnExpr  = Environment ->+                 ( OnExpr)+data Inh_OnExpr  = Inh_OnExpr {env_Inh_OnExpr :: Environment}+data Syn_OnExpr  = Syn_OnExpr {annotatedTree_Syn_OnExpr :: OnExpr}+wrap_OnExpr :: T_OnExpr  ->+               Inh_OnExpr  ->+               Syn_OnExpr +wrap_OnExpr sem (Inh_OnExpr _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_OnExpr _lhsOannotatedTree ))+sem_OnExpr_Just :: T_JoinExpression  ->+                   T_OnExpr +sem_OnExpr_Just just_  =+    (\ _lhsIenv ->+         (let _justOenv :: Environment+              _justIannotatedTree :: JoinExpression+              _lhsOannotatedTree :: OnExpr+              -- copy rule (down)+              _justOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3845 "AstInternal.hs" #-}+              ( _justIannotatedTree) =+                  (just_ _justOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 3852 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3857 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_OnExpr_Nothing :: T_OnExpr +sem_OnExpr_Nothing  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: OnExpr+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 3867 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3872 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- ParamDef ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         namedType            : Type+         paramName            : String+   alternatives:+      alternative ParamDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         visit 0:+            local annotatedTree : _+      alternative ParamDefTp:+         child ann            : {Annotation}+         child typ            : TypeName +         visit 0:+            local annotatedTree : _+-}+data ParamDef  = ParamDef (Annotation) (String) (TypeName) +               | ParamDefTp (Annotation) (TypeName) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_ParamDef :: ParamDef  ->+                T_ParamDef +sem_ParamDef (ParamDef _ann _name _typ )  =+    (sem_ParamDef_ParamDef _ann _name (sem_TypeName _typ ) )+sem_ParamDef (ParamDefTp _ann _typ )  =+    (sem_ParamDef_ParamDefTp _ann (sem_TypeName _typ ) )+-- semantic domain+type T_ParamDef  = Environment ->+                   ( ParamDef,Type,String)+data Inh_ParamDef  = Inh_ParamDef {env_Inh_ParamDef :: Environment}+data Syn_ParamDef  = Syn_ParamDef {annotatedTree_Syn_ParamDef :: ParamDef,namedType_Syn_ParamDef :: Type,paramName_Syn_ParamDef :: String}+wrap_ParamDef :: T_ParamDef  ->+                 Inh_ParamDef  ->+                 Syn_ParamDef +wrap_ParamDef sem (Inh_ParamDef _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOnamedType,_lhsOparamName) =+             (sem _lhsIenv )+     in  (Syn_ParamDef _lhsOannotatedTree _lhsOnamedType _lhsOparamName ))+sem_ParamDef_ParamDef :: Annotation ->+                         String ->+                         T_TypeName  ->+                         T_ParamDef +sem_ParamDef_ParamDef ann_ name_ typ_  =+    (\ _lhsIenv ->+         (let _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: ParamDef+              _lhsOnamedType :: Type+              _lhsOparamName :: String+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3934 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ParamDef ann_ name_ _typIannotatedTree+                  {-# LINE 3941 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3946 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 908, column 9)+              _lhsOnamedType =+                  {-# LINE 908 "./TypeChecking.ag" #-}+                  _typInamedType+                  {-# LINE 3951 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 910, column 9)+              _lhsOparamName =+                  {-# LINE 910 "./TypeChecking.ag" #-}+                  name_+                  {-# LINE 3956 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOparamName)))+sem_ParamDef_ParamDefTp :: Annotation ->+                           T_TypeName  ->+                           T_ParamDef +sem_ParamDef_ParamDefTp ann_ typ_  =+    (\ _lhsIenv ->+         (let _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: ParamDef+              _lhsOnamedType :: Type+              _lhsOparamName :: String+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 3973 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ParamDefTp ann_ _typIannotatedTree+                  {-# LINE 3980 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 3985 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 908, column 9)+              _lhsOnamedType =+                  {-# LINE 908 "./TypeChecking.ag" #-}+                  _typInamedType+                  {-# LINE 3990 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 912, column 9)+              _lhsOparamName =+                  {-# LINE 912 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 3995 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOparamName)))+-- ParamDefList ------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         params               : [(String, Type)]+   alternatives:+      alternative Cons:+         child hd             : ParamDef +         child tl             : ParamDefList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type ParamDefList  = [(ParamDef)]+-- cata+sem_ParamDefList :: ParamDefList  ->+                    T_ParamDefList +sem_ParamDefList list  =+    (Prelude.foldr sem_ParamDefList_Cons sem_ParamDefList_Nil (Prelude.map sem_ParamDef list) )+-- semantic domain+type T_ParamDefList  = Environment ->+                       ( ParamDefList,([(String, Type)]))+data Inh_ParamDefList  = Inh_ParamDefList {env_Inh_ParamDefList :: Environment}+data Syn_ParamDefList  = Syn_ParamDefList {annotatedTree_Syn_ParamDefList :: ParamDefList,params_Syn_ParamDefList :: [(String, Type)]}+wrap_ParamDefList :: T_ParamDefList  ->+                     Inh_ParamDefList  ->+                     Syn_ParamDefList +wrap_ParamDefList sem (Inh_ParamDefList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOparams) =+             (sem _lhsIenv )+     in  (Syn_ParamDefList _lhsOannotatedTree _lhsOparams ))+sem_ParamDefList_Cons :: T_ParamDef  ->+                         T_ParamDefList  ->+                         T_ParamDefList +sem_ParamDefList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: ParamDefList+              _tlIparams :: ([(String, Type)])+              _hdIannotatedTree :: ParamDef+              _hdInamedType :: Type+              _hdIparamName :: String+              _lhsOannotatedTree :: ParamDefList+              _lhsOparams :: ([(String, Type)])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4051 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4056 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIparams) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdInamedType,_hdIparamName) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 4065 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4070 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 916, column 13)+              _lhsOparams =+                  {-# LINE 916 "./TypeChecking.ag" #-}+                  ((_hdIparamName, _hdInamedType) : _tlIparams)+                  {-# LINE 4075 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOparams)))+sem_ParamDefList_Nil :: T_ParamDefList +sem_ParamDefList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: ParamDefList+              _lhsOparams :: ([(String, Type)])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 4086 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4091 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 915, column 12)+              _lhsOparams =+                  {-# LINE 915 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 4096 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOparams)))+-- RaiseType ---------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative RError:+         visit 0:+            local annotatedTree : _+      alternative RException:+         visit 0:+            local annotatedTree : _+      alternative RNotice:+         visit 0:+            local annotatedTree : _+-}+data RaiseType  = RError +                | RException +                | RNotice +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_RaiseType :: RaiseType  ->+                 T_RaiseType +sem_RaiseType (RError )  =+    (sem_RaiseType_RError )+sem_RaiseType (RException )  =+    (sem_RaiseType_RException )+sem_RaiseType (RNotice )  =+    (sem_RaiseType_RNotice )+-- semantic domain+type T_RaiseType  = Environment ->+                    ( RaiseType)+data Inh_RaiseType  = Inh_RaiseType {env_Inh_RaiseType :: Environment}+data Syn_RaiseType  = Syn_RaiseType {annotatedTree_Syn_RaiseType :: RaiseType}+wrap_RaiseType :: T_RaiseType  ->+                  Inh_RaiseType  ->+                  Syn_RaiseType +wrap_RaiseType sem (Inh_RaiseType _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_RaiseType _lhsOannotatedTree ))+sem_RaiseType_RError :: T_RaiseType +sem_RaiseType_RError  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RaiseType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RError+                  {-# LINE 4149 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4154 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RaiseType_RException :: T_RaiseType +sem_RaiseType_RException  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RaiseType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RException+                  {-# LINE 4164 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4169 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RaiseType_RNotice :: T_RaiseType +sem_RaiseType_RNotice  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RaiseType+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RNotice+                  {-# LINE 4179 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4184 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- RestartIdentity ---------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative ContinueIdentity:+         visit 0:+            local annotatedTree : _+      alternative RestartIdentity:+         visit 0:+            local annotatedTree : _+-}+data RestartIdentity  = ContinueIdentity +                      | RestartIdentity +                      deriving ( Data,Eq,Show,Typeable)+-- cata+sem_RestartIdentity :: RestartIdentity  ->+                       T_RestartIdentity +sem_RestartIdentity (ContinueIdentity )  =+    (sem_RestartIdentity_ContinueIdentity )+sem_RestartIdentity (RestartIdentity )  =+    (sem_RestartIdentity_RestartIdentity )+-- semantic domain+type T_RestartIdentity  = Environment ->+                          ( RestartIdentity)+data Inh_RestartIdentity  = Inh_RestartIdentity {env_Inh_RestartIdentity :: Environment}+data Syn_RestartIdentity  = Syn_RestartIdentity {annotatedTree_Syn_RestartIdentity :: RestartIdentity}+wrap_RestartIdentity :: T_RestartIdentity  ->+                        Inh_RestartIdentity  ->+                        Syn_RestartIdentity +wrap_RestartIdentity sem (Inh_RestartIdentity _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_RestartIdentity _lhsOannotatedTree ))+sem_RestartIdentity_ContinueIdentity :: T_RestartIdentity +sem_RestartIdentity_ContinueIdentity  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RestartIdentity+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ContinueIdentity+                  {-# LINE 4231 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4236 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RestartIdentity_RestartIdentity :: T_RestartIdentity +sem_RestartIdentity_RestartIdentity  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RestartIdentity+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RestartIdentity+                  {-# LINE 4246 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4251 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- Root --------------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         producedEnv          : Environment+   alternatives:+      alternative Root:+         child statements     : StatementList +         visit 0:+            local annotatedTree : _+-}+data Root  = Root (StatementList) +           deriving ( Show)+-- cata+sem_Root :: Root  ->+            T_Root +sem_Root (Root _statements )  =+    (sem_Root_Root (sem_StatementList _statements ) )+-- semantic domain+type T_Root  = Environment ->+               ( Root,Environment)+data Inh_Root  = Inh_Root {env_Inh_Root :: Environment}+data Syn_Root  = Syn_Root {annotatedTree_Syn_Root :: Root,producedEnv_Syn_Root :: Environment}+wrap_Root :: T_Root  ->+             Inh_Root  ->+             Syn_Root +wrap_Root sem (Inh_Root _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOproducedEnv) =+             (sem _lhsIenv )+     in  (Syn_Root _lhsOannotatedTree _lhsOproducedEnv ))+sem_Root_Root :: T_StatementList  ->+                 T_Root +sem_Root_Root statements_  =+    (\ _lhsIenv ->+         (let _statementsOenv :: Environment+              _statementsOenvUpdates :: ([EnvironmentUpdate])+              _statementsIannotatedTree :: StatementList+              _statementsIproducedEnv :: Environment+              _lhsOannotatedTree :: Root+              _lhsOproducedEnv :: Environment+              -- copy rule (down)+              _statementsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4300 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 330, column 12)+              _statementsOenvUpdates =+                  {-# LINE 330 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 4305 "AstInternal.hs" #-}+              ( _statementsIannotatedTree,_statementsIproducedEnv) =+                  (statements_ _statementsOenv _statementsOenvUpdates )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Root _statementsIannotatedTree+                  {-# LINE 4312 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4317 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOproducedEnv =+                  {-# LINE 59 "./TypeChecking.ag" #-}+                  _statementsIproducedEnv+                  {-# LINE 4322 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOproducedEnv)))+-- RowConstraint -----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative NotNullConstraint:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+      alternative NullConstraint:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+      alternative RowCheckConstraint:+         child ann            : {Annotation}+         child expression     : Expression +         visit 0:+            local annotatedTree : _+      alternative RowPrimaryKeyConstraint:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+      alternative RowReferenceConstraint:+         child ann            : {Annotation}+         child table          : {String}+         child att            : {Maybe String}+         child onUpdate       : Cascade +         child onDelete       : Cascade +         visit 0:+            local annotatedTree : _+      alternative RowUniqueConstraint:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+-}+data RowConstraint  = NotNullConstraint (Annotation) +                    | NullConstraint (Annotation) +                    | RowCheckConstraint (Annotation) (Expression) +                    | RowPrimaryKeyConstraint (Annotation) +                    | RowReferenceConstraint (Annotation) (String) (Maybe String) (Cascade) (Cascade) +                    | RowUniqueConstraint (Annotation) +                    deriving ( Data,Eq,Show,Typeable)+-- cata+sem_RowConstraint :: RowConstraint  ->+                     T_RowConstraint +sem_RowConstraint (NotNullConstraint _ann )  =+    (sem_RowConstraint_NotNullConstraint _ann )+sem_RowConstraint (NullConstraint _ann )  =+    (sem_RowConstraint_NullConstraint _ann )+sem_RowConstraint (RowCheckConstraint _ann _expression )  =+    (sem_RowConstraint_RowCheckConstraint _ann (sem_Expression _expression ) )+sem_RowConstraint (RowPrimaryKeyConstraint _ann )  =+    (sem_RowConstraint_RowPrimaryKeyConstraint _ann )+sem_RowConstraint (RowReferenceConstraint _ann _table _att _onUpdate _onDelete )  =+    (sem_RowConstraint_RowReferenceConstraint _ann _table _att (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )+sem_RowConstraint (RowUniqueConstraint _ann )  =+    (sem_RowConstraint_RowUniqueConstraint _ann )+-- semantic domain+type T_RowConstraint  = Environment ->+                        ( RowConstraint)+data Inh_RowConstraint  = Inh_RowConstraint {env_Inh_RowConstraint :: Environment}+data Syn_RowConstraint  = Syn_RowConstraint {annotatedTree_Syn_RowConstraint :: RowConstraint}+wrap_RowConstraint :: T_RowConstraint  ->+                      Inh_RowConstraint  ->+                      Syn_RowConstraint +wrap_RowConstraint sem (Inh_RowConstraint _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_RowConstraint _lhsOannotatedTree ))+sem_RowConstraint_NotNullConstraint :: Annotation ->+                                       T_RowConstraint +sem_RowConstraint_NotNullConstraint ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  NotNullConstraint ann_+                  {-# LINE 4405 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4410 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RowConstraint_NullConstraint :: Annotation ->+                                    T_RowConstraint +sem_RowConstraint_NullConstraint ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  NullConstraint ann_+                  {-# LINE 4421 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4426 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RowConstraint_RowCheckConstraint :: Annotation ->+                                        T_Expression  ->+                                        T_RowConstraint +sem_RowConstraint_RowCheckConstraint ann_ expression_  =+    (\ _lhsIenv ->+         (let _expressionOenv :: Environment+              _expressionIannotatedTree :: Expression+              _expressionIliftedColumnName :: String+              _lhsOannotatedTree :: RowConstraint+              -- copy rule (down)+              _expressionOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4441 "AstInternal.hs" #-}+              ( _expressionIannotatedTree,_expressionIliftedColumnName) =+                  (expression_ _expressionOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RowCheckConstraint ann_ _expressionIannotatedTree+                  {-# LINE 4448 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4453 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RowConstraint_RowPrimaryKeyConstraint :: Annotation ->+                                             T_RowConstraint +sem_RowConstraint_RowPrimaryKeyConstraint ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RowPrimaryKeyConstraint ann_+                  {-# LINE 4464 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4469 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RowConstraint_RowReferenceConstraint :: Annotation ->+                                            String ->+                                            (Maybe String) ->+                                            T_Cascade  ->+                                            T_Cascade  ->+                                            T_RowConstraint +sem_RowConstraint_RowReferenceConstraint ann_ table_ att_ onUpdate_ onDelete_  =+    (\ _lhsIenv ->+         (let _onDeleteOenv :: Environment+              _onDeleteIannotatedTree :: Cascade+              _onUpdateOenv :: Environment+              _onUpdateIannotatedTree :: Cascade+              _lhsOannotatedTree :: RowConstraint+              -- copy rule (down)+              _onDeleteOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4488 "AstInternal.hs" #-}+              ( _onDeleteIannotatedTree) =+                  (onDelete_ _onDeleteOenv )+              -- copy rule (down)+              _onUpdateOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4495 "AstInternal.hs" #-}+              ( _onUpdateIannotatedTree) =+                  (onUpdate_ _onUpdateOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RowReferenceConstraint ann_ table_ att_ _onUpdateIannotatedTree _onDeleteIannotatedTree+                  {-# LINE 4502 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4507 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RowConstraint_RowUniqueConstraint :: Annotation ->+                                         T_RowConstraint +sem_RowConstraint_RowUniqueConstraint ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RowUniqueConstraint ann_+                  {-# LINE 4518 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4523 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- RowConstraintList -------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : RowConstraint +         child tl             : RowConstraintList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type RowConstraintList  = [(RowConstraint)]+-- cata+sem_RowConstraintList :: RowConstraintList  ->+                         T_RowConstraintList +sem_RowConstraintList list  =+    (Prelude.foldr sem_RowConstraintList_Cons sem_RowConstraintList_Nil (Prelude.map sem_RowConstraint list) )+-- semantic domain+type T_RowConstraintList  = Environment ->+                            ( RowConstraintList)+data Inh_RowConstraintList  = Inh_RowConstraintList {env_Inh_RowConstraintList :: Environment}+data Syn_RowConstraintList  = Syn_RowConstraintList {annotatedTree_Syn_RowConstraintList :: RowConstraintList}+wrap_RowConstraintList :: T_RowConstraintList  ->+                          Inh_RowConstraintList  ->+                          Syn_RowConstraintList +wrap_RowConstraintList sem (Inh_RowConstraintList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_RowConstraintList _lhsOannotatedTree ))+sem_RowConstraintList_Cons :: T_RowConstraint  ->+                              T_RowConstraintList  ->+                              T_RowConstraintList +sem_RowConstraintList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: RowConstraintList+              _hdIannotatedTree :: RowConstraint+              _lhsOannotatedTree :: RowConstraintList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4574 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4579 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 4588 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4593 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_RowConstraintList_Nil :: T_RowConstraintList +sem_RowConstraintList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: RowConstraintList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 4603 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4608 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- SelectExpression --------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative CombineSelect:+         child ann            : {Annotation}+         child ctype          : CombineType +         child sel1           : SelectExpression +         child sel2           : SelectExpression +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative Select:+         child ann            : {Annotation}+         child selDistinct    : Distinct +         child selSelectList  : SelectList +         child selTref        : MaybeTableRef +         child selWhere       : MaybeBoolExpression +         child selGroupBy     : ExpressionList +         child selHaving      : MaybeBoolExpression +         child selOrderBy     : ExpressionList +         child selDir         : Direction +         child selLimit       : MaybeExpression +         child selOffset      : MaybeExpression +         visit 0:+            local newEnv      : _+            local backTree    : _+            local tpe         : _+      alternative Values:+         child ann            : {Annotation}+         child vll            : ExpressionListList +         visit 0:+            local backTree    : _+            local tpe         : _+-}+data SelectExpression  = CombineSelect (Annotation) (CombineType) (SelectExpression) (SelectExpression) +                       | Select (Annotation) (Distinct) (SelectList) (MaybeTableRef) (MaybeBoolExpression) (ExpressionList) (MaybeBoolExpression) (ExpressionList) (Direction) (MaybeExpression) (MaybeExpression) +                       | Values (Annotation) (ExpressionListList) +                       deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SelectExpression :: SelectExpression  ->+                        T_SelectExpression +sem_SelectExpression (CombineSelect _ann _ctype _sel1 _sel2 )  =+    (sem_SelectExpression_CombineSelect _ann (sem_CombineType _ctype ) (sem_SelectExpression _sel1 ) (sem_SelectExpression _sel2 ) )+sem_SelectExpression (Select _ann _selDistinct _selSelectList _selTref _selWhere _selGroupBy _selHaving _selOrderBy _selDir _selLimit _selOffset )  =+    (sem_SelectExpression_Select _ann (sem_Distinct _selDistinct ) (sem_SelectList _selSelectList ) (sem_MaybeTableRef _selTref ) (sem_MaybeBoolExpression _selWhere ) (sem_ExpressionList _selGroupBy ) (sem_MaybeBoolExpression _selHaving ) (sem_ExpressionList _selOrderBy ) (sem_Direction _selDir ) (sem_MaybeExpression _selLimit ) (sem_MaybeExpression _selOffset ) )+sem_SelectExpression (Values _ann _vll )  =+    (sem_SelectExpression_Values _ann (sem_ExpressionListList _vll ) )+-- semantic domain+type T_SelectExpression  = Environment ->+                           ( SelectExpression)+data Inh_SelectExpression  = Inh_SelectExpression {env_Inh_SelectExpression :: Environment}+data Syn_SelectExpression  = Syn_SelectExpression {annotatedTree_Syn_SelectExpression :: SelectExpression}+wrap_SelectExpression :: T_SelectExpression  ->+                         Inh_SelectExpression  ->+                         Syn_SelectExpression +wrap_SelectExpression sem (Inh_SelectExpression _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_SelectExpression _lhsOannotatedTree ))+sem_SelectExpression_CombineSelect :: Annotation ->+                                      T_CombineType  ->+                                      T_SelectExpression  ->+                                      T_SelectExpression  ->+                                      T_SelectExpression +sem_SelectExpression_CombineSelect ann_ ctype_ sel1_ sel2_  =+    (\ _lhsIenv ->+         (let _sel2Oenv :: Environment+              _sel1Oenv :: Environment+              _sel2IannotatedTree :: SelectExpression+              _sel1IannotatedTree :: SelectExpression+              _ctypeOenv :: Environment+              _ctypeIannotatedTree :: CombineType+              _lhsOannotatedTree :: SelectExpression+              -- copy rule (down)+              _sel2Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4692 "AstInternal.hs" #-}+              -- copy rule (down)+              _sel1Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4697 "AstInternal.hs" #-}+              ( _sel2IannotatedTree) =+                  (sel2_ _sel2Oenv )+              ( _sel1IannotatedTree) =+                  (sel1_ _sel1Oenv )+              -- copy rule (down)+              _ctypeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4706 "AstInternal.hs" #-}+              ( _ctypeIannotatedTree) =+                  (ctype_ _ctypeOenv )+              -- "./TypeChecking.ag"(line 417, column 9)+              _backTree =+                  {-# LINE 417 "./TypeChecking.ag" #-}+                  CombineSelect ann_ _ctypeIannotatedTree+                                _sel1IannotatedTree+                                _sel2IannotatedTree+                  {-# LINE 4715 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 412, column 9)+              _tpe =+                  {-# LINE 412 "./TypeChecking.ag" #-}+                  let sel1t = getTypeAnnotation _sel1IannotatedTree+                      sel2t = getTypeAnnotation _sel2IannotatedTree+                  in chainTypeCheckFailed [sel1t, sel2t] $+                        typeCheckCombineSelect _lhsIenv sel1t sel2t+                  {-# LINE 4723 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 379, column 9)+              _lhsOannotatedTree =+                  {-# LINE 379 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 4731 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_SelectExpression_Select :: Annotation ->+                               T_Distinct  ->+                               T_SelectList  ->+                               T_MaybeTableRef  ->+                               T_MaybeBoolExpression  ->+                               T_ExpressionList  ->+                               T_MaybeBoolExpression  ->+                               T_ExpressionList  ->+                               T_Direction  ->+                               T_MaybeExpression  ->+                               T_MaybeExpression  ->+                               T_SelectExpression +sem_SelectExpression_Select ann_ selDistinct_ selSelectList_ selTref_ selWhere_ selGroupBy_ selHaving_ selOrderBy_ selDir_ selLimit_ selOffset_  =+    (\ _lhsIenv ->+         (let _selOffsetOenv :: Environment+              _selLimitOenv :: Environment+              _selOrderByOenv :: Environment+              _selHavingOenv :: Environment+              _selGroupByOenv :: Environment+              _selTrefOenv :: Environment+              _selTrefIannotatedTree :: MaybeTableRef+              _selTrefIidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _selTrefIjoinIdens :: ([String])+              _selWhereOenv :: Environment+              _selSelectListOenv :: Environment+              _selOffsetIannotatedTree :: MaybeExpression+              _selOffsetIexprType :: (Maybe Type)+              _selLimitIannotatedTree :: MaybeExpression+              _selLimitIexprType :: (Maybe Type)+              _selDirOenv :: Environment+              _selDirIannotatedTree :: Direction+              _selOrderByIannotatedTree :: ExpressionList+              _selOrderByItypeList :: ([Type])+              _selHavingIannotatedTree :: MaybeBoolExpression+              _selGroupByIannotatedTree :: ExpressionList+              _selGroupByItypeList :: ([Type])+              _selWhereIannotatedTree :: MaybeBoolExpression+              _selSelectListIannotatedTree :: SelectList+              _selSelectListIlistType :: Type+              _selDistinctOenv :: Environment+              _selDistinctIannotatedTree :: Distinct+              _lhsOannotatedTree :: SelectExpression+              -- copy rule (down)+              _selOffsetOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4779 "AstInternal.hs" #-}+              -- copy rule (down)+              _selLimitOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4784 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOrderByOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4789 "AstInternal.hs" #-}+              -- copy rule (down)+              _selHavingOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4794 "AstInternal.hs" #-}+              -- copy rule (down)+              _selGroupByOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4799 "AstInternal.hs" #-}+              -- copy rule (down)+              _selTrefOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4804 "AstInternal.hs" #-}+              ( _selTrefIannotatedTree,_selTrefIidens,_selTrefIjoinIdens) =+                  (selTref_ _selTrefOenv )+              -- "./TypeChecking.ag"(line 597, column 10)+              _newEnv =+                  {-# LINE 597 "./TypeChecking.ag" #-}+                  case updateEnvironment _lhsIenv+                        (convertToNewStyleUpdates _selTrefIidens _selTrefIjoinIdens) of+                    Left x -> error $ show x+                    Right e -> e+                  {-# LINE 4814 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 602, column 10)+              _selWhereOenv =+                  {-# LINE 602 "./TypeChecking.ag" #-}+                  _newEnv+                  {-# LINE 4819 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 601, column 10)+              _selSelectListOenv =+                  {-# LINE 601 "./TypeChecking.ag" #-}+                  _newEnv+                  {-# LINE 4824 "AstInternal.hs" #-}+              ( _selOffsetIannotatedTree,_selOffsetIexprType) =+                  (selOffset_ _selOffsetOenv )+              ( _selLimitIannotatedTree,_selLimitIexprType) =+                  (selLimit_ _selLimitOenv )+              -- copy rule (down)+              _selDirOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4833 "AstInternal.hs" #-}+              ( _selDirIannotatedTree) =+                  (selDir_ _selDirOenv )+              ( _selOrderByIannotatedTree,_selOrderByItypeList) =+                  (selOrderBy_ _selOrderByOenv )+              ( _selHavingIannotatedTree) =+                  (selHaving_ _selHavingOenv )+              ( _selGroupByIannotatedTree,_selGroupByItypeList) =+                  (selGroupBy_ _selGroupByOenv )+              ( _selWhereIannotatedTree) =+                  (selWhere_ _selWhereOenv )+              ( _selSelectListIannotatedTree,_selSelectListIlistType) =+                  (selSelectList_ _selSelectListOenv )+              -- copy rule (down)+              _selDistinctOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4850 "AstInternal.hs" #-}+              ( _selDistinctIannotatedTree) =+                  (selDistinct_ _selDistinctOenv )+              -- "./TypeChecking.ag"(line 400, column 9)+              _backTree =+                  {-# LINE 400 "./TypeChecking.ag" #-}+                  Select ann_+                         _selDistinctIannotatedTree+                         _selSelectListIannotatedTree+                         _selTrefIannotatedTree+                         _selWhereIannotatedTree+                         _selGroupByIannotatedTree+                         _selHavingIannotatedTree+                         _selOrderByIannotatedTree+                         _selDirIannotatedTree+                         _selLimitIannotatedTree+                         _selOffsetIannotatedTree+                  {-# LINE 4867 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 391, column 9)+              _tpe =+                  {-# LINE 391 "./TypeChecking.ag" #-}+                  do+                  let trefType = fromMaybe typeBool $ fmap getTypeAnnotation+                                                           _selTrefIannotatedTree+                      slType = _selSelectListIlistType+                  chainTypeCheckFailed [trefType, slType] $+                    Right $ case slType of+                              UnnamedCompositeType [(_,Pseudo Void)] -> Pseudo Void+                              _ -> SetOfType slType+                  {-# LINE 4879 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 379, column 9)+              _lhsOannotatedTree =+                  {-# LINE 379 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 4887 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_SelectExpression_Values :: Annotation ->+                               T_ExpressionListList  ->+                               T_SelectExpression +sem_SelectExpression_Values ann_ vll_  =+    (\ _lhsIenv ->+         (let _vllOenv :: Environment+              _vllIannotatedTree :: ExpressionListList+              _vllItypeListList :: ([[Type]])+              _lhsOannotatedTree :: SelectExpression+              -- copy rule (down)+              _vllOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4902 "AstInternal.hs" #-}+              ( _vllIannotatedTree,_vllItypeListList) =+                  (vll_ _vllOenv )+              -- "./TypeChecking.ag"(line 389, column 9)+              _backTree =+                  {-# LINE 389 "./TypeChecking.ag" #-}+                  Values ann_ _vllIannotatedTree+                  {-# LINE 4909 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 386, column 9)+              _tpe =+                  {-# LINE 386 "./TypeChecking.ag" #-}+                  typeCheckValuesExpr+                              _lhsIenv+                              _vllItypeListList+                  {-# LINE 4916 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 379, column 9)+              _lhsOannotatedTree =+                  {-# LINE 379 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 4924 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- SelectItem --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         columnName           : String+         itemType             : Type+   alternatives:+      alternative SelExp:+         child ann            : {Annotation}+         child ex             : Expression +         visit 0:+            local annotatedTree : _+      alternative SelectItem:+         child ann            : {Annotation}+         child ex             : Expression +         child name           : {String}+         visit 0:+            local annotatedTree : _+-}+data SelectItem  = SelExp (Annotation) (Expression) +                 | SelectItem (Annotation) (Expression) (String) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SelectItem :: SelectItem  ->+                  T_SelectItem +sem_SelectItem (SelExp _ann _ex )  =+    (sem_SelectItem_SelExp _ann (sem_Expression _ex ) )+sem_SelectItem (SelectItem _ann _ex _name )  =+    (sem_SelectItem_SelectItem _ann (sem_Expression _ex ) _name )+-- semantic domain+type T_SelectItem  = Environment ->+                     ( SelectItem,String,Type)+data Inh_SelectItem  = Inh_SelectItem {env_Inh_SelectItem :: Environment}+data Syn_SelectItem  = Syn_SelectItem {annotatedTree_Syn_SelectItem :: SelectItem,columnName_Syn_SelectItem :: String,itemType_Syn_SelectItem :: Type}+wrap_SelectItem :: T_SelectItem  ->+                   Inh_SelectItem  ->+                   Syn_SelectItem +wrap_SelectItem sem (Inh_SelectItem _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType) =+             (sem _lhsIenv )+     in  (Syn_SelectItem _lhsOannotatedTree _lhsOcolumnName _lhsOitemType ))+sem_SelectItem_SelExp :: Annotation ->+                         T_Expression  ->+                         T_SelectItem +sem_SelectItem_SelExp ann_ ex_  =+    (\ _lhsIenv ->+         (let _exOenv :: Environment+              _exIannotatedTree :: Expression+              _exIliftedColumnName :: String+              _lhsOannotatedTree :: SelectItem+              _lhsOcolumnName :: String+              _lhsOitemType :: Type+              -- copy rule (down)+              _exOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 4985 "AstInternal.hs" #-}+              ( _exIannotatedTree,_exIliftedColumnName) =+                  (ex_ _exOenv )+              -- "./TypeChecking.ag"(line 543, column 9)+              _annotatedTree =+                  {-# LINE 543 "./TypeChecking.ag" #-}+                  SelExp ann_ $ fixStar _exIannotatedTree+                  {-# LINE 4992 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4997 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 655, column 14)+              _lhsOcolumnName =+                  {-# LINE 655 "./TypeChecking.ag" #-}+                  case _exIliftedColumnName of+                    "" -> "?column?"+                    s -> s+                  {-# LINE 5004 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 538, column 9)+              _lhsOitemType =+                  {-# LINE 538 "./TypeChecking.ag" #-}+                  getTypeAnnotation _exIannotatedTree+                  {-# LINE 5009 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType)))+sem_SelectItem_SelectItem :: Annotation ->+                             T_Expression  ->+                             String ->+                             T_SelectItem +sem_SelectItem_SelectItem ann_ ex_ name_  =+    (\ _lhsIenv ->+         (let _exOenv :: Environment+              _exIannotatedTree :: Expression+              _exIliftedColumnName :: String+              _lhsOannotatedTree :: SelectItem+              _lhsOcolumnName :: String+              _lhsOitemType :: Type+              -- copy rule (down)+              _exOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5027 "AstInternal.hs" #-}+              ( _exIannotatedTree,_exIliftedColumnName) =+                  (ex_ _exOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  SelectItem ann_ _exIannotatedTree name_+                  {-# LINE 5034 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5039 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 658, column 18)+              _lhsOcolumnName =+                  {-# LINE 658 "./TypeChecking.ag" #-}+                  name_+                  {-# LINE 5044 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 538, column 9)+              _lhsOitemType =+                  {-# LINE 538 "./TypeChecking.ag" #-}+                  getTypeAnnotation _exIannotatedTree+                  {-# LINE 5049 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType)))+-- SelectItemList ----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         listType             : Type+   alternatives:+      alternative Cons:+         child hd             : SelectItem +         child tl             : SelectItemList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type SelectItemList  = [(SelectItem)]+-- cata+sem_SelectItemList :: SelectItemList  ->+                      T_SelectItemList +sem_SelectItemList list  =+    (Prelude.foldr sem_SelectItemList_Cons sem_SelectItemList_Nil (Prelude.map sem_SelectItem list) )+-- semantic domain+type T_SelectItemList  = Environment ->+                         ( SelectItemList,Type)+data Inh_SelectItemList  = Inh_SelectItemList {env_Inh_SelectItemList :: Environment}+data Syn_SelectItemList  = Syn_SelectItemList {annotatedTree_Syn_SelectItemList :: SelectItemList,listType_Syn_SelectItemList :: Type}+wrap_SelectItemList :: T_SelectItemList  ->+                       Inh_SelectItemList  ->+                       Syn_SelectItemList +wrap_SelectItemList sem (Inh_SelectItemList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOlistType) =+             (sem _lhsIenv )+     in  (Syn_SelectItemList _lhsOannotatedTree _lhsOlistType ))+sem_SelectItemList_Cons :: T_SelectItem  ->+                           T_SelectItemList  ->+                           T_SelectItemList +sem_SelectItemList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: SelectItemList+              _tlIlistType :: Type+              _hdIannotatedTree :: SelectItem+              _hdIcolumnName :: String+              _hdIitemType :: Type+              _lhsOannotatedTree :: SelectItemList+              _lhsOlistType :: Type+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5105 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5110 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIlistType) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIcolumnName,_hdIitemType) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 5119 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5124 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 531, column 12)+              _lhsOlistType =+                  {-# LINE 531 "./TypeChecking.ag" #-}+                  doSelectItemListTpe _lhsIenv _hdIcolumnName _hdIitemType _tlIlistType+                  {-# LINE 5129 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType)))+sem_SelectItemList_Nil :: T_SelectItemList +sem_SelectItemList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: SelectItemList+              _lhsOlistType :: Type+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5140 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5145 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 532, column 11)+              _lhsOlistType =+                  {-# LINE 532 "./TypeChecking.ag" #-}+                  UnnamedCompositeType []+                  {-# LINE 5150 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType)))+-- SelectList --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         listType             : Type+   alternatives:+      alternative SelectList:+         child ann            : {Annotation}+         child items          : SelectItemList +         child stringList     : StringList +         visit 0:+            local annotatedTree : _+-}+data SelectList  = SelectList (Annotation) (SelectItemList) (StringList) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SelectList :: SelectList  ->+                  T_SelectList +sem_SelectList (SelectList _ann _items _stringList )  =+    (sem_SelectList_SelectList _ann (sem_SelectItemList _items ) (sem_StringList _stringList ) )+-- semantic domain+type T_SelectList  = Environment ->+                     ( SelectList,Type)+data Inh_SelectList  = Inh_SelectList {env_Inh_SelectList :: Environment}+data Syn_SelectList  = Syn_SelectList {annotatedTree_Syn_SelectList :: SelectList,listType_Syn_SelectList :: Type}+wrap_SelectList :: T_SelectList  ->+                   Inh_SelectList  ->+                   Syn_SelectList +wrap_SelectList sem (Inh_SelectList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOlistType) =+             (sem _lhsIenv )+     in  (Syn_SelectList _lhsOannotatedTree _lhsOlistType ))+sem_SelectList_SelectList :: Annotation ->+                             T_SelectItemList  ->+                             T_StringList  ->+                             T_SelectList +sem_SelectList_SelectList ann_ items_ stringList_  =+    (\ _lhsIenv ->+         (let _itemsOenv :: Environment+              _stringListOenv :: Environment+              _stringListIannotatedTree :: StringList+              _stringListIstrings :: ([String])+              _itemsIannotatedTree :: SelectItemList+              _itemsIlistType :: Type+              _lhsOannotatedTree :: SelectList+              _lhsOlistType :: Type+              -- copy rule (down)+              _itemsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5205 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5210 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIstrings) =+                  (stringList_ _stringListOenv )+              ( _itemsIannotatedTree,_itemsIlistType) =+                  (items_ _itemsOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  SelectList ann_ _itemsIannotatedTree _stringListIannotatedTree+                  {-# LINE 5219 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5224 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 571, column 9)+              _lhsOlistType =+                  {-# LINE 571 "./TypeChecking.ag" #-}+                  _itemsIlistType+                  {-# LINE 5229 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType)))+-- SetClause ---------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         pairs                : [(String,Type)]+         rowSetError          : Maybe TypeError+   alternatives:+      alternative RowSetClause:+         child ann            : {Annotation}+         child atts           : StringList +         child vals           : ExpressionList +         visit 0:+            local annotatedTree : _+            local rowSetError : _+      alternative SetClause:+         child ann            : {Annotation}+         child att            : {String}+         child val            : Expression +         visit 0:+            local annotatedTree : _+-}+data SetClause  = RowSetClause (Annotation) (StringList) (ExpressionList) +                | SetClause (Annotation) (String) (Expression) +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SetClause :: SetClause  ->+                 T_SetClause +sem_SetClause (RowSetClause _ann _atts _vals )  =+    (sem_SetClause_RowSetClause _ann (sem_StringList _atts ) (sem_ExpressionList _vals ) )+sem_SetClause (SetClause _ann _att _val )  =+    (sem_SetClause_SetClause _ann _att (sem_Expression _val ) )+-- semantic domain+type T_SetClause  = Environment ->+                    ( SetClause,([(String,Type)]),(Maybe TypeError))+data Inh_SetClause  = Inh_SetClause {env_Inh_SetClause :: Environment}+data Syn_SetClause  = Syn_SetClause {annotatedTree_Syn_SetClause :: SetClause,pairs_Syn_SetClause :: [(String,Type)],rowSetError_Syn_SetClause :: Maybe TypeError}+wrap_SetClause :: T_SetClause  ->+                  Inh_SetClause  ->+                  Syn_SetClause +wrap_SetClause sem (Inh_SetClause _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetError) =+             (sem _lhsIenv )+     in  (Syn_SetClause _lhsOannotatedTree _lhsOpairs _lhsOrowSetError ))+sem_SetClause_RowSetClause :: Annotation ->+                              T_StringList  ->+                              T_ExpressionList  ->+                              T_SetClause +sem_SetClause_RowSetClause ann_ atts_ vals_  =+    (\ _lhsIenv ->+         (let _valsOenv :: Environment+              _valsIannotatedTree :: ExpressionList+              _valsItypeList :: ([Type])+              _attsOenv :: Environment+              _attsIannotatedTree :: StringList+              _attsIstrings :: ([String])+              _lhsOannotatedTree :: SetClause+              _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetError :: (Maybe TypeError)+              -- copy rule (down)+              _valsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5296 "AstInternal.hs" #-}+              ( _valsIannotatedTree,_valsItypeList) =+                  (vals_ _valsOenv )+              -- copy rule (down)+              _attsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5303 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIstrings) =+                  (atts_ _attsOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  RowSetClause ann_ _attsIannotatedTree _valsIannotatedTree+                  {-# LINE 5310 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5315 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 744, column 9)+              _lhsOpairs =+                  {-# LINE 744 "./TypeChecking.ag" #-}+                  zip _attsIstrings $ getRowTypes _valsItypeList+                  {-# LINE 5320 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 738, column 9)+              _rowSetError =+                  {-# LINE 738 "./TypeChecking.ag" #-}+                  let atts = _attsIstrings+                      types = getRowTypes _valsItypeList+                  in if length atts /= length types+                       then Just WrongNumberOfColumns+                       else Nothing+                  {-# LINE 5329 "AstInternal.hs" #-}+              -- copy rule (from local)+              _lhsOrowSetError =+                  {-# LINE 731 "./TypeChecking.ag" #-}+                  _rowSetError+                  {-# LINE 5334 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetError)))+sem_SetClause_SetClause :: Annotation ->+                           String ->+                           T_Expression  ->+                           T_SetClause +sem_SetClause_SetClause ann_ att_ val_  =+    (\ _lhsIenv ->+         (let _valOenv :: Environment+              _valIannotatedTree :: Expression+              _valIliftedColumnName :: String+              _lhsOannotatedTree :: SetClause+              _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetError :: (Maybe TypeError)+              -- copy rule (down)+              _valOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5352 "AstInternal.hs" #-}+              ( _valIannotatedTree,_valIliftedColumnName) =+                  (val_ _valOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  SetClause ann_ att_ _valIannotatedTree+                  {-# LINE 5359 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5364 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 735, column 9)+              _lhsOpairs =+                  {-# LINE 735 "./TypeChecking.ag" #-}+                  [(att_, getTypeAnnotation _valIannotatedTree)]+                  {-# LINE 5369 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 736, column 9)+              _lhsOrowSetError =+                  {-# LINE 736 "./TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 5374 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetError)))+-- SetClauseList -----------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         pairs                : [(String,Type)]+         rowSetErrors         : [TypeError]+   alternatives:+      alternative Cons:+         child hd             : SetClause +         child tl             : SetClauseList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type SetClauseList  = [(SetClause)]+-- cata+sem_SetClauseList :: SetClauseList  ->+                     T_SetClauseList +sem_SetClauseList list  =+    (Prelude.foldr sem_SetClauseList_Cons sem_SetClauseList_Nil (Prelude.map sem_SetClause list) )+-- semantic domain+type T_SetClauseList  = Environment ->+                        ( SetClauseList,([(String,Type)]),([TypeError]))+data Inh_SetClauseList  = Inh_SetClauseList {env_Inh_SetClauseList :: Environment}+data Syn_SetClauseList  = Syn_SetClauseList {annotatedTree_Syn_SetClauseList :: SetClauseList,pairs_Syn_SetClauseList :: [(String,Type)],rowSetErrors_Syn_SetClauseList :: [TypeError]}+wrap_SetClauseList :: T_SetClauseList  ->+                      Inh_SetClauseList  ->+                      Syn_SetClauseList +wrap_SetClauseList sem (Inh_SetClauseList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetErrors) =+             (sem _lhsIenv )+     in  (Syn_SetClauseList _lhsOannotatedTree _lhsOpairs _lhsOrowSetErrors ))+sem_SetClauseList_Cons :: T_SetClause  ->+                          T_SetClauseList  ->+                          T_SetClauseList +sem_SetClauseList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: SetClauseList+              _tlIpairs :: ([(String,Type)])+              _tlIrowSetErrors :: ([TypeError])+              _hdIannotatedTree :: SetClause+              _hdIpairs :: ([(String,Type)])+              _hdIrowSetError :: (Maybe TypeError)+              _lhsOannotatedTree :: SetClauseList+              _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetErrors :: ([TypeError])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5433 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5438 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIpairs,_tlIrowSetErrors) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIpairs,_hdIrowSetError) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 5447 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5452 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 725, column 10)+              _lhsOpairs =+                  {-# LINE 725 "./TypeChecking.ag" #-}+                  _hdIpairs ++ _tlIpairs+                  {-# LINE 5457 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 726, column 10)+              _lhsOrowSetErrors =+                  {-# LINE 726 "./TypeChecking.ag" #-}+                  maybeToList _hdIrowSetError ++ _tlIrowSetErrors+                  {-# LINE 5462 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetErrors)))+sem_SetClauseList_Nil :: T_SetClauseList +sem_SetClauseList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: SetClauseList+              _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetErrors :: ([TypeError])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5474 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5479 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 727, column 9)+              _lhsOpairs =+                  {-# LINE 727 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5484 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 728, column 9)+              _lhsOrowSetErrors =+                  {-# LINE 728 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5489 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetErrors)))+-- Statement ---------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         envUpdates           : [EnvironmentUpdate]+   alternatives:+      alternative Assignment:+         child ann            : {Annotation}+         child target         : {String}+         child value          : Expression +         visit 0:+            local annotatedTree : _+      alternative CaseStatement:+         child ann            : {Annotation}+         child val            : Expression +         child cases          : ExpressionListStatementListPairList +         child els            : StatementList +         visit 0:+            local annotatedTree : _+      alternative ContinueStatement:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+      alternative Copy:+         child ann            : {Annotation}+         child table          : {String}+         child targetCols     : StringList +         child source         : CopySource +         visit 0:+            local annotatedTree : _+      alternative CopyData:+         child ann            : {Annotation}+         child insData        : {String}+         visit 0:+            local annotatedTree : _+      alternative CreateDomain:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         child check          : MaybeBoolExpression +         visit 0:+            local envUpdates  : _+            local statementInfo : _+            local backTree    : _+            local tpe         : _+      alternative CreateFunction:+         child ann            : {Annotation}+         child lang           : Language +         child name           : {String}+         child params         : ParamDefList +         child rettype        : TypeName +         child bodyQuote      : {String}+         child body           : FnBody +         child vol            : Volatility +         visit 0:+            local envUpdates  : _+            local statementInfo : _+            local backTree    : _+            local tpe         : _+      alternative CreateTable:+         child ann            : {Annotation}+         child name           : {String}+         child atts           : AttributeDefList +         child cons           : ConstraintList +         visit 0:+            local envUpdates  : _+            local statementInfo : _+            local backTree    : _+            local tpe         : _+      alternative CreateTableAs:+         child ann            : {Annotation}+         child name           : {String}+         child expr           : SelectExpression +         visit 0:+            local annotatedTree : _+            local selType     : _+            local attrs       : _+            local envUpdates  : _+      alternative CreateType:+         child ann            : {Annotation}+         child name           : {String}+         child atts           : TypeAttributeDefList +         visit 0:+            local envUpdates  : _+            local statementInfo : _+            local backTree    : _+            local tpe         : _+      alternative CreateView:+         child ann            : {Annotation}+         child name           : {String}+         child expr           : SelectExpression +         visit 0:+            local attrs       : _+            local envUpdates  : _+            local statementInfo : _+            local backTree    : _+            local tpe         : _+      alternative Delete:+         child ann            : {Annotation}+         child table          : {String}+         child whr            : MaybeBoolExpression +         child returning      : {Maybe SelectList}+         visit 0:+            local envUpdates  : _+            local backTree    : _+            local statementInfo : _+            local tpe         : _+      alternative DropFunction:+         child ann            : {Annotation}+         child ifE            : IfExists +         child sigs           : StringStringListPairList +         child cascade        : Cascade +         visit 0:+            local annotatedTree : _+      alternative DropSomething:+         child ann            : {Annotation}+         child dropType       : DropType +         child ifE            : IfExists +         child names          : StringList +         child cascade        : Cascade +         visit 0:+            local annotatedTree : _+      alternative Execute:+         child ann            : {Annotation}+         child expr           : Expression +         visit 0:+            local annotatedTree : _+      alternative ExecuteInto:+         child ann            : {Annotation}+         child expr           : Expression +         child targets        : StringList +         visit 0:+            local annotatedTree : _+      alternative ForIntegerStatement:+         child ann            : {Annotation}+         child var            : {String}+         child from           : Expression +         child to             : Expression +         child sts            : StatementList +         visit 0:+            local annotatedTree : _+      alternative ForSelectStatement:+         child ann            : {Annotation}+         child var            : {String}+         child sel            : SelectExpression +         child sts            : StatementList +         visit 0:+            local annotatedTree : _+      alternative If:+         child ann            : {Annotation}+         child cases          : ExpressionStatementListPairList +         child els            : StatementList +         visit 0:+            local annotatedTree : _+      alternative Insert:+         child ann            : {Annotation}+         child table          : {String}+         child targetCols     : StringList +         child insData        : SelectExpression +         child returning      : {Maybe SelectList}+         visit 0:+            local envUpdates  : _+            local backTree    : _+            local columnStuff : _+            local statementInfo : _+            local tpe         : _+      alternative NullStatement:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+      alternative Perform:+         child ann            : {Annotation}+         child expr           : Expression +         visit 0:+            local annotatedTree : _+      alternative Raise:+         child ann            : {Annotation}+         child level          : RaiseType +         child message        : {String}+         child args           : ExpressionList +         visit 0:+            local annotatedTree : _+      alternative Return:+         child ann            : {Annotation}+         child value          : MaybeExpression +         visit 0:+            local statementInfo : _+            local envUpdates  : _+            local backTree    : _+            local tpe         : _+      alternative ReturnNext:+         child ann            : {Annotation}+         child expr           : Expression +         visit 0:+            local annotatedTree : _+      alternative ReturnQuery:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local annotatedTree : _+      alternative SelectStatement:+         child ann            : {Annotation}+         child ex             : SelectExpression +         visit 0:+            local envUpdates  : _+            local backTree    : _+            local statementInfo : _+            local tpe         : _+      alternative Truncate:+         child ann            : {Annotation}+         child tables         : StringList +         child restartIdentity : RestartIdentity +         child cascade        : Cascade +         visit 0:+            local annotatedTree : _+      alternative Update:+         child ann            : {Annotation}+         child table          : {String}+         child assigns        : SetClauseList +         child whr            : MaybeBoolExpression +         child returning      : {Maybe SelectList}+         visit 0:+            local envUpdates  : _+            local backTree    : _+            local columnsConsistent : _+            local statementInfo : _+            local tpe         : _+      alternative WhileStatement:+         child ann            : {Annotation}+         child expr           : Expression +         child sts            : StatementList +         visit 0:+            local annotatedTree : _+-}+data Statement  = Assignment (Annotation) (String) (Expression) +                | CaseStatement (Annotation) (Expression) (ExpressionListStatementListPairList) (StatementList) +                | ContinueStatement (Annotation) +                | Copy (Annotation) (String) (StringList) (CopySource) +                | CopyData (Annotation) (String) +                | CreateDomain (Annotation) (String) (TypeName) (MaybeBoolExpression) +                | CreateFunction (Annotation) (Language) (String) (ParamDefList) (TypeName) (String) (FnBody) (Volatility) +                | CreateTable (Annotation) (String) (AttributeDefList) (ConstraintList) +                | CreateTableAs (Annotation) (String) (SelectExpression) +                | CreateType (Annotation) (String) (TypeAttributeDefList) +                | CreateView (Annotation) (String) (SelectExpression) +                | Delete (Annotation) (String) (MaybeBoolExpression) (Maybe SelectList) +                | DropFunction (Annotation) (IfExists) (StringStringListPairList) (Cascade) +                | DropSomething (Annotation) (DropType) (IfExists) (StringList) (Cascade) +                | Execute (Annotation) (Expression) +                | ExecuteInto (Annotation) (Expression) (StringList) +                | ForIntegerStatement (Annotation) (String) (Expression) (Expression) (StatementList) +                | ForSelectStatement (Annotation) (String) (SelectExpression) (StatementList) +                | If (Annotation) (ExpressionStatementListPairList) (StatementList) +                | Insert (Annotation) (String) (StringList) (SelectExpression) (Maybe SelectList) +                | NullStatement (Annotation) +                | Perform (Annotation) (Expression) +                | Raise (Annotation) (RaiseType) (String) (ExpressionList) +                | Return (Annotation) (MaybeExpression) +                | ReturnNext (Annotation) (Expression) +                | ReturnQuery (Annotation) (SelectExpression) +                | SelectStatement (Annotation) (SelectExpression) +                | Truncate (Annotation) (StringList) (RestartIdentity) (Cascade) +                | Update (Annotation) (String) (SetClauseList) (MaybeBoolExpression) (Maybe SelectList) +                | WhileStatement (Annotation) (Expression) (StatementList) +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Statement :: Statement  ->+                 T_Statement +sem_Statement (Assignment _ann _target _value )  =+    (sem_Statement_Assignment _ann _target (sem_Expression _value ) )+sem_Statement (CaseStatement _ann _val _cases _els )  =+    (sem_Statement_CaseStatement _ann (sem_Expression _val ) (sem_ExpressionListStatementListPairList _cases ) (sem_StatementList _els ) )+sem_Statement (ContinueStatement _ann )  =+    (sem_Statement_ContinueStatement _ann )+sem_Statement (Copy _ann _table _targetCols _source )  =+    (sem_Statement_Copy _ann _table (sem_StringList _targetCols ) (sem_CopySource _source ) )+sem_Statement (CopyData _ann _insData )  =+    (sem_Statement_CopyData _ann _insData )+sem_Statement (CreateDomain _ann _name _typ _check )  =+    (sem_Statement_CreateDomain _ann _name (sem_TypeName _typ ) (sem_MaybeBoolExpression _check ) )+sem_Statement (CreateFunction _ann _lang _name _params _rettype _bodyQuote _body _vol )  =+    (sem_Statement_CreateFunction _ann (sem_Language _lang ) _name (sem_ParamDefList _params ) (sem_TypeName _rettype ) _bodyQuote (sem_FnBody _body ) (sem_Volatility _vol ) )+sem_Statement (CreateTable _ann _name _atts _cons )  =+    (sem_Statement_CreateTable _ann _name (sem_AttributeDefList _atts ) (sem_ConstraintList _cons ) )+sem_Statement (CreateTableAs _ann _name _expr )  =+    (sem_Statement_CreateTableAs _ann _name (sem_SelectExpression _expr ) )+sem_Statement (CreateType _ann _name _atts )  =+    (sem_Statement_CreateType _ann _name (sem_TypeAttributeDefList _atts ) )+sem_Statement (CreateView _ann _name _expr )  =+    (sem_Statement_CreateView _ann _name (sem_SelectExpression _expr ) )+sem_Statement (Delete _ann _table _whr _returning )  =+    (sem_Statement_Delete _ann _table (sem_MaybeBoolExpression _whr ) _returning )+sem_Statement (DropFunction _ann _ifE _sigs _cascade )  =+    (sem_Statement_DropFunction _ann (sem_IfExists _ifE ) (sem_StringStringListPairList _sigs ) (sem_Cascade _cascade ) )+sem_Statement (DropSomething _ann _dropType _ifE _names _cascade )  =+    (sem_Statement_DropSomething _ann (sem_DropType _dropType ) (sem_IfExists _ifE ) (sem_StringList _names ) (sem_Cascade _cascade ) )+sem_Statement (Execute _ann _expr )  =+    (sem_Statement_Execute _ann (sem_Expression _expr ) )+sem_Statement (ExecuteInto _ann _expr _targets )  =+    (sem_Statement_ExecuteInto _ann (sem_Expression _expr ) (sem_StringList _targets ) )+sem_Statement (ForIntegerStatement _ann _var _from _to _sts )  =+    (sem_Statement_ForIntegerStatement _ann _var (sem_Expression _from ) (sem_Expression _to ) (sem_StatementList _sts ) )+sem_Statement (ForSelectStatement _ann _var _sel _sts )  =+    (sem_Statement_ForSelectStatement _ann _var (sem_SelectExpression _sel ) (sem_StatementList _sts ) )+sem_Statement (If _ann _cases _els )  =+    (sem_Statement_If _ann (sem_ExpressionStatementListPairList _cases ) (sem_StatementList _els ) )+sem_Statement (Insert _ann _table _targetCols _insData _returning )  =+    (sem_Statement_Insert _ann _table (sem_StringList _targetCols ) (sem_SelectExpression _insData ) _returning )+sem_Statement (NullStatement _ann )  =+    (sem_Statement_NullStatement _ann )+sem_Statement (Perform _ann _expr )  =+    (sem_Statement_Perform _ann (sem_Expression _expr ) )+sem_Statement (Raise _ann _level _message _args )  =+    (sem_Statement_Raise _ann (sem_RaiseType _level ) _message (sem_ExpressionList _args ) )+sem_Statement (Return _ann _value )  =+    (sem_Statement_Return _ann (sem_MaybeExpression _value ) )+sem_Statement (ReturnNext _ann _expr )  =+    (sem_Statement_ReturnNext _ann (sem_Expression _expr ) )+sem_Statement (ReturnQuery _ann _sel )  =+    (sem_Statement_ReturnQuery _ann (sem_SelectExpression _sel ) )+sem_Statement (SelectStatement _ann _ex )  =+    (sem_Statement_SelectStatement _ann (sem_SelectExpression _ex ) )+sem_Statement (Truncate _ann _tables _restartIdentity _cascade )  =+    (sem_Statement_Truncate _ann (sem_StringList _tables ) (sem_RestartIdentity _restartIdentity ) (sem_Cascade _cascade ) )+sem_Statement (Update _ann _table _assigns _whr _returning )  =+    (sem_Statement_Update _ann _table (sem_SetClauseList _assigns ) (sem_MaybeBoolExpression _whr ) _returning )+sem_Statement (WhileStatement _ann _expr _sts )  =+    (sem_Statement_WhileStatement _ann (sem_Expression _expr ) (sem_StatementList _sts ) )+-- semantic domain+type T_Statement  = Environment ->+                    ( Statement,([EnvironmentUpdate]))+data Inh_Statement  = Inh_Statement {env_Inh_Statement :: Environment}+data Syn_Statement  = Syn_Statement {annotatedTree_Syn_Statement :: Statement,envUpdates_Syn_Statement :: [EnvironmentUpdate]}+wrap_Statement :: T_Statement  ->+                  Inh_Statement  ->+                  Syn_Statement +wrap_Statement sem (Inh_Statement _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOenvUpdates) =+             (sem _lhsIenv )+     in  (Syn_Statement _lhsOannotatedTree _lhsOenvUpdates ))+sem_Statement_Assignment :: Annotation ->+                            String ->+                            T_Expression  ->+                            T_Statement +sem_Statement_Assignment ann_ target_ value_  =+    (\ _lhsIenv ->+         (let _valueOenv :: Environment+              _valueIannotatedTree :: Expression+              _valueIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _valueOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5849 "AstInternal.hs" #-}+              ( _valueIannotatedTree,_valueIliftedColumnName) =+                  (value_ _valueOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Assignment ann_ target_ _valueIannotatedTree+                  {-# LINE 5856 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5861 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5866 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CaseStatement :: Annotation ->+                               T_Expression  ->+                               T_ExpressionListStatementListPairList  ->+                               T_StatementList  ->+                               T_Statement +sem_Statement_CaseStatement ann_ val_ cases_ els_  =+    (\ _lhsIenv ->+         (let _elsOenv :: Environment+              _casesOenv :: Environment+              _valOenv :: Environment+              _elsOenvUpdates :: ([EnvironmentUpdate])+              _elsIannotatedTree :: StatementList+              _elsIproducedEnv :: Environment+              _casesIannotatedTree :: ExpressionListStatementListPairList+              _valIannotatedTree :: Expression+              _valIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _elsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5890 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5895 "AstInternal.hs" #-}+              -- copy rule (down)+              _valOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5900 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 352, column 24)+              _elsOenvUpdates =+                  {-# LINE 352 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5905 "AstInternal.hs" #-}+              ( _elsIannotatedTree,_elsIproducedEnv) =+                  (els_ _elsOenv _elsOenvUpdates )+              ( _casesIannotatedTree) =+                  (cases_ _casesOenv )+              ( _valIannotatedTree,_valIliftedColumnName) =+                  (val_ _valOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  CaseStatement ann_ _valIannotatedTree _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 5916 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5921 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5926 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_ContinueStatement :: Annotation ->+                                   T_Statement +sem_Statement_ContinueStatement ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ContinueStatement ann_+                  {-# LINE 5938 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5943 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5948 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Copy :: Annotation ->+                      String ->+                      T_StringList  ->+                      T_CopySource  ->+                      T_Statement +sem_Statement_Copy ann_ table_ targetCols_ source_  =+    (\ _lhsIenv ->+         (let _sourceOenv :: Environment+              _sourceIannotatedTree :: CopySource+              _targetColsOenv :: Environment+              _targetColsIannotatedTree :: StringList+              _targetColsIstrings :: ([String])+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _sourceOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5968 "AstInternal.hs" #-}+              ( _sourceIannotatedTree) =+                  (source_ _sourceOenv )+              -- copy rule (down)+              _targetColsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 5975 "AstInternal.hs" #-}+              ( _targetColsIannotatedTree,_targetColsIstrings) =+                  (targetCols_ _targetColsOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Copy ann_ table_ _targetColsIannotatedTree _sourceIannotatedTree+                  {-# LINE 5982 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5987 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 5992 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CopyData :: Annotation ->+                          String ->+                          T_Statement +sem_Statement_CopyData ann_ insData_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  CopyData ann_ insData_+                  {-# LINE 6005 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6010 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6015 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CreateDomain :: Annotation ->+                              String ->+                              T_TypeName  ->+                              T_MaybeBoolExpression  ->+                              T_Statement +sem_Statement_CreateDomain ann_ name_ typ_ check_  =+    (\ _lhsIenv ->+         (let _checkOenv :: Environment+              _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _checkIannotatedTree :: MaybeBoolExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _checkOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6035 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6040 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- "./TypeChecking.ag"(line 870, column 9)+              _envUpdates =+                  {-# LINE 870 "./TypeChecking.ag" #-}+                  [EnvCreateDomain (ScalarType name_) _typInamedType]+                  {-# LINE 6047 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 869, column 9)+              _statementInfo =+                  {-# LINE 869 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6052 "AstInternal.hs" #-}+              ( _checkIannotatedTree) =+                  (check_ _checkOenv )+              -- "./TypeChecking.ag"(line 868, column 9)+              _backTree =+                  {-# LINE 868 "./TypeChecking.ag" #-}+                  CreateDomain ann_ name_ _typIannotatedTree _checkIannotatedTree+                  {-# LINE 6059 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 867, column 9)+              _tpe =+                  {-# LINE 867 "./TypeChecking.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 6064 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6073 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6078 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CreateFunction :: Annotation ->+                                T_Language  ->+                                String ->+                                T_ParamDefList  ->+                                T_TypeName  ->+                                String ->+                                T_FnBody  ->+                                T_Volatility  ->+                                T_Statement +sem_Statement_CreateFunction ann_ lang_ name_ params_ rettype_ bodyQuote_ body_ vol_  =+    (\ _lhsIenv ->+         (let _rettypeOenv :: Environment+              _paramsOenv :: Environment+              _paramsIannotatedTree :: ParamDefList+              _paramsIparams :: ([(String, Type)])+              _bodyOenv :: Environment+              _rettypeIannotatedTree :: TypeName+              _rettypeInamedType :: Type+              _volOenv :: Environment+              _volIannotatedTree :: Volatility+              _bodyIannotatedTree :: FnBody+              _langOenv :: Environment+              _langIannotatedTree :: Language+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _rettypeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6109 "AstInternal.hs" #-}+              -- copy rule (down)+              _paramsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6114 "AstInternal.hs" #-}+              ( _paramsIannotatedTree,_paramsIparams) =+                  (params_ _paramsOenv )+              -- "./TypeChecking.ag"(line 932, column 9)+              _bodyOenv =+                  {-# LINE 932 "./TypeChecking.ag" #-}+                  fromRight _lhsIenv $+                  updateEnvironment _lhsIenv [EnvStackIDs [("", _paramsIparams)+                                                          ,(name_, _paramsIparams)]]+                  {-# LINE 6123 "AstInternal.hs" #-}+              ( _rettypeIannotatedTree,_rettypeInamedType) =+                  (rettype_ _rettypeOenv )+              -- "./TypeChecking.ag"(line 930, column 9)+              _envUpdates =+                  {-# LINE 930 "./TypeChecking.ag" #-}+                  [EnvCreateFunction FunName name_ (map snd _paramsIparams) _rettypeInamedType]+                  {-# LINE 6130 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 929, column 9)+              _statementInfo =+                  {-# LINE 929 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6135 "AstInternal.hs" #-}+              -- copy rule (down)+              _volOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6140 "AstInternal.hs" #-}+              ( _volIannotatedTree) =+                  (vol_ _volOenv )+              ( _bodyIannotatedTree) =+                  (body_ _bodyOenv )+              -- copy rule (down)+              _langOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6149 "AstInternal.hs" #-}+              ( _langIannotatedTree) =+                  (lang_ _langOenv )+              -- "./TypeChecking.ag"(line 921, column 9)+              _backTree =+                  {-# LINE 921 "./TypeChecking.ag" #-}+                  CreateFunction ann_+                                 _langIannotatedTree+                                 name_+                                 _paramsIannotatedTree+                                 _rettypeIannotatedTree+                                 bodyQuote_+                                 _bodyIannotatedTree+                                 _volIannotatedTree+                  {-# LINE 6163 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 920, column 9)+              _tpe =+                  {-# LINE 920 "./TypeChecking.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 6168 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6177 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6182 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CreateTable :: Annotation ->+                             String ->+                             T_AttributeDefList  ->+                             T_ConstraintList  ->+                             T_Statement +sem_Statement_CreateTable ann_ name_ atts_ cons_  =+    (\ _lhsIenv ->+         (let _consOenv :: Environment+              _attsOenv :: Environment+              _attsIannotatedTree :: AttributeDefList+              _attsIattrs :: ([(String, Type)])+              _consIannotatedTree :: ConstraintList+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _consOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6202 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6207 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIattrs) =+                  (atts_ _attsOenv )+              -- "./TypeChecking.ag"(line 799, column 9)+              _envUpdates =+                  {-# LINE 799 "./TypeChecking.ag" #-}+                  [EnvCreateTable name_ _attsIattrs []]+                  {-# LINE 6214 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 798, column 9)+              _statementInfo =+                  {-# LINE 798 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6219 "AstInternal.hs" #-}+              ( _consIannotatedTree) =+                  (cons_ _consOenv )+              -- "./TypeChecking.ag"(line 797, column 9)+              _backTree =+                  {-# LINE 797 "./TypeChecking.ag" #-}+                  CreateTable ann_ name_ _attsIannotatedTree _consIannotatedTree+                  {-# LINE 6226 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 796, column 9)+              _tpe =+                  {-# LINE 796 "./TypeChecking.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 6231 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6240 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6245 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CreateTableAs :: Annotation ->+                               String ->+                               T_SelectExpression  ->+                               T_Statement +sem_Statement_CreateTableAs ann_ name_ expr_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _exprIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6261 "AstInternal.hs" #-}+              ( _exprIannotatedTree) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  CreateTableAs ann_ name_ _exprIannotatedTree+                  {-# LINE 6268 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6273 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 803, column 9)+              _selType =+                  {-# LINE 803 "./TypeChecking.ag" #-}+                  getTypeAnnotation _exprIannotatedTree+                  {-# LINE 6278 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 807, column 9)+              _attrs =+                  {-# LINE 807 "./TypeChecking.ag" #-}+                  case _selType     of+                    UnnamedCompositeType c -> c+                    _-> []+                  {-# LINE 6285 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 810, column 9)+              _envUpdates =+                  {-# LINE 810 "./TypeChecking.ag" #-}+                  [EnvCreateTable name_ _attrs     []]+                  {-# LINE 6290 "AstInternal.hs" #-}+              -- copy rule (from local)+              _lhsOenvUpdates =+                  {-# LINE 317 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6295 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CreateType :: Annotation ->+                            String ->+                            T_TypeAttributeDefList  ->+                            T_Statement +sem_Statement_CreateType ann_ name_ atts_  =+    (\ _lhsIenv ->+         (let _attsOenv :: Environment+              _attsIannotatedTree :: TypeAttributeDefList+              _attsIattrs :: ([(String, Type)])+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _attsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6312 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIattrs) =+                  (atts_ _attsOenv )+              -- "./TypeChecking.ag"(line 855, column 9)+              _envUpdates =+                  {-# LINE 855 "./TypeChecking.ag" #-}+                  [EnvCreateComposite name_ _attsIattrs]+                  {-# LINE 6319 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 854, column 9)+              _statementInfo =+                  {-# LINE 854 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6324 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 853, column 9)+              _backTree =+                  {-# LINE 853 "./TypeChecking.ag" #-}+                  CreateType ann_ name_ _attsIannotatedTree+                  {-# LINE 6329 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 852, column 9)+              _tpe =+                  {-# LINE 852 "./TypeChecking.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 6334 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6343 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6348 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_CreateView :: Annotation ->+                            String ->+                            T_SelectExpression  ->+                            T_Statement +sem_Statement_CreateView ann_ name_ expr_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _exprIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6364 "AstInternal.hs" #-}+              ( _exprIannotatedTree) =+                  (expr_ _exprOenv )+              -- "./TypeChecking.ag"(line 823, column 9)+              _attrs =+                  {-# LINE 823 "./TypeChecking.ag" #-}+                  case getTypeAnnotation _exprIannotatedTree of+                    SetOfType (UnnamedCompositeType c) -> c+                    _ -> []+                  {-# LINE 6373 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 826, column 9)+              _envUpdates =+                  {-# LINE 826 "./TypeChecking.ag" #-}+                  [EnvCreateView name_ _attrs    ]+                  {-# LINE 6378 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 822, column 9)+              _statementInfo =+                  {-# LINE 822 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6383 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 821, column 9)+              _backTree =+                  {-# LINE 821 "./TypeChecking.ag" #-}+                  CreateView ann_ name_ _exprIannotatedTree+                  {-# LINE 6388 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 820, column 9)+              _tpe =+                  {-# LINE 820 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [getTypeAnnotation _exprIannotatedTree] $ Right $ Pseudo Void+                  {-# LINE 6393 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6402 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6407 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Delete :: Annotation ->+                        String ->+                        T_MaybeBoolExpression  ->+                        (Maybe SelectList) ->+                        T_Statement +sem_Statement_Delete ann_ table_ whr_ returning_  =+    (\ _lhsIenv ->+         (let _whrOenv :: Environment+              _whrIannotatedTree :: MaybeBoolExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _whrOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6424 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 766, column 9)+              _envUpdates =+                  {-# LINE 766 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6429 "AstInternal.hs" #-}+              ( _whrIannotatedTree) =+                  (whr_ _whrOenv )+              -- "./TypeChecking.ag"(line 765, column 9)+              _backTree =+                  {-# LINE 765 "./TypeChecking.ag" #-}+                  Delete ann_ table_ _whrIannotatedTree returning_+                  {-# LINE 6436 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 764, column 9)+              _statementInfo =+                  {-# LINE 764 "./TypeChecking.ag" #-}+                  [DeleteInfo table_]+                  {-# LINE 6441 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 760, column 9)+              _tpe =+                  {-# LINE 760 "./TypeChecking.ag" #-}+                  case checkRelationExists _lhsIenv table_ of+                    Just e -> Left [e]+                    Nothing -> Right $ Pseudo Void+                  {-# LINE 6448 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6457 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6462 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_DropFunction :: Annotation ->+                              T_IfExists  ->+                              T_StringStringListPairList  ->+                              T_Cascade  ->+                              T_Statement +sem_Statement_DropFunction ann_ ifE_ sigs_ cascade_  =+    (\ _lhsIenv ->+         (let _cascadeOenv :: Environment+              _cascadeIannotatedTree :: Cascade+              _sigsOenv :: Environment+              _sigsIannotatedTree :: StringStringListPairList+              _ifEOenv :: Environment+              _ifEIannotatedTree :: IfExists+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _cascadeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6483 "AstInternal.hs" #-}+              ( _cascadeIannotatedTree) =+                  (cascade_ _cascadeOenv )+              -- copy rule (down)+              _sigsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6490 "AstInternal.hs" #-}+              ( _sigsIannotatedTree) =+                  (sigs_ _sigsOenv )+              -- copy rule (down)+              _ifEOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6497 "AstInternal.hs" #-}+              ( _ifEIannotatedTree) =+                  (ifE_ _ifEOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  DropFunction ann_ _ifEIannotatedTree _sigsIannotatedTree _cascadeIannotatedTree+                  {-# LINE 6504 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6509 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6514 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_DropSomething :: Annotation ->+                               T_DropType  ->+                               T_IfExists  ->+                               T_StringList  ->+                               T_Cascade  ->+                               T_Statement +sem_Statement_DropSomething ann_ dropType_ ifE_ names_ cascade_  =+    (\ _lhsIenv ->+         (let _cascadeOenv :: Environment+              _cascadeIannotatedTree :: Cascade+              _namesOenv :: Environment+              _namesIannotatedTree :: StringList+              _namesIstrings :: ([String])+              _ifEOenv :: Environment+              _ifEIannotatedTree :: IfExists+              _dropTypeOenv :: Environment+              _dropTypeIannotatedTree :: DropType+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _cascadeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6539 "AstInternal.hs" #-}+              ( _cascadeIannotatedTree) =+                  (cascade_ _cascadeOenv )+              -- copy rule (down)+              _namesOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6546 "AstInternal.hs" #-}+              ( _namesIannotatedTree,_namesIstrings) =+                  (names_ _namesOenv )+              -- copy rule (down)+              _ifEOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6553 "AstInternal.hs" #-}+              ( _ifEIannotatedTree) =+                  (ifE_ _ifEOenv )+              -- copy rule (down)+              _dropTypeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6560 "AstInternal.hs" #-}+              ( _dropTypeIannotatedTree) =+                  (dropType_ _dropTypeOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  DropSomething ann_ _dropTypeIannotatedTree _ifEIannotatedTree _namesIannotatedTree _cascadeIannotatedTree+                  {-# LINE 6567 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6572 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6577 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Execute :: Annotation ->+                         T_Expression  ->+                         T_Statement +sem_Statement_Execute ann_ expr_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6593 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Execute ann_ _exprIannotatedTree+                  {-# LINE 6600 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6605 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6610 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_ExecuteInto :: Annotation ->+                             T_Expression  ->+                             T_StringList  ->+                             T_Statement +sem_Statement_ExecuteInto ann_ expr_ targets_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _targetsOenv :: Environment+              _targetsIannotatedTree :: StringList+              _targetsIstrings :: ([String])+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6630 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6635 "AstInternal.hs" #-}+              ( _targetsIannotatedTree,_targetsIstrings) =+                  (targets_ _targetsOenv )+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ExecuteInto ann_ _exprIannotatedTree _targetsIannotatedTree+                  {-# LINE 6644 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6649 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6654 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_ForIntegerStatement :: Annotation ->+                                     String ->+                                     T_Expression  ->+                                     T_Expression  ->+                                     T_StatementList  ->+                                     T_Statement +sem_Statement_ForIntegerStatement ann_ var_ from_ to_ sts_  =+    (\ _lhsIenv ->+         (let _stsOenv :: Environment+              _toOenv :: Environment+              _fromOenv :: Environment+              _stsOenvUpdates :: ([EnvironmentUpdate])+              _stsIannotatedTree :: StatementList+              _stsIproducedEnv :: Environment+              _toIannotatedTree :: Expression+              _toIliftedColumnName :: String+              _fromIannotatedTree :: Expression+              _fromIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _stsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6680 "AstInternal.hs" #-}+              -- copy rule (down)+              _toOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6685 "AstInternal.hs" #-}+              -- copy rule (down)+              _fromOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6690 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 355, column 10)+              _stsOenvUpdates =+                  {-# LINE 355 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6695 "AstInternal.hs" #-}+              ( _stsIannotatedTree,_stsIproducedEnv) =+                  (sts_ _stsOenv _stsOenvUpdates )+              ( _toIannotatedTree,_toIliftedColumnName) =+                  (to_ _toOenv )+              ( _fromIannotatedTree,_fromIliftedColumnName) =+                  (from_ _fromOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ForIntegerStatement ann_ var_ _fromIannotatedTree _toIannotatedTree _stsIannotatedTree+                  {-# LINE 6706 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6711 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6716 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_ForSelectStatement :: Annotation ->+                                    String ->+                                    T_SelectExpression  ->+                                    T_StatementList  ->+                                    T_Statement +sem_Statement_ForSelectStatement ann_ var_ sel_ sts_  =+    (\ _lhsIenv ->+         (let _stsOenv :: Environment+              _selOenv :: Environment+              _stsOenvUpdates :: ([EnvironmentUpdate])+              _stsIannotatedTree :: StatementList+              _stsIproducedEnv :: Environment+              _selIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _stsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6737 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6742 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 355, column 10)+              _stsOenvUpdates =+                  {-# LINE 355 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6747 "AstInternal.hs" #-}+              ( _stsIannotatedTree,_stsIproducedEnv) =+                  (sts_ _stsOenv _stsOenvUpdates )+              ( _selIannotatedTree) =+                  (sel_ _selOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ForSelectStatement ann_ var_ _selIannotatedTree _stsIannotatedTree+                  {-# LINE 6756 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6761 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6766 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_If :: Annotation ->+                    T_ExpressionStatementListPairList  ->+                    T_StatementList  ->+                    T_Statement +sem_Statement_If ann_ cases_ els_  =+    (\ _lhsIenv ->+         (let _elsOenv :: Environment+              _casesOenv :: Environment+              _elsOenvUpdates :: ([EnvironmentUpdate])+              _elsIannotatedTree :: StatementList+              _elsIproducedEnv :: Environment+              _casesIannotatedTree :: ExpressionStatementListPairList+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _elsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6786 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6791 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 352, column 24)+              _elsOenvUpdates =+                  {-# LINE 352 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6796 "AstInternal.hs" #-}+              ( _elsIannotatedTree,_elsIproducedEnv) =+                  (els_ _elsOenv _elsOenvUpdates )+              ( _casesIannotatedTree) =+                  (cases_ _casesOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  If ann_ _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 6805 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6810 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6815 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Insert :: Annotation ->+                        String ->+                        T_StringList  ->+                        T_SelectExpression  ->+                        (Maybe SelectList) ->+                        T_Statement +sem_Statement_Insert ann_ table_ targetCols_ insData_ returning_  =+    (\ _lhsIenv ->+         (let _insDataOenv :: Environment+              _insDataIannotatedTree :: SelectExpression+              _targetColsOenv :: Environment+              _targetColsIannotatedTree :: StringList+              _targetColsIstrings :: ([String])+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _insDataOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6836 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 689, column 9)+              _envUpdates =+                  {-# LINE 689 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6841 "AstInternal.hs" #-}+              ( _insDataIannotatedTree) =+                  (insData_ _insDataOenv )+              -- copy rule (down)+              _targetColsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6848 "AstInternal.hs" #-}+              ( _targetColsIannotatedTree,_targetColsIstrings) =+                  (targetCols_ _targetColsOenv )+              -- "./TypeChecking.ag"(line 687, column 9)+              _backTree =+                  {-# LINE 687 "./TypeChecking.ag" #-}+                  Insert ann_ table_ _targetColsIannotatedTree+                         _insDataIannotatedTree returning_+                  {-# LINE 6856 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 676, column 9)+              _columnStuff =+                  {-# LINE 676 "./TypeChecking.ag" #-}+                  checkColumnConsistency _lhsIenv+                                         table_+                                         _targetColsIstrings+                                         (getCAtts $ getTypeAnnotation _insDataIannotatedTree)+                  {-# LINE 6864 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 685, column 9)+              _statementInfo =+                  {-# LINE 685 "./TypeChecking.ag" #-}+                  [InsertInfo table_ $ errorToTypeFailF UnnamedCompositeType _columnStuff    ]+                  {-# LINE 6869 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 681, column 9)+              _tpe =+                  {-# LINE 681 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [getTypeAnnotation _insDataIannotatedTree] $ do+                    _columnStuff+                    Right $ Pseudo Void+                  {-# LINE 6876 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 6885 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 6890 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_NullStatement :: Annotation ->+                               T_Statement +sem_Statement_NullStatement ann_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  NullStatement ann_+                  {-# LINE 6902 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6907 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6912 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Perform :: Annotation ->+                         T_Expression  ->+                         T_Statement +sem_Statement_Perform ann_ expr_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6928 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Perform ann_ _exprIannotatedTree+                  {-# LINE 6935 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6940 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6945 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Raise :: Annotation ->+                       T_RaiseType  ->+                       String ->+                       T_ExpressionList  ->+                       T_Statement +sem_Statement_Raise ann_ level_ message_ args_  =+    (\ _lhsIenv ->+         (let _argsOenv :: Environment+              _argsIannotatedTree :: ExpressionList+              _argsItypeList :: ([Type])+              _levelOenv :: Environment+              _levelIannotatedTree :: RaiseType+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _argsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6965 "AstInternal.hs" #-}+              ( _argsIannotatedTree,_argsItypeList) =+                  (args_ _argsOenv )+              -- copy rule (down)+              _levelOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 6972 "AstInternal.hs" #-}+              ( _levelIannotatedTree) =+                  (level_ _levelOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Raise ann_ _levelIannotatedTree message_ _argsIannotatedTree+                  {-# LINE 6979 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6984 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 6989 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Return :: Annotation ->+                        T_MaybeExpression  ->+                        T_Statement +sem_Statement_Return ann_ value_  =+    (\ _lhsIenv ->+         (let _valueOenv :: Environment+              _valueIannotatedTree :: MaybeExpression+              _valueIexprType :: (Maybe Type)+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _valueOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7005 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 987, column 9)+              _statementInfo =+                  {-# LINE 987 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7010 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 986, column 9)+              _envUpdates =+                  {-# LINE 986 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7015 "AstInternal.hs" #-}+              ( _valueIannotatedTree,_valueIexprType) =+                  (value_ _valueOenv )+              -- "./TypeChecking.ag"(line 985, column 9)+              _backTree =+                  {-# LINE 985 "./TypeChecking.ag" #-}+                  Return ann_ _valueIannotatedTree+                  {-# LINE 7022 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 984, column 9)+              _tpe =+                  {-# LINE 984 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [fromMaybe typeBool _valueIexprType] $ Right $ Pseudo Void+                  {-# LINE 7027 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 7036 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 7041 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_ReturnNext :: Annotation ->+                            T_Expression  ->+                            T_Statement +sem_Statement_ReturnNext ann_ expr_  =+    (\ _lhsIenv ->+         (let _exprOenv :: Environment+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7057 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ReturnNext ann_ _exprIannotatedTree+                  {-# LINE 7064 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7069 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7074 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_ReturnQuery :: Annotation ->+                             T_SelectExpression  ->+                             T_Statement +sem_Statement_ReturnQuery ann_ sel_  =+    (\ _lhsIenv ->+         (let _selOenv :: Environment+              _selIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _selOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7089 "AstInternal.hs" #-}+              ( _selIannotatedTree) =+                  (sel_ _selOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  ReturnQuery ann_ _selIannotatedTree+                  {-# LINE 7096 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7101 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7106 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_SelectStatement :: Annotation ->+                                 T_SelectExpression  ->+                                 T_Statement +sem_Statement_SelectStatement ann_ ex_  =+    (\ _lhsIenv ->+         (let _exOenv :: Environment+              _exIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _exOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7121 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 374, column 9)+              _envUpdates =+                  {-# LINE 374 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7126 "AstInternal.hs" #-}+              ( _exIannotatedTree) =+                  (ex_ _exOenv )+              -- "./TypeChecking.ag"(line 373, column 9)+              _backTree =+                  {-# LINE 373 "./TypeChecking.ag" #-}+                  SelectStatement ann_ _exIannotatedTree+                  {-# LINE 7133 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 372, column 9)+              _statementInfo =+                  {-# LINE 372 "./TypeChecking.ag" #-}+                  [SelectInfo $ getTypeAnnotation _exIannotatedTree]+                  {-# LINE 7138 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 371, column 9)+              _tpe =+                  {-# LINE 371 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [getTypeAnnotation _exIannotatedTree] $ Right $ Pseudo Void+                  {-# LINE 7143 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 7152 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 7157 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Truncate :: Annotation ->+                          T_StringList  ->+                          T_RestartIdentity  ->+                          T_Cascade  ->+                          T_Statement +sem_Statement_Truncate ann_ tables_ restartIdentity_ cascade_  =+    (\ _lhsIenv ->+         (let _cascadeOenv :: Environment+              _cascadeIannotatedTree :: Cascade+              _restartIdentityOenv :: Environment+              _restartIdentityIannotatedTree :: RestartIdentity+              _tablesOenv :: Environment+              _tablesIannotatedTree :: StringList+              _tablesIstrings :: ([String])+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _cascadeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7179 "AstInternal.hs" #-}+              ( _cascadeIannotatedTree) =+                  (cascade_ _cascadeOenv )+              -- copy rule (down)+              _restartIdentityOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7186 "AstInternal.hs" #-}+              ( _restartIdentityIannotatedTree) =+                  (restartIdentity_ _restartIdentityOenv )+              -- copy rule (down)+              _tablesOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7193 "AstInternal.hs" #-}+              ( _tablesIannotatedTree,_tablesIstrings) =+                  (tables_ _tablesOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Truncate ann_ _tablesIannotatedTree _restartIdentityIannotatedTree _cascadeIannotatedTree+                  {-# LINE 7200 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7205 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7210 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_Update :: Annotation ->+                        String ->+                        T_SetClauseList  ->+                        T_MaybeBoolExpression  ->+                        (Maybe SelectList) ->+                        T_Statement +sem_Statement_Update ann_ table_ assigns_ whr_ returning_  =+    (\ _lhsIenv ->+         (let _whrOenv :: Environment+              _assignsOenv :: Environment+              _whrIannotatedTree :: MaybeBoolExpression+              _assignsIannotatedTree :: SetClauseList+              _assignsIpairs :: ([(String,Type)])+              _assignsIrowSetErrors :: ([TypeError])+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _whrOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7232 "AstInternal.hs" #-}+              -- copy rule (down)+              _assignsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7237 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 719, column 9)+              _envUpdates =+                  {-# LINE 719 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7242 "AstInternal.hs" #-}+              ( _whrIannotatedTree) =+                  (whr_ _whrOenv )+              ( _assignsIannotatedTree,_assignsIpairs,_assignsIrowSetErrors) =+                  (assigns_ _assignsOenv )+              -- "./TypeChecking.ag"(line 718, column 9)+              _backTree =+                  {-# LINE 718 "./TypeChecking.ag" #-}+                  Update ann_ table_ _assignsIannotatedTree _whrIannotatedTree returning_+                  {-# LINE 7251 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 714, column 9)+              _columnsConsistent =+                  {-# LINE 714 "./TypeChecking.ag" #-}+                  checkColumnConsistency _lhsIenv table_ (map fst _assignsIpairs) _assignsIpairs+                  {-# LINE 7256 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 716, column 9)+              _statementInfo =+                  {-# LINE 716 "./TypeChecking.ag" #-}+                  [UpdateInfo table_ $ errorToTypeFailF UnnamedCompositeType _columnsConsistent    ]+                  {-# LINE 7261 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 706, column 9)+              _tpe =+                  {-# LINE 706 "./TypeChecking.ag" #-}+                  do+                  let re = checkRelationExists _lhsIenv table_+                  when (isJust re) $+                       Left [fromJust $ re]+                  chainTypeCheckFailed (map snd _assignsIpairs) $ do+                    _columnsConsistent+                    checkErrorList _assignsIrowSetErrors $ Pseudo Void+                  {-# LINE 7272 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 310, column 9)+              _lhsOannotatedTree =+                  {-# LINE 310 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementInfoA _statementInfo     +++                            [EnvUpdates _envUpdates    ])+                  {-# LINE 7281 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 315, column 9)+              _lhsOenvUpdates =+                  {-# LINE 315 "./TypeChecking.ag" #-}+                  _envUpdates+                  {-# LINE 7286 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+sem_Statement_WhileStatement :: Annotation ->+                                T_Expression  ->+                                T_StatementList  ->+                                T_Statement +sem_Statement_WhileStatement ann_ expr_ sts_  =+    (\ _lhsIenv ->+         (let _stsOenv :: Environment+              _exprOenv :: Environment+              _stsOenvUpdates :: ([EnvironmentUpdate])+              _stsIannotatedTree :: StatementList+              _stsIproducedEnv :: Environment+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _lhsOannotatedTree :: Statement+              _lhsOenvUpdates :: ([EnvironmentUpdate])+              -- copy rule (down)+              _stsOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7307 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7312 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 355, column 10)+              _stsOenvUpdates =+                  {-# LINE 355 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7317 "AstInternal.hs" #-}+              ( _stsIannotatedTree,_stsIproducedEnv) =+                  (sts_ _stsOenv _stsOenvUpdates )+              ( _exprIannotatedTree,_exprIliftedColumnName) =+                  (expr_ _exprOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  WhileStatement ann_ _exprIannotatedTree _stsIannotatedTree+                  {-# LINE 7326 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7331 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 324, column 9)+              _lhsOenvUpdates =+                  {-# LINE 324 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7336 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOenvUpdates)))+-- StatementList -----------------------------------------------+{-+   visit 0:+      inherited attributes:+         env                  : Environment+         envUpdates           : [EnvironmentUpdate]+      synthesized attributes:+         annotatedTree        : SELF +         producedEnv          : Environment+   alternatives:+      alternative Cons:+         child hd             : Statement +         child tl             : StatementList +         visit 0:+            local newEnv      : _+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type StatementList  = [(Statement)]+-- cata+sem_StatementList :: StatementList  ->+                     T_StatementList +sem_StatementList list  =+    (Prelude.foldr sem_StatementList_Cons sem_StatementList_Nil (Prelude.map sem_Statement list) )+-- semantic domain+type T_StatementList  = Environment ->+                        ([EnvironmentUpdate]) ->+                        ( StatementList,Environment)+data Inh_StatementList  = Inh_StatementList {env_Inh_StatementList :: Environment,envUpdates_Inh_StatementList :: [EnvironmentUpdate]}+data Syn_StatementList  = Syn_StatementList {annotatedTree_Syn_StatementList :: StatementList,producedEnv_Syn_StatementList :: Environment}+wrap_StatementList :: T_StatementList  ->+                      Inh_StatementList  ->+                      Syn_StatementList +wrap_StatementList sem (Inh_StatementList _lhsIenv _lhsIenvUpdates )  =+    (let ( _lhsOannotatedTree,_lhsOproducedEnv) =+             (sem _lhsIenv _lhsIenvUpdates )+     in  (Syn_StatementList _lhsOannotatedTree _lhsOproducedEnv ))+sem_StatementList_Cons :: T_Statement  ->+                          T_StatementList  ->+                          T_StatementList +sem_StatementList_Cons hd_ tl_  =+    (\ _lhsIenv+       _lhsIenvUpdates ->+         (let _hdOenv :: Environment+              _hdIannotatedTree :: Statement+              _hdIenvUpdates :: ([EnvironmentUpdate])+              _tlOenvUpdates :: ([EnvironmentUpdate])+              _tlOenv :: Environment+              _tlIannotatedTree :: StatementList+              _tlIproducedEnv :: Environment+              _lhsOannotatedTree :: StatementList+              _lhsOproducedEnv :: Environment+              -- "./TypeChecking.ag"(line 334, column 9)+              _newEnv =+                  {-# LINE 334 "./TypeChecking.ag" #-}+                  fromRight _lhsIenv $ updateEnvironment _lhsIenv _lhsIenvUpdates+                  {-# LINE 7396 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 335, column 9)+              _hdOenv =+                  {-# LINE 335 "./TypeChecking.ag" #-}+                  _newEnv+                  {-# LINE 7401 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIenvUpdates) =+                  (hd_ _hdOenv )+              -- "./TypeChecking.ag"(line 340, column 9)+              _tlOenvUpdates =+                  {-# LINE 340 "./TypeChecking.ag" #-}+                  _hdIenvUpdates+                  {-# LINE 7408 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 336, column 9)+              _tlOenv =+                  {-# LINE 336 "./TypeChecking.ag" #-}+                  _newEnv+                  {-# LINE 7413 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIproducedEnv) =+                  (tl_ _tlOenv _tlOenvUpdates )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 7420 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7425 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 337, column 9)+              _lhsOproducedEnv =+                  {-# LINE 337 "./TypeChecking.ag" #-}+                  case _tlIannotatedTree of+                   [] -> _newEnv+                   _ -> _tlIproducedEnv+                  {-# LINE 7432 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOproducedEnv)))+sem_StatementList_Nil :: T_StatementList +sem_StatementList_Nil  =+    (\ _lhsIenv+       _lhsIenvUpdates ->+         (let _lhsOannotatedTree :: StatementList+              _lhsOproducedEnv :: Environment+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7444 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7449 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 342, column 9)+              _lhsOproducedEnv =+                  {-# LINE 342 "./TypeChecking.ag" #-}+                  emptyEnvironment+                  {-# LINE 7454 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOproducedEnv)))+-- StringList --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         strings              : [String]+   alternatives:+      alternative Cons:+         child hd             : {String}+         child tl             : StringList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type StringList  = [(String)]+-- cata+sem_StringList :: StringList  ->+                  T_StringList +sem_StringList list  =+    (Prelude.foldr sem_StringList_Cons sem_StringList_Nil list )+-- semantic domain+type T_StringList  = Environment ->+                     ( StringList,([String]))+data Inh_StringList  = Inh_StringList {env_Inh_StringList :: Environment}+data Syn_StringList  = Syn_StringList {annotatedTree_Syn_StringList :: StringList,strings_Syn_StringList :: [String]}+wrap_StringList :: T_StringList  ->+                   Inh_StringList  ->+                   Syn_StringList +wrap_StringList sem (Inh_StringList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOstrings) =+             (sem _lhsIenv )+     in  (Syn_StringList _lhsOannotatedTree _lhsOstrings ))+sem_StringList_Cons :: String ->+                       T_StringList  ->+                       T_StringList +sem_StringList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _tlIannotatedTree :: StringList+              _tlIstrings :: ([String])+              _lhsOannotatedTree :: StringList+              _lhsOstrings :: ([String])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7506 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIstrings) =+                  (tl_ _tlOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) hd_ _tlIannotatedTree+                  {-# LINE 7513 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7518 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 694, column 10)+              _lhsOstrings =+                  {-# LINE 694 "./TypeChecking.ag" #-}+                  hd_ : _tlIstrings+                  {-# LINE 7523 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOstrings)))+sem_StringList_Nil :: T_StringList +sem_StringList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: StringList+              _lhsOstrings :: ([String])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7534 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7539 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 695, column 9)+              _lhsOstrings =+                  {-# LINE 695 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7544 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOstrings)))+-- StringStringListPair ----------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Tuple:+         child x1             : {String}+         child x2             : StringList +         visit 0:+            local annotatedTree : _+-}+type StringStringListPair  = ( (String),(StringList))+-- cata+sem_StringStringListPair :: StringStringListPair  ->+                            T_StringStringListPair +sem_StringStringListPair ( x1,x2)  =+    (sem_StringStringListPair_Tuple x1 (sem_StringList x2 ) )+-- semantic domain+type T_StringStringListPair  = Environment ->+                               ( StringStringListPair)+data Inh_StringStringListPair  = Inh_StringStringListPair {env_Inh_StringStringListPair :: Environment}+data Syn_StringStringListPair  = Syn_StringStringListPair {annotatedTree_Syn_StringStringListPair :: StringStringListPair}+wrap_StringStringListPair :: T_StringStringListPair  ->+                             Inh_StringStringListPair  ->+                             Syn_StringStringListPair +wrap_StringStringListPair sem (Inh_StringStringListPair _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_StringStringListPair _lhsOannotatedTree ))+sem_StringStringListPair_Tuple :: String ->+                                  T_StringList  ->+                                  T_StringStringListPair +sem_StringStringListPair_Tuple x1_ x2_  =+    (\ _lhsIenv ->+         (let _x2Oenv :: Environment+              _x2IannotatedTree :: StringList+              _x2Istrings :: ([String])+              _lhsOannotatedTree :: StringStringListPair+              -- copy rule (down)+              _x2Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7591 "AstInternal.hs" #-}+              ( _x2IannotatedTree,_x2Istrings) =+                  (x2_ _x2Oenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (x1_,_x2IannotatedTree)+                  {-# LINE 7598 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7603 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- StringStringListPairList ------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Cons:+         child hd             : StringStringListPair +         child tl             : StringStringListPairList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type StringStringListPairList  = [(StringStringListPair)]+-- cata+sem_StringStringListPairList :: StringStringListPairList  ->+                                T_StringStringListPairList +sem_StringStringListPairList list  =+    (Prelude.foldr sem_StringStringListPairList_Cons sem_StringStringListPairList_Nil (Prelude.map sem_StringStringListPair list) )+-- semantic domain+type T_StringStringListPairList  = Environment ->+                                   ( StringStringListPairList)+data Inh_StringStringListPairList  = Inh_StringStringListPairList {env_Inh_StringStringListPairList :: Environment}+data Syn_StringStringListPairList  = Syn_StringStringListPairList {annotatedTree_Syn_StringStringListPairList :: StringStringListPairList}+wrap_StringStringListPairList :: T_StringStringListPairList  ->+                                 Inh_StringStringListPairList  ->+                                 Syn_StringStringListPairList +wrap_StringStringListPairList sem (Inh_StringStringListPairList _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_StringStringListPairList _lhsOannotatedTree ))+sem_StringStringListPairList_Cons :: T_StringStringListPair  ->+                                     T_StringStringListPairList  ->+                                     T_StringStringListPairList +sem_StringStringListPairList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _tlIannotatedTree :: StringStringListPairList+              _hdOenv :: Environment+              _hdIannotatedTree :: StringStringListPair+              _lhsOannotatedTree :: StringStringListPairList+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7654 "AstInternal.hs" #-}+              ( _tlIannotatedTree) =+                  (tl_ _tlOenv )+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7661 "AstInternal.hs" #-}+              ( _hdIannotatedTree) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 7668 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7673 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_StringStringListPairList_Nil :: T_StringStringListPairList +sem_StringStringListPairList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: StringStringListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7683 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7688 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+-- TableRef ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         idens                : [(String,([(String,Type)],[(String,Type)]))]+         joinIdens            : [String]+   alternatives:+      alternative JoinedTref:+         child ann            : {Annotation}+         child tbl            : TableRef +         child nat            : Natural +         child joinType       : JoinType +         child tbl1           : TableRef +         child onExpr         : OnExpr +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative SubTref:+         child ann            : {Annotation}+         child sel            : SelectExpression +         child alias          : {String}+         visit 0:+            local backTree    : _+            local tpe         : _+      alternative Tref:+         child ann            : {Annotation}+         child tbl            : {String}+         visit 0:+            local backTree    : _+            local relType     : _+            local tpe         : _+            local unwrappedRelType : _+      alternative TrefAlias:+         child ann            : {Annotation}+         child tbl            : {String}+         child alias          : {String}+         visit 0:+            local backTree    : _+            local relType     : _+            local tpe         : _+            local unwrappedRelType : _+      alternative TrefFun:+         child ann            : {Annotation}+         child fn             : Expression +         visit 0:+            local backTree    : _+            local alias1      : _+            local tpe         : _+      alternative TrefFunAlias:+         child ann            : {Annotation}+         child fn             : Expression +         child alias          : {String}+         visit 0:+            local backTree    : _+            local alias1      : _+            local tpe         : _+-}+data TableRef  = JoinedTref (Annotation) (TableRef) (Natural) (JoinType) (TableRef) (OnExpr) +               | SubTref (Annotation) (SelectExpression) (String) +               | Tref (Annotation) (String) +               | TrefAlias (Annotation) (String) (String) +               | TrefFun (Annotation) (Expression) +               | TrefFunAlias (Annotation) (Expression) (String) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TableRef :: TableRef  ->+                T_TableRef +sem_TableRef (JoinedTref _ann _tbl _nat _joinType _tbl1 _onExpr )  =+    (sem_TableRef_JoinedTref _ann (sem_TableRef _tbl ) (sem_Natural _nat ) (sem_JoinType _joinType ) (sem_TableRef _tbl1 ) (sem_OnExpr _onExpr ) )+sem_TableRef (SubTref _ann _sel _alias )  =+    (sem_TableRef_SubTref _ann (sem_SelectExpression _sel ) _alias )+sem_TableRef (Tref _ann _tbl )  =+    (sem_TableRef_Tref _ann _tbl )+sem_TableRef (TrefAlias _ann _tbl _alias )  =+    (sem_TableRef_TrefAlias _ann _tbl _alias )+sem_TableRef (TrefFun _ann _fn )  =+    (sem_TableRef_TrefFun _ann (sem_Expression _fn ) )+sem_TableRef (TrefFunAlias _ann _fn _alias )  =+    (sem_TableRef_TrefFunAlias _ann (sem_Expression _fn ) _alias )+-- semantic domain+type T_TableRef  = Environment ->+                   ( TableRef,([(String,([(String,Type)],[(String,Type)]))]),([String]))+data Inh_TableRef  = Inh_TableRef {env_Inh_TableRef :: Environment}+data Syn_TableRef  = Syn_TableRef {annotatedTree_Syn_TableRef :: TableRef,idens_Syn_TableRef :: [(String,([(String,Type)],[(String,Type)]))],joinIdens_Syn_TableRef :: [String]}+wrap_TableRef :: T_TableRef  ->+                 Inh_TableRef  ->+                 Syn_TableRef +wrap_TableRef sem (Inh_TableRef _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens) =+             (sem _lhsIenv )+     in  (Syn_TableRef _lhsOannotatedTree _lhsOidens _lhsOjoinIdens ))+sem_TableRef_JoinedTref :: Annotation ->+                           T_TableRef  ->+                           T_Natural  ->+                           T_JoinType  ->+                           T_TableRef  ->+                           T_OnExpr  ->+                           T_TableRef +sem_TableRef_JoinedTref ann_ tbl_ nat_ joinType_ tbl1_ onExpr_  =+    (\ _lhsIenv ->+         (let _onExprOenv :: Environment+              _tbl1Oenv :: Environment+              _tblOenv :: Environment+              _onExprIannotatedTree :: OnExpr+              _tbl1IannotatedTree :: TableRef+              _tbl1Iidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _tbl1IjoinIdens :: ([String])+              _joinTypeOenv :: Environment+              _joinTypeIannotatedTree :: JoinType+              _natOenv :: Environment+              _natIannotatedTree :: Natural+              _tblIannotatedTree :: TableRef+              _tblIidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _tblIjoinIdens :: ([String])+              _lhsOannotatedTree :: TableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- copy rule (down)+              _onExprOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7814 "AstInternal.hs" #-}+              -- copy rule (down)+              _tbl1Oenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7819 "AstInternal.hs" #-}+              -- copy rule (down)+              _tblOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7824 "AstInternal.hs" #-}+              ( _onExprIannotatedTree) =+                  (onExpr_ _onExprOenv )+              ( _tbl1IannotatedTree,_tbl1Iidens,_tbl1IjoinIdens) =+                  (tbl1_ _tbl1Oenv )+              -- copy rule (down)+              _joinTypeOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7833 "AstInternal.hs" #-}+              ( _joinTypeIannotatedTree) =+                  (joinType_ _joinTypeOenv )+              -- copy rule (down)+              _natOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7840 "AstInternal.hs" #-}+              ( _natIannotatedTree) =+                  (nat_ _natOenv )+              ( _tblIannotatedTree,_tblIidens,_tblIjoinIdens) =+                  (tbl_ _tblOenv )+              -- "./TypeChecking.ag"(line 489, column 9)+              _backTree =+                  {-# LINE 489 "./TypeChecking.ag" #-}+                  JoinedTref ann_+                             _tblIannotatedTree+                             _natIannotatedTree+                             _joinTypeIannotatedTree+                             _tbl1IannotatedTree+                             _onExprIannotatedTree+                  {-# LINE 7854 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 473, column 9)+              _tpe =+                  {-# LINE 473 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [tblt+                            ,tbl1t] $+                     case (_natIannotatedTree, _onExprIannotatedTree) of+                            (Natural, _) -> unionJoinList $+                                            commonFieldNames tblt tbl1t+                            (_,Just (JoinUsing _ s)) -> unionJoinList s+                            _ -> unionJoinList []+                  where+                    tblt = getTypeAnnotation _tblIannotatedTree+                    tbl1t = getTypeAnnotation _tbl1IannotatedTree+                    unionJoinList s =+                        combineTableTypesWithUsingList _lhsIenv s tblt tbl1t+                  {-# LINE 7870 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 430, column 9)+              _lhsOannotatedTree =+                  {-# LINE 430 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 7878 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 486, column 9)+              _lhsOidens =+                  {-# LINE 486 "./TypeChecking.ag" #-}+                  _tblIidens ++ _tbl1Iidens+                  {-# LINE 7883 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 487, column 9)+              _lhsOjoinIdens =+                  {-# LINE 487 "./TypeChecking.ag" #-}+                  commonFieldNames (getTypeAnnotation _tblIannotatedTree)+                                   (getTypeAnnotation _tbl1IannotatedTree)+                  {-# LINE 7889 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+sem_TableRef_SubTref :: Annotation ->+                        T_SelectExpression  ->+                        String ->+                        T_TableRef +sem_TableRef_SubTref ann_ sel_ alias_  =+    (\ _lhsIenv ->+         (let _selOenv :: Environment+              _selIannotatedTree :: SelectExpression+              _lhsOannotatedTree :: TableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- copy rule (down)+              _selOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 7906 "AstInternal.hs" #-}+              ( _selIannotatedTree) =+                  (sel_ _selOenv )+              -- "./TypeChecking.ag"(line 439, column 15)+              _backTree =+                  {-# LINE 439 "./TypeChecking.ag" #-}+                  SubTref ann_ _selIannotatedTree alias_+                  {-# LINE 7913 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 437, column 15)+              _tpe =+                  {-# LINE 437 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [getTypeAnnotation _selIannotatedTree] <$>+                  unwrapSetOfWhenComposite $ getTypeAnnotation _selIannotatedTree+                  {-# LINE 7919 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 430, column 9)+              _lhsOannotatedTree =+                  {-# LINE 430 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 7927 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 440, column 15)+              _lhsOidens =+                  {-# LINE 440 "./TypeChecking.ag" #-}+                  [(alias_, (fromRight [] $ getTbCols _selIannotatedTree, []))]+                  {-# LINE 7932 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 441, column 15)+              _lhsOjoinIdens =+                  {-# LINE 441 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7937 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+sem_TableRef_Tref :: Annotation ->+                     String ->+                     T_TableRef +sem_TableRef_Tref ann_ tbl_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: TableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- "./TypeChecking.ag"(line 454, column 9)+              _backTree =+                  {-# LINE 454 "./TypeChecking.ag" #-}+                  Tref ann_ tbl_+                  {-# LINE 7951 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 445, column 9)+              _relType =+                  {-# LINE 445 "./TypeChecking.ag" #-}+                  getRelationType _lhsIenv tbl_+                  {-# LINE 7956 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 443, column 9)+              _tpe =+                  {-# LINE 443 "./TypeChecking.ag" #-}+                  either Left (Right . fst) _relType+                  {-# LINE 7961 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 430, column 9)+              _lhsOannotatedTree =+                  {-# LINE 430 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 7969 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 446, column 9)+              _unwrappedRelType =+                  {-# LINE 446 "./TypeChecking.ag" #-}+                  fromRight ([],[]) $+                  do+                    lrt <- _relType+                    let (UnnamedCompositeType a,UnnamedCompositeType b) = lrt+                    return (a,b)+                  {-# LINE 7978 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 453, column 9)+              _lhsOidens =+                  {-# LINE 453 "./TypeChecking.ag" #-}+                  [(tbl_, _unwrappedRelType    )]+                  {-# LINE 7983 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 444, column 9)+              _lhsOjoinIdens =+                  {-# LINE 444 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 7988 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+sem_TableRef_TrefAlias :: Annotation ->+                          String ->+                          String ->+                          T_TableRef +sem_TableRef_TrefAlias ann_ tbl_ alias_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: TableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- "./TypeChecking.ag"(line 457, column 9)+              _backTree =+                  {-# LINE 457 "./TypeChecking.ag" #-}+                  TrefAlias ann_ tbl_ alias_+                  {-# LINE 8003 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 445, column 9)+              _relType =+                  {-# LINE 445 "./TypeChecking.ag" #-}+                  getRelationType _lhsIenv tbl_+                  {-# LINE 8008 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 443, column 9)+              _tpe =+                  {-# LINE 443 "./TypeChecking.ag" #-}+                  either Left (Right . fst) _relType+                  {-# LINE 8013 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 430, column 9)+              _lhsOannotatedTree =+                  {-# LINE 430 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 8021 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 446, column 9)+              _unwrappedRelType =+                  {-# LINE 446 "./TypeChecking.ag" #-}+                  fromRight ([],[]) $+                  do+                    lrt <- _relType+                    let (UnnamedCompositeType a,UnnamedCompositeType b) = lrt+                    return (a,b)+                  {-# LINE 8030 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 456, column 9)+              _lhsOidens =+                  {-# LINE 456 "./TypeChecking.ag" #-}+                  [(alias_, _unwrappedRelType    )]+                  {-# LINE 8035 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 444, column 9)+              _lhsOjoinIdens =+                  {-# LINE 444 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8040 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+sem_TableRef_TrefFun :: Annotation ->+                        T_Expression  ->+                        T_TableRef +sem_TableRef_TrefFun ann_ fn_  =+    (\ _lhsIenv ->+         (let _fnOenv :: Environment+              _fnIannotatedTree :: Expression+              _fnIliftedColumnName :: String+              _lhsOannotatedTree :: TableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- copy rule (down)+              _fnOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8057 "AstInternal.hs" #-}+              ( _fnIannotatedTree,_fnIliftedColumnName) =+                  (fn_ _fnOenv )+              -- "./TypeChecking.ag"(line 468, column 9)+              _backTree =+                  {-# LINE 468 "./TypeChecking.ag" #-}+                  TrefFun ann_ _fnIannotatedTree+                  {-# LINE 8064 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 467, column 9)+              _alias1 =+                  {-# LINE 467 "./TypeChecking.ag" #-}+                  ""+                  {-# LINE 8069 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 459, column 9)+              _tpe =+                  {-# LINE 459 "./TypeChecking.ag" #-}+                  getFnType _lhsIenv _alias1     _fnIannotatedTree+                  {-# LINE 8074 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 430, column 9)+              _lhsOannotatedTree =+                  {-# LINE 430 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 8082 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 461, column 9)+              _lhsOidens =+                  {-# LINE 461 "./TypeChecking.ag" #-}+                  case getFunIdens+                            _lhsIenv _alias1+                            _fnIannotatedTree of+                    Right (s, UnnamedCompositeType c) -> [(s,(c,[]))]+                    _ -> []+                  {-# LINE 8091 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 460, column 9)+              _lhsOjoinIdens =+                  {-# LINE 460 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8096 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+sem_TableRef_TrefFunAlias :: Annotation ->+                             T_Expression  ->+                             String ->+                             T_TableRef +sem_TableRef_TrefFunAlias ann_ fn_ alias_  =+    (\ _lhsIenv ->+         (let _fnOenv :: Environment+              _fnIannotatedTree :: Expression+              _fnIliftedColumnName :: String+              _lhsOannotatedTree :: TableRef+              _lhsOidens :: ([(String,([(String,Type)],[(String,Type)]))])+              _lhsOjoinIdens :: ([String])+              -- copy rule (down)+              _fnOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8114 "AstInternal.hs" #-}+              ( _fnIannotatedTree,_fnIliftedColumnName) =+                  (fn_ _fnOenv )+              -- "./TypeChecking.ag"(line 471, column 9)+              _backTree =+                  {-# LINE 471 "./TypeChecking.ag" #-}+                  TrefFunAlias ann_ _fnIannotatedTree alias_+                  {-# LINE 8121 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 470, column 9)+              _alias1 =+                  {-# LINE 470 "./TypeChecking.ag" #-}+                  alias_+                  {-# LINE 8126 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 459, column 9)+              _tpe =+                  {-# LINE 459 "./TypeChecking.ag" #-}+                  getFnType _lhsIenv _alias1     _fnIannotatedTree+                  {-# LINE 8131 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 430, column 9)+              _lhsOannotatedTree =+                  {-# LINE 430 "./TypeChecking.ag" #-}+                  annTypesAndErrors _backTree+                    (errorToTypeFail _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 8139 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 461, column 9)+              _lhsOidens =+                  {-# LINE 461 "./TypeChecking.ag" #-}+                  case getFunIdens+                            _lhsIenv _alias1+                            _fnIannotatedTree of+                    Right (s, UnnamedCompositeType c) -> [(s,(c,[]))]+                    _ -> []+                  {-# LINE 8148 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 460, column 9)+              _lhsOjoinIdens =+                  {-# LINE 460 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8153 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))+-- TypeAttributeDef --------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         attrName             : String+         namedType            : Type+   alternatives:+      alternative TypeAttDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         visit 0:+            local annotatedTree : _+-}+data TypeAttributeDef  = TypeAttDef (Annotation) (String) (TypeName) +                       deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TypeAttributeDef :: TypeAttributeDef  ->+                        T_TypeAttributeDef +sem_TypeAttributeDef (TypeAttDef _ann _name _typ )  =+    (sem_TypeAttributeDef_TypeAttDef _ann _name (sem_TypeName _typ ) )+-- semantic domain+type T_TypeAttributeDef  = Environment ->+                           ( TypeAttributeDef,String,Type)+data Inh_TypeAttributeDef  = Inh_TypeAttributeDef {env_Inh_TypeAttributeDef :: Environment}+data Syn_TypeAttributeDef  = Syn_TypeAttributeDef {annotatedTree_Syn_TypeAttributeDef :: TypeAttributeDef,attrName_Syn_TypeAttributeDef :: String,namedType_Syn_TypeAttributeDef :: Type}+wrap_TypeAttributeDef :: T_TypeAttributeDef  ->+                         Inh_TypeAttributeDef  ->+                         Syn_TypeAttributeDef +wrap_TypeAttributeDef sem (Inh_TypeAttributeDef _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType) =+             (sem _lhsIenv )+     in  (Syn_TypeAttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType ))+sem_TypeAttributeDef_TypeAttDef :: Annotation ->+                                   String ->+                                   T_TypeName  ->+                                   T_TypeAttributeDef +sem_TypeAttributeDef_TypeAttDef ann_ name_ typ_  =+    (\ _lhsIenv ->+         (let _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: TypeAttributeDef+              _lhsOattrName :: String+              _lhsOnamedType :: Type+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8207 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  TypeAttDef ann_ name_ _typIannotatedTree+                  {-# LINE 8214 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8219 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 841, column 9)+              _lhsOattrName =+                  {-# LINE 841 "./TypeChecking.ag" #-}+                  name_+                  {-# LINE 8224 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 842, column 9)+              _lhsOnamedType =+                  {-# LINE 842 "./TypeChecking.ag" #-}+                  _typInamedType+                  {-# LINE 8229 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType)))+-- TypeAttributeDefList ----------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         attrs                : [(String, Type)]+   alternatives:+      alternative Cons:+         child hd             : TypeAttributeDef +         child tl             : TypeAttributeDefList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type TypeAttributeDefList  = [(TypeAttributeDef)]+-- cata+sem_TypeAttributeDefList :: TypeAttributeDefList  ->+                            T_TypeAttributeDefList +sem_TypeAttributeDefList list  =+    (Prelude.foldr sem_TypeAttributeDefList_Cons sem_TypeAttributeDefList_Nil (Prelude.map sem_TypeAttributeDef list) )+-- semantic domain+type T_TypeAttributeDefList  = Environment ->+                               ( TypeAttributeDefList,([(String, Type)]))+data Inh_TypeAttributeDefList  = Inh_TypeAttributeDefList {env_Inh_TypeAttributeDefList :: Environment}+data Syn_TypeAttributeDefList  = Syn_TypeAttributeDefList {annotatedTree_Syn_TypeAttributeDefList :: TypeAttributeDefList,attrs_Syn_TypeAttributeDefList :: [(String, Type)]}+wrap_TypeAttributeDefList :: T_TypeAttributeDefList  ->+                             Inh_TypeAttributeDefList  ->+                             Syn_TypeAttributeDefList +wrap_TypeAttributeDefList sem (Inh_TypeAttributeDefList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOattrs) =+             (sem _lhsIenv )+     in  (Syn_TypeAttributeDefList _lhsOannotatedTree _lhsOattrs ))+sem_TypeAttributeDefList_Cons :: T_TypeAttributeDef  ->+                                 T_TypeAttributeDefList  ->+                                 T_TypeAttributeDefList +sem_TypeAttributeDefList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: TypeAttributeDefList+              _tlIattrs :: ([(String, Type)])+              _hdIannotatedTree :: TypeAttributeDef+              _hdIattrName :: String+              _hdInamedType :: Type+              _lhsOannotatedTree :: TypeAttributeDefList+              _lhsOattrs :: ([(String, Type)])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8285 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8290 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIattrs) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIattrName,_hdInamedType) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 8299 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8304 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 847, column 12)+              _lhsOattrs =+                  {-# LINE 847 "./TypeChecking.ag" #-}+                  (_hdIattrName, _hdInamedType) : _tlIattrs+                  {-# LINE 8309 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrs)))+sem_TypeAttributeDefList_Nil :: T_TypeAttributeDefList +sem_TypeAttributeDefList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: TypeAttributeDefList+              _lhsOattrs :: ([(String, Type)])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8320 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8325 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 848, column 11)+              _lhsOattrs =+                  {-# LINE 848 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8330 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrs)))+-- TypeName ----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         namedType            : Type+   alternatives:+      alternative ArrayTypeName:+         child ann            : {Annotation}+         child typ            : TypeName +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative PrecTypeName:+         child ann            : {Annotation}+         child tn             : {String}+         child prec           : {Integer}+         visit 0:+            local backTree    : _+            local tpe         : _+      alternative SetOfTypeName:+         child ann            : {Annotation}+         child typ            : TypeName +         visit 0:+            local backTree    : _+            local tpe         : _+      alternative SimpleTypeName:+         child ann            : {Annotation}+         child tn             : {String}+         visit 0:+            local backTree    : _+            local tpe         : _+-}+data TypeName  = ArrayTypeName (Annotation) (TypeName) +               | PrecTypeName (Annotation) (String) (Integer) +               | SetOfTypeName (Annotation) (TypeName) +               | SimpleTypeName (Annotation) (String) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TypeName :: TypeName  ->+                T_TypeName +sem_TypeName (ArrayTypeName _ann _typ )  =+    (sem_TypeName_ArrayTypeName _ann (sem_TypeName _typ ) )+sem_TypeName (PrecTypeName _ann _tn _prec )  =+    (sem_TypeName_PrecTypeName _ann _tn _prec )+sem_TypeName (SetOfTypeName _ann _typ )  =+    (sem_TypeName_SetOfTypeName _ann (sem_TypeName _typ ) )+sem_TypeName (SimpleTypeName _ann _tn )  =+    (sem_TypeName_SimpleTypeName _ann _tn )+-- semantic domain+type T_TypeName  = Environment ->+                   ( TypeName,Type)+data Inh_TypeName  = Inh_TypeName {env_Inh_TypeName :: Environment}+data Syn_TypeName  = Syn_TypeName {annotatedTree_Syn_TypeName :: TypeName,namedType_Syn_TypeName :: Type}+wrap_TypeName :: T_TypeName  ->+                 Inh_TypeName  ->+                 Syn_TypeName +wrap_TypeName sem (Inh_TypeName _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOnamedType) =+             (sem _lhsIenv )+     in  (Syn_TypeName _lhsOannotatedTree _lhsOnamedType ))+sem_TypeName_ArrayTypeName :: Annotation ->+                              T_TypeName  ->+                              T_TypeName +sem_TypeName_ArrayTypeName ann_ typ_  =+    (\ _lhsIenv ->+         (let _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: TypeName+              _lhsOnamedType :: Type+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8409 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- "./TypeChecking.ag"(line 148, column 9)+              _backTree =+                  {-# LINE 148 "./TypeChecking.ag" #-}+                  ArrayTypeName ann_ _typIannotatedTree+                  {-# LINE 8416 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 147, column 9)+              _tpe =+                  {-# LINE 147 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [_typInamedType] $ Right $ ArrayType _typInamedType+                  {-# LINE 8421 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 137, column 10)+              _lhsOannotatedTree =+                  {-# LINE 137 "./TypeChecking.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 8428 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 136, column 10)+              _lhsOnamedType =+                  {-# LINE 136 "./TypeChecking.ag" #-}+                  errorToTypeFail _tpe+                  {-# LINE 8433 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType)))+sem_TypeName_PrecTypeName :: Annotation ->+                             String ->+                             Integer ->+                             T_TypeName +sem_TypeName_PrecTypeName ann_ tn_ prec_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: TypeName+              _lhsOnamedType :: Type+              -- "./TypeChecking.ag"(line 154, column 9)+              _backTree =+                  {-# LINE 154 "./TypeChecking.ag" #-}+                  PrecTypeName ann_ tn_ prec_+                  {-# LINE 8447 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 153, column 9)+              _tpe =+                  {-# LINE 153 "./TypeChecking.ag" #-}+                  Right TypeCheckFailed+                  {-# LINE 8452 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 137, column 10)+              _lhsOannotatedTree =+                  {-# LINE 137 "./TypeChecking.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 8459 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 136, column 10)+              _lhsOnamedType =+                  {-# LINE 136 "./TypeChecking.ag" #-}+                  errorToTypeFail _tpe+                  {-# LINE 8464 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType)))+sem_TypeName_SetOfTypeName :: Annotation ->+                              T_TypeName  ->+                              T_TypeName +sem_TypeName_SetOfTypeName ann_ typ_  =+    (\ _lhsIenv ->+         (let _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: TypeName+              _lhsOnamedType :: Type+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8480 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- "./TypeChecking.ag"(line 151, column 9)+              _backTree =+                  {-# LINE 151 "./TypeChecking.ag" #-}+                  SetOfTypeName ann_ _typIannotatedTree+                  {-# LINE 8487 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 150, column 9)+              _tpe =+                  {-# LINE 150 "./TypeChecking.ag" #-}+                  chainTypeCheckFailed [_typInamedType] $ Right $ SetOfType _typInamedType+                  {-# LINE 8492 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 137, column 10)+              _lhsOannotatedTree =+                  {-# LINE 137 "./TypeChecking.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 8499 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 136, column 10)+              _lhsOnamedType =+                  {-# LINE 136 "./TypeChecking.ag" #-}+                  errorToTypeFail _tpe+                  {-# LINE 8504 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType)))+sem_TypeName_SimpleTypeName :: Annotation ->+                               String ->+                               T_TypeName +sem_TypeName_SimpleTypeName ann_ tn_  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: TypeName+              _lhsOnamedType :: Type+              -- "./TypeChecking.ag"(line 145, column 9)+              _backTree =+                  {-# LINE 145 "./TypeChecking.ag" #-}+                  SimpleTypeName ann_ tn_+                  {-# LINE 8517 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 144, column 9)+              _tpe =+                  {-# LINE 144 "./TypeChecking.ag" #-}+                  envLookupType _lhsIenv $ canonicalizeTypeName tn_+                  {-# LINE 8522 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 137, column 10)+              _lhsOannotatedTree =+                  {-# LINE 137 "./TypeChecking.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 8529 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 136, column 10)+              _lhsOnamedType =+                  {-# LINE 136 "./TypeChecking.ag" #-}+                  errorToTypeFail _tpe+                  {-# LINE 8534 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType)))+-- VarDef ------------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         def                  : (String,Type)+   alternatives:+      alternative VarDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         child value          : {Maybe Expression}+         visit 0:+            local annotatedTree : _+-}+data VarDef  = VarDef (Annotation) (String) (TypeName) (Maybe Expression) +             deriving ( Data,Eq,Show,Typeable)+-- cata+sem_VarDef :: VarDef  ->+              T_VarDef +sem_VarDef (VarDef _ann _name _typ _value )  =+    (sem_VarDef_VarDef _ann _name (sem_TypeName _typ ) _value )+-- semantic domain+type T_VarDef  = Environment ->+                 ( VarDef,((String,Type)))+data Inh_VarDef  = Inh_VarDef {env_Inh_VarDef :: Environment}+data Syn_VarDef  = Syn_VarDef {annotatedTree_Syn_VarDef :: VarDef,def_Syn_VarDef :: (String,Type)}+wrap_VarDef :: T_VarDef  ->+               Inh_VarDef  ->+               Syn_VarDef +wrap_VarDef sem (Inh_VarDef _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOdef) =+             (sem _lhsIenv )+     in  (Syn_VarDef _lhsOannotatedTree _lhsOdef ))+sem_VarDef_VarDef :: Annotation ->+                     String ->+                     T_TypeName  ->+                     (Maybe Expression) ->+                     T_VarDef +sem_VarDef_VarDef ann_ name_ typ_ value_  =+    (\ _lhsIenv ->+         (let _typOenv :: Environment+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _lhsOannotatedTree :: VarDef+              _lhsOdef :: ((String,Type))+              -- copy rule (down)+              _typOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8588 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType) =+                  (typ_ _typOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  VarDef ann_ name_ _typIannotatedTree value_+                  {-# LINE 8595 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8600 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 945, column 14)+              _lhsOdef =+                  {-# LINE 945 "./TypeChecking.ag" #-}+                  (name_, _typInamedType)+                  {-# LINE 8605 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOdef)))+-- VarDefList --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attributes:+         annotatedTree        : SELF +         defs                 : [(String,Type)]+   alternatives:+      alternative Cons:+         child hd             : VarDef +         child tl             : VarDefList +         visit 0:+            local annotatedTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+-}+type VarDefList  = [(VarDef)]+-- cata+sem_VarDefList :: VarDefList  ->+                  T_VarDefList +sem_VarDefList list  =+    (Prelude.foldr sem_VarDefList_Cons sem_VarDefList_Nil (Prelude.map sem_VarDef list) )+-- semantic domain+type T_VarDefList  = Environment ->+                     ( VarDefList,([(String,Type)]))+data Inh_VarDefList  = Inh_VarDefList {env_Inh_VarDefList :: Environment}+data Syn_VarDefList  = Syn_VarDefList {annotatedTree_Syn_VarDefList :: VarDefList,defs_Syn_VarDefList :: [(String,Type)]}+wrap_VarDefList :: T_VarDefList  ->+                   Inh_VarDefList  ->+                   Syn_VarDefList +wrap_VarDefList sem (Inh_VarDefList _lhsIenv )  =+    (let ( _lhsOannotatedTree,_lhsOdefs) =+             (sem _lhsIenv )+     in  (Syn_VarDefList _lhsOannotatedTree _lhsOdefs ))+sem_VarDefList_Cons :: T_VarDef  ->+                       T_VarDefList  ->+                       T_VarDefList +sem_VarDefList_Cons hd_ tl_  =+    (\ _lhsIenv ->+         (let _tlOenv :: Environment+              _hdOenv :: Environment+              _tlIannotatedTree :: VarDefList+              _tlIdefs :: ([(String,Type)])+              _hdIannotatedTree :: VarDef+              _hdIdef :: ((String,Type))+              _lhsOannotatedTree :: VarDefList+              _lhsOdefs :: ([(String,Type)])+              -- copy rule (down)+              _tlOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8660 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOenv =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _lhsIenv+                  {-# LINE 8665 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIdefs) =+                  (tl_ _tlOenv )+              ( _hdIannotatedTree,_hdIdef) =+                  (hd_ _hdOenv )+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 8674 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8679 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 948, column 12)+              _lhsOdefs =+                  {-# LINE 948 "./TypeChecking.ag" #-}+                  _hdIdef : _tlIdefs+                  {-# LINE 8684 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOdefs)))+sem_VarDefList_Nil :: T_VarDefList +sem_VarDefList_Nil  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: VarDefList+              _lhsOdefs :: ([(String,Type)])+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8695 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8700 "AstInternal.hs" #-}+              -- "./TypeChecking.ag"(line 949, column 11)+              _lhsOdefs =+                  {-# LINE 949 "./TypeChecking.ag" #-}+                  []+                  {-# LINE 8705 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOdefs)))+-- Volatility --------------------------------------------------+{-+   visit 0:+      inherited attribute:+         env                  : Environment+      synthesized attribute:+         annotatedTree        : SELF +   alternatives:+      alternative Immutable:+         visit 0:+            local annotatedTree : _+      alternative Stable:+         visit 0:+            local annotatedTree : _+      alternative Volatile:+         visit 0:+            local annotatedTree : _+-}+data Volatility  = Immutable +                 | Stable +                 | Volatile +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Volatility :: Volatility  ->+                  T_Volatility +sem_Volatility (Immutable )  =+    (sem_Volatility_Immutable )+sem_Volatility (Stable )  =+    (sem_Volatility_Stable )+sem_Volatility (Volatile )  =+    (sem_Volatility_Volatile )+-- semantic domain+type T_Volatility  = Environment ->+                     ( Volatility)+data Inh_Volatility  = Inh_Volatility {env_Inh_Volatility :: Environment}+data Syn_Volatility  = Syn_Volatility {annotatedTree_Syn_Volatility :: Volatility}+wrap_Volatility :: T_Volatility  ->+                   Inh_Volatility  ->+                   Syn_Volatility +wrap_Volatility sem (Inh_Volatility _lhsIenv )  =+    (let ( _lhsOannotatedTree) =+             (sem _lhsIenv )+     in  (Syn_Volatility _lhsOannotatedTree ))+sem_Volatility_Immutable :: T_Volatility +sem_Volatility_Immutable  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Volatility+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Immutable+                  {-# LINE 8758 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8763 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Volatility_Stable :: T_Volatility +sem_Volatility_Stable  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Volatility+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Stable+                  {-# LINE 8773 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8778 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))+sem_Volatility_Volatile :: T_Volatility +sem_Volatility_Volatile  =+    (\ _lhsIenv ->+         (let _lhsOannotatedTree :: Volatility+              -- self rule+              _annotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  Volatile+                  {-# LINE 8788 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 56 "./TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8793 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree)))
+ Database/HsSqlPpp/AstInternals/AstUtils.lhs view
@@ -0,0 +1,62 @@+Copyright 2009 Jake Wheat++This file contains a bunch of small low level utilities to help with+type checking.++> {-# OPTIONS_HADDOCK hide #-}++> module Database.HsSqlPpp.AstInternals.AstUtils+>     (+>      --checkTypes+>      chainTypeCheckFailed+>     ,errorToTypeFail+>     ,errorToTypeFailF+>     ,checkErrorList+>     ,getErrors+>     ) where++> import Data.List++> import Database.HsSqlPpp.AstInternals.TypeType++================================================================================++= type checking utils++== checkErrors++if we find a typecheckfailed in the list, then propagate that, else+use the final argument.++> chainTypeCheckFailed :: [Type] -> Either a Type -> Either a Type+> chainTypeCheckFailed a b =+>   if any (==TypeCheckFailed) a+>     then Right TypeCheckFailed+>     else b++convert an 'either [typeerror] type' to a type++> errorToTypeFail :: Either [TypeError] Type -> Type+> errorToTypeFail tpe = case tpe of+>                         Left _ -> TypeCheckFailed+>                         Right t -> t++convert an 'either [typeerror] x' to a type, using an x->type function++> errorToTypeFailF :: (t -> Type) -> Either [TypeError] t -> Type+> errorToTypeFailF f tpe = case tpe of+>                                   Left _ -> TypeCheckFailed+>                                   Right t -> f t++used to pass a regular type on iff the list of errors is null++> checkErrorList :: [TypeError] -> Type -> Either [TypeError] Type+> checkErrorList es t = if null es+>                         then Right t+>                         else Left es++extract errors from an either, gives empty list if right++> getErrors :: Either [TypeError] Type -> [TypeError]+> getErrors = either id (const [])+
+ Database/HsSqlPpp/AstInternals/DefaultTemplate1Environment.lhs view
@@ -0,0 +1,19 @@++Copyright 2009 Jake Wheat++This file contains++> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment+>     (defaultTemplate1Environment+>      ) where++> import Database.HsSqlPpp.AstInternals.EnvironmentInternal+> import Database.HsSqlPpp.AstInternals.TypeType++> defaultTemplate1Environment :: Environment+> defaultTemplate1Environment = (\l -> case l of+>                                       Left x -> error $ show x+>                                       Right e -> e)+>                                 $ updateEnvironment defaultEnvironment [EnvCreateScalar (ScalarType "bool") "B" True,EnvCreateScalar (ScalarType "bytea") "U" False,EnvCreateScalar (ScalarType "char") "S" False,EnvCreateScalar (ScalarType "name") "S" False,EnvCreateScalar (ScalarType "int8") "N" False,EnvCreateScalar (ScalarType "int2") "N" False,EnvCreateScalar (ScalarType "int2vector") "A" False,EnvCreateScalar (ScalarType "int4") "N" False,EnvCreateScalar (ScalarType "regproc") "N" False,EnvCreateScalar (ScalarType "text") "S" True,EnvCreateScalar (ScalarType "oid") "N" True,EnvCreateScalar (ScalarType "tid") "U" False,EnvCreateScalar (ScalarType "xid") "U" False,EnvCreateScalar (ScalarType "cid") "U" False,EnvCreateScalar (ScalarType "oidvector") "A" False,EnvCreateScalar (ScalarType "xml") "U" False,EnvCreateScalar (ScalarType "point") "G" False,EnvCreateScalar (ScalarType "lseg") "G" False,EnvCreateScalar (ScalarType "path") "G" False,EnvCreateScalar (ScalarType "box") "G" False,EnvCreateScalar (ScalarType "polygon") "G" False,EnvCreateScalar (ScalarType "line") "G" False,EnvCreateScalar (ScalarType "float4") "N" False,EnvCreateScalar (ScalarType "float8") "N" True,EnvCreateScalar (ScalarType "abstime") "D" False,EnvCreateScalar (ScalarType "reltime") "T" False,EnvCreateScalar (ScalarType "tinterval") "T" False,EnvCreateScalar (ScalarType "circle") "G" False,EnvCreateScalar (ScalarType "money") "N" False,EnvCreateScalar (ScalarType "macaddr") "U" False,EnvCreateScalar (ScalarType "inet") "I" True,EnvCreateScalar (ScalarType "cidr") "I" False,EnvCreateScalar (ScalarType "aclitem") "U" False,EnvCreateScalar (ScalarType "bpchar") "S" False,EnvCreateScalar (ScalarType "varchar") "S" False,EnvCreateScalar (ScalarType "date") "D" False,EnvCreateScalar (ScalarType "time") "D" False,EnvCreateScalar (ScalarType "timestamp") "D" False,EnvCreateScalar (ScalarType "timestamptz") "D" True,EnvCreateScalar (ScalarType "interval") "T" True,EnvCreateScalar (ScalarType "timetz") "D" False,EnvCreateScalar (ScalarType "bit") "V" False,EnvCreateScalar (ScalarType "varbit") "V" True,EnvCreateScalar (ScalarType "numeric") "N" False,EnvCreateScalar (ScalarType "refcursor") "U" False,EnvCreateScalar (ScalarType "regprocedure") "N" False,EnvCreateScalar (ScalarType "regoper") "N" False,EnvCreateScalar (ScalarType "regoperator") "N" False,EnvCreateScalar (ScalarType "regclass") "N" False,EnvCreateScalar (ScalarType "regtype") "N" False,EnvCreateScalar (ScalarType "uuid") "U" False,EnvCreateScalar (ScalarType "tsvector") "U" False,EnvCreateScalar (ScalarType "gtsvector") "U" False,EnvCreateScalar (ScalarType "tsquery") "U" False,EnvCreateScalar (ScalarType "regconfig") "N" False,EnvCreateScalar (ScalarType "regdictionary") "N" False,EnvCreateScalar (ScalarType "txid_snapshot") "U" False,EnvCreateCast (ScalarType "int8") (ScalarType "int2") AssignmentCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "float4") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "float8") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "numeric") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "int8") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "int4") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "float4") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "float8") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "numeric") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "int8") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "int2") AssignmentCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "float4") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "float8") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "numeric") ImplicitCastContext,EnvCreateCast (ScalarType "float4") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "float4") (ScalarType "int2") AssignmentCastContext,EnvCreateCast (ScalarType "float4") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "float4") (ScalarType "float8") ImplicitCastContext,EnvCreateCast (ScalarType "float4") (ScalarType "numeric") AssignmentCastContext,EnvCreateCast (ScalarType "float8") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "float8") (ScalarType "int2") AssignmentCastContext,EnvCreateCast (ScalarType "float8") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "float8") (ScalarType "float4") AssignmentCastContext,EnvCreateCast (ScalarType "float8") (ScalarType "numeric") AssignmentCastContext,EnvCreateCast (ScalarType "numeric") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "numeric") (ScalarType "int2") AssignmentCastContext,EnvCreateCast (ScalarType "numeric") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "numeric") (ScalarType "float4") ImplicitCastContext,EnvCreateCast (ScalarType "numeric") (ScalarType "float8") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "bool") ExplicitCastContext,EnvCreateCast (ScalarType "bool") (ScalarType "int4") ExplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regproc") ImplicitCastContext,EnvCreateCast (ScalarType "regproc") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regproc") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regproc") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regproc") ImplicitCastContext,EnvCreateCast (ScalarType "regproc") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regproc") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "regproc") (ScalarType "regprocedure") ImplicitCastContext,EnvCreateCast (ScalarType "regprocedure") (ScalarType "regproc") ImplicitCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regprocedure") ImplicitCastContext,EnvCreateCast (ScalarType "regprocedure") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regprocedure") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regprocedure") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regprocedure") ImplicitCastContext,EnvCreateCast (ScalarType "regprocedure") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regprocedure") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regoper") ImplicitCastContext,EnvCreateCast (ScalarType "regoper") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regoper") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regoper") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regoper") ImplicitCastContext,EnvCreateCast (ScalarType "regoper") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regoper") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "regoper") (ScalarType "regoperator") ImplicitCastContext,EnvCreateCast (ScalarType "regoperator") (ScalarType "regoper") ImplicitCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regoperator") ImplicitCastContext,EnvCreateCast (ScalarType "regoperator") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regoperator") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regoperator") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regoperator") ImplicitCastContext,EnvCreateCast (ScalarType "regoperator") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regoperator") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regclass") ImplicitCastContext,EnvCreateCast (ScalarType "regclass") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regclass") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regclass") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regclass") ImplicitCastContext,EnvCreateCast (ScalarType "regclass") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regclass") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regtype") ImplicitCastContext,EnvCreateCast (ScalarType "regtype") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regtype") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regtype") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regtype") ImplicitCastContext,EnvCreateCast (ScalarType "regtype") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regtype") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regconfig") ImplicitCastContext,EnvCreateCast (ScalarType "regconfig") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regconfig") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regconfig") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regconfig") ImplicitCastContext,EnvCreateCast (ScalarType "regconfig") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regconfig") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "oid") (ScalarType "regdictionary") ImplicitCastContext,EnvCreateCast (ScalarType "regdictionary") (ScalarType "oid") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "regdictionary") ImplicitCastContext,EnvCreateCast (ScalarType "int2") (ScalarType "regdictionary") ImplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "regdictionary") ImplicitCastContext,EnvCreateCast (ScalarType "regdictionary") (ScalarType "int8") AssignmentCastContext,EnvCreateCast (ScalarType "regdictionary") (ScalarType "int4") AssignmentCastContext,EnvCreateCast (ScalarType "text") (ScalarType "regclass") ImplicitCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "regclass") ImplicitCastContext,EnvCreateCast (ScalarType "text") (ScalarType "bpchar") ImplicitCastContext,EnvCreateCast (ScalarType "text") (ScalarType "varchar") ImplicitCastContext,EnvCreateCast (ScalarType "bpchar") (ScalarType "text") ImplicitCastContext,EnvCreateCast (ScalarType "bpchar") (ScalarType "varchar") ImplicitCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "text") ImplicitCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "bpchar") ImplicitCastContext,EnvCreateCast (ScalarType "char") (ScalarType "text") ImplicitCastContext,EnvCreateCast (ScalarType "char") (ScalarType "bpchar") AssignmentCastContext,EnvCreateCast (ScalarType "char") (ScalarType "varchar") AssignmentCastContext,EnvCreateCast (ScalarType "name") (ScalarType "text") ImplicitCastContext,EnvCreateCast (ScalarType "name") (ScalarType "bpchar") AssignmentCastContext,EnvCreateCast (ScalarType "name") (ScalarType "varchar") AssignmentCastContext,EnvCreateCast (ScalarType "text") (ScalarType "char") AssignmentCastContext,EnvCreateCast (ScalarType "bpchar") (ScalarType "char") AssignmentCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "char") AssignmentCastContext,EnvCreateCast (ScalarType "text") (ScalarType "name") ImplicitCastContext,EnvCreateCast (ScalarType "bpchar") (ScalarType "name") ImplicitCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "name") ImplicitCastContext,EnvCreateCast (ScalarType "char") (ScalarType "int4") ExplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "char") ExplicitCastContext,EnvCreateCast (ScalarType "abstime") (ScalarType "date") AssignmentCastContext,EnvCreateCast (ScalarType "abstime") (ScalarType "time") AssignmentCastContext,EnvCreateCast (ScalarType "abstime") (ScalarType "timestamp") ImplicitCastContext,EnvCreateCast (ScalarType "abstime") (ScalarType "timestamptz") ImplicitCastContext,EnvCreateCast (ScalarType "reltime") (ScalarType "interval") ImplicitCastContext,EnvCreateCast (ScalarType "date") (ScalarType "timestamp") ImplicitCastContext,EnvCreateCast (ScalarType "date") (ScalarType "timestamptz") ImplicitCastContext,EnvCreateCast (ScalarType "time") (ScalarType "interval") ImplicitCastContext,EnvCreateCast (ScalarType "time") (ScalarType "timetz") ImplicitCastContext,EnvCreateCast (ScalarType "timestamp") (ScalarType "abstime") AssignmentCastContext,EnvCreateCast (ScalarType "timestamp") (ScalarType "date") AssignmentCastContext,EnvCreateCast (ScalarType "timestamp") (ScalarType "time") AssignmentCastContext,EnvCreateCast (ScalarType "timestamp") (ScalarType "timestamptz") ImplicitCastContext,EnvCreateCast (ScalarType "timestamptz") (ScalarType "abstime") AssignmentCastContext,EnvCreateCast (ScalarType "timestamptz") (ScalarType "date") AssignmentCastContext,EnvCreateCast (ScalarType "timestamptz") (ScalarType "time") AssignmentCastContext,EnvCreateCast (ScalarType "timestamptz") (ScalarType "timestamp") AssignmentCastContext,EnvCreateCast (ScalarType "timestamptz") (ScalarType "timetz") AssignmentCastContext,EnvCreateCast (ScalarType "interval") (ScalarType "reltime") AssignmentCastContext,EnvCreateCast (ScalarType "interval") (ScalarType "time") AssignmentCastContext,EnvCreateCast (ScalarType "timetz") (ScalarType "time") AssignmentCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "abstime") ExplicitCastContext,EnvCreateCast (ScalarType "abstime") (ScalarType "int4") ExplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "reltime") ExplicitCastContext,EnvCreateCast (ScalarType "reltime") (ScalarType "int4") ExplicitCastContext,EnvCreateCast (ScalarType "lseg") (ScalarType "point") ExplicitCastContext,EnvCreateCast (ScalarType "path") (ScalarType "point") ExplicitCastContext,EnvCreateCast (ScalarType "path") (ScalarType "polygon") AssignmentCastContext,EnvCreateCast (ScalarType "box") (ScalarType "point") ExplicitCastContext,EnvCreateCast (ScalarType "box") (ScalarType "lseg") ExplicitCastContext,EnvCreateCast (ScalarType "box") (ScalarType "polygon") AssignmentCastContext,EnvCreateCast (ScalarType "box") (ScalarType "circle") ExplicitCastContext,EnvCreateCast (ScalarType "polygon") (ScalarType "point") ExplicitCastContext,EnvCreateCast (ScalarType "polygon") (ScalarType "path") AssignmentCastContext,EnvCreateCast (ScalarType "polygon") (ScalarType "box") ExplicitCastContext,EnvCreateCast (ScalarType "polygon") (ScalarType "circle") ExplicitCastContext,EnvCreateCast (ScalarType "circle") (ScalarType "point") ExplicitCastContext,EnvCreateCast (ScalarType "circle") (ScalarType "box") ExplicitCastContext,EnvCreateCast (ScalarType "circle") (ScalarType "polygon") ExplicitCastContext,EnvCreateCast (ScalarType "cidr") (ScalarType "inet") ImplicitCastContext,EnvCreateCast (ScalarType "inet") (ScalarType "cidr") AssignmentCastContext,EnvCreateCast (ScalarType "bit") (ScalarType "varbit") ImplicitCastContext,EnvCreateCast (ScalarType "varbit") (ScalarType "bit") ImplicitCastContext,EnvCreateCast (ScalarType "int8") (ScalarType "bit") ExplicitCastContext,EnvCreateCast (ScalarType "int4") (ScalarType "bit") ExplicitCastContext,EnvCreateCast (ScalarType "bit") (ScalarType "int8") ExplicitCastContext,EnvCreateCast (ScalarType "bit") (ScalarType "int4") ExplicitCastContext,EnvCreateCast (ScalarType "cidr") (ScalarType "text") AssignmentCastContext,EnvCreateCast (ScalarType "inet") (ScalarType "text") AssignmentCastContext,EnvCreateCast (ScalarType "bool") (ScalarType "text") AssignmentCastContext,EnvCreateCast (ScalarType "xml") (ScalarType "text") AssignmentCastContext,EnvCreateCast (ScalarType "text") (ScalarType "xml") ExplicitCastContext,EnvCreateCast (ScalarType "cidr") (ScalarType "varchar") AssignmentCastContext,EnvCreateCast (ScalarType "inet") (ScalarType "varchar") AssignmentCastContext,EnvCreateCast (ScalarType "bool") (ScalarType "varchar") AssignmentCastContext,EnvCreateCast (ScalarType "xml") (ScalarType "varchar") AssignmentCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "xml") ExplicitCastContext,EnvCreateCast (ScalarType "cidr") (ScalarType "bpchar") AssignmentCastContext,EnvCreateCast (ScalarType "inet") (ScalarType "bpchar") AssignmentCastContext,EnvCreateCast (ScalarType "bool") (ScalarType "bpchar") AssignmentCastContext,EnvCreateCast (ScalarType "xml") (ScalarType "bpchar") AssignmentCastContext,EnvCreateCast (ScalarType "bpchar") (ScalarType "xml") ExplicitCastContext,EnvCreateCast (ScalarType "bpchar") (ScalarType "bpchar") ImplicitCastContext,EnvCreateCast (ScalarType "varchar") (ScalarType "varchar") ImplicitCastContext,EnvCreateCast (ScalarType "time") (ScalarType "time") ImplicitCastContext,EnvCreateCast (ScalarType "timestamp") (ScalarType "timestamp") ImplicitCastContext,EnvCreateCast (ScalarType "timestamptz") (ScalarType "timestamptz") ImplicitCastContext,EnvCreateCast (ScalarType "interval") (ScalarType "interval") ImplicitCastContext,EnvCreateCast (ScalarType "timetz") (ScalarType "timetz") ImplicitCastContext,EnvCreateCast (ScalarType "bit") (ScalarType "bit") ImplicitCastContext,EnvCreateCast (ScalarType "varbit") (ScalarType "varbit") ImplicitCastContext,EnvCreateCast (ScalarType "numeric") (ScalarType "numeric") ImplicitCastContext,EnvCreateFunction FunPrefix "~" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunPrefix "~" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunPrefix "~" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunPrefix "~" [ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunPrefix "~" [ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunPrefix "||/" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunPrefix "|/" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunPrefix "|" [ScalarType "tinterval"] (ScalarType "abstime"),EnvCreateFunction FunPrefix "@@" [ScalarType "circle"] (ScalarType "point"),EnvCreateFunction FunPrefix "@@" [ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunPrefix "@@" [ScalarType "path"] (ScalarType "point"),EnvCreateFunction FunPrefix "@@" [ScalarType "polygon"] (ScalarType "point"),EnvCreateFunction FunPrefix "@@" [ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunPrefix "@-@" [ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunPrefix "@-@" [ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunPrefix "@" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunPrefix "@" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunPrefix "@" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunPrefix "@" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunPrefix "@" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunPrefix "@" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunPrefix "?|" [ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunPrefix "?|" [ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunPrefix "?-" [ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunPrefix "?-" [ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunPrefix "-" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunPrefix "-" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunPrefix "-" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunPrefix "-" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunPrefix "-" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunPrefix "-" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunPrefix "-" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunPrefix "+" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunPrefix "+" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunPrefix "+" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunPrefix "+" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunPrefix "+" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunPrefix "+" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunPrefix "#" [ScalarType "path"] (ScalarType "int4"),EnvCreateFunction FunPrefix "#" [ScalarType "polygon"] (ScalarType "int4"),EnvCreateFunction FunPrefix "!!" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunPrefix "!!" [ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunPostfix "!" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunBinary "~~*" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~~*" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~~*" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~~" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~~" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary "~~" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~>~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~>~" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "~>=~" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "~>=~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~=" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "~=" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "~=" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "~=" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "~=" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "~<~" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "~<~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~<=~" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "~<=~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~*" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~*" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~*" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "circle",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "polygon",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "path",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "~" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "||" [Pseudo AnyArray,Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunBinary "||" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunBinary "||" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "varbit"),EnvCreateFunction FunBinary "||" [Pseudo AnyElement,Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunBinary "||" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunBinary "||" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bytea"),EnvCreateFunction FunBinary "||" [Pseudo AnyNonArray,ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunBinary "||" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "tsvector"),EnvCreateFunction FunBinary "||" [Pseudo AnyArray,Pseudo AnyElement] (Pseudo AnyArray),EnvCreateFunction FunBinary "||" [ScalarType "text",Pseudo AnyNonArray] (ScalarType "text"),EnvCreateFunction FunBinary "|>>" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "|>>" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "|>>" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "|&>" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "|&>" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "|&>" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "|" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "|" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "|" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "|" [ScalarType "inet",ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunBinary "|" [ScalarType "bit",ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunBinary "^" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunBinary "^" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "@@@" [ScalarType "tsquery",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "@@@" [ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "@@" [ScalarType "text",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "@@" [ScalarType "tsquery",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "@@" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "@@" [ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "polygon",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "path",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "@>" [ScalarType "circle",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "?||" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "?||" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "?|" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "?-|" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "?-|" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "?-" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "lseg",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "lseg",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "?#" [ScalarType "line",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary ">^" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary ">^" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>=" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunBinary ">>" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary ">>" [ScalarType "int2",ScalarType "int4"] (ScalarType "int2"),EnvCreateFunction FunBinary ">>" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary ">>" [ScalarType "bit",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunBinary ">=" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary ">=" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary ">" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "aclitem",ScalarType "aclitem"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int2vector",ScalarType "int2vector"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "cid",ScalarType "cid"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "xid",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "xid",ScalarType "xid"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "=" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<^" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "<^" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "lseg",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "lseg",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "point",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "point",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "point",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "point",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "point",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "<@" [ScalarType "point",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "<?>" [ScalarType "abstime",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "<>" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<=" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<|" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<|" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<|" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<=" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<" [ScalarType "int2",ScalarType "int4"] (ScalarType "int2"),EnvCreateFunction FunBinary "<<" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "<<" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunBinary "<<" [ScalarType "bit",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunBinary "<<" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "<<" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunBinary "<->" [ScalarType "point",ScalarType "point"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "circle",ScalarType "polygon"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "point",ScalarType "line"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "point",ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "circle",ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "point",ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "lseg",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "point",ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "lseg",ScalarType "line"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "point",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "box",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "line",ScalarType "line"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "path",ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunBinary "<->" [ScalarType "line",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunBinary "<#>" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "tinterval"),EnvCreateFunction FunBinary "<" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "<" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunBinary "/" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "/" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "/" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "/" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "/" [ScalarType "money",ScalarType "float4"] (ScalarType "money"),EnvCreateFunction FunBinary "/" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunBinary "/" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunBinary "/" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunBinary "/" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunBinary "/" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "/" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunBinary "/" [ScalarType "money",ScalarType "int4"] (ScalarType "money"),EnvCreateFunction FunBinary "/" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunBinary "/" [ScalarType "interval",ScalarType "float8"] (ScalarType "interval"),EnvCreateFunction FunBinary "/" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "/" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunBinary "/" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "/" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunBinary "/" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "/" [ScalarType "money",ScalarType "int2"] (ScalarType "money"),EnvCreateFunction FunBinary "/" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunBinary "/" [ScalarType "money",ScalarType "float8"] (ScalarType "money"),EnvCreateFunction FunBinary "/" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunBinary "-" [ScalarType "interval",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunBinary "-" [ScalarType "timestamptz",ScalarType "interval"] (ScalarType "timestamptz"),EnvCreateFunction FunBinary "-" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "interval"),EnvCreateFunction FunBinary "-" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunBinary "-" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunBinary "-" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "-" [ScalarType "date",ScalarType "int4"] (ScalarType "date"),EnvCreateFunction FunBinary "-" [ScalarType "date",ScalarType "date"] (ScalarType "int4"),EnvCreateFunction FunBinary "-" [ScalarType "date",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "-" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ArrayType (ScalarType "aclitem")),EnvCreateFunction FunBinary "-" [ScalarType "money",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunBinary "-" [ScalarType "inet",ScalarType "int8"] (ScalarType "inet"),EnvCreateFunction FunBinary "-" [ScalarType "inet",ScalarType "inet"] (ScalarType "int8"),EnvCreateFunction FunBinary "-" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunBinary "-" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunBinary "-" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunBinary "-" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunBinary "-" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "-" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunBinary "-" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "-" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunBinary "-" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "-" [ScalarType "time",ScalarType "interval"] (ScalarType "time"),EnvCreateFunction FunBinary "-" [ScalarType "timetz",ScalarType "interval"] (ScalarType "timetz"),EnvCreateFunction FunBinary "-" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "-" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunBinary "-" [ScalarType "abstime",ScalarType "reltime"] (ScalarType "abstime"),EnvCreateFunction FunBinary "-" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunBinary "-" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "-" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "-" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "-" [ScalarType "timestamp",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "-" [ScalarType "time",ScalarType "time"] (ScalarType "interval"),EnvCreateFunction FunBinary "-" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "interval"),EnvCreateFunction FunBinary "+" [ScalarType "interval",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunBinary "+" [ScalarType "date",ScalarType "time"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "+" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunBinary "+" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "+" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "+" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "+" [ScalarType "timetz",ScalarType "interval"] (ScalarType "timetz"),EnvCreateFunction FunBinary "+" [ScalarType "time",ScalarType "interval"] (ScalarType "time"),EnvCreateFunction FunBinary "+" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "+" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunBinary "+" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "+" [ScalarType "timestamp",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "+" [ScalarType "time",ScalarType "date"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "+" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunBinary "+" [ScalarType "date",ScalarType "timetz"] (ScalarType "timestamptz"),EnvCreateFunction FunBinary "+" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "+" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunBinary "+" [ScalarType "path",ScalarType "path"] (ScalarType "path"),EnvCreateFunction FunBinary "+" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunBinary "+" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunBinary "+" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunBinary "+" [ScalarType "money",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunBinary "+" [ScalarType "int8",ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunBinary "+" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ArrayType (ScalarType "aclitem")),EnvCreateFunction FunBinary "+" [ScalarType "inet",ScalarType "int8"] (ScalarType "inet"),EnvCreateFunction FunBinary "+" [ScalarType "interval",ScalarType "date"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "+" [ScalarType "date",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "+" [ScalarType "timetz",ScalarType "date"] (ScalarType "timestamptz"),EnvCreateFunction FunBinary "+" [ScalarType "interval",ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunBinary "+" [ScalarType "interval",ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunBinary "+" [ScalarType "date",ScalarType "int4"] (ScalarType "date"),EnvCreateFunction FunBinary "+" [ScalarType "interval",ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunBinary "+" [ScalarType "int4",ScalarType "date"] (ScalarType "date"),EnvCreateFunction FunBinary "+" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "+" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunBinary "+" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "+" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunBinary "+" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunBinary "+" [ScalarType "timestamptz",ScalarType "interval"] (ScalarType "timestamptz"),EnvCreateFunction FunBinary "+" [ScalarType "abstime",ScalarType "reltime"] (ScalarType "abstime"),EnvCreateFunction FunBinary "+" [ScalarType "interval",ScalarType "time"] (ScalarType "time"),EnvCreateFunction FunBinary "*" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunBinary "*" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "*" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunBinary "*" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunBinary "*" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "*" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunBinary "*" [ScalarType "money",ScalarType "float4"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "float4",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "money",ScalarType "float8"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "money",ScalarType "int4"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "money",ScalarType "int2"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "float8",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "int4",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "int2",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunBinary "*" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunBinary "*" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunBinary "*" [ScalarType "float8",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunBinary "*" [ScalarType "interval",ScalarType "float8"] (ScalarType "interval"),EnvCreateFunction FunBinary "*" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "*" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunBinary "*" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "*" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "*" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunBinary "*" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunBinary "*" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "*" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunBinary "*" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "*" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunBinary "&>" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "&>" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "&>" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "&<|" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "&<|" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "&<|" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "&<" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "&<" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "&<" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "&&" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunBinary "&&" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunBinary "&&" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunBinary "&&" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunBinary "&&" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunBinary "&&" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunBinary "&" [ScalarType "inet",ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunBinary "&" [ScalarType "bit",ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunBinary "&" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "&" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "&" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "%" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "%" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunBinary "%" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "%" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "#>=" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "#>" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "#=" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "#<>" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "#<=" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "#<" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunBinary "##" [ScalarType "line",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "lseg",ScalarType "line"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "point",ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "lseg",ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "line",ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "point",ScalarType "line"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "point",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunBinary "##" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunBinary "#" [ScalarType "bit",ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunBinary "#" [ScalarType "line",ScalarType "line"] (ScalarType "point"),EnvCreateFunction FunBinary "#" [ScalarType "box",ScalarType "box"] (ScalarType "box"),EnvCreateFunction FunBinary "#" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunBinary "#" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunBinary "#" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunBinary "#" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunBinary "!~~*" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~~*" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~~*" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~~" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~~" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~~" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~*" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~*" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~*" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunBinary "!~" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "RI_FKey_cascade_del" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_cascade_upd" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_check_ins" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_check_upd" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_noaction_del" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_noaction_upd" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_restrict_del" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_restrict_upd" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_setdefault_del" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_setdefault_upd" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_setnull_del" [] (Pseudo Trigger),EnvCreateFunction FunName "RI_FKey_setnull_upd" [] (Pseudo Trigger),EnvCreateFunction FunName "abbrev" [ScalarType "cidr"] (ScalarType "text"),EnvCreateFunction FunName "abbrev" [ScalarType "inet"] (ScalarType "text"),EnvCreateFunction FunName "abs" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "abs" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "abs" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "abs" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "abs" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "abs" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "abstime" [ScalarType "timestamp"] (ScalarType "abstime"),EnvCreateFunction FunName "abstime" [ScalarType "timestamptz"] (ScalarType "abstime"),EnvCreateFunction FunName "abstimeeq" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "abstimege" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "abstimegt" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "abstimein" [Pseudo Cstring] (ScalarType "abstime"),EnvCreateFunction FunName "abstimele" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "abstimelt" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "abstimene" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "abstimeout" [ScalarType "abstime"] (Pseudo Cstring),EnvCreateFunction FunName "abstimerecv" [Pseudo Internal] (ScalarType "abstime"),EnvCreateFunction FunName "abstimesend" [ScalarType "abstime"] (ScalarType "bytea"),EnvCreateFunction FunName "aclcontains" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ScalarType "bool"),EnvCreateFunction FunName "aclinsert" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ArrayType (ScalarType "aclitem")),EnvCreateFunction FunName "aclitemeq" [ScalarType "aclitem",ScalarType "aclitem"] (ScalarType "bool"),EnvCreateFunction FunName "aclitemin" [Pseudo Cstring] (ScalarType "aclitem"),EnvCreateFunction FunName "aclitemout" [ScalarType "aclitem"] (Pseudo Cstring),EnvCreateFunction FunName "aclremove" [ArrayType (ScalarType "aclitem"),ScalarType "aclitem"] (ArrayType (ScalarType "aclitem")),EnvCreateFunction FunName "acos" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "age" [ScalarType "xid"] (ScalarType "int4"),EnvCreateFunction FunName "age" [ScalarType "timestamp"] (ScalarType "interval"),EnvCreateFunction FunName "age" [ScalarType "timestamptz"] (ScalarType "interval"),EnvCreateFunction FunName "age" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "interval"),EnvCreateFunction FunName "age" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "interval"),EnvCreateFunction FunName "any_in" [Pseudo Cstring] (Pseudo Any),EnvCreateFunction FunName "any_out" [Pseudo Any] (Pseudo Cstring),EnvCreateFunction FunName "anyarray_in" [Pseudo Cstring] (Pseudo AnyArray),EnvCreateFunction FunName "anyarray_out" [Pseudo AnyArray] (Pseudo Cstring),EnvCreateFunction FunName "anyarray_recv" [Pseudo Internal] (Pseudo AnyArray),EnvCreateFunction FunName "anyarray_send" [Pseudo AnyArray] (ScalarType "bytea"),EnvCreateFunction FunName "anyelement_in" [Pseudo Cstring] (Pseudo AnyElement),EnvCreateFunction FunName "anyelement_out" [Pseudo AnyElement] (Pseudo Cstring),EnvCreateFunction FunName "anyenum_in" [Pseudo Cstring] (Pseudo AnyEnum),EnvCreateFunction FunName "anyenum_out" [Pseudo AnyEnum] (Pseudo Cstring),EnvCreateFunction FunName "anynonarray_in" [Pseudo Cstring] (Pseudo AnyNonArray),EnvCreateFunction FunName "anynonarray_out" [Pseudo AnyNonArray] (Pseudo Cstring),EnvCreateFunction FunName "anytextcat" [Pseudo AnyNonArray,ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "area" [ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunName "area" [ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "area" [ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunName "areajoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "areasel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "array_agg_finalfn" [Pseudo Internal] (Pseudo AnyArray),EnvCreateFunction FunName "array_agg_transfn" [Pseudo Internal,Pseudo AnyElement] (Pseudo Internal),EnvCreateFunction FunName "array_append" [Pseudo AnyArray,Pseudo AnyElement] (Pseudo AnyArray),EnvCreateFunction FunName "array_cat" [Pseudo AnyArray,Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunName "array_dims" [Pseudo AnyArray] (ScalarType "text"),EnvCreateFunction FunName "array_eq" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "array_fill" [Pseudo AnyElement,ArrayType (ScalarType "int4")] (Pseudo AnyArray),EnvCreateFunction FunName "array_fill" [Pseudo AnyElement,ArrayType (ScalarType "int4"),ArrayType (ScalarType "int4")] (Pseudo AnyArray),EnvCreateFunction FunName "array_ge" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "array_gt" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "array_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (Pseudo AnyArray),EnvCreateFunction FunName "array_larger" [Pseudo AnyArray,Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunName "array_le" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "array_length" [Pseudo AnyArray,ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "array_lower" [Pseudo AnyArray,ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "array_lt" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "array_ndims" [Pseudo AnyArray] (ScalarType "int4"),EnvCreateFunction FunName "array_ne" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "array_out" [Pseudo AnyArray] (Pseudo Cstring),EnvCreateFunction FunName "array_prepend" [Pseudo AnyElement,Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunName "array_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (Pseudo AnyArray),EnvCreateFunction FunName "array_send" [Pseudo AnyArray] (ScalarType "bytea"),EnvCreateFunction FunName "array_smaller" [Pseudo AnyArray,Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunName "array_to_string" [Pseudo AnyArray,ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "array_upper" [Pseudo AnyArray,ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "arraycontained" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "arraycontains" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "arrayoverlap" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "bool"),EnvCreateFunction FunName "ascii" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "ascii_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "ascii_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "asin" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "atan" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "atan2" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "big5_to_euc_tw" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "big5_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "big5_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "bit" [ScalarType "int8",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "bit" [ScalarType "int4",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "bit" [ScalarType "bit",ScalarType "int4",ScalarType "bool"] (ScalarType "bit"),EnvCreateFunction FunName "bit_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "bit_length" [ScalarType "bytea"] (ScalarType "int4"),EnvCreateFunction FunName "bit_length" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "bit_length" [ScalarType "bit"] (ScalarType "int4"),EnvCreateFunction FunName "bit_out" [ScalarType "bit"] (Pseudo Cstring),EnvCreateFunction FunName "bit_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "bit_send" [ScalarType "bit"] (ScalarType "bytea"),EnvCreateFunction FunName "bitand" [ScalarType "bit",ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunName "bitcat" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "varbit"),EnvCreateFunction FunName "bitcmp" [ScalarType "bit",ScalarType "bit"] (ScalarType "int4"),EnvCreateFunction FunName "biteq" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunName "bitge" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunName "bitgt" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunName "bitle" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunName "bitlt" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunName "bitne" [ScalarType "bit",ScalarType "bit"] (ScalarType "bool"),EnvCreateFunction FunName "bitnot" [ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunName "bitor" [ScalarType "bit",ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunName "bitshiftleft" [ScalarType "bit",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "bitshiftright" [ScalarType "bit",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "bittypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "bittypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "bitxor" [ScalarType "bit",ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunName "bool" [ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "booland_statefunc" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "booleq" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boolge" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boolgt" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boolin" [Pseudo Cstring] (ScalarType "bool"),EnvCreateFunction FunName "boolle" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boollt" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boolne" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boolor_statefunc" [ScalarType "bool",ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunName "boolout" [ScalarType "bool"] (Pseudo Cstring),EnvCreateFunction FunName "boolrecv" [Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "boolsend" [ScalarType "bool"] (ScalarType "bytea"),EnvCreateFunction FunName "box" [ScalarType "polygon"] (ScalarType "box"),EnvCreateFunction FunName "box" [ScalarType "circle"] (ScalarType "box"),EnvCreateFunction FunName "box" [ScalarType "point",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunName "box_above" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_above_eq" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_add" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunName "box_below" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_below_eq" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_center" [ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunName "box_contain" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_contained" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_distance" [ScalarType "box",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "box_div" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunName "box_eq" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_ge" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_gt" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_in" [Pseudo Cstring] (ScalarType "box"),EnvCreateFunction FunName "box_intersect" [ScalarType "box",ScalarType "box"] (ScalarType "box"),EnvCreateFunction FunName "box_le" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_left" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_lt" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_mul" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunName "box_out" [ScalarType "box"] (Pseudo Cstring),EnvCreateFunction FunName "box_overabove" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_overbelow" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_overlap" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_overleft" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_overright" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_recv" [Pseudo Internal] (ScalarType "box"),EnvCreateFunction FunName "box_right" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_same" [ScalarType "box",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "box_send" [ScalarType "box"] (ScalarType "bytea"),EnvCreateFunction FunName "box_sub" [ScalarType "box",ScalarType "point"] (ScalarType "box"),EnvCreateFunction FunName "bpchar" [ScalarType "char"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpchar" [ScalarType "name"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpchar" [ScalarType "bpchar",ScalarType "int4",ScalarType "bool"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpchar_larger" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpchar_pattern_ge" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpchar_pattern_gt" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpchar_pattern_le" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpchar_pattern_lt" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpchar_smaller" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpcharcmp" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "bpchareq" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharge" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpchargt" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpchariclike" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharicnlike" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharicregexeq" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharicregexne" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharin" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpcharle" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharlike" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharlt" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharne" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharnlike" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharout" [ScalarType "bpchar"] (Pseudo Cstring),EnvCreateFunction FunName "bpcharrecv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "bpchar"),EnvCreateFunction FunName "bpcharregexeq" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharregexne" [ScalarType "bpchar",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "bpcharsend" [ScalarType "bpchar"] (ScalarType "bytea"),EnvCreateFunction FunName "bpchartypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "bpchartypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "broadcast" [ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "btabstimecmp" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "int4"),EnvCreateFunction FunName "btarraycmp" [Pseudo AnyArray,Pseudo AnyArray] (ScalarType "int4"),EnvCreateFunction FunName "btbeginscan" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "btboolcmp" [ScalarType "bool",ScalarType "bool"] (ScalarType "int4"),EnvCreateFunction FunName "btbpchar_pattern_cmp" [ScalarType "bpchar",ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "btbuild" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "btbulkdelete" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "btcharcmp" [ScalarType "char",ScalarType "char"] (ScalarType "int4"),EnvCreateFunction FunName "btcostestimate" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "btendscan" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "btfloat48cmp" [ScalarType "float4",ScalarType "float8"] (ScalarType "int4"),EnvCreateFunction FunName "btfloat4cmp" [ScalarType "float4",ScalarType "float4"] (ScalarType "int4"),EnvCreateFunction FunName "btfloat84cmp" [ScalarType "float8",ScalarType "float4"] (ScalarType "int4"),EnvCreateFunction FunName "btfloat8cmp" [ScalarType "float8",ScalarType "float8"] (ScalarType "int4"),EnvCreateFunction FunName "btgetbitmap" [Pseudo Internal,Pseudo Internal] (ScalarType "int8"),EnvCreateFunction FunName "btgettuple" [Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "btinsert" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "btint24cmp" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "btint28cmp" [ScalarType "int2",ScalarType "int8"] (ScalarType "int4"),EnvCreateFunction FunName "btint2cmp" [ScalarType "int2",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "btint42cmp" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "btint48cmp" [ScalarType "int4",ScalarType "int8"] (ScalarType "int4"),EnvCreateFunction FunName "btint4cmp" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "btint82cmp" [ScalarType "int8",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "btint84cmp" [ScalarType "int8",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "btint8cmp" [ScalarType "int8",ScalarType "int8"] (ScalarType "int4"),EnvCreateFunction FunName "btmarkpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "btnamecmp" [ScalarType "name",ScalarType "name"] (ScalarType "int4"),EnvCreateFunction FunName "btoidcmp" [ScalarType "oid",ScalarType "oid"] (ScalarType "int4"),EnvCreateFunction FunName "btoidvectorcmp" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "int4"),EnvCreateFunction FunName "btoptions" [ArrayType (ScalarType "text"),ScalarType "bool"] (ScalarType "bytea"),EnvCreateFunction FunName "btrecordcmp" [Pseudo Record,Pseudo Record] (ScalarType "int4"),EnvCreateFunction FunName "btreltimecmp" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "int4"),EnvCreateFunction FunName "btrescan" [Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "btrestrpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "btrim" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "btrim" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bytea"),EnvCreateFunction FunName "btrim" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "bttext_pattern_cmp" [ScalarType "text",ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "bttextcmp" [ScalarType "text",ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "bttidcmp" [ScalarType "tid",ScalarType "tid"] (ScalarType "int4"),EnvCreateFunction FunName "bttintervalcmp" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "int4"),EnvCreateFunction FunName "btvacuumcleanup" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "byteacat" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bytea"),EnvCreateFunction FunName "byteacmp" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "int4"),EnvCreateFunction FunName "byteaeq" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "byteage" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "byteagt" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "byteain" [Pseudo Cstring] (ScalarType "bytea"),EnvCreateFunction FunName "byteale" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "bytealike" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "bytealt" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "byteane" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "byteanlike" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "byteaout" [ScalarType "bytea"] (Pseudo Cstring),EnvCreateFunction FunName "bytearecv" [Pseudo Internal] (ScalarType "bytea"),EnvCreateFunction FunName "byteasend" [ScalarType "bytea"] (ScalarType "bytea"),EnvCreateFunction FunName "cash_cmp" [ScalarType "money",ScalarType "money"] (ScalarType "int4"),EnvCreateFunction FunName "cash_div_flt4" [ScalarType "money",ScalarType "float4"] (ScalarType "money"),EnvCreateFunction FunName "cash_div_flt8" [ScalarType "money",ScalarType "float8"] (ScalarType "money"),EnvCreateFunction FunName "cash_div_int2" [ScalarType "money",ScalarType "int2"] (ScalarType "money"),EnvCreateFunction FunName "cash_div_int4" [ScalarType "money",ScalarType "int4"] (ScalarType "money"),EnvCreateFunction FunName "cash_eq" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunName "cash_ge" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunName "cash_gt" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunName "cash_in" [Pseudo Cstring] (ScalarType "money"),EnvCreateFunction FunName "cash_le" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunName "cash_lt" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunName "cash_mi" [ScalarType "money",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "cash_mul_flt4" [ScalarType "money",ScalarType "float4"] (ScalarType "money"),EnvCreateFunction FunName "cash_mul_flt8" [ScalarType "money",ScalarType "float8"] (ScalarType "money"),EnvCreateFunction FunName "cash_mul_int2" [ScalarType "money",ScalarType "int2"] (ScalarType "money"),EnvCreateFunction FunName "cash_mul_int4" [ScalarType "money",ScalarType "int4"] (ScalarType "money"),EnvCreateFunction FunName "cash_ne" [ScalarType "money",ScalarType "money"] (ScalarType "bool"),EnvCreateFunction FunName "cash_out" [ScalarType "money"] (Pseudo Cstring),EnvCreateFunction FunName "cash_pl" [ScalarType "money",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "cash_recv" [Pseudo Internal] (ScalarType "money"),EnvCreateFunction FunName "cash_send" [ScalarType "money"] (ScalarType "bytea"),EnvCreateFunction FunName "cash_words" [ScalarType "money"] (ScalarType "text"),EnvCreateFunction FunName "cashlarger" [ScalarType "money",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "cashsmaller" [ScalarType "money",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "cbrt" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "ceil" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "ceil" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "ceiling" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "ceiling" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "center" [ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunName "center" [ScalarType "circle"] (ScalarType "point"),EnvCreateFunction FunName "char" [ScalarType "int4"] (ScalarType "char"),EnvCreateFunction FunName "char" [ScalarType "text"] (ScalarType "char"),EnvCreateFunction FunName "char_length" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "char_length" [ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "character_length" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "character_length" [ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "chareq" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunName "charge" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunName "chargt" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunName "charin" [Pseudo Cstring] (ScalarType "char"),EnvCreateFunction FunName "charle" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunName "charlt" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunName "charne" [ScalarType "char",ScalarType "char"] (ScalarType "bool"),EnvCreateFunction FunName "charout" [ScalarType "char"] (Pseudo Cstring),EnvCreateFunction FunName "charrecv" [Pseudo Internal] (ScalarType "char"),EnvCreateFunction FunName "charsend" [ScalarType "char"] (ScalarType "bytea"),EnvCreateFunction FunName "chr" [ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "cideq" [ScalarType "cid",ScalarType "cid"] (ScalarType "bool"),EnvCreateFunction FunName "cidin" [Pseudo Cstring] (ScalarType "cid"),EnvCreateFunction FunName "cidout" [ScalarType "cid"] (Pseudo Cstring),EnvCreateFunction FunName "cidr" [ScalarType "inet"] (ScalarType "cidr"),EnvCreateFunction FunName "cidr_in" [Pseudo Cstring] (ScalarType "cidr"),EnvCreateFunction FunName "cidr_out" [ScalarType "cidr"] (Pseudo Cstring),EnvCreateFunction FunName "cidr_recv" [Pseudo Internal] (ScalarType "cidr"),EnvCreateFunction FunName "cidr_send" [ScalarType "cidr"] (ScalarType "bytea"),EnvCreateFunction FunName "cidrecv" [Pseudo Internal] (ScalarType "cid"),EnvCreateFunction FunName "cidsend" [ScalarType "cid"] (ScalarType "bytea"),EnvCreateFunction FunName "circle" [ScalarType "box"] (ScalarType "circle"),EnvCreateFunction FunName "circle" [ScalarType "polygon"] (ScalarType "circle"),EnvCreateFunction FunName "circle" [ScalarType "point",ScalarType "float8"] (ScalarType "circle"),EnvCreateFunction FunName "circle_above" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_add_pt" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunName "circle_below" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_center" [ScalarType "circle"] (ScalarType "point"),EnvCreateFunction FunName "circle_contain" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_contain_pt" [ScalarType "circle",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "circle_contained" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_distance" [ScalarType "circle",ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunName "circle_div_pt" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunName "circle_eq" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_ge" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_gt" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_in" [Pseudo Cstring] (ScalarType "circle"),EnvCreateFunction FunName "circle_le" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_left" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_lt" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_mul_pt" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunName "circle_ne" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_out" [ScalarType "circle"] (Pseudo Cstring),EnvCreateFunction FunName "circle_overabove" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_overbelow" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_overlap" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_overleft" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_overright" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_recv" [Pseudo Internal] (ScalarType "circle"),EnvCreateFunction FunName "circle_right" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_same" [ScalarType "circle",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "circle_send" [ScalarType "circle"] (ScalarType "bytea"),EnvCreateFunction FunName "circle_sub_pt" [ScalarType "circle",ScalarType "point"] (ScalarType "circle"),EnvCreateFunction FunName "clock_timestamp" [] (ScalarType "timestamptz"),EnvCreateFunction FunName "close_lb" [ScalarType "line",ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunName "close_ls" [ScalarType "line",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunName "close_lseg" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunName "close_pb" [ScalarType "point",ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunName "close_pl" [ScalarType "point",ScalarType "line"] (ScalarType "point"),EnvCreateFunction FunName "close_ps" [ScalarType "point",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunName "close_sb" [ScalarType "lseg",ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunName "close_sl" [ScalarType "lseg",ScalarType "line"] (ScalarType "point"),EnvCreateFunction FunName "col_description" [ScalarType "oid",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "contjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "contsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "convert" [ScalarType "bytea",ScalarType "name",ScalarType "name"] (ScalarType "bytea"),EnvCreateFunction FunName "convert_from" [ScalarType "bytea",ScalarType "name"] (ScalarType "text"),EnvCreateFunction FunName "convert_to" [ScalarType "text",ScalarType "name"] (ScalarType "bytea"),EnvCreateFunction FunName "cos" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "cot" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "cstring_in" [Pseudo Cstring] (Pseudo Cstring),EnvCreateFunction FunName "cstring_out" [Pseudo Cstring] (Pseudo Cstring),EnvCreateFunction FunName "cstring_recv" [Pseudo Internal] (Pseudo Cstring),EnvCreateFunction FunName "cstring_send" [Pseudo Cstring] (ScalarType "bytea"),EnvCreateFunction FunName "current_database" [] (ScalarType "name"),EnvCreateFunction FunName "current_query" [] (ScalarType "text"),EnvCreateFunction FunName "current_schema" [] (ScalarType "name"),EnvCreateFunction FunName "current_schemas" [ScalarType "bool"] (ArrayType (ScalarType "name")),EnvCreateFunction FunName "current_setting" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "current_user" [] (ScalarType "name"),EnvCreateFunction FunName "currtid" [ScalarType "oid",ScalarType "tid"] (ScalarType "tid"),EnvCreateFunction FunName "currtid2" [ScalarType "text",ScalarType "tid"] (ScalarType "tid"),EnvCreateFunction FunName "currval" [ScalarType "regclass"] (ScalarType "int8"),EnvCreateFunction FunName "cursor_to_xml" [ScalarType "refcursor",ScalarType "int4",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "cursor_to_xmlschema" [ScalarType "refcursor",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "database_to_xml" [ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "database_to_xml_and_xmlschema" [ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "database_to_xmlschema" [ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "date" [ScalarType "abstime"] (ScalarType "date"),EnvCreateFunction FunName "date" [ScalarType "timestamp"] (ScalarType "date"),EnvCreateFunction FunName "date" [ScalarType "timestamptz"] (ScalarType "date"),EnvCreateFunction FunName "date_cmp" [ScalarType "date",ScalarType "date"] (ScalarType "int4"),EnvCreateFunction FunName "date_cmp_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "int4"),EnvCreateFunction FunName "date_cmp_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "int4"),EnvCreateFunction FunName "date_eq" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "date_eq_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "date_eq_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "date_ge" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "date_ge_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "date_ge_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "date_gt" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "date_gt_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "date_gt_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "date_in" [Pseudo Cstring] (ScalarType "date"),EnvCreateFunction FunName "date_larger" [ScalarType "date",ScalarType "date"] (ScalarType "date"),EnvCreateFunction FunName "date_le" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "date_le_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "date_le_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "date_lt" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "date_lt_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "date_lt_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "date_mi" [ScalarType "date",ScalarType "date"] (ScalarType "int4"),EnvCreateFunction FunName "date_mi_interval" [ScalarType "date",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunName "date_mii" [ScalarType "date",ScalarType "int4"] (ScalarType "date"),EnvCreateFunction FunName "date_ne" [ScalarType "date",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "date_ne_timestamp" [ScalarType "date",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "date_ne_timestamptz" [ScalarType "date",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "date_out" [ScalarType "date"] (Pseudo Cstring),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "abstime"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "reltime"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "date"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "time"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "timestamp"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "timestamptz"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "interval"] (ScalarType "float8"),EnvCreateFunction FunName "date_part" [ScalarType "text",ScalarType "timetz"] (ScalarType "float8"),EnvCreateFunction FunName "date_pl_interval" [ScalarType "date",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunName "date_pli" [ScalarType "date",ScalarType "int4"] (ScalarType "date"),EnvCreateFunction FunName "date_recv" [Pseudo Internal] (ScalarType "date"),EnvCreateFunction FunName "date_send" [ScalarType "date"] (ScalarType "bytea"),EnvCreateFunction FunName "date_smaller" [ScalarType "date",ScalarType "date"] (ScalarType "date"),EnvCreateFunction FunName "date_trunc" [ScalarType "text",ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunName "date_trunc" [ScalarType "text",ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunName "date_trunc" [ScalarType "text",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "datetime_pl" [ScalarType "date",ScalarType "time"] (ScalarType "timestamp"),EnvCreateFunction FunName "datetimetz_pl" [ScalarType "date",ScalarType "timetz"] (ScalarType "timestamptz"),EnvCreateFunction FunName "dcbrt" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "decode" [ScalarType "text",ScalarType "text"] (ScalarType "bytea"),EnvCreateFunction FunName "degrees" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "dexp" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "diagonal" [ScalarType "box"] (ScalarType "lseg"),EnvCreateFunction FunName "diameter" [ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunName "dispell_init" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dispell_lexize" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dist_cpoly" [ScalarType "circle",ScalarType "polygon"] (ScalarType "float8"),EnvCreateFunction FunName "dist_lb" [ScalarType "line",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "dist_pb" [ScalarType "point",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "dist_pc" [ScalarType "point",ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunName "dist_pl" [ScalarType "point",ScalarType "line"] (ScalarType "float8"),EnvCreateFunction FunName "dist_ppath" [ScalarType "point",ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunName "dist_ps" [ScalarType "point",ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunName "dist_sb" [ScalarType "lseg",ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "dist_sl" [ScalarType "lseg",ScalarType "line"] (ScalarType "float8"),EnvCreateFunction FunName "div" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "dlog1" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "dlog10" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "domain_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (Pseudo Any),EnvCreateFunction FunName "domain_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (Pseudo Any),EnvCreateFunction FunName "dpow" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "dround" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "dsimple_init" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dsimple_lexize" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dsnowball_init" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dsnowball_lexize" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dsqrt" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "dsynonym_init" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dsynonym_lexize" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "dtrunc" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "encode" [ScalarType "bytea",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "enum_cmp" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "int4"),EnvCreateFunction FunName "enum_eq" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunName "enum_first" [Pseudo AnyEnum] (Pseudo AnyEnum),EnvCreateFunction FunName "enum_ge" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunName "enum_gt" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunName "enum_in" [Pseudo Cstring,ScalarType "oid"] (Pseudo AnyEnum),EnvCreateFunction FunName "enum_larger" [Pseudo AnyEnum,Pseudo AnyEnum] (Pseudo AnyEnum),EnvCreateFunction FunName "enum_last" [Pseudo AnyEnum] (Pseudo AnyEnum),EnvCreateFunction FunName "enum_le" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunName "enum_lt" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunName "enum_ne" [Pseudo AnyEnum,Pseudo AnyEnum] (ScalarType "bool"),EnvCreateFunction FunName "enum_out" [Pseudo AnyEnum] (Pseudo Cstring),EnvCreateFunction FunName "enum_range" [Pseudo AnyEnum] (Pseudo AnyArray),EnvCreateFunction FunName "enum_range" [Pseudo AnyEnum,Pseudo AnyEnum] (Pseudo AnyArray),EnvCreateFunction FunName "enum_recv" [Pseudo Cstring,ScalarType "oid"] (Pseudo AnyEnum),EnvCreateFunction FunName "enum_send" [Pseudo AnyEnum] (ScalarType "bytea"),EnvCreateFunction FunName "enum_smaller" [Pseudo AnyEnum,Pseudo AnyEnum] (Pseudo AnyEnum),EnvCreateFunction FunName "eqjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "eqsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "euc_cn_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_cn_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_jis_2004_to_shift_jis_2004" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_jis_2004_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_jp_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_jp_to_sjis" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_jp_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_kr_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_kr_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_tw_to_big5" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_tw_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "euc_tw_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "exp" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "exp" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "factorial" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunName "family" [ScalarType "inet"] (ScalarType "int4"),EnvCreateFunction FunName "flatfile_update_trigger" [] (Pseudo Trigger),EnvCreateFunction FunName "float4" [ScalarType "int8"] (ScalarType "float4"),EnvCreateFunction FunName "float4" [ScalarType "int2"] (ScalarType "float4"),EnvCreateFunction FunName "float4" [ScalarType "int4"] (ScalarType "float4"),EnvCreateFunction FunName "float4" [ScalarType "float8"] (ScalarType "float4"),EnvCreateFunction FunName "float4" [ScalarType "numeric"] (ScalarType "float4"),EnvCreateFunction FunName "float48div" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float48eq" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float48ge" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float48gt" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float48le" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float48lt" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float48mi" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float48mul" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float48ne" [ScalarType "float4",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float48pl" [ScalarType "float4",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float4_accum" [ArrayType (ScalarType "float8"),ScalarType "float4"] (ArrayType (ScalarType "float8")),EnvCreateFunction FunName "float4abs" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4div" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4eq" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float4ge" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float4gt" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float4in" [Pseudo Cstring] (ScalarType "float4"),EnvCreateFunction FunName "float4larger" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4le" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float4lt" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float4mi" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4mul" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4ne" [ScalarType "float4",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float4out" [ScalarType "float4"] (Pseudo Cstring),EnvCreateFunction FunName "float4pl" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4recv" [Pseudo Internal] (ScalarType "float4"),EnvCreateFunction FunName "float4send" [ScalarType "float4"] (ScalarType "bytea"),EnvCreateFunction FunName "float4smaller" [ScalarType "float4",ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4um" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float4up" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunName "float8" [ScalarType "int8"] (ScalarType "float8"),EnvCreateFunction FunName "float8" [ScalarType "int2"] (ScalarType "float8"),EnvCreateFunction FunName "float8" [ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "float8" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunName "float8" [ScalarType "numeric"] (ScalarType "float8"),EnvCreateFunction FunName "float84div" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunName "float84eq" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float84ge" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float84gt" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float84le" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float84lt" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float84mi" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunName "float84mul" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunName "float84ne" [ScalarType "float8",ScalarType "float4"] (ScalarType "bool"),EnvCreateFunction FunName "float84pl" [ScalarType "float8",ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunName "float8_accum" [ArrayType (ScalarType "float8"),ScalarType "float8"] (ArrayType (ScalarType "float8")),EnvCreateFunction FunName "float8_avg" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_corr" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_covar_pop" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_covar_samp" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_accum" [ArrayType (ScalarType "float8"),ScalarType "float8",ScalarType "float8"] (ArrayType (ScalarType "float8")),EnvCreateFunction FunName "float8_regr_avgx" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_avgy" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_intercept" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_r2" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_slope" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_sxx" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_sxy" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_regr_syy" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_stddev_pop" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_stddev_samp" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_var_pop" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8_var_samp" [ArrayType (ScalarType "float8")] (ScalarType "float8"),EnvCreateFunction FunName "float8abs" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8div" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8eq" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float8ge" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float8gt" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float8in" [Pseudo Cstring] (ScalarType "float8"),EnvCreateFunction FunName "float8larger" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8le" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float8lt" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float8mi" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8mul" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8ne" [ScalarType "float8",ScalarType "float8"] (ScalarType "bool"),EnvCreateFunction FunName "float8out" [ScalarType "float8"] (Pseudo Cstring),EnvCreateFunction FunName "float8pl" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8recv" [Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "float8send" [ScalarType "float8"] (ScalarType "bytea"),EnvCreateFunction FunName "float8smaller" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8um" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "float8up" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "floor" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "floor" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "flt4_mul_cash" [ScalarType "float4",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "flt8_mul_cash" [ScalarType "float8",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "fmgr_c_validator" [ScalarType "oid"] (Pseudo Void),EnvCreateFunction FunName "fmgr_internal_validator" [ScalarType "oid"] (Pseudo Void),EnvCreateFunction FunName "fmgr_sql_validator" [ScalarType "oid"] (Pseudo Void),EnvCreateFunction FunName "format_type" [ScalarType "oid",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "gb18030_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "gbk_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "generate_series" [ScalarType "int8",ScalarType "int8"] (SetOfType (ScalarType "int8")),EnvCreateFunction FunName "generate_series" [ScalarType "int4",ScalarType "int4"] (SetOfType (ScalarType "int4")),EnvCreateFunction FunName "generate_series" [ScalarType "int8",ScalarType "int8",ScalarType "int8"] (SetOfType (ScalarType "int8")),EnvCreateFunction FunName "generate_series" [ScalarType "int4",ScalarType "int4",ScalarType "int4"] (SetOfType (ScalarType "int4")),EnvCreateFunction FunName "generate_series" [ScalarType "timestamp",ScalarType "timestamp",ScalarType "interval"] (SetOfType (ScalarType "timestamp")),EnvCreateFunction FunName "generate_series" [ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "interval"] (SetOfType (ScalarType "timestamptz")),EnvCreateFunction FunName "generate_subscripts" [Pseudo AnyArray,ScalarType "int4"] (SetOfType (ScalarType "int4")),EnvCreateFunction FunName "generate_subscripts" [Pseudo AnyArray,ScalarType "int4",ScalarType "bool"] (SetOfType (ScalarType "int4")),EnvCreateFunction FunName "get_bit" [ScalarType "bytea",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "get_byte" [ScalarType "bytea",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "get_current_ts_config" [] (ScalarType "regconfig"),EnvCreateFunction FunName "getdatabaseencoding" [] (ScalarType "name"),EnvCreateFunction FunName "getpgusername" [] (ScalarType "name"),EnvCreateFunction FunName "gin_cmp_prefix" [ScalarType "text",ScalarType "text",ScalarType "int2",Pseudo Internal] (ScalarType "int4"),EnvCreateFunction FunName "gin_cmp_tslexeme" [ScalarType "text",ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "gin_extract_tsquery" [ScalarType "tsquery",Pseudo Internal,ScalarType "int2",Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gin_extract_tsvector" [ScalarType "tsvector",Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gin_tsquery_consistent" [Pseudo Internal,ScalarType "int2",ScalarType "tsquery",ScalarType "int4",Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "ginarrayconsistent" [Pseudo Internal,ScalarType "int2",Pseudo AnyArray,ScalarType "int4",Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "ginarrayextract" [Pseudo AnyArray,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "ginbeginscan" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "ginbuild" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "ginbulkdelete" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gincostestimate" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "ginendscan" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "gingetbitmap" [Pseudo Internal,Pseudo Internal] (ScalarType "int8"),EnvCreateFunction FunName "gininsert" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "ginmarkpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "ginoptions" [ArrayType (ScalarType "text"),ScalarType "bool"] (ScalarType "bytea"),EnvCreateFunction FunName "ginqueryarrayextract" [Pseudo AnyArray,Pseudo Internal,ScalarType "int2",Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "ginrescan" [Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "ginrestrpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "ginvacuumcleanup" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_box_compress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_box_consistent" [Pseudo Internal,ScalarType "box",ScalarType "int4",ScalarType "oid",Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gist_box_decompress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_box_penalty" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_box_picksplit" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_box_same" [ScalarType "box",ScalarType "box",Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_box_union" [Pseudo Internal,Pseudo Internal] (ScalarType "box"),EnvCreateFunction FunName "gist_circle_compress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_circle_consistent" [Pseudo Internal,ScalarType "circle",ScalarType "int4",ScalarType "oid",Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gist_poly_compress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gist_poly_consistent" [Pseudo Internal,ScalarType "polygon",ScalarType "int4",ScalarType "oid",Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gistbeginscan" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gistbuild" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gistbulkdelete" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gistcostestimate" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "gistendscan" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "gistgetbitmap" [Pseudo Internal,Pseudo Internal] (ScalarType "int8"),EnvCreateFunction FunName "gistgettuple" [Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gistinsert" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gistmarkpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "gistoptions" [ArrayType (ScalarType "text"),ScalarType "bool"] (ScalarType "bytea"),EnvCreateFunction FunName "gistrescan" [Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "gistrestrpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "gistvacuumcleanup" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsquery_compress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsquery_consistent" [Pseudo Internal,Pseudo Internal,ScalarType "int4",ScalarType "oid",Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gtsquery_decompress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsquery_penalty" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsquery_picksplit" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsquery_same" [ScalarType "int8",ScalarType "int8",Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsquery_union" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvector_compress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvector_consistent" [Pseudo Internal,ScalarType "gtsvector",ScalarType "int4",ScalarType "oid",Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "gtsvector_decompress" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvector_penalty" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvector_picksplit" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvector_same" [ScalarType "gtsvector",ScalarType "gtsvector",Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvector_union" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "gtsvectorin" [Pseudo Cstring] (ScalarType "gtsvector"),EnvCreateFunction FunName "gtsvectorout" [ScalarType "gtsvector"] (Pseudo Cstring),EnvCreateFunction FunName "has_any_column_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_any_column_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_any_column_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_any_column_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_any_column_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_any_column_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "text",ScalarType "int2",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "oid",ScalarType "int2",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "name",ScalarType "text",ScalarType "int2",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "name",ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "name",ScalarType "oid",ScalarType "int2",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "oid",ScalarType "text",ScalarType "int2",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "int2",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_column_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_database_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_database_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_database_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_database_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_database_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_database_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_foreign_data_wrapper_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_foreign_data_wrapper_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_foreign_data_wrapper_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_foreign_data_wrapper_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_foreign_data_wrapper_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_foreign_data_wrapper_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_function_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_function_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_function_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_function_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_function_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_function_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_language_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_language_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_language_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_language_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_language_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_language_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_schema_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_schema_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_schema_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_schema_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_schema_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_schema_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_server_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_server_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_server_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_server_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_server_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_server_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_table_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_table_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_table_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_table_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_table_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_table_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_tablespace_privilege" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_tablespace_privilege" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_tablespace_privilege" [ScalarType "name",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_tablespace_privilege" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_tablespace_privilege" [ScalarType "oid",ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "has_tablespace_privilege" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "hash_aclitem" [ScalarType "aclitem"] (ScalarType "int4"),EnvCreateFunction FunName "hash_numeric" [ScalarType "numeric"] (ScalarType "int4"),EnvCreateFunction FunName "hashbeginscan" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "hashbpchar" [ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "hashbuild" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "hashbulkdelete" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "hashchar" [ScalarType "char"] (ScalarType "int4"),EnvCreateFunction FunName "hashcostestimate" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "hashendscan" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "hashenum" [Pseudo AnyEnum] (ScalarType "int4"),EnvCreateFunction FunName "hashfloat4" [ScalarType "float4"] (ScalarType "int4"),EnvCreateFunction FunName "hashfloat8" [ScalarType "float8"] (ScalarType "int4"),EnvCreateFunction FunName "hashgetbitmap" [Pseudo Internal,Pseudo Internal] (ScalarType "int8"),EnvCreateFunction FunName "hashgettuple" [Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "hashinet" [ScalarType "inet"] (ScalarType "int4"),EnvCreateFunction FunName "hashinsert" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "hashint2" [ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "hashint2vector" [ScalarType "int2vector"] (ScalarType "int4"),EnvCreateFunction FunName "hashint4" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "hashint8" [ScalarType "int8"] (ScalarType "int4"),EnvCreateFunction FunName "hashmacaddr" [ScalarType "macaddr"] (ScalarType "int4"),EnvCreateFunction FunName "hashmarkpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "hashname" [ScalarType "name"] (ScalarType "int4"),EnvCreateFunction FunName "hashoid" [ScalarType "oid"] (ScalarType "int4"),EnvCreateFunction FunName "hashoidvector" [ScalarType "oidvector"] (ScalarType "int4"),EnvCreateFunction FunName "hashoptions" [ArrayType (ScalarType "text"),ScalarType "bool"] (ScalarType "bytea"),EnvCreateFunction FunName "hashrescan" [Pseudo Internal,Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "hashrestrpos" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "hashtext" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "hashvacuumcleanup" [Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "hashvarlena" [Pseudo Internal] (ScalarType "int4"),EnvCreateFunction FunName "height" [ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "host" [ScalarType "inet"] (ScalarType "text"),EnvCreateFunction FunName "hostmask" [ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "iclikejoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "iclikesel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "icnlikejoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "icnlikesel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "icregexeqjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "icregexeqsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "icregexnejoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "icregexnesel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "inet_client_addr" [] (ScalarType "inet"),EnvCreateFunction FunName "inet_client_port" [] (ScalarType "int4"),EnvCreateFunction FunName "inet_in" [Pseudo Cstring] (ScalarType "inet"),EnvCreateFunction FunName "inet_out" [ScalarType "inet"] (Pseudo Cstring),EnvCreateFunction FunName "inet_recv" [Pseudo Internal] (ScalarType "inet"),EnvCreateFunction FunName "inet_send" [ScalarType "inet"] (ScalarType "bytea"),EnvCreateFunction FunName "inet_server_addr" [] (ScalarType "inet"),EnvCreateFunction FunName "inet_server_port" [] (ScalarType "int4"),EnvCreateFunction FunName "inetand" [ScalarType "inet",ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "inetmi" [ScalarType "inet",ScalarType "inet"] (ScalarType "int8"),EnvCreateFunction FunName "inetmi_int8" [ScalarType "inet",ScalarType "int8"] (ScalarType "inet"),EnvCreateFunction FunName "inetnot" [ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "inetor" [ScalarType "inet",ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "inetpl" [ScalarType "inet",ScalarType "int8"] (ScalarType "inet"),EnvCreateFunction FunName "initcap" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "int2" [ScalarType "int8"] (ScalarType "int2"),EnvCreateFunction FunName "int2" [ScalarType "int4"] (ScalarType "int2"),EnvCreateFunction FunName "int2" [ScalarType "float4"] (ScalarType "int2"),EnvCreateFunction FunName "int2" [ScalarType "float8"] (ScalarType "int2"),EnvCreateFunction FunName "int2" [ScalarType "numeric"] (ScalarType "int2"),EnvCreateFunction FunName "int24div" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int24eq" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int24ge" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int24gt" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int24le" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int24lt" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int24mi" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int24mul" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int24ne" [ScalarType "int2",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int24pl" [ScalarType "int2",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int28div" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int28eq" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int28ge" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int28gt" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int28le" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int28lt" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int28mi" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int28mul" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int28ne" [ScalarType "int2",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int28pl" [ScalarType "int2",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int2_accum" [ArrayType (ScalarType "numeric"),ScalarType "int2"] (ArrayType (ScalarType "numeric")),EnvCreateFunction FunName "int2_avg_accum" [ArrayType (ScalarType "int8"),ScalarType "int2"] (ArrayType (ScalarType "int8")),EnvCreateFunction FunName "int2_mul_cash" [ScalarType "int2",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "int2_sum" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunName "int2abs" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2and" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2div" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2eq" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int2ge" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int2gt" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int2in" [Pseudo Cstring] (ScalarType "int2"),EnvCreateFunction FunName "int2larger" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2le" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int2lt" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int2mi" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2mod" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2mul" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2ne" [ScalarType "int2",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int2not" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2or" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2out" [ScalarType "int2"] (Pseudo Cstring),EnvCreateFunction FunName "int2pl" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2recv" [Pseudo Internal] (ScalarType "int2"),EnvCreateFunction FunName "int2send" [ScalarType "int2"] (ScalarType "bytea"),EnvCreateFunction FunName "int2shl" [ScalarType "int2",ScalarType "int4"] (ScalarType "int2"),EnvCreateFunction FunName "int2shr" [ScalarType "int2",ScalarType "int4"] (ScalarType "int2"),EnvCreateFunction FunName "int2smaller" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2um" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2up" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int2vectoreq" [ScalarType "int2vector",ScalarType "int2vector"] (ScalarType "bool"),EnvCreateFunction FunName "int2vectorin" [Pseudo Cstring] (ScalarType "int2vector"),EnvCreateFunction FunName "int2vectorout" [ScalarType "int2vector"] (Pseudo Cstring),EnvCreateFunction FunName "int2vectorrecv" [Pseudo Internal] (ScalarType "int2vector"),EnvCreateFunction FunName "int2vectorsend" [ScalarType "int2vector"] (ScalarType "bytea"),EnvCreateFunction FunName "int2xor" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "int4" [ScalarType "bool"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "char"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "int8"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "float4"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "float8"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "bit"] (ScalarType "int4"),EnvCreateFunction FunName "int4" [ScalarType "numeric"] (ScalarType "int4"),EnvCreateFunction FunName "int42div" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "int42eq" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int42ge" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int42gt" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int42le" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int42lt" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int42mi" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "int42mul" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "int42ne" [ScalarType "int4",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int42pl" [ScalarType "int4",ScalarType "int2"] (ScalarType "int4"),EnvCreateFunction FunName "int48div" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int48eq" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int48ge" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int48gt" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int48le" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int48lt" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int48mi" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int48mul" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int48ne" [ScalarType "int4",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int48pl" [ScalarType "int4",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int4_accum" [ArrayType (ScalarType "numeric"),ScalarType "int4"] (ArrayType (ScalarType "numeric")),EnvCreateFunction FunName "int4_avg_accum" [ArrayType (ScalarType "int8"),ScalarType "int4"] (ArrayType (ScalarType "int8")),EnvCreateFunction FunName "int4_mul_cash" [ScalarType "int4",ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunName "int4_sum" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int4abs" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4and" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4div" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4eq" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int4ge" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int4gt" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int4in" [Pseudo Cstring] (ScalarType "int4"),EnvCreateFunction FunName "int4inc" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4larger" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4le" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int4lt" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int4mi" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4mod" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4mul" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4ne" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int4not" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4or" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4out" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "int4pl" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4recv" [Pseudo Internal] (ScalarType "int4"),EnvCreateFunction FunName "int4send" [ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "int4shl" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4shr" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4smaller" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4um" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4up" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int4xor" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "int8" [ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunName "int8" [ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int8" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "int8" [ScalarType "float4"] (ScalarType "int8"),EnvCreateFunction FunName "int8" [ScalarType "float8"] (ScalarType "int8"),EnvCreateFunction FunName "int8" [ScalarType "bit"] (ScalarType "int8"),EnvCreateFunction FunName "int8" [ScalarType "numeric"] (ScalarType "int8"),EnvCreateFunction FunName "int82div" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunName "int82eq" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int82ge" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int82gt" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int82le" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int82lt" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int82mi" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunName "int82mul" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunName "int82ne" [ScalarType "int8",ScalarType "int2"] (ScalarType "bool"),EnvCreateFunction FunName "int82pl" [ScalarType "int8",ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunName "int84div" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int84eq" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int84ge" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int84gt" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int84le" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int84lt" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int84mi" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int84mul" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int84ne" [ScalarType "int8",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "int84pl" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int8_accum" [ArrayType (ScalarType "numeric"),ScalarType "int8"] (ArrayType (ScalarType "numeric")),EnvCreateFunction FunName "int8_avg" [ArrayType (ScalarType "int8")] (ScalarType "numeric"),EnvCreateFunction FunName "int8_avg_accum" [ArrayType (ScalarType "numeric"),ScalarType "int8"] (ArrayType (ScalarType "numeric")),EnvCreateFunction FunName "int8_sum" [ScalarType "numeric",ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunName "int8abs" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8and" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8div" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8eq" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int8ge" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int8gt" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int8in" [Pseudo Cstring] (ScalarType "int8"),EnvCreateFunction FunName "int8inc" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8inc_any" [ScalarType "int8",Pseudo Any] (ScalarType "int8"),EnvCreateFunction FunName "int8inc_float8_float8" [ScalarType "int8",ScalarType "float8",ScalarType "float8"] (ScalarType "int8"),EnvCreateFunction FunName "int8larger" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8le" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int8lt" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int8mi" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8mod" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8mul" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8ne" [ScalarType "int8",ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "int8not" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8or" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8out" [ScalarType "int8"] (Pseudo Cstring),EnvCreateFunction FunName "int8pl" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8pl_inet" [ScalarType "int8",ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "int8recv" [Pseudo Internal] (ScalarType "int8"),EnvCreateFunction FunName "int8send" [ScalarType "int8"] (ScalarType "bytea"),EnvCreateFunction FunName "int8shl" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int8shr" [ScalarType "int8",ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunName "int8smaller" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8um" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8up" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "int8xor" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "integer_pl_date" [ScalarType "int4",ScalarType "date"] (ScalarType "date"),EnvCreateFunction FunName "inter_lb" [ScalarType "line",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "inter_sb" [ScalarType "lseg",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "inter_sl" [ScalarType "lseg",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "internal_in" [Pseudo Cstring] (Pseudo Internal),EnvCreateFunction FunName "internal_out" [Pseudo Internal] (Pseudo Cstring),EnvCreateFunction FunName "interval" [ScalarType "reltime"] (ScalarType "interval"),EnvCreateFunction FunName "interval" [ScalarType "time"] (ScalarType "interval"),EnvCreateFunction FunName "interval" [ScalarType "interval",ScalarType "int4"] (ScalarType "interval"),EnvCreateFunction FunName "interval_accum" [ArrayType (ScalarType "interval"),ScalarType "interval"] (ArrayType (ScalarType "interval")),EnvCreateFunction FunName "interval_avg" [ArrayType (ScalarType "interval")] (ScalarType "interval"),EnvCreateFunction FunName "interval_cmp" [ScalarType "interval",ScalarType "interval"] (ScalarType "int4"),EnvCreateFunction FunName "interval_div" [ScalarType "interval",ScalarType "float8"] (ScalarType "interval"),EnvCreateFunction FunName "interval_eq" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "interval_ge" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "interval_gt" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "interval_hash" [ScalarType "interval"] (ScalarType "int4"),EnvCreateFunction FunName "interval_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "interval"),EnvCreateFunction FunName "interval_larger" [ScalarType "interval",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "interval_le" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "interval_lt" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "interval_mi" [ScalarType "interval",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "interval_mul" [ScalarType "interval",ScalarType "float8"] (ScalarType "interval"),EnvCreateFunction FunName "interval_ne" [ScalarType "interval",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "interval_out" [ScalarType "interval"] (Pseudo Cstring),EnvCreateFunction FunName "interval_pl" [ScalarType "interval",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "interval_pl_date" [ScalarType "interval",ScalarType "date"] (ScalarType "timestamp"),EnvCreateFunction FunName "interval_pl_time" [ScalarType "interval",ScalarType "time"] (ScalarType "time"),EnvCreateFunction FunName "interval_pl_timestamp" [ScalarType "interval",ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunName "interval_pl_timestamptz" [ScalarType "interval",ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunName "interval_pl_timetz" [ScalarType "interval",ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunName "interval_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "interval"),EnvCreateFunction FunName "interval_send" [ScalarType "interval"] (ScalarType "bytea"),EnvCreateFunction FunName "interval_smaller" [ScalarType "interval",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "interval_um" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "intervaltypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "intervaltypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "intinterval" [ScalarType "abstime",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "isclosed" [ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "isfinite" [ScalarType "abstime"] (ScalarType "bool"),EnvCreateFunction FunName "isfinite" [ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "isfinite" [ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "isfinite" [ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "isfinite" [ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "ishorizontal" [ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "ishorizontal" [ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "ishorizontal" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "iso8859_1_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "iso8859_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "iso_to_koi8r" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "iso_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "iso_to_win1251" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "iso_to_win866" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "isopen" [ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "isparallel" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "isparallel" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "isperp" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "isperp" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "isvertical" [ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "isvertical" [ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "isvertical" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "johab_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "justify_days" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "justify_hours" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "justify_interval" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "koi8r_to_iso" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "koi8r_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "koi8r_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "koi8r_to_win1251" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "koi8r_to_win866" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "koi8u_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "language_handler_in" [Pseudo Cstring] (Pseudo LanguageHandler),EnvCreateFunction FunName "language_handler_out" [Pseudo LanguageHandler] (Pseudo Cstring),EnvCreateFunction FunName "lastval" [] (ScalarType "int8"),EnvCreateFunction FunName "latin1_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "latin2_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "latin2_to_win1250" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "latin3_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "latin4_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "length" [ScalarType "bytea"] (ScalarType "int4"),EnvCreateFunction FunName "length" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "length" [ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunName "length" [ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunName "length" [ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "length" [ScalarType "bit"] (ScalarType "int4"),EnvCreateFunction FunName "length" [ScalarType "tsvector"] (ScalarType "int4"),EnvCreateFunction FunName "length" [ScalarType "bytea",ScalarType "name"] (ScalarType "int4"),EnvCreateFunction FunName "like" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "like" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "like" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "like_escape" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bytea"),EnvCreateFunction FunName "like_escape" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "likejoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "likesel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "line" [ScalarType "point",ScalarType "point"] (ScalarType "line"),EnvCreateFunction FunName "line_distance" [ScalarType "line",ScalarType "line"] (ScalarType "float8"),EnvCreateFunction FunName "line_eq" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "line_horizontal" [ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "line_in" [Pseudo Cstring] (ScalarType "line"),EnvCreateFunction FunName "line_interpt" [ScalarType "line",ScalarType "line"] (ScalarType "point"),EnvCreateFunction FunName "line_intersect" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "line_out" [ScalarType "line"] (Pseudo Cstring),EnvCreateFunction FunName "line_parallel" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "line_perp" [ScalarType "line",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "line_recv" [Pseudo Internal] (ScalarType "line"),EnvCreateFunction FunName "line_send" [ScalarType "line"] (ScalarType "bytea"),EnvCreateFunction FunName "line_vertical" [ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "ln" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "ln" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "lo_close" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "lo_creat" [ScalarType "int4"] (ScalarType "oid"),EnvCreateFunction FunName "lo_create" [ScalarType "oid"] (ScalarType "oid"),EnvCreateFunction FunName "lo_export" [ScalarType "oid",ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "lo_import" [ScalarType "text"] (ScalarType "oid"),EnvCreateFunction FunName "lo_import" [ScalarType "text",ScalarType "oid"] (ScalarType "oid"),EnvCreateFunction FunName "lo_lseek" [ScalarType "int4",ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "lo_open" [ScalarType "oid",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "lo_tell" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "lo_truncate" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "lo_unlink" [ScalarType "oid"] (ScalarType "int4"),EnvCreateFunction FunName "log" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "log" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "log" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "loread" [ScalarType "int4",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "lower" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "lowrite" [ScalarType "int4",ScalarType "bytea"] (ScalarType "int4"),EnvCreateFunction FunName "lpad" [ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "lpad" [ScalarType "text",ScalarType "int4",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "lseg" [ScalarType "box"] (ScalarType "lseg"),EnvCreateFunction FunName "lseg" [ScalarType "point",ScalarType "point"] (ScalarType "lseg"),EnvCreateFunction FunName "lseg_center" [ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunName "lseg_distance" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunName "lseg_eq" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_ge" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_gt" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_horizontal" [ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_in" [Pseudo Cstring] (ScalarType "lseg"),EnvCreateFunction FunName "lseg_interpt" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunName "lseg_intersect" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_le" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_length" [ScalarType "lseg"] (ScalarType "float8"),EnvCreateFunction FunName "lseg_lt" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_ne" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_out" [ScalarType "lseg"] (Pseudo Cstring),EnvCreateFunction FunName "lseg_parallel" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_perp" [ScalarType "lseg",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "lseg_recv" [Pseudo Internal] (ScalarType "lseg"),EnvCreateFunction FunName "lseg_send" [ScalarType "lseg"] (ScalarType "bytea"),EnvCreateFunction FunName "lseg_vertical" [ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "ltrim" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "ltrim" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "macaddr_cmp" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "int4"),EnvCreateFunction FunName "macaddr_eq" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunName "macaddr_ge" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunName "macaddr_gt" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunName "macaddr_in" [Pseudo Cstring] (ScalarType "macaddr"),EnvCreateFunction FunName "macaddr_le" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunName "macaddr_lt" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunName "macaddr_ne" [ScalarType "macaddr",ScalarType "macaddr"] (ScalarType "bool"),EnvCreateFunction FunName "macaddr_out" [ScalarType "macaddr"] (Pseudo Cstring),EnvCreateFunction FunName "macaddr_recv" [Pseudo Internal] (ScalarType "macaddr"),EnvCreateFunction FunName "macaddr_send" [ScalarType "macaddr"] (ScalarType "bytea"),EnvCreateFunction FunName "makeaclitem" [ScalarType "oid",ScalarType "oid",ScalarType "text",ScalarType "bool"] (ScalarType "aclitem"),EnvCreateFunction FunName "masklen" [ScalarType "inet"] (ScalarType "int4"),EnvCreateFunction FunName "md5" [ScalarType "bytea"] (ScalarType "text"),EnvCreateFunction FunName "md5" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "mic_to_ascii" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_big5" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_euc_cn" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_euc_jp" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_euc_kr" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_euc_tw" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_iso" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_koi8r" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_latin1" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_latin2" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_latin3" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_latin4" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_sjis" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_win1250" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_win1251" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mic_to_win866" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "mktinterval" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "tinterval"),EnvCreateFunction FunName "mod" [ScalarType "int8",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "mod" [ScalarType "int2",ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunName "mod" [ScalarType "int4",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "mod" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "mul_d_interval" [ScalarType "float8",ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunName "name" [ScalarType "text"] (ScalarType "name"),EnvCreateFunction FunName "name" [ScalarType "bpchar"] (ScalarType "name"),EnvCreateFunction FunName "name" [ScalarType "varchar"] (ScalarType "name"),EnvCreateFunction FunName "nameeq" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunName "namege" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunName "namegt" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunName "nameiclike" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "nameicnlike" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "nameicregexeq" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "nameicregexne" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "namein" [Pseudo Cstring] (ScalarType "name"),EnvCreateFunction FunName "namele" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunName "namelike" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "namelt" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunName "namene" [ScalarType "name",ScalarType "name"] (ScalarType "bool"),EnvCreateFunction FunName "namenlike" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "nameout" [ScalarType "name"] (Pseudo Cstring),EnvCreateFunction FunName "namerecv" [Pseudo Internal] (ScalarType "name"),EnvCreateFunction FunName "nameregexeq" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "nameregexne" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "namesend" [ScalarType "name"] (ScalarType "bytea"),EnvCreateFunction FunName "neqjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "neqsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "netmask" [ScalarType "inet"] (ScalarType "inet"),EnvCreateFunction FunName "network" [ScalarType "inet"] (ScalarType "cidr"),EnvCreateFunction FunName "network_cmp" [ScalarType "inet",ScalarType "inet"] (ScalarType "int4"),EnvCreateFunction FunName "network_eq" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_ge" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_gt" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_le" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_lt" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_ne" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_sub" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_subeq" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_sup" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "network_supeq" [ScalarType "inet",ScalarType "inet"] (ScalarType "bool"),EnvCreateFunction FunName "nextval" [ScalarType "regclass"] (ScalarType "int8"),EnvCreateFunction FunName "nlikejoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "nlikesel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "notlike" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "bool"),EnvCreateFunction FunName "notlike" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "notlike" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "now" [] (ScalarType "timestamptz"),EnvCreateFunction FunName "npoints" [ScalarType "path"] (ScalarType "int4"),EnvCreateFunction FunName "npoints" [ScalarType "polygon"] (ScalarType "int4"),EnvCreateFunction FunName "numeric" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric" [ScalarType "float4"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric" [ScalarType "float8"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric" [ScalarType "numeric",ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_abs" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_accum" [ArrayType (ScalarType "numeric"),ScalarType "numeric"] (ArrayType (ScalarType "numeric")),EnvCreateFunction FunName "numeric_add" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_avg" [ArrayType (ScalarType "numeric")] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_avg_accum" [ArrayType (ScalarType "numeric"),ScalarType "numeric"] (ArrayType (ScalarType "numeric")),EnvCreateFunction FunName "numeric_cmp" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "int4"),EnvCreateFunction FunName "numeric_div" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_div_trunc" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_eq" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunName "numeric_exp" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_fac" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_ge" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunName "numeric_gt" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunName "numeric_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_inc" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_larger" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_le" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunName "numeric_ln" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_log" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_lt" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunName "numeric_mod" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_mul" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_ne" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "bool"),EnvCreateFunction FunName "numeric_out" [ScalarType "numeric"] (Pseudo Cstring),EnvCreateFunction FunName "numeric_power" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_send" [ScalarType "numeric"] (ScalarType "bytea"),EnvCreateFunction FunName "numeric_smaller" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_sqrt" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_stddev_pop" [ArrayType (ScalarType "numeric")] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_stddev_samp" [ArrayType (ScalarType "numeric")] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_sub" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_uminus" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_uplus" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_var_pop" [ArrayType (ScalarType "numeric")] (ScalarType "numeric"),EnvCreateFunction FunName "numeric_var_samp" [ArrayType (ScalarType "numeric")] (ScalarType "numeric"),EnvCreateFunction FunName "numerictypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "numerictypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "numnode" [ScalarType "tsquery"] (ScalarType "int4"),EnvCreateFunction FunName "obj_description" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "obj_description" [ScalarType "oid",ScalarType "name"] (ScalarType "text"),EnvCreateFunction FunName "octet_length" [ScalarType "bytea"] (ScalarType "int4"),EnvCreateFunction FunName "octet_length" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "octet_length" [ScalarType "bpchar"] (ScalarType "int4"),EnvCreateFunction FunName "octet_length" [ScalarType "bit"] (ScalarType "int4"),EnvCreateFunction FunName "oid" [ScalarType "int8"] (ScalarType "oid"),EnvCreateFunction FunName "oideq" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "oidge" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "oidgt" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "oidin" [Pseudo Cstring] (ScalarType "oid"),EnvCreateFunction FunName "oidlarger" [ScalarType "oid",ScalarType "oid"] (ScalarType "oid"),EnvCreateFunction FunName "oidle" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "oidlt" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "oidne" [ScalarType "oid",ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "oidout" [ScalarType "oid"] (Pseudo Cstring),EnvCreateFunction FunName "oidrecv" [Pseudo Internal] (ScalarType "oid"),EnvCreateFunction FunName "oidsend" [ScalarType "oid"] (ScalarType "bytea"),EnvCreateFunction FunName "oidsmaller" [ScalarType "oid",ScalarType "oid"] (ScalarType "oid"),EnvCreateFunction FunName "oidvectoreq" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunName "oidvectorge" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunName "oidvectorgt" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunName "oidvectorin" [Pseudo Cstring] (ScalarType "oidvector"),EnvCreateFunction FunName "oidvectorle" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunName "oidvectorlt" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunName "oidvectorne" [ScalarType "oidvector",ScalarType "oidvector"] (ScalarType "bool"),EnvCreateFunction FunName "oidvectorout" [ScalarType "oidvector"] (Pseudo Cstring),EnvCreateFunction FunName "oidvectorrecv" [Pseudo Internal] (ScalarType "oidvector"),EnvCreateFunction FunName "oidvectorsend" [ScalarType "oidvector"] (ScalarType "bytea"),EnvCreateFunction FunName "oidvectortypes" [ScalarType "oidvector"] (ScalarType "text"),EnvCreateFunction FunName "on_pb" [ScalarType "point",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "on_pl" [ScalarType "point",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "on_ppath" [ScalarType "point",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "on_ps" [ScalarType "point",ScalarType "lseg"] (ScalarType "bool"),EnvCreateFunction FunName "on_sb" [ScalarType "lseg",ScalarType "box"] (ScalarType "bool"),EnvCreateFunction FunName "on_sl" [ScalarType "lseg",ScalarType "line"] (ScalarType "bool"),EnvCreateFunction FunName "opaque_in" [Pseudo Cstring] (Pseudo Opaque),EnvCreateFunction FunName "opaque_out" [Pseudo Opaque] (Pseudo Cstring),EnvCreateFunction FunName "overlaps" [ScalarType "time",ScalarType "time",ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "time",ScalarType "time",ScalarType "time",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "time",ScalarType "interval",ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "time",ScalarType "interval",ScalarType "time",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamp",ScalarType "interval",ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamp",ScalarType "interval",ScalarType "timestamp",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamptz",ScalarType "interval",ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timestamptz",ScalarType "interval",ScalarType "timestamptz",ScalarType "interval"] (ScalarType "bool"),EnvCreateFunction FunName "overlaps" [ScalarType "timetz",ScalarType "timetz",ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "overlay" [ScalarType "text",ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "overlay" [ScalarType "text",ScalarType "text",ScalarType "int4",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "path" [ScalarType "polygon"] (ScalarType "path"),EnvCreateFunction FunName "path_add" [ScalarType "path",ScalarType "path"] (ScalarType "path"),EnvCreateFunction FunName "path_add_pt" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunName "path_center" [ScalarType "path"] (ScalarType "point"),EnvCreateFunction FunName "path_contain_pt" [ScalarType "path",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "path_distance" [ScalarType "path",ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunName "path_div_pt" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunName "path_in" [Pseudo Cstring] (ScalarType "path"),EnvCreateFunction FunName "path_inter" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "path_length" [ScalarType "path"] (ScalarType "float8"),EnvCreateFunction FunName "path_mul_pt" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunName "path_n_eq" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "path_n_ge" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "path_n_gt" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "path_n_le" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "path_n_lt" [ScalarType "path",ScalarType "path"] (ScalarType "bool"),EnvCreateFunction FunName "path_npoints" [ScalarType "path"] (ScalarType "int4"),EnvCreateFunction FunName "path_out" [ScalarType "path"] (Pseudo Cstring),EnvCreateFunction FunName "path_recv" [Pseudo Internal] (ScalarType "path"),EnvCreateFunction FunName "path_send" [ScalarType "path"] (ScalarType "bytea"),EnvCreateFunction FunName "path_sub_pt" [ScalarType "path",ScalarType "point"] (ScalarType "path"),EnvCreateFunction FunName "pclose" [ScalarType "path"] (ScalarType "path"),EnvCreateFunction FunName "pg_advisory_lock" [ScalarType "int8"] (Pseudo Void),EnvCreateFunction FunName "pg_advisory_lock" [ScalarType "int4",ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "pg_advisory_lock_shared" [ScalarType "int8"] (Pseudo Void),EnvCreateFunction FunName "pg_advisory_lock_shared" [ScalarType "int4",ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "pg_advisory_unlock" [ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "pg_advisory_unlock" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_advisory_unlock_all" [] (Pseudo Void),EnvCreateFunction FunName "pg_advisory_unlock_shared" [ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "pg_advisory_unlock_shared" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_backend_pid" [] (ScalarType "int4"),EnvCreateFunction FunName "pg_cancel_backend" [ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_char_to_encoding" [ScalarType "name"] (ScalarType "int4"),EnvCreateFunction FunName "pg_client_encoding" [] (ScalarType "name"),EnvCreateFunction FunName "pg_column_size" [Pseudo Any] (ScalarType "int4"),EnvCreateFunction FunName "pg_conf_load_time" [] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_conversion_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_current_xlog_insert_location" [] (ScalarType "text"),EnvCreateFunction FunName "pg_current_xlog_location" [] (ScalarType "text"),EnvCreateFunction FunName "pg_cursor" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_database_size" [ScalarType "name"] (ScalarType "int8"),EnvCreateFunction FunName "pg_database_size" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_encoding_to_char" [ScalarType "int4"] (ScalarType "name"),EnvCreateFunction FunName "pg_function_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_get_constraintdef" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_constraintdef" [ScalarType "oid",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_expr" [ScalarType "text",ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_expr" [ScalarType "text",ScalarType "oid",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_function_arguments" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_function_identity_arguments" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_function_result" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_functiondef" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_indexdef" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_indexdef" [ScalarType "oid",ScalarType "int4",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_keywords" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_get_ruledef" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_ruledef" [ScalarType "oid",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_serial_sequence" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_triggerdef" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_userbyid" [ScalarType "oid"] (ScalarType "name"),EnvCreateFunction FunName "pg_get_viewdef" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_viewdef" [ScalarType "oid"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_viewdef" [ScalarType "text",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_get_viewdef" [ScalarType "oid",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_has_role" [ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "pg_has_role" [ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "pg_has_role" [ScalarType "name",ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "pg_has_role" [ScalarType "name",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "pg_has_role" [ScalarType "oid",ScalarType "name",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "pg_has_role" [ScalarType "oid",ScalarType "oid",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "pg_is_other_temp_schema" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_lock_status" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_ls_dir" [ScalarType "text"] (SetOfType (ScalarType "text")),EnvCreateFunction FunName "pg_my_temp_schema" [] (ScalarType "oid"),EnvCreateFunction FunName "pg_opclass_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_operator_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_options_to_table" [ArrayType (ScalarType "text")] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_postmaster_start_time" [] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_prepared_statement" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_prepared_xact" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_read_file" [ScalarType "text",ScalarType "int8",ScalarType "int8"] (ScalarType "text"),EnvCreateFunction FunName "pg_relation_size" [ScalarType "regclass"] (ScalarType "int8"),EnvCreateFunction FunName "pg_relation_size" [ScalarType "regclass",ScalarType "text"] (ScalarType "int8"),EnvCreateFunction FunName "pg_reload_conf" [] (ScalarType "bool"),EnvCreateFunction FunName "pg_rotate_logfile" [] (ScalarType "bool"),EnvCreateFunction FunName "pg_show_all_settings" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_size_pretty" [ScalarType "int8"] (ScalarType "text"),EnvCreateFunction FunName "pg_sleep" [ScalarType "float8"] (Pseudo Void),EnvCreateFunction FunName "pg_start_backup" [ScalarType "text",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "pg_stat_clear_snapshot" [] (Pseudo Void),EnvCreateFunction FunName "pg_stat_file" [ScalarType "text"] (Pseudo Record),EnvCreateFunction FunName "pg_stat_get_activity" [ScalarType "int4"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_stat_get_backend_activity" [ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "pg_stat_get_backend_activity_start" [ScalarType "int4"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_backend_client_addr" [ScalarType "int4"] (ScalarType "inet"),EnvCreateFunction FunName "pg_stat_get_backend_client_port" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "pg_stat_get_backend_dbid" [ScalarType "int4"] (ScalarType "oid"),EnvCreateFunction FunName "pg_stat_get_backend_idset" [] (SetOfType (ScalarType "int4")),EnvCreateFunction FunName "pg_stat_get_backend_pid" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "pg_stat_get_backend_start" [ScalarType "int4"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_backend_userid" [ScalarType "int4"] (ScalarType "oid"),EnvCreateFunction FunName "pg_stat_get_backend_waiting" [ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_stat_get_backend_xact_start" [ScalarType "int4"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_bgwriter_buf_written_checkpoints" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_bgwriter_buf_written_clean" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_bgwriter_maxwritten_clean" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_bgwriter_requested_checkpoints" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_bgwriter_timed_checkpoints" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_blocks_fetched" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_blocks_hit" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_buf_alloc" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_buf_written_backend" [] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_blocks_fetched" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_blocks_hit" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_numbackends" [ScalarType "oid"] (ScalarType "int4"),EnvCreateFunction FunName "pg_stat_get_db_tuples_deleted" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_tuples_fetched" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_tuples_inserted" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_tuples_returned" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_tuples_updated" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_xact_commit" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_db_xact_rollback" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_dead_tuples" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_function_calls" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_function_self_time" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_function_time" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_last_analyze_time" [ScalarType "oid"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_last_autoanalyze_time" [ScalarType "oid"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_last_autovacuum_time" [ScalarType "oid"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_last_vacuum_time" [ScalarType "oid"] (ScalarType "timestamptz"),EnvCreateFunction FunName "pg_stat_get_live_tuples" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_numscans" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_tuples_deleted" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_tuples_fetched" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_tuples_hot_updated" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_tuples_inserted" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_tuples_returned" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_get_tuples_updated" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_stat_reset" [] (Pseudo Void),EnvCreateFunction FunName "pg_stop_backup" [] (ScalarType "text"),EnvCreateFunction FunName "pg_switch_xlog" [] (ScalarType "text"),EnvCreateFunction FunName "pg_table_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_tablespace_databases" [ScalarType "oid"] (SetOfType (ScalarType "oid")),EnvCreateFunction FunName "pg_tablespace_size" [ScalarType "name"] (ScalarType "int8"),EnvCreateFunction FunName "pg_tablespace_size" [ScalarType "oid"] (ScalarType "int8"),EnvCreateFunction FunName "pg_terminate_backend" [ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_timezone_abbrevs" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_timezone_names" [] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "pg_total_relation_size" [ScalarType "regclass"] (ScalarType "int8"),EnvCreateFunction FunName "pg_try_advisory_lock" [ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "pg_try_advisory_lock" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_try_advisory_lock_shared" [ScalarType "int8"] (ScalarType "bool"),EnvCreateFunction FunName "pg_try_advisory_lock_shared" [ScalarType "int4",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "pg_ts_config_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_ts_dict_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_ts_parser_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_ts_template_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_type_is_visible" [ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pg_typeof" [Pseudo Any] (ScalarType "regtype"),EnvCreateFunction FunName "pg_xlogfile_name" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "pg_xlogfile_name_offset" [ScalarType "text"] (Pseudo Record),EnvCreateFunction FunName "pi" [] (ScalarType "float8"),EnvCreateFunction FunName "plainto_tsquery" [ScalarType "text"] (ScalarType "tsquery"),EnvCreateFunction FunName "plainto_tsquery" [ScalarType "regconfig",ScalarType "text"] (ScalarType "tsquery"),EnvCreateFunction FunName "point" [ScalarType "lseg"] (ScalarType "point"),EnvCreateFunction FunName "point" [ScalarType "path"] (ScalarType "point"),EnvCreateFunction FunName "point" [ScalarType "box"] (ScalarType "point"),EnvCreateFunction FunName "point" [ScalarType "polygon"] (ScalarType "point"),EnvCreateFunction FunName "point" [ScalarType "circle"] (ScalarType "point"),EnvCreateFunction FunName "point" [ScalarType "float8",ScalarType "float8"] (ScalarType "point"),EnvCreateFunction FunName "point_above" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_add" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunName "point_below" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_distance" [ScalarType "point",ScalarType "point"] (ScalarType "float8"),EnvCreateFunction FunName "point_div" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunName "point_eq" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_horiz" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_in" [Pseudo Cstring] (ScalarType "point"),EnvCreateFunction FunName "point_left" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_mul" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunName "point_ne" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_out" [ScalarType "point"] (Pseudo Cstring),EnvCreateFunction FunName "point_recv" [Pseudo Internal] (ScalarType "point"),EnvCreateFunction FunName "point_right" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "point_send" [ScalarType "point"] (ScalarType "bytea"),EnvCreateFunction FunName "point_sub" [ScalarType "point",ScalarType "point"] (ScalarType "point"),EnvCreateFunction FunName "point_vert" [ScalarType "point",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "poly_above" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_below" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_center" [ScalarType "polygon"] (ScalarType "point"),EnvCreateFunction FunName "poly_contain" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_contain_pt" [ScalarType "polygon",ScalarType "point"] (ScalarType "bool"),EnvCreateFunction FunName "poly_contained" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_distance" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "float8"),EnvCreateFunction FunName "poly_in" [Pseudo Cstring] (ScalarType "polygon"),EnvCreateFunction FunName "poly_left" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_npoints" [ScalarType "polygon"] (ScalarType "int4"),EnvCreateFunction FunName "poly_out" [ScalarType "polygon"] (Pseudo Cstring),EnvCreateFunction FunName "poly_overabove" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_overbelow" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_overlap" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_overleft" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_overright" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_recv" [Pseudo Internal] (ScalarType "polygon"),EnvCreateFunction FunName "poly_right" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_same" [ScalarType "polygon",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "poly_send" [ScalarType "polygon"] (ScalarType "bytea"),EnvCreateFunction FunName "polygon" [ScalarType "path"] (ScalarType "polygon"),EnvCreateFunction FunName "polygon" [ScalarType "box"] (ScalarType "polygon"),EnvCreateFunction FunName "polygon" [ScalarType "circle"] (ScalarType "polygon"),EnvCreateFunction FunName "polygon" [ScalarType "int4",ScalarType "circle"] (ScalarType "polygon"),EnvCreateFunction FunName "popen" [ScalarType "path"] (ScalarType "path"),EnvCreateFunction FunName "position" [ScalarType "bytea",ScalarType "bytea"] (ScalarType "int4"),EnvCreateFunction FunName "position" [ScalarType "text",ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "position" [ScalarType "bit",ScalarType "bit"] (ScalarType "int4"),EnvCreateFunction FunName "positionjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "positionsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "postgresql_fdw_validator" [ArrayType (ScalarType "text"),ScalarType "oid"] (ScalarType "bool"),EnvCreateFunction FunName "pow" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "pow" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "power" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "power" [ScalarType "numeric",ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "prsd_end" [Pseudo Internal] (Pseudo Void),EnvCreateFunction FunName "prsd_headline" [Pseudo Internal,Pseudo Internal,ScalarType "tsquery"] (Pseudo Internal),EnvCreateFunction FunName "prsd_lextype" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "prsd_nexttoken" [Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "prsd_start" [Pseudo Internal,ScalarType "int4"] (Pseudo Internal),EnvCreateFunction FunName "pt_contained_circle" [ScalarType "point",ScalarType "circle"] (ScalarType "bool"),EnvCreateFunction FunName "pt_contained_poly" [ScalarType "point",ScalarType "polygon"] (ScalarType "bool"),EnvCreateFunction FunName "query_to_xml" [ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "query_to_xml_and_xmlschema" [ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "query_to_xmlschema" [ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "querytree" [ScalarType "tsquery"] (ScalarType "text"),EnvCreateFunction FunName "quote_ident" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "quote_literal" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "quote_literal" [Pseudo AnyElement] (ScalarType "text"),EnvCreateFunction FunName "quote_nullable" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "quote_nullable" [Pseudo AnyElement] (ScalarType "text"),EnvCreateFunction FunName "radians" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "radius" [ScalarType "circle"] (ScalarType "float8"),EnvCreateFunction FunName "random" [] (ScalarType "float8"),EnvCreateFunction FunName "record_eq" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunName "record_ge" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunName "record_gt" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunName "record_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (Pseudo Record),EnvCreateFunction FunName "record_le" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunName "record_lt" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunName "record_ne" [Pseudo Record,Pseudo Record] (ScalarType "bool"),EnvCreateFunction FunName "record_out" [Pseudo Record] (Pseudo Cstring),EnvCreateFunction FunName "record_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (Pseudo Record),EnvCreateFunction FunName "record_send" [Pseudo Record] (ScalarType "bytea"),EnvCreateFunction FunName "regclass" [ScalarType "text"] (ScalarType "regclass"),EnvCreateFunction FunName "regclassin" [Pseudo Cstring] (ScalarType "regclass"),EnvCreateFunction FunName "regclassout" [ScalarType "regclass"] (Pseudo Cstring),EnvCreateFunction FunName "regclassrecv" [Pseudo Internal] (ScalarType "regclass"),EnvCreateFunction FunName "regclasssend" [ScalarType "regclass"] (ScalarType "bytea"),EnvCreateFunction FunName "regconfigin" [Pseudo Cstring] (ScalarType "regconfig"),EnvCreateFunction FunName "regconfigout" [ScalarType "regconfig"] (Pseudo Cstring),EnvCreateFunction FunName "regconfigrecv" [Pseudo Internal] (ScalarType "regconfig"),EnvCreateFunction FunName "regconfigsend" [ScalarType "regconfig"] (ScalarType "bytea"),EnvCreateFunction FunName "regdictionaryin" [Pseudo Cstring] (ScalarType "regdictionary"),EnvCreateFunction FunName "regdictionaryout" [ScalarType "regdictionary"] (Pseudo Cstring),EnvCreateFunction FunName "regdictionaryrecv" [Pseudo Internal] (ScalarType "regdictionary"),EnvCreateFunction FunName "regdictionarysend" [ScalarType "regdictionary"] (ScalarType "bytea"),EnvCreateFunction FunName "regexeqjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "regexeqsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "regexnejoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "regexnesel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "regexp_matches" [ScalarType "text",ScalarType "text"] (SetOfType (ArrayType (ScalarType "text"))),EnvCreateFunction FunName "regexp_matches" [ScalarType "text",ScalarType "text",ScalarType "text"] (SetOfType (ArrayType (ScalarType "text"))),EnvCreateFunction FunName "regexp_replace" [ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "regexp_replace" [ScalarType "text",ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "regexp_split_to_array" [ScalarType "text",ScalarType "text"] (ArrayType (ScalarType "text")),EnvCreateFunction FunName "regexp_split_to_array" [ScalarType "text",ScalarType "text",ScalarType "text"] (ArrayType (ScalarType "text")),EnvCreateFunction FunName "regexp_split_to_table" [ScalarType "text",ScalarType "text"] (SetOfType (ScalarType "text")),EnvCreateFunction FunName "regexp_split_to_table" [ScalarType "text",ScalarType "text",ScalarType "text"] (SetOfType (ScalarType "text")),EnvCreateFunction FunName "regoperatorin" [Pseudo Cstring] (ScalarType "regoperator"),EnvCreateFunction FunName "regoperatorout" [ScalarType "regoperator"] (Pseudo Cstring),EnvCreateFunction FunName "regoperatorrecv" [Pseudo Internal] (ScalarType "regoperator"),EnvCreateFunction FunName "regoperatorsend" [ScalarType "regoperator"] (ScalarType "bytea"),EnvCreateFunction FunName "regoperin" [Pseudo Cstring] (ScalarType "regoper"),EnvCreateFunction FunName "regoperout" [ScalarType "regoper"] (Pseudo Cstring),EnvCreateFunction FunName "regoperrecv" [Pseudo Internal] (ScalarType "regoper"),EnvCreateFunction FunName "regopersend" [ScalarType "regoper"] (ScalarType "bytea"),EnvCreateFunction FunName "regprocedurein" [Pseudo Cstring] (ScalarType "regprocedure"),EnvCreateFunction FunName "regprocedureout" [ScalarType "regprocedure"] (Pseudo Cstring),EnvCreateFunction FunName "regprocedurerecv" [Pseudo Internal] (ScalarType "regprocedure"),EnvCreateFunction FunName "regproceduresend" [ScalarType "regprocedure"] (ScalarType "bytea"),EnvCreateFunction FunName "regprocin" [Pseudo Cstring] (ScalarType "regproc"),EnvCreateFunction FunName "regprocout" [ScalarType "regproc"] (Pseudo Cstring),EnvCreateFunction FunName "regprocrecv" [Pseudo Internal] (ScalarType "regproc"),EnvCreateFunction FunName "regprocsend" [ScalarType "regproc"] (ScalarType "bytea"),EnvCreateFunction FunName "regtypein" [Pseudo Cstring] (ScalarType "regtype"),EnvCreateFunction FunName "regtypeout" [ScalarType "regtype"] (Pseudo Cstring),EnvCreateFunction FunName "regtyperecv" [Pseudo Internal] (ScalarType "regtype"),EnvCreateFunction FunName "regtypesend" [ScalarType "regtype"] (ScalarType "bytea"),EnvCreateFunction FunName "reltime" [ScalarType "interval"] (ScalarType "reltime"),EnvCreateFunction FunName "reltimeeq" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "reltimege" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "reltimegt" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "reltimein" [Pseudo Cstring] (ScalarType "reltime"),EnvCreateFunction FunName "reltimele" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "reltimelt" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "reltimene" [ScalarType "reltime",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "reltimeout" [ScalarType "reltime"] (Pseudo Cstring),EnvCreateFunction FunName "reltimerecv" [Pseudo Internal] (ScalarType "reltime"),EnvCreateFunction FunName "reltimesend" [ScalarType "reltime"] (ScalarType "bytea"),EnvCreateFunction FunName "repeat" [ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "replace" [ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "round" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "round" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "round" [ScalarType "numeric",ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunName "rpad" [ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "rpad" [ScalarType "text",ScalarType "int4",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "rtrim" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "rtrim" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "scalargtjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "scalargtsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "scalarltjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "scalarltsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "schema_to_xml" [ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "schema_to_xml_and_xmlschema" [ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "schema_to_xmlschema" [ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "session_user" [] (ScalarType "name"),EnvCreateFunction FunName "set_bit" [ScalarType "bytea",ScalarType "int4",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "set_byte" [ScalarType "bytea",ScalarType "int4",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "set_config" [ScalarType "text",ScalarType "text",ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "set_masklen" [ScalarType "cidr",ScalarType "int4"] (ScalarType "cidr"),EnvCreateFunction FunName "set_masklen" [ScalarType "inet",ScalarType "int4"] (ScalarType "inet"),EnvCreateFunction FunName "setseed" [ScalarType "float8"] (Pseudo Void),EnvCreateFunction FunName "setval" [ScalarType "regclass",ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunName "setval" [ScalarType "regclass",ScalarType "int8",ScalarType "bool"] (ScalarType "int8"),EnvCreateFunction FunName "setweight" [ScalarType "tsvector",ScalarType "char"] (ScalarType "tsvector"),EnvCreateFunction FunName "shell_in" [Pseudo Cstring] (Pseudo Opaque),EnvCreateFunction FunName "shell_out" [Pseudo Opaque] (Pseudo Cstring),EnvCreateFunction FunName "shift_jis_2004_to_euc_jis_2004" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "shift_jis_2004_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "shobj_description" [ScalarType "oid",ScalarType "name"] (ScalarType "text"),EnvCreateFunction FunName "sign" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "sign" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "similar_escape" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "sin" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "sjis_to_euc_jp" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "sjis_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "sjis_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "slope" [ScalarType "point",ScalarType "point"] (ScalarType "float8"),EnvCreateFunction FunName "smgreq" [ScalarType "smgr",ScalarType "smgr"] (ScalarType "bool"),EnvCreateFunction FunName "smgrin" [Pseudo Cstring] (ScalarType "smgr"),EnvCreateFunction FunName "smgrne" [ScalarType "smgr",ScalarType "smgr"] (ScalarType "bool"),EnvCreateFunction FunName "smgrout" [ScalarType "smgr"] (Pseudo Cstring),EnvCreateFunction FunName "split_part" [ScalarType "text",ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "sqrt" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "sqrt" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "statement_timestamp" [] (ScalarType "timestamptz"),EnvCreateFunction FunName "string_to_array" [ScalarType "text",ScalarType "text"] (ArrayType (ScalarType "text")),EnvCreateFunction FunName "strip" [ScalarType "tsvector"] (ScalarType "tsvector"),EnvCreateFunction FunName "strpos" [ScalarType "text",ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "substr" [ScalarType "bytea",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "substr" [ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "substr" [ScalarType "bytea",ScalarType "int4",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "substr" [ScalarType "text",ScalarType "int4",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "substring" [ScalarType "bytea",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "substring" [ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "substring" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "substring" [ScalarType "bit",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "substring" [ScalarType "bytea",ScalarType "int4",ScalarType "int4"] (ScalarType "bytea"),EnvCreateFunction FunName "substring" [ScalarType "text",ScalarType "int4",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "substring" [ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "substring" [ScalarType "bit",ScalarType "int4",ScalarType "int4"] (ScalarType "bit"),EnvCreateFunction FunName "suppress_redundant_updates_trigger" [] (Pseudo Trigger),EnvCreateFunction FunName "table_to_xml" [ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "table_to_xml_and_xmlschema" [ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "table_to_xmlschema" [ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "tan" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "text" [ScalarType "bool"] (ScalarType "text"),EnvCreateFunction FunName "text" [ScalarType "char"] (ScalarType "text"),EnvCreateFunction FunName "text" [ScalarType "name"] (ScalarType "text"),EnvCreateFunction FunName "text" [ScalarType "xml"] (ScalarType "text"),EnvCreateFunction FunName "text" [ScalarType "inet"] (ScalarType "text"),EnvCreateFunction FunName "text" [ScalarType "bpchar"] (ScalarType "text"),EnvCreateFunction FunName "text_ge" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_gt" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_larger" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "text_le" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_lt" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_pattern_ge" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_pattern_gt" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_pattern_le" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_pattern_lt" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "text_smaller" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "textanycat" [ScalarType "text",Pseudo AnyNonArray] (ScalarType "text"),EnvCreateFunction FunName "textcat" [ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "texteq" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "texticlike" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "texticnlike" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "texticregexeq" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "texticregexne" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "textin" [Pseudo Cstring] (ScalarType "text"),EnvCreateFunction FunName "textlen" [ScalarType "text"] (ScalarType "int4"),EnvCreateFunction FunName "textlike" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "textne" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "textnlike" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "textout" [ScalarType "text"] (Pseudo Cstring),EnvCreateFunction FunName "textrecv" [Pseudo Internal] (ScalarType "text"),EnvCreateFunction FunName "textregexeq" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "textregexne" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "textsend" [ScalarType "text"] (ScalarType "bytea"),EnvCreateFunction FunName "thesaurus_init" [Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "thesaurus_lexize" [Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal] (Pseudo Internal),EnvCreateFunction FunName "tideq" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunName "tidge" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunName "tidgt" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunName "tidin" [Pseudo Cstring] (ScalarType "tid"),EnvCreateFunction FunName "tidlarger" [ScalarType "tid",ScalarType "tid"] (ScalarType "tid"),EnvCreateFunction FunName "tidle" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunName "tidlt" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunName "tidne" [ScalarType "tid",ScalarType "tid"] (ScalarType "bool"),EnvCreateFunction FunName "tidout" [ScalarType "tid"] (Pseudo Cstring),EnvCreateFunction FunName "tidrecv" [Pseudo Internal] (ScalarType "tid"),EnvCreateFunction FunName "tidsend" [ScalarType "tid"] (ScalarType "bytea"),EnvCreateFunction FunName "tidsmaller" [ScalarType "tid",ScalarType "tid"] (ScalarType "tid"),EnvCreateFunction FunName "time" [ScalarType "abstime"] (ScalarType "time"),EnvCreateFunction FunName "time" [ScalarType "timestamp"] (ScalarType "time"),EnvCreateFunction FunName "time" [ScalarType "timestamptz"] (ScalarType "time"),EnvCreateFunction FunName "time" [ScalarType "interval"] (ScalarType "time"),EnvCreateFunction FunName "time" [ScalarType "timetz"] (ScalarType "time"),EnvCreateFunction FunName "time" [ScalarType "time",ScalarType "int4"] (ScalarType "time"),EnvCreateFunction FunName "time_cmp" [ScalarType "time",ScalarType "time"] (ScalarType "int4"),EnvCreateFunction FunName "time_eq" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "time_ge" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "time_gt" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "time_hash" [ScalarType "time"] (ScalarType "int4"),EnvCreateFunction FunName "time_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "time"),EnvCreateFunction FunName "time_larger" [ScalarType "time",ScalarType "time"] (ScalarType "time"),EnvCreateFunction FunName "time_le" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "time_lt" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "time_mi_interval" [ScalarType "time",ScalarType "interval"] (ScalarType "time"),EnvCreateFunction FunName "time_mi_time" [ScalarType "time",ScalarType "time"] (ScalarType "interval"),EnvCreateFunction FunName "time_ne" [ScalarType "time",ScalarType "time"] (ScalarType "bool"),EnvCreateFunction FunName "time_out" [ScalarType "time"] (Pseudo Cstring),EnvCreateFunction FunName "time_pl_interval" [ScalarType "time",ScalarType "interval"] (ScalarType "time"),EnvCreateFunction FunName "time_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "time"),EnvCreateFunction FunName "time_send" [ScalarType "time"] (ScalarType "bytea"),EnvCreateFunction FunName "time_smaller" [ScalarType "time",ScalarType "time"] (ScalarType "time"),EnvCreateFunction FunName "timedate_pl" [ScalarType "time",ScalarType "date"] (ScalarType "timestamp"),EnvCreateFunction FunName "timemi" [ScalarType "abstime",ScalarType "reltime"] (ScalarType "abstime"),EnvCreateFunction FunName "timenow" [] (ScalarType "abstime"),EnvCreateFunction FunName "timeofday" [] (ScalarType "text"),EnvCreateFunction FunName "timepl" [ScalarType "abstime",ScalarType "reltime"] (ScalarType "abstime"),EnvCreateFunction FunName "timestamp" [ScalarType "abstime"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp" [ScalarType "date"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp" [ScalarType "timestamptz"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp" [ScalarType "date",ScalarType "time"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp" [ScalarType "timestamp",ScalarType "int4"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp_cmp" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "int4"),EnvCreateFunction FunName "timestamp_cmp_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "int4"),EnvCreateFunction FunName "timestamp_cmp_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "int4"),EnvCreateFunction FunName "timestamp_eq" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_eq_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_eq_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_ge" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_ge_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_ge_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_gt" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_gt_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_gt_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_hash" [ScalarType "timestamp"] (ScalarType "int4"),EnvCreateFunction FunName "timestamp_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp_larger" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp_le" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_le_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_le_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_lt" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_lt_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_lt_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_mi" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "interval"),EnvCreateFunction FunName "timestamp_mi_interval" [ScalarType "timestamp",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp_ne" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_ne_date" [ScalarType "timestamp",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_ne_timestamptz" [ScalarType "timestamp",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamp_out" [ScalarType "timestamp"] (Pseudo Cstring),EnvCreateFunction FunName "timestamp_pl_interval" [ScalarType "timestamp",ScalarType "interval"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamp_send" [ScalarType "timestamp"] (ScalarType "bytea"),EnvCreateFunction FunName "timestamp_smaller" [ScalarType "timestamp",ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunName "timestamptypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "timestamptypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "timestamptz" [ScalarType "abstime"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz" [ScalarType "date"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz" [ScalarType "timestamp"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz" [ScalarType "date",ScalarType "time"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz" [ScalarType "date",ScalarType "timetz"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz" [ScalarType "timestamptz",ScalarType "int4"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz_cmp" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "int4"),EnvCreateFunction FunName "timestamptz_cmp_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "int4"),EnvCreateFunction FunName "timestamptz_cmp_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "int4"),EnvCreateFunction FunName "timestamptz_eq" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_eq_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_eq_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_ge" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_ge_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_ge_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_gt" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_gt_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_gt_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz_larger" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz_le" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_le_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_le_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_lt" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_lt_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_lt_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_mi" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "interval"),EnvCreateFunction FunName "timestamptz_mi_interval" [ScalarType "timestamptz",ScalarType "interval"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz_ne" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_ne_date" [ScalarType "timestamptz",ScalarType "date"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_ne_timestamp" [ScalarType "timestamptz",ScalarType "timestamp"] (ScalarType "bool"),EnvCreateFunction FunName "timestamptz_out" [ScalarType "timestamptz"] (Pseudo Cstring),EnvCreateFunction FunName "timestamptz_pl_interval" [ScalarType "timestamptz",ScalarType "interval"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptz_send" [ScalarType "timestamptz"] (ScalarType "bytea"),EnvCreateFunction FunName "timestamptz_smaller" [ScalarType "timestamptz",ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timestamptztypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "timestamptztypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "timetypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "timetypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "timetz" [ScalarType "time"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz" [ScalarType "timestamptz"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz" [ScalarType "timetz",ScalarType "int4"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz_cmp" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "int4"),EnvCreateFunction FunName "timetz_eq" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "timetz_ge" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "timetz_gt" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "timetz_hash" [ScalarType "timetz"] (ScalarType "int4"),EnvCreateFunction FunName "timetz_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz_larger" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz_le" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "timetz_lt" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "timetz_mi_interval" [ScalarType "timetz",ScalarType "interval"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz_ne" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "bool"),EnvCreateFunction FunName "timetz_out" [ScalarType "timetz"] (Pseudo Cstring),EnvCreateFunction FunName "timetz_pl_interval" [ScalarType "timetz",ScalarType "interval"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "timetz"),EnvCreateFunction FunName "timetz_send" [ScalarType "timetz"] (ScalarType "bytea"),EnvCreateFunction FunName "timetz_smaller" [ScalarType "timetz",ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunName "timetzdate_pl" [ScalarType "timetz",ScalarType "date"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timetztypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "timetztypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "timezone" [ScalarType "text",ScalarType "timestamp"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timezone" [ScalarType "text",ScalarType "timestamptz"] (ScalarType "timestamp"),EnvCreateFunction FunName "timezone" [ScalarType "text",ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunName "timezone" [ScalarType "interval",ScalarType "timestamp"] (ScalarType "timestamptz"),EnvCreateFunction FunName "timezone" [ScalarType "interval",ScalarType "timestamptz"] (ScalarType "timestamp"),EnvCreateFunction FunName "timezone" [ScalarType "interval",ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunName "tinterval" [ScalarType "abstime",ScalarType "abstime"] (ScalarType "tinterval"),EnvCreateFunction FunName "tintervalct" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalend" [ScalarType "tinterval"] (ScalarType "abstime"),EnvCreateFunction FunName "tintervaleq" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalge" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalgt" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalin" [Pseudo Cstring] (ScalarType "tinterval"),EnvCreateFunction FunName "tintervalle" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalleneq" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "tintervallenge" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "tintervallengt" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "tintervallenle" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "tintervallenlt" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "tintervallenne" [ScalarType "tinterval",ScalarType "reltime"] (ScalarType "bool"),EnvCreateFunction FunName "tintervallt" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalne" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalout" [ScalarType "tinterval"] (Pseudo Cstring),EnvCreateFunction FunName "tintervalov" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalrecv" [Pseudo Internal] (ScalarType "tinterval"),EnvCreateFunction FunName "tintervalrel" [ScalarType "tinterval"] (ScalarType "reltime"),EnvCreateFunction FunName "tintervalsame" [ScalarType "tinterval",ScalarType "tinterval"] (ScalarType "bool"),EnvCreateFunction FunName "tintervalsend" [ScalarType "tinterval"] (ScalarType "bytea"),EnvCreateFunction FunName "tintervalstart" [ScalarType "tinterval"] (ScalarType "abstime"),EnvCreateFunction FunName "to_ascii" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_ascii" [ScalarType "text",ScalarType "name"] (ScalarType "text"),EnvCreateFunction FunName "to_ascii" [ScalarType "text",ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "int8",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "int4",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "float4",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "float8",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "timestamp",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "timestamptz",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "interval",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_char" [ScalarType "numeric",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "to_date" [ScalarType "text",ScalarType "text"] (ScalarType "date"),EnvCreateFunction FunName "to_hex" [ScalarType "int8"] (ScalarType "text"),EnvCreateFunction FunName "to_hex" [ScalarType "int4"] (ScalarType "text"),EnvCreateFunction FunName "to_number" [ScalarType "text",ScalarType "text"] (ScalarType "numeric"),EnvCreateFunction FunName "to_timestamp" [ScalarType "float8"] (ScalarType "timestamptz"),EnvCreateFunction FunName "to_timestamp" [ScalarType "text",ScalarType "text"] (ScalarType "timestamptz"),EnvCreateFunction FunName "to_tsquery" [ScalarType "text"] (ScalarType "tsquery"),EnvCreateFunction FunName "to_tsquery" [ScalarType "regconfig",ScalarType "text"] (ScalarType "tsquery"),EnvCreateFunction FunName "to_tsvector" [ScalarType "text"] (ScalarType "tsvector"),EnvCreateFunction FunName "to_tsvector" [ScalarType "regconfig",ScalarType "text"] (ScalarType "tsvector"),EnvCreateFunction FunName "transaction_timestamp" [] (ScalarType "timestamptz"),EnvCreateFunction FunName "translate" [ScalarType "text",ScalarType "text",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "trigger_in" [Pseudo Cstring] (Pseudo Trigger),EnvCreateFunction FunName "trigger_out" [Pseudo Trigger] (Pseudo Cstring),EnvCreateFunction FunName "trunc" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunName "trunc" [ScalarType "macaddr"] (ScalarType "macaddr"),EnvCreateFunction FunName "trunc" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunName "trunc" [ScalarType "numeric",ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunName "ts_debug" [ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_debug" [ScalarType "regconfig",ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_headline" [ScalarType "text",ScalarType "tsquery"] (ScalarType "text"),EnvCreateFunction FunName "ts_headline" [ScalarType "text",ScalarType "tsquery",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "ts_headline" [ScalarType "regconfig",ScalarType "text",ScalarType "tsquery"] (ScalarType "text"),EnvCreateFunction FunName "ts_headline" [ScalarType "regconfig",ScalarType "text",ScalarType "tsquery",ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "ts_lexize" [ScalarType "regdictionary",ScalarType "text"] (ArrayType (ScalarType "text")),EnvCreateFunction FunName "ts_match_qv" [ScalarType "tsquery",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "ts_match_tq" [ScalarType "text",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "ts_match_tt" [ScalarType "text",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "ts_match_vq" [ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "ts_parse" [ScalarType "text",ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_parse" [ScalarType "oid",ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_rank" [ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank" [ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank" [ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank" [ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank_cd" [ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank_cd" [ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank_cd" [ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rank_cd" [ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"] (ScalarType "float4"),EnvCreateFunction FunName "ts_rewrite" [ScalarType "tsquery",ScalarType "text"] (ScalarType "tsquery"),EnvCreateFunction FunName "ts_rewrite" [ScalarType "tsquery",ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunName "ts_stat" [ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_stat" [ScalarType "text",ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_token_type" [ScalarType "text"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_token_type" [ScalarType "oid"] (SetOfType (Pseudo Record)),EnvCreateFunction FunName "ts_typanalyze" [Pseudo Internal] (ScalarType "bool"),EnvCreateFunction FunName "tsmatchjoinsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal] (ScalarType "float8"),EnvCreateFunction FunName "tsmatchsel" [Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"] (ScalarType "float8"),EnvCreateFunction FunName "tsq_mcontained" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsq_mcontains" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_and" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunName "tsquery_cmp" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "int4"),EnvCreateFunction FunName "tsquery_eq" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_ge" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_gt" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_le" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_lt" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_ne" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "bool"),EnvCreateFunction FunName "tsquery_not" [ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunName "tsquery_or" [ScalarType "tsquery",ScalarType "tsquery"] (ScalarType "tsquery"),EnvCreateFunction FunName "tsqueryin" [Pseudo Cstring] (ScalarType "tsquery"),EnvCreateFunction FunName "tsqueryout" [ScalarType "tsquery"] (Pseudo Cstring),EnvCreateFunction FunName "tsqueryrecv" [Pseudo Internal] (ScalarType "tsquery"),EnvCreateFunction FunName "tsquerysend" [ScalarType "tsquery"] (ScalarType "bytea"),EnvCreateFunction FunName "tsvector_cmp" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "int4"),EnvCreateFunction FunName "tsvector_concat" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "tsvector"),EnvCreateFunction FunName "tsvector_eq" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "tsvector_ge" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "tsvector_gt" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "tsvector_le" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "tsvector_lt" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "tsvector_ne" [ScalarType "tsvector",ScalarType "tsvector"] (ScalarType "bool"),EnvCreateFunction FunName "tsvector_update_trigger" [] (Pseudo Trigger),EnvCreateFunction FunName "tsvector_update_trigger_column" [] (Pseudo Trigger),EnvCreateFunction FunName "tsvectorin" [Pseudo Cstring] (ScalarType "tsvector"),EnvCreateFunction FunName "tsvectorout" [ScalarType "tsvector"] (Pseudo Cstring),EnvCreateFunction FunName "tsvectorrecv" [Pseudo Internal] (ScalarType "tsvector"),EnvCreateFunction FunName "tsvectorsend" [ScalarType "tsvector"] (ScalarType "bytea"),EnvCreateFunction FunName "txid_current" [] (ScalarType "int8"),EnvCreateFunction FunName "txid_current_snapshot" [] (ScalarType "txid_snapshot"),EnvCreateFunction FunName "txid_snapshot_in" [Pseudo Cstring] (ScalarType "txid_snapshot"),EnvCreateFunction FunName "txid_snapshot_out" [ScalarType "txid_snapshot"] (Pseudo Cstring),EnvCreateFunction FunName "txid_snapshot_recv" [Pseudo Internal] (ScalarType "txid_snapshot"),EnvCreateFunction FunName "txid_snapshot_send" [ScalarType "txid_snapshot"] (ScalarType "bytea"),EnvCreateFunction FunName "txid_snapshot_xip" [ScalarType "txid_snapshot"] (SetOfType (ScalarType "int8")),EnvCreateFunction FunName "txid_snapshot_xmax" [ScalarType "txid_snapshot"] (ScalarType "int8"),EnvCreateFunction FunName "txid_snapshot_xmin" [ScalarType "txid_snapshot"] (ScalarType "int8"),EnvCreateFunction FunName "txid_visible_in_snapshot" [ScalarType "int8",ScalarType "txid_snapshot"] (ScalarType "bool"),EnvCreateFunction FunName "uhc_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "unknownin" [Pseudo Cstring] (ScalarType "unknown"),EnvCreateFunction FunName "unknownout" [ScalarType "unknown"] (Pseudo Cstring),EnvCreateFunction FunName "unknownrecv" [Pseudo Internal] (ScalarType "unknown"),EnvCreateFunction FunName "unknownsend" [ScalarType "unknown"] (ScalarType "bytea"),EnvCreateFunction FunName "unnest" [Pseudo AnyArray] (SetOfType (Pseudo AnyElement)),EnvCreateFunction FunName "upper" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunName "utf8_to_ascii" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_big5" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_euc_cn" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_euc_jis_2004" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_euc_jp" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_euc_kr" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_euc_tw" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_gb18030" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_gbk" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_iso8859" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_iso8859_1" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_johab" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_koi8r" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_koi8u" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_shift_jis_2004" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_sjis" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_uhc" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "utf8_to_win" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "uuid_cmp" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "int4"),EnvCreateFunction FunName "uuid_eq" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunName "uuid_ge" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunName "uuid_gt" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunName "uuid_hash" [ScalarType "uuid"] (ScalarType "int4"),EnvCreateFunction FunName "uuid_in" [Pseudo Cstring] (ScalarType "uuid"),EnvCreateFunction FunName "uuid_le" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunName "uuid_lt" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunName "uuid_ne" [ScalarType "uuid",ScalarType "uuid"] (ScalarType "bool"),EnvCreateFunction FunName "uuid_out" [ScalarType "uuid"] (Pseudo Cstring),EnvCreateFunction FunName "uuid_recv" [Pseudo Internal] (ScalarType "uuid"),EnvCreateFunction FunName "uuid_send" [ScalarType "uuid"] (ScalarType "bytea"),EnvCreateFunction FunName "varbit" [ScalarType "varbit",ScalarType "int4",ScalarType "bool"] (ScalarType "varbit"),EnvCreateFunction FunName "varbit_in" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "varbit"),EnvCreateFunction FunName "varbit_out" [ScalarType "varbit"] (Pseudo Cstring),EnvCreateFunction FunName "varbit_recv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "varbit"),EnvCreateFunction FunName "varbit_send" [ScalarType "varbit"] (ScalarType "bytea"),EnvCreateFunction FunName "varbitcmp" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "int4"),EnvCreateFunction FunName "varbiteq" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunName "varbitge" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunName "varbitgt" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunName "varbitle" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunName "varbitlt" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunName "varbitne" [ScalarType "varbit",ScalarType "varbit"] (ScalarType "bool"),EnvCreateFunction FunName "varbittypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "varbittypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "varchar" [ScalarType "name"] (ScalarType "varchar"),EnvCreateFunction FunName "varchar" [ScalarType "varchar",ScalarType "int4",ScalarType "bool"] (ScalarType "varchar"),EnvCreateFunction FunName "varcharin" [Pseudo Cstring,ScalarType "oid",ScalarType "int4"] (ScalarType "varchar"),EnvCreateFunction FunName "varcharout" [ScalarType "varchar"] (Pseudo Cstring),EnvCreateFunction FunName "varcharrecv" [Pseudo Internal,ScalarType "oid",ScalarType "int4"] (ScalarType "varchar"),EnvCreateFunction FunName "varcharsend" [ScalarType "varchar"] (ScalarType "bytea"),EnvCreateFunction FunName "varchartypmodin" [ArrayType (Pseudo Cstring)] (ScalarType "int4"),EnvCreateFunction FunName "varchartypmodout" [ScalarType "int4"] (Pseudo Cstring),EnvCreateFunction FunName "version" [] (ScalarType "text"),EnvCreateFunction FunName "void_in" [Pseudo Cstring] (Pseudo Void),EnvCreateFunction FunName "void_out" [Pseudo Void] (Pseudo Cstring),EnvCreateFunction FunName "width" [ScalarType "box"] (ScalarType "float8"),EnvCreateFunction FunName "width_bucket" [ScalarType "float8",ScalarType "float8",ScalarType "float8",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "width_bucket" [ScalarType "numeric",ScalarType "numeric",ScalarType "numeric",ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunName "win1250_to_latin2" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win1250_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win1251_to_iso" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win1251_to_koi8r" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win1251_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win1251_to_win866" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win866_to_iso" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win866_to_koi8r" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win866_to_mic" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win866_to_win1251" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "win_to_utf8" [ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"] (Pseudo Void),EnvCreateFunction FunName "xideq" [ScalarType "xid",ScalarType "xid"] (ScalarType "bool"),EnvCreateFunction FunName "xideqint4" [ScalarType "xid",ScalarType "int4"] (ScalarType "bool"),EnvCreateFunction FunName "xidin" [Pseudo Cstring] (ScalarType "xid"),EnvCreateFunction FunName "xidout" [ScalarType "xid"] (Pseudo Cstring),EnvCreateFunction FunName "xidrecv" [Pseudo Internal] (ScalarType "xid"),EnvCreateFunction FunName "xidsend" [ScalarType "xid"] (ScalarType "bytea"),EnvCreateFunction FunName "xml" [ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "xml_in" [Pseudo Cstring] (ScalarType "xml"),EnvCreateFunction FunName "xml_out" [ScalarType "xml"] (Pseudo Cstring),EnvCreateFunction FunName "xml_recv" [Pseudo Internal] (ScalarType "xml"),EnvCreateFunction FunName "xml_send" [ScalarType "xml"] (ScalarType "bytea"),EnvCreateFunction FunName "xmlcomment" [ScalarType "text"] (ScalarType "xml"),EnvCreateFunction FunName "xmlconcat2" [ScalarType "xml",ScalarType "xml"] (ScalarType "xml"),EnvCreateFunction FunName "xmlvalidate" [ScalarType "xml",ScalarType "text"] (ScalarType "bool"),EnvCreateFunction FunName "xpath" [ScalarType "text",ScalarType "xml"] (ArrayType (ScalarType "xml")),EnvCreateFunction FunName "xpath" [ScalarType "text",ScalarType "xml",ArrayType (ScalarType "text")] (ArrayType (ScalarType "xml")),EnvCreateFunction FunAgg "array_agg" [Pseudo AnyElement] (Pseudo AnyArray),EnvCreateFunction FunAgg "avg" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "avg" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "avg" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "avg" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "avg" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "avg" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunAgg "avg" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "bit_and" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunAgg "bit_and" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunAgg "bit_and" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunAgg "bit_and" [ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunAgg "bit_or" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunAgg "bit_or" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunAgg "bit_or" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunAgg "bit_or" [ScalarType "bit"] (ScalarType "bit"),EnvCreateFunction FunAgg "bool_and" [ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunAgg "bool_or" [ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunAgg "corr" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "count" [] (ScalarType "int8"),EnvCreateFunction FunAgg "count" [Pseudo Any] (ScalarType "int8"),EnvCreateFunction FunAgg "covar_pop" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "covar_samp" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "every" [ScalarType "bool"] (ScalarType "bool"),EnvCreateFunction FunAgg "max" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunAgg "max" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunAgg "max" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunAgg "max" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunAgg "max" [ScalarType "oid"] (ScalarType "oid"),EnvCreateFunction FunAgg "max" [ScalarType "tid"] (ScalarType "tid"),EnvCreateFunction FunAgg "max" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunAgg "max" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "max" [ScalarType "abstime"] (ScalarType "abstime"),EnvCreateFunction FunAgg "max" [ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunAgg "max" [ScalarType "bpchar"] (ScalarType "bpchar"),EnvCreateFunction FunAgg "max" [ScalarType "date"] (ScalarType "date"),EnvCreateFunction FunAgg "max" [ScalarType "time"] (ScalarType "time"),EnvCreateFunction FunAgg "max" [ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunAgg "max" [ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunAgg "max" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunAgg "max" [ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunAgg "max" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "max" [Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunAgg "max" [Pseudo AnyEnum] (Pseudo AnyEnum),EnvCreateFunction FunAgg "min" [ScalarType "int8"] (ScalarType "int8"),EnvCreateFunction FunAgg "min" [ScalarType "int2"] (ScalarType "int2"),EnvCreateFunction FunAgg "min" [ScalarType "int4"] (ScalarType "int4"),EnvCreateFunction FunAgg "min" [ScalarType "text"] (ScalarType "text"),EnvCreateFunction FunAgg "min" [ScalarType "oid"] (ScalarType "oid"),EnvCreateFunction FunAgg "min" [ScalarType "tid"] (ScalarType "tid"),EnvCreateFunction FunAgg "min" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunAgg "min" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "min" [ScalarType "abstime"] (ScalarType "abstime"),EnvCreateFunction FunAgg "min" [ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunAgg "min" [ScalarType "bpchar"] (ScalarType "bpchar"),EnvCreateFunction FunAgg "min" [ScalarType "date"] (ScalarType "date"),EnvCreateFunction FunAgg "min" [ScalarType "time"] (ScalarType "time"),EnvCreateFunction FunAgg "min" [ScalarType "timestamp"] (ScalarType "timestamp"),EnvCreateFunction FunAgg "min" [ScalarType "timestamptz"] (ScalarType "timestamptz"),EnvCreateFunction FunAgg "min" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunAgg "min" [ScalarType "timetz"] (ScalarType "timetz"),EnvCreateFunction FunAgg "min" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "min" [Pseudo AnyArray] (Pseudo AnyArray),EnvCreateFunction FunAgg "min" [Pseudo AnyEnum] (Pseudo AnyEnum),EnvCreateFunction FunAgg "regr_avgx" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_avgy" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_count" [ScalarType "float8",ScalarType "float8"] (ScalarType "int8"),EnvCreateFunction FunAgg "regr_intercept" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_r2" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_slope" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_sxx" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_sxy" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "regr_syy" [ScalarType "float8",ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_pop" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_pop" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_pop" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_pop" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev_pop" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev_pop" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_samp" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_samp" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_samp" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "stddev_samp" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev_samp" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "stddev_samp" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "sum" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "sum" [ScalarType "int2"] (ScalarType "int8"),EnvCreateFunction FunAgg "sum" [ScalarType "int4"] (ScalarType "int8"),EnvCreateFunction FunAgg "sum" [ScalarType "float4"] (ScalarType "float4"),EnvCreateFunction FunAgg "sum" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "sum" [ScalarType "money"] (ScalarType "money"),EnvCreateFunction FunAgg "sum" [ScalarType "interval"] (ScalarType "interval"),EnvCreateFunction FunAgg "sum" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_pop" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_pop" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_pop" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_pop" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "var_pop" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "var_pop" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_samp" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_samp" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_samp" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "var_samp" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "var_samp" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "var_samp" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "variance" [ScalarType "int8"] (ScalarType "numeric"),EnvCreateFunction FunAgg "variance" [ScalarType "int2"] (ScalarType "numeric"),EnvCreateFunction FunAgg "variance" [ScalarType "int4"] (ScalarType "numeric"),EnvCreateFunction FunAgg "variance" [ScalarType "float4"] (ScalarType "float8"),EnvCreateFunction FunAgg "variance" [ScalarType "float8"] (ScalarType "float8"),EnvCreateFunction FunAgg "variance" [ScalarType "numeric"] (ScalarType "numeric"),EnvCreateFunction FunAgg "xmlagg" [ScalarType "xml"] (ScalarType "xml"),EnvCreateTable "pg_aggregate" [("aggfnoid",ScalarType "regproc"),("aggtransfn",ScalarType "regproc"),("aggfinalfn",ScalarType "regproc"),("aggsortop",ScalarType "oid"),("aggtranstype",ScalarType "oid"),("agginitval",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_am" [("amname",ScalarType "name"),("amstrategies",ScalarType "int2"),("amsupport",ScalarType "int2"),("amcanorder",ScalarType "bool"),("amcanbackward",ScalarType "bool"),("amcanunique",ScalarType "bool"),("amcanmulticol",ScalarType "bool"),("amoptionalkey",ScalarType "bool"),("amindexnulls",ScalarType "bool"),("amsearchnulls",ScalarType "bool"),("amstorage",ScalarType "bool"),("amclusterable",ScalarType "bool"),("amkeytype",ScalarType "oid"),("aminsert",ScalarType "regproc"),("ambeginscan",ScalarType "regproc"),("amgettuple",ScalarType "regproc"),("amgetbitmap",ScalarType "regproc"),("amrescan",ScalarType "regproc"),("amendscan",ScalarType "regproc"),("ammarkpos",ScalarType "regproc"),("amrestrpos",ScalarType "regproc"),("ambuild",ScalarType "regproc"),("ambulkdelete",ScalarType "regproc"),("amvacuumcleanup",ScalarType "regproc"),("amcostestimate",ScalarType "regproc"),("amoptions",ScalarType "regproc")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_amop" [("amopfamily",ScalarType "oid"),("amoplefttype",ScalarType "oid"),("amoprighttype",ScalarType "oid"),("amopstrategy",ScalarType "int2"),("amopopr",ScalarType "oid"),("amopmethod",ScalarType "oid")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_amproc" [("amprocfamily",ScalarType "oid"),("amproclefttype",ScalarType "oid"),("amprocrighttype",ScalarType "oid"),("amprocnum",ScalarType "int2"),("amproc",ScalarType "regproc")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_attrdef" [("adrelid",ScalarType "oid"),("adnum",ScalarType "int2"),("adbin",ScalarType "text"),("adsrc",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_attribute" [("attrelid",ScalarType "oid"),("attname",ScalarType "name"),("atttypid",ScalarType "oid"),("attstattarget",ScalarType "int4"),("attlen",ScalarType "int2"),("attnum",ScalarType "int2"),("attndims",ScalarType "int4"),("attcacheoff",ScalarType "int4"),("atttypmod",ScalarType "int4"),("attbyval",ScalarType "bool"),("attstorage",ScalarType "char"),("attalign",ScalarType "char"),("attnotnull",ScalarType "bool"),("atthasdef",ScalarType "bool"),("attisdropped",ScalarType "bool"),("attislocal",ScalarType "bool"),("attinhcount",ScalarType "int4"),("attacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_auth_members" [("roleid",ScalarType "oid"),("member",ScalarType "oid"),("grantor",ScalarType "oid"),("admin_option",ScalarType "bool")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_authid" [("rolname",ScalarType "name"),("rolsuper",ScalarType "bool"),("rolinherit",ScalarType "bool"),("rolcreaterole",ScalarType "bool"),("rolcreatedb",ScalarType "bool"),("rolcatupdate",ScalarType "bool"),("rolcanlogin",ScalarType "bool"),("rolconnlimit",ScalarType "int4"),("rolpassword",ScalarType "text"),("rolvaliduntil",ScalarType "timestamptz"),("rolconfig",ArrayType (ScalarType "text"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_cast" [("castsource",ScalarType "oid"),("casttarget",ScalarType "oid"),("castfunc",ScalarType "oid"),("castcontext",ScalarType "char"),("castmethod",ScalarType "char")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_class" [("relname",ScalarType "name"),("relnamespace",ScalarType "oid"),("reltype",ScalarType "oid"),("relowner",ScalarType "oid"),("relam",ScalarType "oid"),("relfilenode",ScalarType "oid"),("reltablespace",ScalarType "oid"),("relpages",ScalarType "int4"),("reltuples",ScalarType "float4"),("reltoastrelid",ScalarType "oid"),("reltoastidxid",ScalarType "oid"),("relhasindex",ScalarType "bool"),("relisshared",ScalarType "bool"),("relistemp",ScalarType "bool"),("relkind",ScalarType "char"),("relnatts",ScalarType "int2"),("relchecks",ScalarType "int2"),("relhasoids",ScalarType "bool"),("relhaspkey",ScalarType "bool"),("relhasrules",ScalarType "bool"),("relhastriggers",ScalarType "bool"),("relhassubclass",ScalarType "bool"),("relfrozenxid",ScalarType "xid"),("relacl",ArrayType (ScalarType "aclitem")),("reloptions",ArrayType (ScalarType "text"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_constraint" [("conname",ScalarType "name"),("connamespace",ScalarType "oid"),("contype",ScalarType "char"),("condeferrable",ScalarType "bool"),("condeferred",ScalarType "bool"),("conrelid",ScalarType "oid"),("contypid",ScalarType "oid"),("confrelid",ScalarType "oid"),("confupdtype",ScalarType "char"),("confdeltype",ScalarType "char"),("confmatchtype",ScalarType "char"),("conislocal",ScalarType "bool"),("coninhcount",ScalarType "int4"),("conkey",ArrayType (ScalarType "int2")),("confkey",ArrayType (ScalarType "int2")),("conpfeqop",ArrayType (ScalarType "oid")),("conppeqop",ArrayType (ScalarType "oid")),("conffeqop",ArrayType (ScalarType "oid")),("conbin",ScalarType "text"),("consrc",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_conversion" [("conname",ScalarType "name"),("connamespace",ScalarType "oid"),("conowner",ScalarType "oid"),("conforencoding",ScalarType "int4"),("contoencoding",ScalarType "int4"),("conproc",ScalarType "regproc"),("condefault",ScalarType "bool")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_database" [("datname",ScalarType "name"),("datdba",ScalarType "oid"),("encoding",ScalarType "int4"),("datcollate",ScalarType "name"),("datctype",ScalarType "name"),("datistemplate",ScalarType "bool"),("datallowconn",ScalarType "bool"),("datconnlimit",ScalarType "int4"),("datlastsysoid",ScalarType "oid"),("datfrozenxid",ScalarType "xid"),("dattablespace",ScalarType "oid"),("datconfig",ArrayType (ScalarType "text")),("datacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_depend" [("classid",ScalarType "oid"),("objid",ScalarType "oid"),("objsubid",ScalarType "int4"),("refclassid",ScalarType "oid"),("refobjid",ScalarType "oid"),("refobjsubid",ScalarType "int4"),("deptype",ScalarType "char")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_description" [("objoid",ScalarType "oid"),("classoid",ScalarType "oid"),("objsubid",ScalarType "int4"),("description",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_enum" [("enumtypid",ScalarType "oid"),("enumlabel",ScalarType "name")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_foreign_data_wrapper" [("fdwname",ScalarType "name"),("fdwowner",ScalarType "oid"),("fdwvalidator",ScalarType "oid"),("fdwacl",ArrayType (ScalarType "aclitem")),("fdwoptions",ArrayType (ScalarType "text"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_foreign_server" [("srvname",ScalarType "name"),("srvowner",ScalarType "oid"),("srvfdw",ScalarType "oid"),("srvtype",ScalarType "text"),("srvversion",ScalarType "text"),("srvacl",ArrayType (ScalarType "aclitem")),("srvoptions",ArrayType (ScalarType "text"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_index" [("indexrelid",ScalarType "oid"),("indrelid",ScalarType "oid"),("indnatts",ScalarType "int2"),("indisunique",ScalarType "bool"),("indisprimary",ScalarType "bool"),("indisclustered",ScalarType "bool"),("indisvalid",ScalarType "bool"),("indcheckxmin",ScalarType "bool"),("indisready",ScalarType "bool"),("indkey",ScalarType "int2vector"),("indclass",ScalarType "oidvector"),("indoption",ScalarType "int2vector"),("indexprs",ScalarType "text"),("indpred",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_inherits" [("inhrelid",ScalarType "oid"),("inhparent",ScalarType "oid"),("inhseqno",ScalarType "int4")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_language" [("lanname",ScalarType "name"),("lanowner",ScalarType "oid"),("lanispl",ScalarType "bool"),("lanpltrusted",ScalarType "bool"),("lanplcallfoid",ScalarType "oid"),("lanvalidator",ScalarType "oid"),("lanacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_largeobject" [("loid",ScalarType "oid"),("pageno",ScalarType "int4"),("data",ScalarType "bytea")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_listener" [("relname",ScalarType "name"),("listenerpid",ScalarType "int4"),("notification",ScalarType "int4")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_namespace" [("nspname",ScalarType "name"),("nspowner",ScalarType "oid"),("nspacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_opclass" [("opcmethod",ScalarType "oid"),("opcname",ScalarType "name"),("opcnamespace",ScalarType "oid"),("opcowner",ScalarType "oid"),("opcfamily",ScalarType "oid"),("opcintype",ScalarType "oid"),("opcdefault",ScalarType "bool"),("opckeytype",ScalarType "oid")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_operator" [("oprname",ScalarType "name"),("oprnamespace",ScalarType "oid"),("oprowner",ScalarType "oid"),("oprkind",ScalarType "char"),("oprcanmerge",ScalarType "bool"),("oprcanhash",ScalarType "bool"),("oprleft",ScalarType "oid"),("oprright",ScalarType "oid"),("oprresult",ScalarType "oid"),("oprcom",ScalarType "oid"),("oprnegate",ScalarType "oid"),("oprcode",ScalarType "regproc"),("oprrest",ScalarType "regproc"),("oprjoin",ScalarType "regproc")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_opfamily" [("opfmethod",ScalarType "oid"),("opfname",ScalarType "name"),("opfnamespace",ScalarType "oid"),("opfowner",ScalarType "oid")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_pltemplate" [("tmplname",ScalarType "name"),("tmpltrusted",ScalarType "bool"),("tmpldbacreate",ScalarType "bool"),("tmplhandler",ScalarType "text"),("tmplvalidator",ScalarType "text"),("tmpllibrary",ScalarType "text"),("tmplacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_proc" [("proname",ScalarType "name"),("pronamespace",ScalarType "oid"),("proowner",ScalarType "oid"),("prolang",ScalarType "oid"),("procost",ScalarType "float4"),("prorows",ScalarType "float4"),("provariadic",ScalarType "oid"),("proisagg",ScalarType "bool"),("proiswindow",ScalarType "bool"),("prosecdef",ScalarType "bool"),("proisstrict",ScalarType "bool"),("proretset",ScalarType "bool"),("provolatile",ScalarType "char"),("pronargs",ScalarType "int2"),("pronargdefaults",ScalarType "int2"),("prorettype",ScalarType "oid"),("proargtypes",ScalarType "oidvector"),("proallargtypes",ArrayType (ScalarType "oid")),("proargmodes",ArrayType (ScalarType "char")),("proargnames",ArrayType (ScalarType "text")),("proargdefaults",ScalarType "text"),("prosrc",ScalarType "text"),("probin",ScalarType "bytea"),("proconfig",ArrayType (ScalarType "text")),("proacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_rewrite" [("rulename",ScalarType "name"),("ev_class",ScalarType "oid"),("ev_attr",ScalarType "int2"),("ev_type",ScalarType "char"),("ev_enabled",ScalarType "char"),("is_instead",ScalarType "bool"),("ev_qual",ScalarType "text"),("ev_action",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_shdepend" [("dbid",ScalarType "oid"),("classid",ScalarType "oid"),("objid",ScalarType "oid"),("objsubid",ScalarType "int4"),("refclassid",ScalarType "oid"),("refobjid",ScalarType "oid"),("deptype",ScalarType "char")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_shdescription" [("objoid",ScalarType "oid"),("classoid",ScalarType "oid"),("description",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_statistic" [("starelid",ScalarType "oid"),("staattnum",ScalarType "int2"),("stanullfrac",ScalarType "float4"),("stawidth",ScalarType "int4"),("stadistinct",ScalarType "float4"),("stakind1",ScalarType "int2"),("stakind2",ScalarType "int2"),("stakind3",ScalarType "int2"),("stakind4",ScalarType "int2"),("staop1",ScalarType "oid"),("staop2",ScalarType "oid"),("staop3",ScalarType "oid"),("staop4",ScalarType "oid"),("stanumbers1",ArrayType (ScalarType "float4")),("stanumbers2",ArrayType (ScalarType "float4")),("stanumbers3",ArrayType (ScalarType "float4")),("stanumbers4",ArrayType (ScalarType "float4")),("stavalues1",Pseudo AnyArray),("stavalues2",Pseudo AnyArray),("stavalues3",Pseudo AnyArray),("stavalues4",Pseudo AnyArray)] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_tablespace" [("spcname",ScalarType "name"),("spcowner",ScalarType "oid"),("spclocation",ScalarType "text"),("spcacl",ArrayType (ScalarType "aclitem"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_trigger" [("tgrelid",ScalarType "oid"),("tgname",ScalarType "name"),("tgfoid",ScalarType "oid"),("tgtype",ScalarType "int2"),("tgenabled",ScalarType "char"),("tgisconstraint",ScalarType "bool"),("tgconstrname",ScalarType "name"),("tgconstrrelid",ScalarType "oid"),("tgconstraint",ScalarType "oid"),("tgdeferrable",ScalarType "bool"),("tginitdeferred",ScalarType "bool"),("tgnargs",ScalarType "int2"),("tgattr",ScalarType "int2vector"),("tgargs",ScalarType "bytea")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_ts_config" [("cfgname",ScalarType "name"),("cfgnamespace",ScalarType "oid"),("cfgowner",ScalarType "oid"),("cfgparser",ScalarType "oid")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_ts_config_map" [("mapcfg",ScalarType "oid"),("maptokentype",ScalarType "int4"),("mapseqno",ScalarType "int4"),("mapdict",ScalarType "oid")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_ts_dict" [("dictname",ScalarType "name"),("dictnamespace",ScalarType "oid"),("dictowner",ScalarType "oid"),("dicttemplate",ScalarType "oid"),("dictinitoption",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_ts_parser" [("prsname",ScalarType "name"),("prsnamespace",ScalarType "oid"),("prsstart",ScalarType "regproc"),("prstoken",ScalarType "regproc"),("prsend",ScalarType "regproc"),("prsheadline",ScalarType "regproc"),("prslextype",ScalarType "regproc")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_ts_template" [("tmplname",ScalarType "name"),("tmplnamespace",ScalarType "oid"),("tmplinit",ScalarType "regproc"),("tmpllexize",ScalarType "regproc")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_type" [("typname",ScalarType "name"),("typnamespace",ScalarType "oid"),("typowner",ScalarType "oid"),("typlen",ScalarType "int2"),("typbyval",ScalarType "bool"),("typtype",ScalarType "char"),("typcategory",ScalarType "char"),("typispreferred",ScalarType "bool"),("typisdefined",ScalarType "bool"),("typdelim",ScalarType "char"),("typrelid",ScalarType "oid"),("typelem",ScalarType "oid"),("typarray",ScalarType "oid"),("typinput",ScalarType "regproc"),("typoutput",ScalarType "regproc"),("typreceive",ScalarType "regproc"),("typsend",ScalarType "regproc"),("typmodin",ScalarType "regproc"),("typmodout",ScalarType "regproc"),("typanalyze",ScalarType "regproc"),("typalign",ScalarType "char"),("typstorage",ScalarType "char"),("typnotnull",ScalarType "bool"),("typbasetype",ScalarType "oid"),("typtypmod",ScalarType "int4"),("typndims",ScalarType "int4"),("typdefaultbin",ScalarType "text"),("typdefault",ScalarType "text")] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateTable "pg_user_mapping" [("umuser",ScalarType "oid"),("umserver",ScalarType "oid"),("umoptions",ArrayType (ScalarType "text"))] [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")],EnvCreateView "pg_cursors" [("name",ScalarType "text"),("statement",ScalarType "text"),("is_holdable",ScalarType "bool"),("is_binary",ScalarType "bool"),("is_scrollable",ScalarType "bool"),("creation_time",ScalarType "timestamptz")],EnvCreateView "pg_group" [("groname",ScalarType "name"),("grosysid",ScalarType "oid"),("grolist",ArrayType (ScalarType "oid"))],EnvCreateView "pg_indexes" [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("indexname",ScalarType "name"),("tablespace",ScalarType "name"),("indexdef",ScalarType "text")],EnvCreateView "pg_locks" [("locktype",ScalarType "text"),("database",ScalarType "oid"),("relation",ScalarType "oid"),("page",ScalarType "int4"),("tuple",ScalarType "int2"),("virtualxid",ScalarType "text"),("transactionid",ScalarType "xid"),("classid",ScalarType "oid"),("objid",ScalarType "oid"),("objsubid",ScalarType "int2"),("virtualtransaction",ScalarType "text"),("pid",ScalarType "int4"),("mode",ScalarType "text"),("granted",ScalarType "bool")],EnvCreateView "pg_prepared_statements" [("name",ScalarType "text"),("statement",ScalarType "text"),("prepare_time",ScalarType "timestamptz"),("parameter_types",ArrayType (ScalarType "regtype")),("from_sql",ScalarType "bool")],EnvCreateView "pg_prepared_xacts" [("transaction",ScalarType "xid"),("gid",ScalarType "text"),("prepared",ScalarType "timestamptz"),("owner",ScalarType "name"),("database",ScalarType "name")],EnvCreateView "pg_roles" [("rolname",ScalarType "name"),("rolsuper",ScalarType "bool"),("rolinherit",ScalarType "bool"),("rolcreaterole",ScalarType "bool"),("rolcreatedb",ScalarType "bool"),("rolcatupdate",ScalarType "bool"),("rolcanlogin",ScalarType "bool"),("rolconnlimit",ScalarType "int4"),("rolpassword",ScalarType "text"),("rolvaliduntil",ScalarType "timestamptz"),("rolconfig",ArrayType (ScalarType "text")),("oid",ScalarType "oid")],EnvCreateView "pg_rules" [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("rulename",ScalarType "name"),("definition",ScalarType "text")],EnvCreateView "pg_settings" [("name",ScalarType "text"),("setting",ScalarType "text"),("unit",ScalarType "text"),("category",ScalarType "text"),("short_desc",ScalarType "text"),("extra_desc",ScalarType "text"),("context",ScalarType "text"),("vartype",ScalarType "text"),("source",ScalarType "text"),("min_val",ScalarType "text"),("max_val",ScalarType "text"),("enumvals",ArrayType (ScalarType "text")),("boot_val",ScalarType "text"),("reset_val",ScalarType "text"),("sourcefile",ScalarType "text"),("sourceline",ScalarType "int4")],EnvCreateView "pg_shadow" [("usename",ScalarType "name"),("usesysid",ScalarType "oid"),("usecreatedb",ScalarType "bool"),("usesuper",ScalarType "bool"),("usecatupd",ScalarType "bool"),("passwd",ScalarType "text"),("valuntil",ScalarType "abstime"),("useconfig",ArrayType (ScalarType "text"))],EnvCreateView "pg_stat_activity" [("datid",ScalarType "oid"),("datname",ScalarType "name"),("procpid",ScalarType "int4"),("usesysid",ScalarType "oid"),("usename",ScalarType "name"),("current_query",ScalarType "text"),("waiting",ScalarType "bool"),("xact_start",ScalarType "timestamptz"),("query_start",ScalarType "timestamptz"),("backend_start",ScalarType "timestamptz"),("client_addr",ScalarType "inet"),("client_port",ScalarType "int4")],EnvCreateView "pg_stat_all_indexes" [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_scan",ScalarType "int8"),("idx_tup_read",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8")],EnvCreateView "pg_stat_all_tables" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("seq_scan",ScalarType "int8"),("seq_tup_read",ScalarType "int8"),("idx_scan",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8"),("n_tup_ins",ScalarType "int8"),("n_tup_upd",ScalarType "int8"),("n_tup_del",ScalarType "int8"),("n_tup_hot_upd",ScalarType "int8"),("n_live_tup",ScalarType "int8"),("n_dead_tup",ScalarType "int8"),("last_vacuum",ScalarType "timestamptz"),("last_autovacuum",ScalarType "timestamptz"),("last_analyze",ScalarType "timestamptz"),("last_autoanalyze",ScalarType "timestamptz")],EnvCreateView "pg_stat_bgwriter" [("checkpoints_timed",ScalarType "int8"),("checkpoints_req",ScalarType "int8"),("buffers_checkpoint",ScalarType "int8"),("buffers_clean",ScalarType "int8"),("maxwritten_clean",ScalarType "int8"),("buffers_backend",ScalarType "int8"),("buffers_alloc",ScalarType "int8")],EnvCreateView "pg_stat_database" [("datid",ScalarType "oid"),("datname",ScalarType "name"),("numbackends",ScalarType "int4"),("xact_commit",ScalarType "int8"),("xact_rollback",ScalarType "int8"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8"),("tup_returned",ScalarType "int8"),("tup_fetched",ScalarType "int8"),("tup_inserted",ScalarType "int8"),("tup_updated",ScalarType "int8"),("tup_deleted",ScalarType "int8")],EnvCreateView "pg_stat_sys_indexes" [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_scan",ScalarType "int8"),("idx_tup_read",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8")],EnvCreateView "pg_stat_sys_tables" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("seq_scan",ScalarType "int8"),("seq_tup_read",ScalarType "int8"),("idx_scan",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8"),("n_tup_ins",ScalarType "int8"),("n_tup_upd",ScalarType "int8"),("n_tup_del",ScalarType "int8"),("n_tup_hot_upd",ScalarType "int8"),("n_live_tup",ScalarType "int8"),("n_dead_tup",ScalarType "int8"),("last_vacuum",ScalarType "timestamptz"),("last_autovacuum",ScalarType "timestamptz"),("last_analyze",ScalarType "timestamptz"),("last_autoanalyze",ScalarType "timestamptz")],EnvCreateView "pg_stat_user_functions" [("funcid",ScalarType "oid"),("schemaname",ScalarType "name"),("funcname",ScalarType "name"),("calls",ScalarType "int8"),("total_time",ScalarType "int8"),("self_time",ScalarType "int8")],EnvCreateView "pg_stat_user_indexes" [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_scan",ScalarType "int8"),("idx_tup_read",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8")],EnvCreateView "pg_stat_user_tables" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("seq_scan",ScalarType "int8"),("seq_tup_read",ScalarType "int8"),("idx_scan",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8"),("n_tup_ins",ScalarType "int8"),("n_tup_upd",ScalarType "int8"),("n_tup_del",ScalarType "int8"),("n_tup_hot_upd",ScalarType "int8"),("n_live_tup",ScalarType "int8"),("n_dead_tup",ScalarType "int8"),("last_vacuum",ScalarType "timestamptz"),("last_autovacuum",ScalarType "timestamptz"),("last_analyze",ScalarType "timestamptz"),("last_autoanalyze",ScalarType "timestamptz")],EnvCreateView "pg_statio_all_indexes" [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_all_sequences" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_all_tables" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("heap_blks_read",ScalarType "int8"),("heap_blks_hit",ScalarType "int8"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8"),("toast_blks_read",ScalarType "int8"),("toast_blks_hit",ScalarType "int8"),("tidx_blks_read",ScalarType "int8"),("tidx_blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_sys_indexes" [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_sys_sequences" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_sys_tables" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("heap_blks_read",ScalarType "int8"),("heap_blks_hit",ScalarType "int8"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8"),("toast_blks_read",ScalarType "int8"),("toast_blks_hit",ScalarType "int8"),("tidx_blks_read",ScalarType "int8"),("tidx_blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_user_indexes" [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_user_sequences" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8")],EnvCreateView "pg_statio_user_tables" [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("heap_blks_read",ScalarType "int8"),("heap_blks_hit",ScalarType "int8"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8"),("toast_blks_read",ScalarType "int8"),("toast_blks_hit",ScalarType "int8"),("tidx_blks_read",ScalarType "int8"),("tidx_blks_hit",ScalarType "int8")],EnvCreateView "pg_stats" [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("attname",ScalarType "name"),("null_frac",ScalarType "float4"),("avg_width",ScalarType "int4"),("n_distinct",ScalarType "float4"),("most_common_vals",Pseudo AnyArray),("most_common_freqs",ArrayType (ScalarType "float4")),("histogram_bounds",Pseudo AnyArray),("correlation",ScalarType "float4")],EnvCreateView "pg_tables" [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("tableowner",ScalarType "name"),("tablespace",ScalarType "name"),("hasindexes",ScalarType "bool"),("hasrules",ScalarType "bool"),("hastriggers",ScalarType "bool")],EnvCreateView "pg_timezone_abbrevs" [("abbrev",ScalarType "text"),("utc_offset",ScalarType "interval"),("is_dst",ScalarType "bool")],EnvCreateView "pg_timezone_names" [("name",ScalarType "text"),("abbrev",ScalarType "text"),("utc_offset",ScalarType "interval"),("is_dst",ScalarType "bool")],EnvCreateView "pg_user" [("usename",ScalarType "name"),("usesysid",ScalarType "oid"),("usecreatedb",ScalarType "bool"),("usesuper",ScalarType "bool"),("usecatupd",ScalarType "bool"),("passwd",ScalarType "text"),("valuntil",ScalarType "abstime"),("useconfig",ArrayType (ScalarType "text"))],EnvCreateView "pg_user_mappings" [("umid",ScalarType "oid"),("srvid",ScalarType "oid"),("srvname",ScalarType "name"),("umuser",ScalarType "oid"),("usename",ScalarType "name"),("umoptions",ArrayType (ScalarType "text"))],EnvCreateView "pg_views" [("schemaname",ScalarType "name"),("viewname",ScalarType "name"),("viewowner",ScalarType "name"),("definition",ScalarType "text")]]
+ Database/HsSqlPpp/AstInternals/EnvironmentInternal.lhs view
@@ -0,0 +1,537 @@+Copyright 2009 Jake Wheat++This module contains the implementation of the Environment data types+and functions, and provides the api for the other type checking+modules.++> {-# LANGUAGE DeriveDataTypeable #-}+> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.EnvironmentInternal+>     (+>      Environment+>     ,QualifiedIDs+>     ,CastContext(..)+>     ,CompositeFlavour(..)+>     ,CompositeDef+>     ,FunctionPrototype+>     ,DomainDefinition+>     ,FunFlav(..)+>     ,emptyEnvironment+>     ,defaultEnvironment+>     ,EnvironmentUpdate(..)+>     ,updateEnvironment+>     --,destructEnvironment+>     -- type checker stuff+>     ,envExpandStar+>     ,envLookupID+>     ,envCompositeAttrs+>     ,envTypeCategory+>     ,envPreferredType+>     ,envCast+>     ,envDomainBaseType+>     ,envLookupFns+>     ,envTypeExists+>     ,envLookupType+>     ,OperatorType(..)+>     ,getOperatorType+>     ,isOperatorName+>     ) where++> import Control.Monad+> import Data.List+> import Data.Generics++> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.Utils++> -- | The main datatype, this holds the catalog and context+> -- information to type check against.+> data Environment = Environment+>                    {envTypeNames :: [(String, Type)]+>                    ,envDomainDefs :: [DomainDefinition]+>                    ,envCasts :: [(Type,Type,CastContext)]+>                    ,envTypeCategories :: [(Type,String,Bool)]+>                    ,envPrefixOperators :: [FunctionPrototype]+>                    ,envPostfixOperators :: [FunctionPrototype]+>                    ,envBinaryOperators :: [FunctionPrototype]+>                    ,envFunctions :: [FunctionPrototype]+>                    ,envAggregates :: [FunctionPrototype]+>                    ,envAttrDefs :: [CompositeDef]+>                    --,envAttrSystemColumns :: [CompositeDef]+>                    ,envIdentifierTypes :: [[QualifiedIDs]]+>                    ,envStarTypes :: [QualifiedIDs]}+++> -- | Represents an empty environment. This doesn't contain things+> -- like the \'and\' operator, and so if you try to use it it will+> -- almost certainly not work.+> emptyEnvironment :: Environment+> emptyEnvironment = Environment [] [] [] [] [] [] [] [] [] [] [] []++> -- | Represents what you probably want to use as a starting point if+> -- you are building an environment from scratch. It contains+> -- information on built in function like things that aren't in the+> -- PostGreSQL catalog, such as greatest, coalesce, keyword operators+> -- like \'and\', etc..+> defaultEnvironment :: Environment+> defaultEnvironment = emptyEnvironment {+>                       envTypeNames = pseudoTypes+>                      ,envBinaryOperators = keywordOperatorTypes+>                      ,envFunctions = specialFunctionTypes}++> -- | Represents the types of the ids available, currently used for+> -- resolving identifiers inside select expressions. Will probably+> -- change as this is fixed to support more general contexts.  The+> -- components represent the qualifying name (empty string for no+> -- qualifying name), the list of identifier names with their types,+> -- and the list of system column identifier names with their types.+> type QualifiedIDs = (String, [(String,Type)])++> -- | Use to note what the flavour of a cast is, i.e. if/when it can+> -- be used implicitly.+> data CastContext = ImplicitCastContext+>                  | AssignmentCastContext+>                  | ExplicitCastContext+>                    deriving (Eq,Show,Typeable,Data)++> -- | Used to distinguish between standalone composite types, and+> -- automatically generated ones, generated from a table or view+> -- respectively.+> data CompositeFlavour = Composite | TableComposite | ViewComposite+>                         deriving (Eq,Show)++> -- | Provides the definition of a composite type. The components are+> -- composite (or table or view) name, the flavour of the composite,+> -- the types of the composite attributes, and the types of the+> -- system columns iff the composite represents a table type (the+> -- third and fourth components are always 'UnnamedCompositeType's).+> type CompositeDef = (String, CompositeFlavour, Type, Type)++> -- | The components are: function (or operator) name, argument+> -- types, and return type.+> type FunctionPrototype = (String, [Type], Type)++> -- | The components are domain type, base type (todo: add check+> -- constraint).+> type DomainDefinition = (Type,Type)++> data EnvironmentUpdate =+>     -- | add a new scalar type with the name given, also creates+>     -- an array type automatically+>     EnvCreateScalar Type String Bool+>   | EnvCreateDomain Type Type+>   | EnvCreateComposite String [(String,Type)]+>   | EnvCreateCast Type Type CastContext+>   | EnvCreateTable String [(String,Type)] [(String,Type)]+>   | EnvCreateView String [(String,Type)]+>   | EnvCreateFunction FunFlav String [Type] Type+>     -- | to allow an unqualified identifier reference to work you need to+>     -- supply an extra entry with \"\" as the alias, and all the fields,+>     -- in the case of joins, these unaliased fields need to have the+>     -- duplicates removed and the types resolved+>   | EnvStackIDs [QualifiedIDs]+>     -- | to allow an unqualified star to work you need to+>     -- supply an extra entry with \"\" as the alias, and all the fields+>   | EnvSetStarExpansion [QualifiedIDs]+>     deriving (Eq,Show,Typeable,Data)++> data FunFlav = FunPrefix | FunPostfix | FunBinary+>              | FunName | FunAgg+>                deriving (Eq,Show,Typeable,Data)++> -- | Applies a list of 'EnvironmentUpdate's to an 'Environment' value+> -- to produce a new Environment value.+> updateEnvironment :: Environment+>                   -> [EnvironmentUpdate]+>                   -> Either [TypeError] Environment+> updateEnvironment env' eus =+>   foldM updateEnv' env' eus+>   where+>     updateEnv' env eu =+>       case eu of+>         EnvCreateScalar ty cat pref -> do+>                 errorWhen (not allowed)+>                   [BadEnvironmentUpdate $ "can only add scalar types\+>                                           \this way, got " ++ show ty]+>                 let ScalarType nm = ty+>                 return $ addTypeWithArray env nm ty cat pref+>                 where+>                   allowed = case ty of+>                                     ScalarType _ -> True+>                                     _ -> False+>         EnvCreateDomain ty baseTy -> do+>                 errorWhen (not allowed)+>                   [BadEnvironmentUpdate $ "can only add domain types\+>                                           \this way, got " ++ show ty]+>                 errorWhen (not baseAllowed)+>                   [BadEnvironmentUpdate $ "can only add domain types\+>                                           \based on scalars, got "+>                                           ++ show baseTy]+>                 let DomainType nm = ty+>                 let cat = envTypeCategory env baseTy+>                 return $ (addTypeWithArray env nm ty cat False) {+>                                        envDomainDefs =+>                                          (ty,baseTy):envDomainDefs env+>                                        ,envCasts =+>                                          (ty,baseTy,ImplicitCastContext):envCasts env}+>                 where+>                   allowed = case ty of+>                                     DomainType _ -> True+>                                     _ -> False+>                   baseAllowed = case baseTy of+>                                   ScalarType _ -> True+>                                   _ -> False+>         EnvCreateComposite nm flds ->+>                 return $ (addTypeWithArray env nm (CompositeType nm) "C" False) {+>                             envAttrDefs =+>                               (nm,Composite,UnnamedCompositeType flds, UnnamedCompositeType [])+>                               : envAttrDefs env}+>         EnvCreateCast src tgt ctx -> return $ env {envCasts = (src,tgt,ctx):envCasts env}+>         EnvCreateTable nm attrs sysAttrs -> do+>                 checkTypeDoesntExist env nm (CompositeType nm)+>                 return $ (addTypeWithArray env nm+>                             (CompositeType nm) "C" False) {+>                             envAttrDefs =+>                               (nm,TableComposite,UnnamedCompositeType attrs, UnnamedCompositeType sysAttrs)+>                               : envAttrDefs env}+>         EnvCreateView nm attrs -> {-trace ("create view:" ++ show nm) $-} do+>                 checkTypeDoesntExist env nm (CompositeType nm)+>                 return $ (addTypeWithArray env nm+>                             (CompositeType nm) "C" False) {+>                             envAttrDefs =+>                               (nm,ViewComposite,UnnamedCompositeType attrs, UnnamedCompositeType [])+>                               : envAttrDefs env}+>         EnvCreateFunction f nm args ret ->+>             return $ case f of+>               FunPrefix -> env {envPrefixOperators=(nm,args,ret):envPrefixOperators env}+>               FunPostfix -> env {envPostfixOperators=(nm,args,ret):envPostfixOperators env}+>               FunBinary -> env {envBinaryOperators=(nm,args,ret):envBinaryOperators env}+>               FunAgg -> env {envAggregates=(nm,args,ret):envAggregates env}+>               FunName -> env {envFunctions=(nm,args,ret):envFunctions env}+>         EnvStackIDs qids -> return $ env {envIdentifierTypes = qids:envIdentifierTypes env}+>         EnvSetStarExpansion sids -> return $ env {envStarTypes = sids}+>     addTypeWithArray env nm ty cat pref =+>       env {envTypeNames =+>                ('_':nm,ArrayType ty)+>                : (nm,ty)+>                : envTypeNames env+>           ,envTypeCategories =+>                (ArrayType ty,"A",False)+>                : (ty,cat,pref)+>                : envTypeCategories env}+>     checkTypeDoesntExist env nm ty = do+>         errorWhen (any (==nm) $ map fst $ envTypeNames env)+>             [TypeAlreadyExists ty]+>         errorWhen (any (==ty) $ map snd $ envTypeNames env)+>             [TypeAlreadyExists ty]+>         return ()+++> {-+> -- | Takes part an 'Environment' value to produce a list of 'EnvironmentUpdate's.+> -- You can use this to look inside the Environment data type e.g. if you want to+> -- examine a catalog. It should be the case that:+> --+> -- @+> -- updateEnvironment emptyEnvironment (destructEnvironment env) = env+> -- @+> destructEnvironment :: Environment -> [EnvironmentUpdate]+> destructEnvironment = undefined+> -}++TODO -this shouldn't be too difficult, just bluff it and use quick+check to see if it works+++================================================================================++= type checking stuff++> envCompositeAttrs :: Environment -> [CompositeFlavour] -> Type -> Either [TypeError] (CompositeDef)+> envCompositeAttrs env flvs ty = do+>   let CompositeType nm = ty+>   let c = filter (\(n,t,_,_) -> n == nm && (null flvs || t `elem` flvs)) $ envAttrDefs env+>   errorWhen (null c)+>             [UnrecognisedRelation nm]+>   case c of+>     (_,fl1,r,s):[] -> return (nm,fl1,r,s)+>     _ -> error $ "problem getting attributes for: " ++ show ty ++ ", " ++ show c++> envTypeCategory :: Environment -> Type -> String+> envTypeCategory env ty =+>   let (c,_) = envGetCategoryInfo env ty+>   in c++> envPreferredType :: Environment -> Type -> Bool+> envPreferredType env ty =+>   let (_,p) = envGetCategoryInfo env ty+>   in p++> envCast :: Environment -> CastContext -> Type -> Type -> Bool+> envCast env ctx from to = any (==(from,to,ctx)) (envCasts env)+++> envDomainBaseType :: Environment -> Type -> Type+> envDomainBaseType env ty =+>   --check type is domain, check it exists in main list+>   case lookup ty (envDomainDefs env) of+>       Nothing -> error "domain not found" -- Left [DomainDefNotFound ty]+>       Just t -> t+++> envLookupFns :: Environment -> String -> [FunctionPrototype]+> envLookupFns env name =+>     filter (\(nm,_,_) -> nm == name) envGetAllFns+>     where+>     envGetAllFns =+>         concat [envPrefixOperators env+>                ,envPostfixOperators env+>                ,envBinaryOperators env+>                ,envFunctions env+>                ,envAggregates env]++== internal support for type checker fns above++> envGetCategoryInfo :: Environment -> Type -> (String, Bool)+> envGetCategoryInfo env ty =+>   case ty of+>     ArrayType (Pseudo _) -> ("A",False)+>     Pseudo _ -> ("P",False)+>     _ -> let l = filter (\(t,_,_) -> ty == t) $ envTypeCategories env+>          in if null l+>               then error $ "no type category for " ++ show ty+>               else let (_,c,p):_ =l+>                    in (c,p)++++= Attribute identifier scoping++The way this scoping works is we have a list of prefixes/namespaces,+which is generally the table/view name, or the alias given to it, and+then a list of identifiers (with no dots) and their types. When we+look up the type of an identifier, if it has an correlation name we+try to match that against a table name or alias in that list, if it is+not present or not unique then throw an error. Similarly with no+correlation name, we look at all the lists, if the id is not present+or not unique then throw an error.++envIdentifierTypes is for expanding *. If we want to access the+common attributes from one of the tables in a using or natural join,+this attribute can be qualified with either of the table names/+aliases. But when we expand the *, we only output these common fields+once, so keep a separate list of these fields used just for expanding+the star. The other twist is that these common fields appear first in+the resultant field list.++System columns: pg also has these - they have names and types like+other attributes, but are not included when expanding stars, so you+only get them when you explicitly ask for them. The main use is using+the oid system column which is heavily used as a target for foreign+key references in the pg catalog.++This system still isn't working right. Subqueries are a+problem. Aspects which don't work right now are:++consider this query:+select relname as relvar_name+    from pg_class+    where ((relnamespace =+           (select oid+              from pg_namespace+              where (nspname = 'public'))) and (relkind = 'r'));++we need to be able to access attributes from pg_class inside the subquery,+but 1) they aren't inserted if you use * in the inner query+2) they can't make an identifier ambiguous, so the oid here in the subquery+is ok even though both the oid from pg_namespace and the oid from pg_class+are in scope.++So there are two problems with the current code:+it's too aggressive at throwing ambiguous identifier errors+it pulls in too many identifiers when expanding star++Solution ideas:+for the ambiguous errors, create a stack of identifiers, then split+the EnvUpdateIDs into two, one to replace the current set, and one to+push a new set on the stack. Then fix the lookup to walk the stack level by level.++for the *, we already have special cases for system columns, and for+join ids. I think the best solution is to provide a separate list of *+columns and types, with a separate env update ctor, and get the type+checker to resolve the list for * expansion rather than doing it here.++This should also handle parameters and variable declarations in plpgsql+functions too, these stack in the same way, with one complication to+do with parameters:++there is an additional complication with plpgsql, which isn't going to+be handled for now: instead of stacking like everything else, for+variable references inside select, insert, update and delete+statements only, which aren't qualified and match a parameter name,+then the parameter is used in lieu of variable declarations or+attributes inside a select expression. This will be handled at some+point.++this is something the lint checker should flag when it's written, it+will also flag any ambiguous identifiers which resolve ok only because+of stacking, this is a standard warning in many flavours of lint+checkers.++One last thing is that we need to make sure identifiers availability doesn't+get inherited too far: e.g. a create function inside a create function+can't access ids from the outer create function. This is pretty easy:+the following things generate identifier bindings:+select expressions, inside the expression+parameter defs+variable defs++since select expressions can't contain statements, we don't need to+worry about e.g. if statements, they want to inherit ids from params+and variable defs, so the default is good.++For environments being updated sequentially: since the environment is+updated in a statement list (i.e. environment updates stack from one+statement to the next within a single statement list), any var defs+can't break out of the containing list, so we are covered e.g. for a+variable def leaking from an inner block to an outer block.++With ids going into select expressions: we want the default which is+parameters, vardefs and ids from containing select expressions to be+inherited. So, in the end the only case to deal with is a create+function inside another create function. This isn't dealt with at the+moment.++++> envExpandStar :: Environment -> String -> Either [TypeError] [(String,Type)]+> envExpandStar env correlationName =+>     case lookup correlationName $ envStarTypes env of+>       Nothing -> errorWhen (correlationName == "")+>                            [InternalError "no star expansion found?"] >>+>                  Left [UnrecognisedCorrelationName correlationName]+>       Just l -> Right l++> envLookupID :: Environment -> String -> String -> Either [TypeError] Type+> envLookupID env correlationName iden = {-trace ("lookup " ++ show iden ++ " in " ++ show (envIdentifierTypes env)) $ -}+>   envLookupID' $ envIdentifierTypes env+>   where+>     envLookupID' (its:itss) =+>       case lookup correlationName its of+>         Nothing -> errorWhen (correlationName == "")+>                              [UnrecognisedIdentifier iden] >>+>                    Left [UnrecognisedCorrelationName correlationName]+>         Just s -> case filter (\(n,_) -> n==iden) s of+>                     [] -> envLookupID' itss+>                     (_,t):[] -> Right t+>                     _ -> Left [AmbiguousIdentifier iden]+>     envLookupID' [] = Left [UnrecognisedIdentifier $ if correlationName == "" then iden else correlationName ++ "." ++ iden]++> envTypeExists :: Environment -> Type -> Either [TypeError] Type+> envTypeExists env t =+>     errorWhen (t `notElem` map snd (envTypeNames env))+>               [UnknownTypeError t] >>+>     Right t++> envLookupType :: Environment -> String -> Either [TypeError] Type+> envLookupType env name =+>     liftME [UnknownTypeName name] $+>       lookup name (envTypeNames env)+++================================================================================++= built in stuff++keyword operators, all of these are built in and don't appear in any+postgresql catalog++This is wrong, these need to be separated into prefix, postfix, binary++> keywordOperatorTypes :: [(String,[Type],Type)]+> keywordOperatorTypes = [+>   ("!and", [typeBool, typeBool], typeBool)+>  ,("!or", [typeBool, typeBool], typeBool)+>  ,("!like", [ScalarType "text", ScalarType "text"], typeBool)+>  ,("!not", [typeBool], typeBool)+>  ,("!isNull", [Pseudo AnyElement], typeBool)+>  ,("!isNotNull", [Pseudo AnyElement], typeBool)+>  ,("!arrayCtor", [Pseudo AnyElement], Pseudo AnyArray) -- not quite right,+>                                         -- needs variadic support+>                                         -- currently works via a special case+>                                         -- in the type checking code+>  ,("!between", [Pseudo AnyElement+>               ,Pseudo AnyElement+>               ,Pseudo AnyElement], Pseudo AnyElement)+>  ,("!substring", [ScalarType "text",typeInt,typeInt], ScalarType "text")+>  ,("!arraySub", [Pseudo AnyArray,typeInt], Pseudo AnyElement)+>  ]++these look like functions, but don't appear in the postgresql catalog.++> specialFunctionTypes :: [(String,[Type],Type)]+> specialFunctionTypes = [+>   ("coalesce", [Pseudo AnyElement],+>     Pseudo AnyElement) -- needs variadic support to be correct,+>                        -- uses special case in type checking+>                        -- currently+>  ,("nullif", [Pseudo AnyElement, Pseudo AnyElement], Pseudo AnyElement)+>  ,("greatest", [Pseudo AnyElement], Pseudo AnyElement) --variadic, blah+>  ,("least", [Pseudo AnyElement], Pseudo AnyElement) --also+>  ]++> pseudoTypes :: [(String, Type)]+> pseudoTypes =+>     [("any",Pseudo Any)+>     ,("anyarray",Pseudo AnyArray)+>     ,("anyelement",Pseudo AnyElement)+>     ,("anyenum",Pseudo AnyEnum)+>     ,("anynonarray",Pseudo AnyNonArray)+>     ,("cstring",Pseudo Cstring)+>     ,("record",Pseudo Record)+>     ,("trigger",Pseudo Trigger)+>     ,("void",Pseudo Void)+>     ,("_cstring",ArrayType $ Pseudo Cstring)+>     ,("_record",ArrayType $ Pseudo Record)+>     --,Pseudo Internal+>     --,Pseudo LanguageHandler+>     --,Pseudo Opaque+>     ]++================================================================================++= getOperatorType++used by the pretty printer, not sure this is a very good design++for now, assume that all the overloaded operators that have the+same name are all either binary, prefix or postfix, otherwise the+getoperatortype would need the types of the arguments to determine+the operator type, and the parser would have to be a lot cleverer+although, parsec handles - being unary and binary without breaking+a sweat, so maybe this isn't too difficult?++this is why binary @ operator isn't currently supported++> data OperatorType = BinaryOp | PrefixOp | PostfixOp+>                   deriving (Eq,Show)++> getOperatorType :: Environment -> String -> OperatorType+> getOperatorType env s = case () of+>                       _ | s `elem` ["!and", "!or","!like"] -> BinaryOp+>                         | s `elem` ["!not"] -> PrefixOp+>                         | s `elem` ["!isNull", "!isNotNull"] -> PostfixOp+>                         | any (\(x,_,_) -> x == s) (envBinaryOperators env) ->+>                             BinaryOp+>                         | any (\(x,_,_) -> x == s ||+>                                            (x=="-" && s=="u-"))+>                               (envPrefixOperators env) ->+>                             PrefixOp+>                         | any (\(x,_,_) -> x == s) (envPostfixOperators env) ->+>                             PostfixOp+>                         | otherwise ->+>                             error $ "don't know flavour of operator " ++ s++> isOperatorName :: String -> Bool+> isOperatorName = any (`elem` "+-*/<>=~!@#%^&|`?")
+ Database/HsSqlPpp/AstInternals/EnvironmentReader.lhs view
@@ -0,0 +1,219 @@+Copyright 2009 Jake Wheat++This module contains the code to read a set of environment updates+from a database.++The code here hasn't been tidied up since the Environment data type+was heavily changed so it's a bit messy.++> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.EnvironmentReader+>     (readEnvironmentFromDatabase) where++> import qualified Data.Map as M+> import Data.Maybe+> import Control.Applicative++> import Database.HsSqlPpp.Dbms.DBAccess+> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.Utils+> import Database.HsSqlPpp.AstInternals.EnvironmentInternal++> -- | Creates an 'EnvironmentUpdate' list by reading the database given.+> -- To create an Environment value from this, use+> --+> -- @+> -- env <- readEnvironmentFromDatabase 'something'+> -- let newEnv = updateEnvironment defaultEnvironment env+> -- @+> readEnvironmentFromDatabase :: String -- ^ name of the database to read+>                             -> IO [EnvironmentUpdate]+> readEnvironmentFromDatabase dbName = withConn ("dbname=" ++ dbName) $ \conn -> do+>    typeInfo <- selectRelation conn+>                  "select t.oid as oid,\n\+>                  \       t.typtype,\n\+>                  \       t.typname,\n\+>                  \       t.typarray,\n\+>                  \       coalesce(e.typtype,'0') as atyptype,\n\+>                  \       e.oid as aoid,\n\+>                  \       e.typname as atypname\n\+>                  \  from pg_catalog.pg_type t\n\+>                  \  left outer join pg_type e\n\+>                  \    on t.typarray = e.oid\n\+>                  \  where pg_catalog.pg_type_is_visible(t.oid)\n\+>                  \   and not exists(select 1 from pg_catalog.pg_type el\n\+>                  \                       where el.typarray = t.oid)\n\+>                  \  order by t.typname;" []+>    let typeStuff = concatMap convTypeInfoRow typeInfo+>        typeAssoc = map (\(a,b,_) -> (a,b)) typeStuff+>        typeMap = M.fromList typeAssoc+>    cts <- map (\(nm:cat:pref:[]) ->+>                EnvCreateScalar (ScalarType nm) cat ( read pref :: Bool)) <$>+>           selectRelation conn+>                        "select t.typname,typcategory,typispreferred\n\+>                        \from pg_type t\n\+>                        \where t.typarray<>0 and\n\+>                        \    typtype='b' and\n\+>                        \    pg_catalog.pg_type_is_visible(t.oid);" []+>    domainDefInfo <- selectRelation conn+>                       "select oid, typbasetype\n\+>                       \from pg_type where typtype = 'd'\n\+>                       \     and  pg_catalog.pg_type_is_visible(oid);" []+>    let jlt k = fromJust $ M.lookup k typeMap+>    let domainDefs = map (\l -> (jlt (l!!0),  jlt (l!!1))) domainDefInfo+>    --let domainCasts = map (\(t,b) ->(t,b,ImplicitCastContext)) domainDefs+>    castInfo <- selectRelation conn+>                  "select castsource,casttarget,castcontext from pg_cast;" []+>    let casts = {- domainCasts ++ -}  flip map castInfo+>                  (\l -> (jlt (l!!0), jlt (l!!1),+>                          case (l!!2) of+>                                      "a" -> AssignmentCastContext+>                                      "i" -> ImplicitCastContext+>                                      "e" -> ExplicitCastContext+>                                      _ -> error $ "internal error: unknown cast context " ++ (l!!2)))+>    operatorInfo <- selectRelation conn+>                        "select oprname,\n\+>                        \       oprleft,\n\+>                        \       oprright,\n\+>                        \       oprresult\n\+>                        \from pg_operator\n\+>                        \      where not (oprleft <> 0 and oprright <> 0\n\+>                        \         and oprname = '@') --hack for now\n\+>                        \      order by oprname;" []+>    let getOps a b c [] = (a,b,c)+>        getOps pref post bin (l:ls) =+>          let bit = (\a -> (l!!0, a, jlt(l!!3)))+>          in case () of+>                   _ | l!!1 == "0" -> getOps (bit [jlt (l!!2)]:pref) post bin ls+>                     | l!!2 == "0" -> getOps pref (bit [jlt (l!!1)]:post) bin ls+>                     | otherwise -> getOps pref post (bit [jlt (l!!1), jlt (l!!2)]:bin) ls+>    let (prefixOps, postfixOps, binaryOps) = getOps [] [] [] operatorInfo+>    functionInfo <- selectRelation conn+>                       "select proname,\n\+>                       \       array_to_string(proargtypes,','),\n\+>                       \       proretset,\n\+>                       \       prorettype\n\+>                       \from pg_proc\n\+>                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\+>                       \      and provariadic = 0\n\+>                       \      and not proisagg\n\+>                       \      and not proiswindow\n\+>                       \order by proname,proargtypes;" []+>    let fnProts = map (convFnRow jlt) functionInfo++>    aggregateInfo <- selectRelation conn+>                       "select proname,\n\+>                       \       array_to_string(proargtypes,','),\n\+>                       \       proretset,\n\+>                       \       prorettype\n\+>                       \from pg_proc\n\+>                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\+>                       \      and provariadic = 0\n\+>                       \      and proisagg\n\+>                       \order by proname,proargtypes;" []+>    let aggProts = map (convFnRow jlt) aggregateInfo++>    comps <- map (\(kind:nm:atts:sysatts:[]) ->+>              case kind of+>                "c" -> EnvCreateComposite nm (convertAttString jlt atts)+>                "r" -> EnvCreateTable nm (convertAttString jlt atts) (convertAttString jlt sysatts)+>                "v" -> EnvCreateView nm (convertAttString jlt atts)+>                _ -> error $ "unrecognised relkind: " ++ kind) <$>+>                 selectRelation conn+>                   "with att1 as (\n\+>                   \ select\n\+>                   \     attrelid,\n\+>                   \     attname,\n\+>                   \     attnum,\n\+>                   \     atttypid\n\+>                   \   from pg_attribute\n\+>                   \   inner join pg_class cls\n\+>                   \      on cls.oid = attrelid\n\+>                   \   where pg_catalog.pg_table_is_visible(cls.oid)\n\+>                   \      and cls.relkind in ('r','v','c')\n\+>                   \      and not attisdropped),\n\+>                   \ sysAtt as (\n\+>                   \ select attrelid,\n\+>                   \     array_to_string(\n\+>                   \       array_agg(attname || ';' || atttypid)\n\+>                   \         over (partition by attrelid order by attnum\n\+>                   \               range between unbounded preceding\n\+>                   \               and unbounded following)\n\+>                   \       ,',') as sysAtts\n\+>                   \   from att1\n\+>                   \   where attnum < 0),\n\+>                   \ att as (\n\+>                   \ select attrelid,\n\+>                   \     array_to_string(\n\+>                   \       array_agg(attname || ';' || atttypid)\n\+>                   \          over (partition by attrelid order by attnum\n\+>                   \                range between unbounded preceding\n\+>                   \                and unbounded following)\n\+>                   \       ,',') as atts\n\+>                   \   from att1\n\+>                   \   where attnum > 0)\n\+>                   \ select distinct\n\+>                   \     cls.relkind,\n\+>                   \     cls.relname,\n\+>                   \     atts,\n\+>                   \     coalesce(sysAtts,'')\n\+>                   \   from att left outer join sysAtt using (attrelid)\n\+>                   \   inner join pg_class cls\n\+>                   \     on cls.oid = attrelid\n\+>                   \   order by relkind,relname;" []+++>    return $ concat [+>                cts+>               ,map (uncurry EnvCreateDomain) domainDefs+>               ,map (\(a,b,c) -> EnvCreateCast a b c) casts+>               ,map (\(a,b,c) -> EnvCreateFunction FunPrefix a b c) prefixOps+>               ,map (\(a,b,c) -> EnvCreateFunction FunPostfix a b c) postfixOps+>               ,map (\(a,b,c) -> EnvCreateFunction FunBinary a b c) binaryOps+>               ,map (\(a,b,c) -> EnvCreateFunction FunName a b c) fnProts+>               ,map (\(a,b,c) -> EnvCreateFunction FunAgg a b c) aggProts+>               ,comps]+>    where+>      convertAttString jlt s =+>          let ps = split ',' s+>              ps1 = map (split ';') ps+>          in map (\pl -> (head pl, jlt (pl!!1))) ps1+>      convFnRow jlt l =+>         (head l,fnArgs,fnRet)+>         where+>           fnRet = let rt1 = jlt (l!!3)+>                   in if read (l!!2)::Bool+>                        then SetOfType rt1+>                        else rt1+>           fnArgs = if (l!!1) == ""+>                      then []+>                      else let a = split ',' (l!!1)+>                           in map jlt a+>      convTypeInfoRow l =+>        let name = (l!!2)+>            ctor = case (l!!1) of+>                     "b" -> ScalarType+>                     "c" -> CompositeType+>                     "d" -> DomainType+>                     "e" -> EnumType+>                     "p" -> (\t -> Pseudo (case t of+>                                                  "any" -> Any+>                                                  "anyarray" -> AnyArray+>                                                  "anyelement" -> AnyElement+>                                                  "anyenum" -> AnyEnum+>                                                  "anynonarray" -> AnyNonArray+>                                                  "cstring" -> Cstring+>                                                  "internal" -> Internal+>                                                  "language_handler" -> LanguageHandler+>                                                  "opaque" -> Opaque+>                                                  "record" -> Record+>                                                  "trigger" -> Trigger+>                                                  "void" -> Void+>                                                  _ -> error $ "internal error: unknown pseudo " ++ t))+>                     _ -> error $ "internal error: unknown type type: " ++ (l !! 1)+>            scType = (head l, ctor name, name)+>        in if (l!!4) /= "0"+>           then [(l!!5,ArrayType $ ctor name, '_':name), scType]+>           else [scType]+
+ Database/HsSqlPpp/AstInternals/TypeChecking.ag view
@@ -0,0 +1,1134 @@+{-+Copyright 2009 Jake Wheat++This file contains the attr and sem definitions, which do the type+checking, etc..++A lot of the haskell code has been moved into other files:+TypeCheckingH, AstUtils.lhs, it is intended that only small amounts of+code appear (i.e. one-liners) inline in this file, and larger bits go+in AstUtils.lhs. These are only divided because the attribute grammar+system uses a custom syntax with a custom preprocessor. These+guidelines aren't followed very well.++The current type checking approach doesn't quite match how SQL+works. The main problem is that you can e.g. exec create table+statements inside a function. This is something that the type checker+will probably not be able to deal for a while if ever. (Will need+hooks into postgresql to do this properly, which might not be+impossible...).++Once most of the type checking is working, all the code and+documentation will be overhauled quite a lot. Alternatively put, this+code is in need of better documentation and organisation, and serious+refactoring.++An unholy mixture of Maybe, Either, Either/Error Monad and TypeCheckFailed+is used to do error handling.++One of the common patterns is when type checking a node:++first check any types of subnodes which it depends on, if any are+typecheckfailed, then this node's type is typecheckfailed and we stop+there.++otherwise, calculate the type of this node, or get an error if there+is a problem, this is put into loc.tpe which is Either TypeError+Type. Then some common code takes this value and sets the node type to+the type or typecheckfailed if tpe is left, and if it is left add a+type error annotation also.++================================================================================++= main attributes used++Here are the main attributes used in the type checking:++env is used to chain the environments up and down the tree, to allow+access to the catalog information, and to store the in environment+identifier names and types e.g. inside a select expression.++annotatedTree is used to create a copy of the ast with the type,+etc. annotations.++-}+ATTR AllNodes Root ExpressionRoot+  [ env : Environment || annotatedTree : SELF]++ATTR StatementList Root+  [|| producedEnv : Environment]++{-+================================================================================++= expressions++-}++{+annTypesAndErrors :: Data a => a -> Type -> [TypeError]+                  -> Maybe [AnnotationElement] -> a+annTypesAndErrors item nt errs add =+    updateAnnotation modifier item+    where+      modifier = (([TypeAnnotation nt] ++ fromMaybe [] add +++       map TypeErrorA errs) ++)++}++SEM Expression+    | IntegerLit StringLit FloatLit BooleanLit NullLit FunCall Identifier+      Exists Case CaseSimple Cast InPredicate ScalarSubQuery+      --PositionalArg WindowFn+        lhs.annotatedTree = annTypesAndErrors @loc.backTree+                              (errorToTypeFail @loc.tpe)+                              (getErrors @loc.tpe)+                              Nothing++{-+== literals+-}++SEM Expression+    | IntegerLit+        loc.backTree = IntegerLit @ann @i+    | StringLit+        loc.backTree = StringLit @ann @quote @value+    | FloatLit+        loc.backTree = FloatLit @ann @d+    | BooleanLit+        loc.backTree = BooleanLit @ann @b+    | NullLit+        loc.backTree = NullLit @ann++SEM Expression+     | IntegerLit loc.tpe = Right typeInt+     | StringLit loc.tpe = Right UnknownStringLit+     | FloatLit loc.tpe = Right typeNumeric+     | BooleanLit loc.tpe = Right typeBool+     -- I think a null has the same type resolution as an unknown string lit+     | NullLit loc.tpe = Right UnknownStringLit+++{-++== cast expression++-}++SEM Expression+    | Cast loc.tpe = Right $ @tn.namedType+           loc.backTree = Cast @ann @expr.annotatedTree @tn.annotatedTree++{-++== type names++Types with type modifiers (called PrecTypeName here, to be changed),+are not supported at the moment.++-}++ATTR TypeName [||namedType : Type]++SEM TypeName+     | SimpleTypeName ArrayTypeName SetOfTypeName PrecTypeName+         lhs.namedType = errorToTypeFail @loc.tpe+         lhs.annotatedTree = updateAnnotation+                               ((map TypeErrorA $ getErrors @loc.tpe) ++)+                               @loc.backTree+++SEM TypeName+     | SimpleTypeName+        loc.tpe = envLookupType @lhs.env $ canonicalizeTypeName @tn+        loc.backTree = SimpleTypeName @ann @tn+     | ArrayTypeName+        loc.tpe = chainTypeCheckFailed [@typ.namedType] $ Right $ ArrayType @typ.namedType+        loc.backTree = ArrayTypeName @ann @typ.annotatedTree+     | SetOfTypeName+        loc.tpe = chainTypeCheckFailed [@typ.namedType] $ Right $ SetOfType @typ.namedType+        loc.backTree = SetOfTypeName @ann @typ.annotatedTree+     | PrecTypeName+        loc.tpe = Right TypeCheckFailed+        loc.backTree = PrecTypeName @ann @tn @prec++{-+== operators and functions+-}+SEM Expression+    | FunCall+        loc.tpe = chainTypeCheckFailed @args.typeList $+                    typeCheckFunCall+                      @lhs.env+                      @funName+                      @args.typeList+        loc.backTree = FunCall @ann @funName @args.annotatedTree++{-+== case expression++for non simple cases, we need all the when expressions to be bool, and+then to collect the types of the then parts to see if we can resolve a+common type++for simple cases, we need to check all the when parts have the same type+as the value to check against, then we collect the then parts as above.++-}++SEM Expression+    | Case CaseSimple+        loc.whenTypes = map getTypeAnnotation $ concatMap fst $+                        @cases.annotatedTree+        loc.thenTypes = map getTypeAnnotation $+                            (map snd $ @cases.annotatedTree) +++                              maybeToList @els.annotatedTree++SEM Expression+    | Case+        loc.tpe =+            chainTypeCheckFailed @loc.whenTypes $ do+               when (any (/= typeBool) @loc.whenTypes) $+                 Left [WrongTypes typeBool @loc.whenTypes]+               chainTypeCheckFailed @loc.thenTypes $+                        resolveResultSetType+                          @lhs.env+                          @loc.thenTypes+        loc.backTree = Case @ann @cases.annotatedTree @els.annotatedTree+++SEM Expression+    | CaseSimple+        loc.tpe =+          chainTypeCheckFailed @loc.whenTypes $ do+          checkWhenTypes <- resolveResultSetType+                                 @lhs.env+                                 (getTypeAnnotation @value.annotatedTree: @loc.whenTypes)+          chainTypeCheckFailed @loc.thenTypes $+                     resolveResultSetType+                              @lhs.env+                              @loc.thenTypes+        loc.backTree = CaseSimple @ann @value.annotatedTree @cases.annotatedTree @els.annotatedTree++{-+== identifiers+pull id types out of env for identifiers++-}++SEM Expression+    | Identifier+        loc.tpe = let (correlationName,iden) = splitIdentifier @i+                  in envLookupID @lhs.env correlationName iden+        loc.backTree = Identifier @ann @i++SEM Expression+    | Exists+        loc.tpe = Right typeBool+        loc.backTree = Exists @ann @sel.annotatedTree+++{-+== scalar subquery+1 col -> type of that col+2 + cols -> row type+-}++SEM Expression+    | ScalarSubQuery+        loc.tpe = let selType = getTypeAnnotation @sel.annotatedTree+                  in chainTypeCheckFailed [selType]+                       $ do+                         f <- map snd <$> unwrapSetOfComposite selType+                         case length f of+                              0 -> Left [InternalError "no columns in scalar subquery?"]+                              1 -> Right $ head f+                              _ -> Right $ RowCtor f++        loc.backTree = ScalarSubQuery @ann @sel.annotatedTree+{-+== inlist+-}++SEM Expression+    | InPredicate+        loc.tpe = do+                    lt <- @list.listType+                    ty <- resolveResultSetType+                            @lhs.env+                            [getTypeAnnotation @expr.annotatedTree, lt]+                    return typeBool+        loc.backTree = InPredicate @ann @expr.annotatedTree @i @list.annotatedTree+++ATTR InList [||listType : {Either [TypeError] Type}]++SEM InList+    | InList+        lhs.listType = resolveResultSetType+                         @lhs.env+                         @exprs.typeList+    | InSelect+        lhs.listType =+            do+              attrs <-  map snd <$> (unwrapSetOfComposite $+                          let a = getTypeAnnotation @sel.annotatedTree+                          in {-trace ("attrs is: " ++ show a) $-} a)+              typ <- case length attrs of+                           0 -> Left [InternalError "got subquery with no columns? in inselect"]+                           1 -> Right $ head attrs+                           _ -> Right $ RowCtor attrs+              chainTypeCheckFailed attrs $ Right typ++++ATTR ExpressionList [||typeList : {[Type]}]++SEM ExpressionList+    | Cons lhs.typeList = getTypeAnnotation @hd.annotatedTree : @tl.typeList+    | Nil lhs.typeList = []+++ATTR ExpressionListList  [||typeListList : {[[Type]]}]++SEM ExpressionListList+    | Cons lhs.typeListList = @hd.typeList : @tl.typeListList+    | Nil lhs.typeListList = []+++{-+================================================================================++= statements++-}++SEM Statement+    | SelectStatement Insert Update Delete CreateView CreateDomain+      CreateFunction CreateType CreateTable Return+        lhs.annotatedTree = annTypesAndErrors @loc.backTree+                              (errorToTypeFail @loc.tpe)+                              (getErrors @loc.tpe)+                              $ Just (map StatementInfoA @loc.statementInfo +++                                      [EnvUpdates @loc.envUpdates])+        lhs.envUpdates = @loc.envUpdates++ATTR Statement [||envUpdates : {[EnvironmentUpdate]}]++SEM Statement+    | Assignment CaseStatement ContinueStatement Copy CopyData DropFunction+      DropSomething Execute ExecuteInto ForIntegerStatement ForSelectStatement+      If NullStatement Perform Raise ReturnNext ReturnQuery Truncate+      WhileStatement+        lhs.envUpdates = []+++ATTR StatementList [ envUpdates : {[EnvironmentUpdate]}||]++SEM Root+    | Root statements.envUpdates = []++SEM StatementList+    | Cons+        loc.newEnv = fromRight @lhs.env $ updateEnvironment @lhs.env @lhs.envUpdates+        hd.env = @loc.newEnv+        tl.env = @loc.newEnv+        lhs.producedEnv = case @tl.annotatedTree of+                           [] -> @loc.newEnv+                           _ -> @tl.producedEnv+        tl.envUpdates = @hd.envUpdates+    | Nil+        lhs.producedEnv = emptyEnvironment+++SEM ExpressionListStatementListPair+    | Tuple x2.envUpdates = []+SEM ExpressionStatementListPair+    | Tuple x2.envUpdates = []+SEM FnBody+    | PlpgsqlFnBody SqlFnBody sts.envUpdates = []+SEM Statement+    | CaseStatement If els.envUpdates = []+SEM Statement+    | ForIntegerStatement ForSelectStatement WhileStatement+         sts.envUpdates = []++{-++================================================================================++= basic select statements++This is a bit of a mess, will be rewritten with a proper literate+flavour once all the different bits are type checking ok, which should+make it much more readable.++-}++SEM Statement+    | SelectStatement+        loc.tpe = chainTypeCheckFailed [getTypeAnnotation @ex.annotatedTree] $ Right $ Pseudo Void+        loc.statementInfo = [SelectInfo $ getTypeAnnotation @ex.annotatedTree]+        loc.backTree = SelectStatement @ann @ex.annotatedTree+        loc.envUpdates = []+++SEM SelectExpression+    | Values Select CombineSelect+        lhs.annotatedTree = annTypesAndErrors @loc.backTree+                              (errorToTypeFail @loc.tpe)+                              (getErrors @loc.tpe)+                              Nothing++SEM SelectExpression+    | Values+        loc.tpe = typeCheckValuesExpr+                              @lhs.env+                              @vll.typeListList+        loc.backTree = Values @ann @vll.annotatedTree+    | Select+        loc.tpe =+           do+           let trefType = fromMaybe typeBool $ fmap getTypeAnnotation+                                                    @selTref.annotatedTree+               slType = @selSelectList.listType+           chainTypeCheckFailed [trefType, slType] $+             Right $ case slType of+                       UnnamedCompositeType [(_,Pseudo Void)] -> Pseudo Void+                       _ -> SetOfType slType+        loc.backTree = Select @ann+                              @selDistinct.annotatedTree+                              @selSelectList.annotatedTree+                              @selTref.annotatedTree+                              @selWhere.annotatedTree+                              @selGroupBy.annotatedTree+                              @selHaving.annotatedTree+                              @selOrderBy.annotatedTree+                              @selDir.annotatedTree+                              @selLimit.annotatedTree+                              @selOffset.annotatedTree+    | CombineSelect+        loc.tpe =+          let sel1t = getTypeAnnotation @sel1.annotatedTree+              sel2t = getTypeAnnotation @sel2.annotatedTree+          in chainTypeCheckFailed [sel1t, sel2t] $+                typeCheckCombineSelect @lhs.env sel1t sel2t+        loc.backTree = CombineSelect @ann @ctype.annotatedTree+                                     @sel1.annotatedTree+                                     @sel2.annotatedTree++{+getTbCols c = unwrapSetOfComposite (getTypeAnnotation c)+}++ATTR TableRef MaybeTableRef [||idens : {[(String,([(String,Type)],[(String,Type)]))]}+                                  joinIdens : {[String]} ]++SEM TableRef+    | SubTref TrefAlias Tref TrefFun TrefFunAlias JoinedTref+        lhs.annotatedTree = annTypesAndErrors @loc.backTree+                              (errorToTypeFail @loc.tpe)+                              (getErrors @loc.tpe)+                              Nothing++-- one of the main hairy bits of code which needs a serious refactor:+SEM TableRef+    | SubTref loc.tpe = chainTypeCheckFailed [getTypeAnnotation @sel.annotatedTree] <$>+                        unwrapSetOfWhenComposite $ getTypeAnnotation @sel.annotatedTree+              loc.backTree = SubTref @ann @sel.annotatedTree @alias+              lhs.idens = [(@alias, (fromRight [] $ getTbCols @sel.annotatedTree, []))]+              lhs.joinIdens = []+    | TrefAlias Tref+        loc.tpe = either Left (Right . fst) @loc.relType+        lhs.joinIdens = []+        loc.relType = getRelationType @lhs.env @tbl+        loc.unwrappedRelType =+            fromRight ([],[]) $+            do+              lrt <- @loc.relType+              let (UnnamedCompositeType a,UnnamedCompositeType b) = lrt+              return (a,b)+    | Tref+        lhs.idens = [(@tbl, @loc.unwrappedRelType)]+        loc.backTree = Tref @ann @tbl+    | TrefAlias+        lhs.idens = [(@alias, @loc.unwrappedRelType)]+        loc.backTree = TrefAlias @ann @tbl @alias+    | TrefFun TrefFunAlias+        loc.tpe = getFnType @lhs.env @loc.alias1 @fn.annotatedTree+        lhs.joinIdens = []+        lhs.idens = case getFunIdens+                              @lhs.env @loc.alias1+                              @fn.annotatedTree of+                      Right (s, UnnamedCompositeType c) -> [(s,(c,[]))]+                      _ -> []+    | TrefFun+        loc.alias1 = ""+        loc.backTree = TrefFun @ann @fn.annotatedTree+    | TrefFunAlias+        loc.alias1 = @alias+        loc.backTree = TrefFunAlias @ann @fn.annotatedTree @alias+    | JoinedTref+        loc.tpe =+            chainTypeCheckFailed [tblt+                      ,tbl1t] $+               case (@nat.annotatedTree, @onExpr.annotatedTree) of+                      (Natural, _) -> unionJoinList $+                                      commonFieldNames tblt tbl1t+                      (_,Just (JoinUsing _ s)) -> unionJoinList s+                      _ -> unionJoinList []+            where+              tblt = getTypeAnnotation @tbl.annotatedTree+              tbl1t = getTypeAnnotation @tbl1.annotatedTree+              unionJoinList s =+                  combineTableTypesWithUsingList @lhs.env s tblt tbl1t+        lhs.idens = @tbl.idens ++ @tbl1.idens+        lhs.joinIdens = commonFieldNames (getTypeAnnotation @tbl.annotatedTree)+                                         (getTypeAnnotation @tbl1.annotatedTree)+        loc.backTree = JoinedTref @ann+                                  @tbl.annotatedTree+                                  @nat.annotatedTree+                                  @joinType.annotatedTree+                                  @tbl1.annotatedTree+                                  @onExpr.annotatedTree++{++getFnType :: Environment -> String -> Expression -> Either [TypeError] Type+getFnType env alias =+    either Left (Right . snd) . getFunIdens env alias++getFunIdens :: Environment -> String -> Expression -> Either [TypeError] (String,Type)+getFunIdens env alias fnVal =+   case fnVal of+       FunCall _ f _ ->+           let correlationName = if alias /= ""+                                   then alias+                                   else f+           in Right (correlationName, case getTypeAnnotation fnVal of+                SetOfType (CompositeType t) -> getCompositeType t+                SetOfType x -> UnnamedCompositeType [(correlationName,x)]+                y -> UnnamedCompositeType [(correlationName,y)])+       x -> Left [ContextError "FunCall"]+   where+     getCompositeType t =+                    case getAttrs env [Composite+                                      ,TableComposite+                                      ,ViewComposite] t of+                      Just (_,_,a@(UnnamedCompositeType _), _) -> a+                      _ -> UnnamedCompositeType []+}++SEM MaybeTableRef+    | Nothing+        lhs.idens = []+        lhs.joinIdens = []++ATTR SelectItemList SelectList [||listType : Type]++SEM SelectItemList+    | Cons lhs.listType = doSelectItemListTpe @lhs.env @hd.columnName @hd.itemType @tl.listType+    | Nil lhs.listType = UnnamedCompositeType []++ATTR SelectItem [||itemType : Type]++SEM SelectItem+    | SelExp SelectItem+        lhs.itemType = getTypeAnnotation @ex.annotatedTree++-- hack to fix up for errors for ok *+SEM SelectItem+    | SelExp+        loc.annotatedTree = SelExp @ann $ fixStar @ex.annotatedTree+    | SelectItem+        loc.backTree = SelectItem @ann (fixStar @ex.annotatedTree) @name++{++fixStar :: Expression -> Expression+fixStar =+    everywhere (mkT fixStar')+    where+      fixStar' :: Annotation -> Annotation+      fixStar' a =+          if TypeAnnotation TypeCheckFailed `elem` a+              && any (\an ->+                       case an of+                         TypeErrorA (UnrecognisedIdentifier x) |+                           let (_,iden) = splitIdentifier x+                           in iden == "*" -> True+                         _ -> False) a+             then filter (\an -> case an of+                                   TypeAnnotation TypeCheckFailed -> False+                                   TypeErrorA (UnrecognisedIdentifier _) -> False+                                   _ -> True) a+             else a+}++SEM SelectList+    | SelectList+        lhs.listType = @items.listType+++{-++== env passing++env flow:+current simple version:+from tref -> select list+          -> where++(so we take the identifiers and types from the tref part, and send+them into the selectlist and where parts)++full order of identifier passing:+   1. from+   2. where+   3. group by+   4. having+   5. select++-}++SEM SelectExpression+    | Select+         loc.newEnv = case updateEnvironment @lhs.env+                            (convertToNewStyleUpdates @selTref.idens @selTref.joinIdens) of+                        Left x -> error $ show x -- @lhs.env+                        Right e -> e+         selSelectList.env = @loc.newEnv+         selWhere.env = @loc.newEnv++{-++== attributes++columnName is used to collect the column names that the select list+produces, it is combined into an unnamedcompositetype in+selectitemlist, which is also where star expansion happens.++-}++ATTR SelectItem [||columnName : String]++{-+if the select item is just an identifier, then that column is named+after the identifier+e.g. select a, b as c, b + c from d, gives three columns one named+a, one named c, and one unnamed, even though only one has an alias+if the select item is a function or aggregate call at the top level,+then it is named after that function or aggregate++if it is a cast, the column is named after the target data type name+iff it is a simple type name++-}++--default value for non identifier nodes++ATTR Expression [||liftedColumnName USE {`(fixedValue "")`} {""}: String]++{+fixedValue :: a -> a -> a -> a+fixedValue a _ _ = a+}++{-+override for identifier nodes, this only makes it out to the selectitem+node if the identifier is not wrapped in parens, function calls, etc.+-}++SEM Expression+  | Identifier lhs.liftedColumnName = @i+  | FunCall lhs.liftedColumnName =+      if isOperatorName @funName+         then ""+         else @funName+  | Cast lhs.liftedColumnName = case @tn.annotatedTree of+                                  SimpleTypeName _ tn -> tn+                                  _ -> ""++-- collect the aliases and column names for use by the selectitemlist nodes+SEM SelectItem+    | SelExp lhs.columnName = case @ex.liftedColumnName of+                                "" -> "?column?"+                                s -> s+    | SelectItem lhs.columnName = @name+++{-+================================================================================++= insert++-}+{+getCAtts t =+    case t of+      SetOfType (UnnamedCompositeType t) -> t+      _ -> []+}++SEM Statement+    | Insert+        loc.columnStuff =+            checkColumnConsistency @lhs.env+                                   @table+                                   @targetCols.strings+                                   (getCAtts $ getTypeAnnotation @insData.annotatedTree)+        loc.tpe =+            chainTypeCheckFailed [getTypeAnnotation @insData.annotatedTree] $ do+              @loc.columnStuff+              Right $ Pseudo Void+        loc.statementInfo =+            [InsertInfo @table $ errorToTypeFailF UnnamedCompositeType @loc.columnStuff]+        loc.backTree = Insert @ann @table @targetCols.annotatedTree+                              @insData.annotatedTree @returning+        loc.envUpdates = []++ATTR StringList [||strings : {[String]}]++SEM StringList+  | Cons lhs.strings = @hd : @tl.strings+  | Nil lhs.strings = []++{-+================================================================================++= update++-}++SEM Statement+    | Update+        loc.tpe =+            do+            let re = checkRelationExists @lhs.env @table+            when (isJust re) $+                 Left [fromJust $ re]+            chainTypeCheckFailed (map snd @assigns.pairs) $ do+              @loc.columnsConsistent+              checkErrorList @assigns.rowSetErrors $ Pseudo Void+        loc.columnsConsistent =+            checkColumnConsistency @lhs.env @table (map fst @assigns.pairs) @assigns.pairs+        loc.statementInfo =+            [UpdateInfo @table $ errorToTypeFailF UnnamedCompositeType @loc.columnsConsistent]+        loc.backTree = Update @ann @table @assigns.annotatedTree @whr.annotatedTree @returning+        loc.envUpdates = []++ATTR SetClauseList [||pairs : {[(String,Type)]}+                      rowSetErrors : {[TypeError]}]++SEM SetClauseList+  | Cons lhs.pairs = @hd.pairs ++ @tl.pairs+         lhs.rowSetErrors = maybeToList @hd.rowSetError ++ @tl.rowSetErrors+  | Nil lhs.pairs = []+        lhs.rowSetErrors = []++ATTR SetClause [||pairs : {[(String,Type)]}+                  rowSetError : {Maybe TypeError}]++SEM SetClause+    | SetClause+        lhs.pairs = [(@att, getTypeAnnotation @val.annotatedTree)]+        lhs.rowSetError = Nothing+    | RowSetClause+        loc.rowSetError =+          let atts = @atts.strings+              types = getRowTypes @vals.typeList+          in if length atts /= length types+               then Just WrongNumberOfColumns+               else Nothing+        lhs.pairs = zip @atts.strings $ getRowTypes @vals.typeList++{+getRowTypes :: [Type] -> [Type]+getRowTypes [RowCtor ts] = ts+getRowTypes ts = ts+}++{-+================================================================================++= delete+-}++SEM Statement+    | Delete+        loc.tpe =+            case checkRelationExists @lhs.env @table of+              Just e -> Left [e]+              Nothing -> Right $ Pseudo Void+        loc.statementInfo = [DeleteInfo @table]+        loc.backTree = Delete @ann @table @whr.annotatedTree @returning+        loc.envUpdates = []++{-+================================================================================++= create table++env needs to be modified:+types, typenames, typecats, attrdefs, systemcolumns++produces a compositedef: (name, tablecomposite, unnamedcomp [(attrname, type)])++-}+ATTR AttributeDef [||attrName : String+                     namedType : Type]++SEM AttributeDef+    | AttributeDef+      lhs.attrName = @name+      lhs.namedType = @typ.namedType++ATTR AttributeDefList [||attrs : {[(String, Type)]}]++SEM AttributeDefList+    | Cons lhs.attrs = (@hd.attrName, @hd.namedType) : @tl.attrs+    | Nil lhs.attrs = []++SEM Statement+    | CreateTable+        loc.attrTypes = map snd @atts.attrs+        loc.tpe = Right $ Pseudo Void+        loc.backTree = CreateTable @ann @name @atts.annotatedTree @cons.annotatedTree+        loc.statementInfo = []+        loc.envUpdates = [EnvCreateTable @name @atts.attrs []]++SEM Statement+    | CreateTableAs+        loc.selType = getTypeAnnotation @expr.annotatedTree+        loc.tpe = Right @loc.selType+        loc.backTree = CreateTableAs @ann @name @expr.annotatedTree+        loc.statementInfo = []+        loc.attrs = case @loc.selType of+                      UnnamedCompositeType c -> c+                      _-> []+        loc.envUpdates = [EnvCreateTable @name @loc.attrs []]+{-+================================================================================++= create view++-}++SEM Statement+    | CreateView+        loc.tpe = chainTypeCheckFailed [getTypeAnnotation @expr.annotatedTree] $ Right $ Pseudo Void+        loc.backTree = CreateView @ann @name @expr.annotatedTree+        loc.statementInfo = []+        loc.attrs = case getTypeAnnotation @expr.annotatedTree of+                      SetOfType (UnnamedCompositeType c) -> c+                      _ -> []+        loc.envUpdates = [EnvCreateView @name @loc.attrs]++++{-+================================================================================++= create type++-}+ATTR TypeAttributeDef [||attrName : String+                            namedType : Type]++SEM TypeAttributeDef+    | TypeAttDef+        lhs.attrName = @name+        lhs.namedType = @typ.namedType++ATTR TypeAttributeDefList [||attrs : {[(String, Type)]}]++SEM TypeAttributeDefList+    | Cons lhs.attrs = (@hd.attrName, @hd.namedType) : @tl.attrs+    | Nil lhs.attrs = []++SEM Statement+    | CreateType+        loc.tpe = Right $ Pseudo Void+        loc.backTree = CreateType @ann @name @atts.annotatedTree+        loc.statementInfo = []+        loc.envUpdates = [EnvCreateComposite @name @atts.attrs]++{-++================================================================================++= create domain++-}++SEM Statement+    | CreateDomain+        loc.tpe = Right $ Pseudo Void+        loc.backTree = CreateDomain @ann @name @typ.annotatedTree @check.annotatedTree+        loc.statementInfo = []+        loc.envUpdates = [EnvCreateDomain (ScalarType @name) @typ.namedType]+{-+================================================================================++= create function++get the signature, does some checking of the body, still a bit limited++ISSUE:++when writing an sql file, you can put a create function which refers+to a table definition that is given later. As long as the function+isn't called before the table definition is given, this is ok. To+handle this, need to gather the function prototype, but delay checking+the contents until either a) all the other type checking has been+done, or b) the function is needed (list ways this can happen: used in+a view (even then, not needed until view is used), function can be+called directly, or indirectly in another function call, ...)++No thoughts on how to do this - but at some point want to support+'declarative' sql source code, where the order doesn't matter, and+this code figures out an order to load it into the database which will+get past pgs checks, so hopefully the solution will move towards this+goal also. One additional consideration is that the error message in a+situation like this would be really helpful if it could tell that a+problem like this could be fixed with a reordering, and suggest that+reordering.++-}++ATTR ParamDef [||paramName : String]++ATTR ParamDefList [||params : {[(String, Type)]}]++ATTR ParamDef [||namedType : Type]++SEM ParamDef+    | ParamDef ParamDefTp+        lhs.namedType = @typ.namedType+    | ParamDef+        lhs.paramName = @name+    | ParamDefTp+        lhs.paramName = ""++SEM ParamDefList+     | Nil lhs.params = []+     | Cons lhs.params = ((@hd.paramName, @hd.namedType) : @tl.params)++SEM Statement+    | CreateFunction+        loc.tpe = Right $ Pseudo Void+        loc.backTree = CreateFunction @ann+                                      @lang.annotatedTree+                                      @name+                                      @params.annotatedTree+                                      @rettype.annotatedTree+                                      @bodyQuote+                                      @body.annotatedTree+                                      @vol.annotatedTree+        loc.statementInfo = []+        loc.envUpdates = [EnvCreateFunction FunName @name (map snd @params.params) @rettype.namedType]+        --add the parameters to the environment for the contained statements+        body.env = fromRight @lhs.env $+                   updateEnvironment @lhs.env [EnvStackIDs [("", @params.params)+                                                           ,(@name, @params.params)]]++SEM FnBody+    | PlpgsqlFnBody+        sts.env = fromRight @lhs.env $ updateEnvironment @lhs.env [EnvStackIDs [("", @vars.defs)]]++ATTR VarDef [||def : {(String,Type)}]++ATTR VarDefList [||defs : {[(String,Type)]}]++SEM VarDef+    | VarDef lhs.def = (@name, @typ.namedType)++SEM VarDefList+    | Cons lhs.defs = @hd.def : @tl.defs+    | Nil lhs.defs = []++{-+================================================================================++= statement common components++-}++SEM MaybeBoolExpression+    | Just+        lhs.annotatedTree =+          if getTypeAnnotation @just.annotatedTree `notElem` [typeBool, TypeCheckFailed]+            then Just $ updateAnnotation ((TypeErrorA ExpressionMustBeBool) :)+                          @just.annotatedTree+            else Just $ @just.annotatedTree++ATTR MaybeExpression [||exprType : {Maybe Type}]++SEM MaybeExpression+    | Just lhs.exprType = Just $ getTypeAnnotation @just.annotatedTree+    | Nothing lhs.exprType = Nothing++++{-++================================================================================++= plpgsql statements++-}++SEM Statement+    | Return+        loc.tpe = chainTypeCheckFailed [fromMaybe typeBool @value.exprType] $ Right $ Pseudo Void+        loc.backTree = Return @ann @value.annotatedTree+        loc.envUpdates = []+        loc.statementInfo = []++{-++================================================================================++= static tests++Try to use a list of message data types to hold all sorts of+information which works its way out to the top level where the client+code gets it. Want to have the lists concatenated together+automatically from subnodes to parent node, and then to be able to add+extra messages to this list at each node also.++Problem 1: can't have two sem statements for the same node type which+both add messages, and then the messages get combined to provide the+final message list attribute value for that node. You want this so+that e.g. that different sorts of checks appear in different+sections. Workaround is instead of having each check in it's own+section, to combine them all into one SEM.++Problem 2: no shorthand to combine what the default rule for messages+would be and then add a bit extra - so if you want all the children+messages, plus possibly an extra message or two, have to write out the+default rule in full explicitly. Can get round this by writing out+loads of code.++Both the workarounds to these seem a bit tedious and error prone, and+will make the code much less readable. Maybe need a preprocessor to+produce the ag file? Alternatively, just attach the messages to each+node (so this appears in the data types and isn't an attribute, then+have a tree walker collect them all). Since an annotation field in+each node is going to be added anyway, so each node can be labelled+with a type, will probably do this at some point.++================================================================================++= inloop testing++inloop - use to check continue, exit, and other commands that can only+appear inside loops (for, while, loop)++the only nodes that really need this attribute are the ones which can+contain statements++The inloop test is the only thing which uses the messages atm. It+shouldn't, at some point inloop testing will become part of the type+checking.++This is just some example code, will probably do something a lot more+heavy weight like symbolic interpretation - want to do all sorts of+loop, return, nullability, etc. analysis.++-}+{-+ATTR AllNodes Root ExpressionRoot [||messages USE {++} {[]} : {[Message]}]++ATTR AllNodes+  [ inLoop: Bool||]++SEM Root+  | Root statements.inLoop = False++SEM ExpressionRoot+  | ExpressionRoot expr.inLoop = False++-- set the inloop stuff which nests, it's reset inside a create+-- function statement, in case you have a create function inside a+-- loop, seems unlikely you'd do this though++SEM Statement+     | ForSelectStatement ForIntegerStatement WhileStatement sts.inLoop = True+     | CreateFunction body.inLoop = False++-- now we can check when we hit a continue statement if it is in the+-- right context+SEM Statement+    | ContinueStatement  lhs.messages = if not @lhs.inLoop+                                          then [Error ContinueNotInLoop]+                                          else []+-}+{-+================================================================================++= notes and todo+++containment guide for select expressions:+combineselect 2 selects+insert ?select+createtableas 1 select+createview 1 select+return query 1 select+forselect 1 select+select->subselect select+expression->exists select+            scalarsubquery select+            inselect select++containment guide for statements:+forselect [statement]+forinteger [statement]+while [statement]+casestatement [[statement]]+if [[statement]]+createfunction->fnbody [Statement]++TODO++some non type-check checks:+check plpgsql only in plpgsql function+orderby in top level select only+copy followed immediately by copydata iff stdin, copydata only follows+  copy from stdin+count args to raise, etc., check same number as placeholders in string+no natural with onexpr in joins+typename -> setof (& fix parsing), what else like this?+expressions: positionalarg in function, window function only in select+ list top level++review all ast checks, and see if we can also catch them during+parsing (e.g. typeName parses setof, but this should only be allowed+for a function return, and we can make this a parse error when parsing+from source code rather than checking a generated ast. This needs+judgement to say whether a parse error is better than a check error, I+think for setof it is, but e.g. for a continue not in a loop (which+could be caught during parsing) works better as a check error, looking+at the error message the user will get. This might be wrong, haven't+thought too carefully about it yet).+++TODO: canonicalize ast process, as part of type checking produces a+canonicalized ast which:+all implicit casts appear explicitly in the ast (maybe distinguished+from explicit casts?)+all names fully qualified+all types use canonical names+literal values and selectors in one form (use row style?)+nodes are tagged with types+what else?++Canonical form only defined for type consistent asts.++This canonical form should pretty print and parse back to the same+form, and type check correctly.+++-}
+ Database/HsSqlPpp/AstInternals/TypeCheckingH.lhs view
@@ -0,0 +1,260 @@+Copyright 2009 Jake Wheat++This file contains some utility functions for working with types and+type checking, which have been moved out of TypeChecking.ag for ease+of development (no uuagc mode for emacs is the problem).++> {-# OPTIONS_HADDOCK hide #-}++> module Database.HsSqlPpp.AstInternals.TypeCheckingH+>     (+>      typeCheckFunCall+>     ,typeCheckValuesExpr+>     ,getAttrs+>     ,combineTableTypesWithUsingList+>     ,doSelectItemListTpe+>     ,splitIdentifier+>     ,getRelationType+>     ,checkColumnConsistency+>     ,checkRelationExists+>     ,convertToNewStyleUpdates+>     ,commonFieldNames+>     ,typeCheckCombineSelect+>     ,chainTypeCheckFailed+>     ,errorToTypeFail+>     ,errorToTypeFailF+>     ,checkErrorList+>     ,getErrors+>     ) where++> import Data.Maybe+> import Data.List+> import Debug.Trace+> import Data.Either+> import Control.Applicative+> import Control.Monad.Error++> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.AstInternals.AstUtils+> import Database.HsSqlPpp.AstInternals.TypeConversion+> import Database.HsSqlPpp.AstInternals.EnvironmentInternal+> import Database.HsSqlPpp.Utils++================================================================================++= type check code++> typeCheckFunCall :: Environment -> String -> [Type] -> Either [TypeError] Type+> typeCheckFunCall env fnName argsType =+>     chainTypeCheckFailed argsType $+>       case fnName of+>               -- do the special cases first, some of these will use+>               -- the variadic support when it is done and no longer+>               -- be special cases.+>               "!arrayCtor" ->+>                     ArrayType <$> resolveResultSetType env argsType+>               "!between" -> do+>                     f1 <- lookupFn ">=" [argsType !! 0, argsType !! 1]+>                     f2 <- lookupFn "<=" [argsType !! 0, argsType !! 2]+>                     lookupFn "!and" [f1,f2]+>               "coalesce" -> resolveResultSetType env argsType+>               "greatest" -> do+>                     t <- resolveResultSetType env argsType+>                     lookupFn ">=" [t,t]+>                     return t+>               "least" -> do+>                     t <- resolveResultSetType env argsType+>                     lookupFn "<=" [t,t]+>                     return t+>               "!rowCtor" -> return $ RowCtor argsType+>                     -- special case the row comparison ops+>               _ | let isRowCtor t = case t of+>                                       RowCtor _ -> True+>                                       _ -> False+>                   in fnName `elem` ["=", "<>", "<=", ">=", "<", ">"]+>                          && length argsType == 2+>                          && all isRowCtor argsType ->+>                     checkRowTypesMatch (head argsType) (head $ tail argsType)+>               s -> lookupFn s argsType+>     where+>       lookupFn :: String -> [Type] -> Either [TypeError] Type+>       lookupFn s1 args = do+>         (_,_,r) <- findCallMatch env+>                              (if s1 == "u-" then "-" else s1) args+>         return r+>       checkRowTypesMatch (RowCtor t1s) (RowCtor t2s) = do+>         when (length t1s /= length t2s) $ Left [ValuesListsMustBeSameLength]+>         --this is wrong - we want all the errors, not just the first set+>         mapM_ (resolveResultSetType env . (\(a,b) -> [a,b])) $ zip t1s t2s+>         return typeBool+>       checkRowTypesMatch x y  =+>         error $ "internal error: checkRowTypesMatch called with " ++ show x ++ "," ++ show y+++> typeCheckValuesExpr :: Environment -> [[Type]] -> Either [TypeError] Type+> typeCheckValuesExpr env rowsTs =+>         let colNames = zipWith (++)+>                            (repeat "column")+>                            (map show [1..length $ head rowsTs])+>         in unionRelTypes env rowsTs colNames++> typeCheckCombineSelect :: Environment -> Type -> Type -> Either [TypeError] Type+> typeCheckCombineSelect env v1 v2 = do+>     u1 <- unwrapSetOfComposite v1+>     let colNames = map fst u1+>     u2 <- unwrapSetOfComposite v2+>     let colTypes1 = map snd u1+>     let colTypes2 = map snd u2+>     unionRelTypes env [colTypes1,colTypes2] colNames++> unionRelTypes :: Environment -> [[Type]] -> [String] -> Either [TypeError] Type+> unionRelTypes env rowsTs colNames =+>   let lengths = map length rowsTs+>   in case () of+>              _ | null rowsTs ->+>                    Left [NoRowsGivenForValues]+>                | not (all (==head lengths) lengths) ->+>                    Left [ValuesListsMustBeSameLength]+>                | otherwise ->+>                    --i don't think this propagates all the errors, just the first set+>                    mapM (resolveResultSetType env) (transpose rowsTs) >>=+>                      (return . SetOfType . UnnamedCompositeType . zip colNames)++================================================================================++= utils++lookup a composite type name, restricting it to only certain kinds of+composite type, returns the composite definition which you can get the+attributes out of which is a pair with the normal columns first, then+the system columns second++> getAttrs :: Environment -> [CompositeFlavour] -> String -> Maybe CompositeDef+> getAttrs env f n = case envCompositeAttrs env f (CompositeType n) of+>                      Left _ -> Nothing+>                      Right a -> Just a++combine two relvar types when being joined, pass in a using list and+it checks the types in the using list are compatible, and eliminates+duplicate columns of the attrs in the using list, returns the relvar+type of the joined tables.++> combineTableTypesWithUsingList :: Environment -> [String] -> Type -> Type -> Either [TypeError] Type+> combineTableTypesWithUsingList env l t1c t2c = do+>     --check t1 and t2 have l+>     t1 <-unwrapComposite t1c+>     t2 <- unwrapComposite t2c+>     let names1 = getNames t1+>     let names2 = getNames t2+>     when (not (contained l names1) ||+>               not (contained l names2)) $+>          Left [MissingJoinAttribute]+>     --check the types+>     joinColumnTypes <- mapM (getColumnType t1 t2) l+>     let nonJoinColumns =+>             let notJoin = (\(s,_) -> s `notElem` l)+>             in filter notJoin t1 ++ filter notJoin t2+>     return $ UnnamedCompositeType $ zip l joinColumnTypes ++ nonJoinColumns+>     where+>       getNames :: [(String,Type)] -> [String]+>       getNames = map fst+>       contained l1 l2 = all (`elem` l2) l1+>       getColumnType :: [(String,Type)] -> [(String,Type)] -> String -> Either [TypeError] Type+>       getColumnType t1 t2 f =+>           let ct1 = getFieldType t1 f+>               ct2 = getFieldType t2 f+>           in resolveResultSetType env [ct1,ct2]+>       getFieldType t f = snd $ fromJust $ find (\(s,_) -> s == f) t++> doSelectItemListTpe :: Environment+>                     -> String+>                     -> Type+>                     -> Type+>                     -> Type+> doSelectItemListTpe env colName colType types =+>     if types == TypeCheckFailed+>        then types+>        else errorToTypeFail (do+>          let (correlationName,iden) = splitIdentifier colName+>          newCols <- if iden == "*"+>                          then envExpandStar env correlationName+>                          else return [(iden, colType)]+>          foldM (flip consComposite) types $ reverse newCols)++I think this should be alright, an identifier referenced in an+expression can only have zero or one dot in it.++> splitIdentifier :: String -> (String,String)+> splitIdentifier s = let (a,b) = span (/= '.') s+>                     in if b == ""+>                          then ("", a)+>                          else (a,tail b)+++returns the type of the relation, and the system columns also++> getRelationType :: Environment -> String -> Either [TypeError] (Type,Type)+> getRelationType env tbl =+>           case getAttrs env [TableComposite, ViewComposite] tbl of+>             Just ((_,_,a@(UnnamedCompositeType _), s@(UnnamedCompositeType _)))+>                  -> Right (a,s)+>             _ -> Left [UnrecognisedRelation tbl]++> commonFieldNames :: Type -> Type -> [String]+> commonFieldNames t1 t2 =+>     intersect (fn t1) (fn t2)+>     where+>       fn (UnnamedCompositeType s) = map fst s+>       fn _ = []++> checkColumnConsistency :: Environment ->  String -> [String] -> [(String,Type)]+>                        -> Either [TypeError] [(String,Type)]+> checkColumnConsistency env tbl cols' insNameTypePairs = do+>   rt <- getRelationType env tbl+>   ttcols <- unwrapComposite $ fst rt+>   let cols :: [String]+>       cols = if null cols'+>                then map fst ttcols+>                else cols'+>   errorWhen (length insNameTypePairs /= length cols) [WrongNumberOfColumns]+>   let nonMatchingColumns = cols \\ map fst ttcols+>   errorWhen (not $ null nonMatchingColumns) $+>        map UnrecognisedIdentifier nonMatchingColumns+>   let targetNameTypePairs =+>         map (\l -> (l,fromJust $ lookup l ttcols)) cols+>         --check the types of the insdata match the column targets+>         --name datatype columntype+>       typeTriples = map (\((a,b),c) -> (a,b,c)) $ zip targetNameTypePairs $ map snd insNameTypePairs+>       errs :: [TypeError]+>       errs = concat $ lefts $ map (\(_,b,c) -> checkAssignmentValid env c b) typeTriples+>   unless (null errs) $ Left errs+>   return targetNameTypePairs++> checkRelationExists :: Environment -> String -> Maybe TypeError+> checkRelationExists env tbl =+>           case getAttrs env [TableComposite, ViewComposite] tbl of+>             Just _ -> Nothing+>             _ -> Just $ UnrecognisedRelation tbl++this function a bit of a mess - artefact of not fully updated code+after the environment data type was changed.++> convertToNewStyleUpdates :: [(String, ([(String,Type)], [(String,Type)]))] -> [String] -> [EnvironmentUpdate]+> convertToNewStyleUpdates qualIdens joinIdens =+>   -- we're given a list of qualified types, and a list of names of join columns+>   -- want to produce a list of qualified types, with an additional one with "" qualification+>   -- and produce a star expansion+>     [EnvStackIDs newQualifiedList+>     ,EnvSetStarExpansion newStarExpansion]+>   where+>     qualifiedFieldsCombined :: [(String,[(String,Type)])]+>     qualifiedFieldsCombined = map (\(alias,(att,sysatt)) -> (alias, att++sysatt)) qualIdens+>     isJoinField (n,_) = n `elem` joinIdens+>     (joinFields,nonJoinFields) = partition isJoinField $ concatMap snd qualifiedFieldsCombined+>     --need to resolve types instead of using nub+>     newQualifiedList = ("", nub joinFields ++ nonJoinFields):qualifiedFieldsCombined+>     qualifiedFieldsStarExp = map (\(alias,(att,_)) -> (alias, att)) qualIdens+>     (joinFieldsStarExp,nonJoinFieldsStarExp) =+>         partition isJoinField $ concatMap snd qualifiedFieldsStarExp+>     --need to resolve types instead of using nub+>     newStarExpansion = ("", nub joinFieldsStarExp ++ nonJoinFieldsStarExp):qualifiedFieldsStarExp
+ Database/HsSqlPpp/AstInternals/TypeConversion.lhs view
@@ -0,0 +1,498 @@+Copyright 2009 Jake Wheat++This file contains the functions for resolving types and+function/operator resolution. See the pg manual chapter 10:++http://www.postgresql.org/docs/8.4/interactive/typeconv.html++This code is really spaghettified.++findCallMatch - pass in a name and a list of arguments, and it returns+the matching function. (pg manual 10.2,10.3)++resolveResultSetType - pass in a set of types, and it tries to find+the common type they can all be cast to. (pg manual 10.5)++checkAssignmentValid - pass in source type and target type, returns+                typelist[] if ok, otherwise error, pg manual 10.4+                Value Storage++> {-# OPTIONS_HADDOCK hide #-}++> module Database.HsSqlPpp.AstInternals.TypeConversion (+>                        findCallMatch+>                       ,resolveResultSetType+>                       ,checkAssignmentValid+>                       ) where++> import Data.Maybe+> import Data.List++> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.AstInternals.AstUtils+> import Database.HsSqlPpp.AstInternals.EnvironmentInternal+> import Database.HsSqlPpp.Utils+++= findCallMatch++findCallMatch - partially implements the type conversion rules for+finding an operator or function match given a name and list of+arguments with partial or fully specified types++TODO:, qualifiers+namespaces+function style casts not in catalog+variadic args+default args+domains -> base type+what about aggregates and window functions?++Algo:++cands = all fns with matching names+        and same number of args++if exact match on types in this list, use it+  (if binary operator being matched, and one arg is typed and one is+  unknown, also match an operator by assuming the unknown is the same+  as the typed arg)++best match part:++filter cands with args which don't exactly match input args, and input+args cannot be converted by an implicit cast. unknowns count as+matching anything+if one left: use it++filter for preferred types:++for each cand, count each arg at each position which needs conversion,+and the cand type is a preferred type at that position.+if there are cands with count>0, keep only cands with the max count,+if one return it+if there are no cands with count>0, keep them all++check unknowns:+if any input args are unknown, and any cand accepts string at that+position, fix that arg's category as string, otherwise if all cands+accept same category at that position, fix that input args as that+category.+if we still have unknowns, then fail++discard cands which don't match the new input arg/category list++for each categorised input arg, if any cand accepts preferred type at+that position, get rid of cands which don't accept preferred type at+that position++if one left: use+else fail++polymorphic matching:+want to create a set of matches to insert into the cast pairs list+so:++find all matches on name, num args and have polymorphic parameters++for each one, check the polymorphic categories - eliminate fns that+have params in wrong category - array, non array, enum.+work out the base types for the polymorphic args at each spot based on+the args passed - so each arg is unchanged except arrays which have+the array part stripped off++now we have a list of types to match against the polymorphic params,+use resolveResultSetType to see if we can produce a match, if so,+create a new prototype which is the same as the polymorphic function+but with this matching arg swapped in, work out the casts and add it+into cand cast pairs, after exact match has been run.+++findCallMatch is a bit of a mess++> type ProtArgCast = (FunctionPrototype, [ArgCastFlavour])++> findCallMatch :: Environment -> String -> [Type] ->  Either [TypeError] FunctionPrototype+> findCallMatch env f inArgs =+>     returnIfOnne [+>        exactMatch+>       ,binOp1UnknownMatch+>       ,polymorpicExactMatches+>       ,reachable+>       ,mostExactMatches+>       ,filteredForPreferred+>       ,unknownMatchesByCat]+>       [NoMatchingOperator f inArgs]+>     where+>       -- basic lists which roughly mirror algo+>       -- get the possibly matching candidates+>       initialCandList :: [FunctionPrototype]+>       initialCandList = filter (\(_,candArgs,_) ->+>                                   length candArgs == length inArgs) $+>                                envLookupFns env f+>+>       -- record what casts are needed for each candidate+>       castPairs :: [[ArgCastFlavour]]+>       castPairs = map (listCastPairs . getFnArgs) initialCandList+>+>       candCastPairs :: [ProtArgCast]+>       candCastPairs = zip initialCandList castPairs+>+>       -- see if we have an exact match+>       exactMatch :: [ProtArgCast]+>       exactMatch = filterCandCastPairs (all (==ExactMatch)) candCastPairs+>+>       -- implement the one known, one unknown resolution for binary operators+>       binOp1UnknownMatch :: [ProtArgCast]+>       binOp1UnknownMatch = getBinOp1UnknownMatch candCastPairs+>+>       --collect possible polymorphic matches+>       polymorphicMatches :: [ProtArgCast]+>       polymorphicMatches = filterPolymorphics candCastPairs+>+>       polymorpicExactMatches :: [ProtArgCast]+>       polymorpicExactMatches = filterCandCastPairs (all (==ExactMatch)) polymorphicMatches+>+>       -- eliminate candidates for which the inargs cannot be casted to+>       reachable :: [ProtArgCast]+>       reachable = mergePolys (filterCandCastPairs (none (==CannotCast)) candCastPairs)+>                     polymorphicMatches+>+>       mostExactMatches :: [ProtArgCast]+>       mostExactMatches =+>         let inArgsBase = map (replaceWithBase env) inArgs+>             exactCounts :: [Int]+>             exactCounts =+>               map ((length+>                       . filter (\(a1,a2) -> a1==replaceWithBase env a2)+>                       . zip inArgsBase)+>                 . (\((_,a,_),_) -> a)) reachable+>             pairs = zip reachable exactCounts+>             maxm = maximum exactCounts+>         in case () of+>              _ | null reachable -> []+>                | maxm > 0 -> map fst $ filter (\(_,b) -> b == maxm) pairs+>                | otherwise -> []+>+>       -- keep the cands with the most casts to preferred types+>       preferredTypesCounts = countPreferredTypeCasts reachable+>       keepCounts = maximum preferredTypesCounts+>       itemCountPairs :: [(ProtArgCast,Int)]+>       itemCountPairs = zip reachable preferredTypesCounts+>       filteredForPreferred :: [ProtArgCast]+>       filteredForPreferred = map fst $ filter (\(_,i) -> i == keepCounts) itemCountPairs+>+>       -- collect the inArg type categories to do unknown inArg resolution+>       argCats :: [Either () String]+>       argCats = getCastCategoriesForUnknowns filteredForPreferred+>       unknownMatchesByCat :: [ProtArgCast]+>       unknownMatchesByCat = getCandCatMatches filteredForPreferred argCats+>+>       -------------+>+>       listCastPairs :: [Type] -> [ArgCastFlavour]+>       listCastPairs l = listCastPairs' inArgs l+>                         where+>                           listCastPairs' :: [Type] -> [Type] -> [ArgCastFlavour]+>                           listCastPairs' (ia:ias) (ca:cas) =+>                               (case () of+>                                  _ | ia == ca -> ExactMatch+>                                    | implicitlyCastableFromTo env ia ca ->+>                                        if envPreferredType env ca+>                                          then ImplicitToPreferred+>                                          else ImplicitToNonPreferred+>                                    | otherwise -> CannotCast+>                               ) : listCastPairs' ias cas+>                           listCastPairs' [] [] = []+>                           listCastPairs' _ _ = error "internal error: mismatched num args in implicit cast algorithm"+>+>+>       getBinOp1UnknownMatch :: [ProtArgCast] -> [ProtArgCast]+>       getBinOp1UnknownMatch cands =+>           if not (isOperatorName f &&+>                   length inArgs == 2 &&+>                   count (==UnknownStringLit) inArgs == 1)+>             then []+>             else let newInArgs =+>                          replicate 2 (if head inArgs == UnknownStringLit+>                                         then inArgs !! 1+>                                         else head inArgs)+>                  in filter (\((_,a,_),_) -> a == newInArgs) cands+>+>       filterPolymorphics :: [ProtArgCast] -> [ProtArgCast]+>       filterPolymorphics cl =+>           let ms :: [ProtArgCast]+>               ms = filter canMatch polys+>               polyTypes :: [Maybe Type]+>               polyTypes = map resolvePolyType ms+>               polyTypePairs :: [(Maybe Type, ProtArgCast)]+>               polyTypePairs = zip polyTypes ms+>               keepPolyTypePairs :: [(Type, ProtArgCast)]+>               keepPolyTypePairs =+>                 mapMaybe (\(t,p) -> case t of+>                                            Nothing -> Nothing+>                                            Just t' -> Just (t',p))+>                               polyTypePairs+>               finalRows = map (\(t,p) -> instantiatePolyType p t)+>                               keepPolyTypePairs+>               --create the new cast lists+>               cps :: [[ArgCastFlavour]]+>               cps = map (listCastPairs . getFnArgs . fst) finalRows+>           in zip (map fst finalRows) cps+>           where+>             polys :: [ProtArgCast]+>             polys = filter (\((_,a,_),_) -> any (`elem`+>                                              [Pseudo Any+>                                              ,Pseudo AnyArray+>                                              ,Pseudo AnyElement+>                                              ,Pseudo AnyEnum+>                                              ,Pseudo AnyNonArray]) a) cl+>             canMatch :: ProtArgCast -> Bool+>             canMatch pac =+>                let ((_,fnArgs,_),_) = pac+>                in canMatch' inArgs fnArgs+>                where+>                  canMatch' [] [] = True+>                  canMatch' (ia:ias) (pa:pas) =+>                    case pa of+>                      Pseudo Any -> nextMatch+>                      Pseudo AnyArray -> isArrayType ia && nextMatch+>                      Pseudo AnyElement -> nextMatch+>                      Pseudo AnyEnum -> False+>                      Pseudo AnyNonArray -> if isArrayType ia+>                                              then False+>                                              else nextMatch+>                      _ -> True+>                    where+>                      nextMatch = canMatch' ias pas+>                  canMatch' _ _ = error "internal error: mismatched lists in canMatch'"+>             resolvePolyType :: ProtArgCast -> Maybe Type+>             resolvePolyType ((_,fnArgs,_),_) =+>                 {-trace ("\nresolving " ++ show fnArgs ++ " against " ++ show inArgs ++ "\n") $-}+>                 let argPairs = zip inArgs fnArgs+>                     typeList :: [Type]+>                     typeList = catMaybes $ flip map argPairs+>                                  (\(ia,fa) -> case fa of+>                                                   Pseudo Any -> if isArrayType ia+>                                                                          then eitherToMaybe $ unwrapArray ia+>                                                                          else Just ia+>                                                   Pseudo AnyArray -> eitherToMaybe $ unwrapArray ia+>                                                   Pseudo AnyElement -> if isArrayType ia+>                                                                          then eitherToMaybe $ unwrapArray ia+>                                                                          else Just ia+>                                                   Pseudo AnyEnum -> Nothing+>                                                   Pseudo AnyNonArray -> Just ia+>                                                   _ -> Nothing)+>                 in {-trace ("\nresolve types: " ++ show typeList ++ "\n") $-}+>                    case resolveResultSetType env typeList of+>                      Left _ -> Nothing+>                      Right t -> Just t+>             instantiatePolyType :: ProtArgCast -> Type -> ProtArgCast+>             instantiatePolyType pac t =+>               let ((fn,a,r),_) = pac+>                   instArgs = swapPolys t a+>                   p1 = (fn, instArgs, swapPoly t r)+>               in let x = (p1,listCastPairs instArgs)+>                  in {-trace ("\nfixed:" ++ show x ++ "\n")-} x+>               where+>                 swapPolys :: Type -> [Type] -> [Type]+>                 swapPolys = map . swapPoly+>                 swapPoly :: Type -> Type -> Type+>                 swapPoly pit at =+>                   case at of+>                     Pseudo Any -> if isArrayType at+>                                     then ArrayType pit+>                                     else pit+>                     Pseudo AnyArray -> ArrayType pit+>                     Pseudo AnyElement -> if isArrayType at+>                                            then ArrayType pit+>                                            else pit+>                     Pseudo AnyEnum -> pit+>                     Pseudo AnyNonArray -> pit+>                     _ -> at+>       --merge in the instantiated poly functions, with a twist:+>       -- if we already have the exact same set of args in the non poly list+>       -- as a poly, then don't include that poly+>       mergePolys :: [ProtArgCast] -> [ProtArgCast] -> [ProtArgCast]+>       mergePolys orig polys =+>           let origArgs = map (\((_,a,_),_) -> a) orig+>               filteredPolys = filter (\((_,a,_),_) -> a `notElem` origArgs) polys+>           in orig ++ filteredPolys+>+>       countPreferredTypeCasts :: [ProtArgCast] -> [Int]+>       countPreferredTypeCasts =+>           map (\(_,cp) -> count (==ImplicitToPreferred) cp)+>+>       -- Left () is used for inArgs which aren't unknown,+>       --                      and for unknowns which we don't have a+>       --                      unique category+>       -- Right s -> s is the single letter category at+>       --                           that position+>       getCastCategoriesForUnknowns :: [ProtArgCast] -> [Either () String]+>       getCastCategoriesForUnknowns cands =+>           filterArgN 0+>           where+>             candArgLists :: [[Type]]+>             candArgLists = map (\((_,a,_), _) -> a) cands+>             filterArgN :: Int -> [Either () String]+>             filterArgN n =+>                 if n == length inArgs+>                   then []+>                   else let targType = inArgs !! n+>                        in ((if targType /= UnknownStringLit+>                               then Left ()+>                               else getCandsCatAt n) : filterArgN (n+1))+>                 where+>                   getCandsCatAt :: Int -> Either () String+>                   getCandsCatAt n' =+>                       let typesAtN = map (!!n') candArgLists+>                           catsAtN = map (envTypeCategory env) typesAtN+>                       in case () of+>                            --if any are string choose string+>                            _ | any (== "S") catsAtN -> Right "S"+>                              -- if all are same cat choose that+>                              | all (== head catsAtN) catsAtN -> Right $ head catsAtN+>                              -- otherwise no match, this will be+>                              -- picked up as complete failure to match+>                              -- later on+>                              | otherwise -> Left ()+>+>       getCandCatMatches :: [ProtArgCast] -> [Either () String] -> [ProtArgCast]+>       getCandCatMatches candsA cats = getMatches candsA 0+>          where+>            getMatches :: [ProtArgCast] -> Int -> [ProtArgCast]+>            getMatches cands n =+>                case () of+>                  _ | n == length inArgs -> cands+>                    | (inArgs !! n) /= UnknownStringLit -> getMatches cands (n + 1)+>                    | otherwise ->+>                        let catMatches :: [ProtArgCast]+>                            catMatches = filter (\c -> Right (getCatForArgN n c) ==+>                                                      (cats !! n)) cands+>                            prefMatches :: [ProtArgCast]+>                            prefMatches = filter (envPreferredType env .+>                                                    getTypeForArgN n) catMatches+>                            keepMatches :: [ProtArgCast]+>                            keepMatches = if length prefMatches > 0+>                                            then prefMatches+>                                            else catMatches+>                        in getMatches keepMatches (n + 1)+>            getTypeForArgN :: Int -> ProtArgCast -> Type+>            getTypeForArgN n ((_,a,_),_) = a !! n+>            getCatForArgN :: Int -> ProtArgCast -> String+>            getCatForArgN n = envTypeCategory env . getTypeForArgN n+>+>       -- utils+>       -- filter a candidate/cast flavours pair by a predicate on each+>       -- individual cast flavour+>       filterCandCastPairs :: ([ArgCastFlavour] -> Bool)+>                           -> [ProtArgCast]+>                           -> [ProtArgCast]+>       filterCandCastPairs predi = filter (\(_,cp) -> predi cp)+>+>       getFnArgs :: FunctionPrototype -> [Type]+>       getFnArgs (_,a,_) = a+>       returnIfOnne [] e = Left e+>       returnIfOnne (l:ls) e = if length l == 1+>                               then Right $ getHeadFn l+>                               else returnIfOnne ls e+>+>       getHeadFn :: [ProtArgCast] -> FunctionPrototype+>       getHeadFn l =  let ((hdFn, _):_) = l+>                      in hdFn+>       none p = not . any p+>       count p = length . filter p+>+> data ArgCastFlavour = ExactMatch+>                     | CannotCast+>                     | ImplicitToPreferred+>                     | ImplicitToNonPreferred+>                       deriving (Eq,Show)+>+> implicitlyCastableFromTo :: Environment -> Type -> Type -> Bool+> implicitlyCastableFromTo env from to = from == UnknownStringLit ||+>                                          envCast env ImplicitCastContext from to+>++resolveResultSetType -+partially implement the typing of results sets where the types aren't+all the same and not unknown+used in union,except,intersect columns, case, array ctor, values, greatest and least++algo:+if all inputs are same and not unknown -> that type+replace domains with base types+if all inputs are unknown then text+if the non unknown types aren't all in same category then fail+choose first input type that is a preferred type if there is one+choose last non unknown type that has implicit casts from all preceding inputs+check all can convert to selected type else fail++code is not as much of a mess as findCallMatch++> resolveResultSetType :: Environment -> [Type] -> Either [TypeError] Type+> resolveResultSetType env inArgs =+>   chainTypeCheckFailed inArgs $+>       case () of+>               _ | null inArgs -> Left [TypelessEmptyArray]+>                 | allSameType -> Right $ head inArgs+>                 | allSameBaseType -> Right $ head inArgsBase+>                 --todo: do domains+>                 | allUnknown -> Right $ ScalarType "text"+>                 | not allSameCat ->+>                     Left [IncompatibleTypeSet inArgs]+>                 | isJust targetType &&+>                   allConvertibleToFrom (fromJust targetType) inArgs ->+>                       Right $ fromJust targetType+>                 | otherwise -> Left [IncompatibleTypeSet inArgs]+>   where+>      allSameType = all (== head inArgs) inArgs &&+>                      head inArgs /= UnknownStringLit+>      allSameBaseType = all (== head inArgsBase) inArgsBase &&+>                      head inArgsBase /= UnknownStringLit+>      inArgsBase = map (replaceWithBase env) inArgs+>      allUnknown = all (==UnknownStringLit) inArgsBase+>      allSameCat = let firstCat = envTypeCategory env (head knownTypes)+>                   in all (\t -> envTypeCategory env t == firstCat)+>                          knownTypes+>      targetType = case catMaybes [firstPreferred, lastAllConvertibleTo] of+>                     [] -> Nothing+>                     (x:_) -> Just x+>      firstPreferred = find (envPreferredType env) knownTypes+>      lastAllConvertibleTo = firstAllConvertibleTo (reverse knownTypes)+>      firstAllConvertibleTo (x:xs) = if allConvertibleToFrom x xs+>                                       then Just x+>                                       else firstAllConvertibleTo xs+>      firstAllConvertibleTo [] = Nothing+>      matchOrImplicitToFrom t t1 = t == t1 ||+>                                   implicitlyCastableFromTo env t1 t+>      knownTypes = filter (/=UnknownStringLit) inArgsBase+>      allConvertibleToFrom = all . matchOrImplicitToFrom++> replaceWithBase :: Environment -> Type -> Type+> replaceWithBase env t@(DomainType _) = envDomainBaseType env t+> replaceWithBase _ t = t++todo:+row ctor implicitly and explicitly cast to a composite type+cast empty array, where else can an empty array work?++================================================================================++= checkAssignmentValue++assignment is ok if:+types are equal+there is a cast from src to target++> checkAssignmentValid :: Environment -> Type -> Type -> Either [TypeError] ()+> checkAssignmentValid env src tgt =+>     case () of+>       _ | src == tgt -> Right()+>         | assignCastableFromTo env src tgt -> Right ()+>         | otherwise -> Left [IncompatibleTypes tgt src]++> assignCastableFromTo :: Environment -> Type -> Type -> Bool+> assignCastableFromTo env from to = from == UnknownStringLit ||+>                                    envCast env ImplicitCastContext from to ||+>                                    envCast env AssignmentCastContext from to
+ Database/HsSqlPpp/AstInternals/TypeType.lhs view
@@ -0,0 +1,367 @@+Copyright 2009 Jake Wheat++This file contains the data type Type. It is kept separate so we can+compile the types and function information from the database+separately to AstInternal.ag.++Types overview:++Regular types: scalarType, arrayType, composite type, domaintype+we can use these anywhere.++semi first class types: row, unknownstringlit (called unknown in pg) -+these can be used in some places, but not others, in particular an+expression can have this type or select can have a row with these+type, but a view can't have a column with this type (so a select can+be valid on it's own but not as a view. Not sure if Row types can be+variables, unknownstringlit definitely can't. (Update, seems a view+can have a column with type unknown.)++pseudo types - mirror pg pseudo types+Internal, LanguageHandler, Opaque probably won't ever be properly supported+Not sure exactly what Any is, can't use it in functions like the other any types?+ - update: seems that Any is like AnyElement, but multiple Anys don't+   have to have the same type.+AnyElement, AnyArray, AnyEnum, AnyNonArray - used to implement polymorphic functions,+  can only be used in these functions as params, return type (and local vars?).+Cstring - treated as variant of text?+record -dynamically typed, depends where it is used, i think is used+for type inference in function return types (so you don't have to+write the correct type, the compiler fills it in), and as a dynamically+typed variable in functions, where it can take any composite typed+value.+void is used for functions which return nothing+trigger is a tag to say a function is used in triggers, used as a+return type only+typecheckfailed is used to represent the type of anything which the code+is currently unable to type check, this usage should disappear at some+point, and then it will only represent code which doesn't type check+because of a mistake.++The Type type identifies the type of a node, but doesn't necessarily+describe the type.+Arraytype, setoftype and row are treated as type generators, and are+unnamed so have structural equality. Other types sometimes effectively+have structural equality depending on the context... (SQL/ PostGreSQL+wasn't designed by ML programmers!)++Typing relational valued expressions:+use SetOfType combined with composite type for now, see if it works+out. If not, will have to add another type.++> {-# OPTIONS_HADDOCK hide #-}++> {-# LANGUAGE FlexibleInstances,DeriveDataTypeable #-}+++> module Database.HsSqlPpp.AstInternals.TypeType where++> import Control.Monad.Error++> import Data.Generics++ > import Data.Binary++> data Type = ScalarType String+>           | ArrayType Type+>           | SetOfType Type+>           | CompositeType String+>           | UnnamedCompositeType [(String,Type)]+>           | DomainType String+>           | EnumType String+>           | RowCtor [Type]+>           | Pseudo PseudoType+>           | TypeCheckFailed -- represents something which the type checker+>                             -- doesn't know how to type check+>                             -- or it cannot work the type out because of errors+>           | UnknownStringLit -- represents a string literal+>                              -- token whose type isn't yet+>                              -- determined+>             deriving (Eq,Show,Typeable,Data)++> data PseudoType = Any+>                 | AnyArray+>                 | AnyElement+>                 | AnyEnum+>                 | AnyNonArray+>                 | Cstring+>                 | Record+>                 | Trigger+>                 | Void+>                 | Internal+>                 | LanguageHandler+>                 | Opaque+>                   deriving (Eq,Show,Typeable,Data)++this list will need reviewing, probably refactor to a completely+different set of infos, also will want to add more information to+these, and to provide a way of converting into a user friendly+string. It is intended for this code to produce highly useful errors+later on down the line.++>                    -- mostly expected,got+> data TypeError = WrongTypes Type [Type]+>                | UnknownTypeError Type+>                | UnknownTypeName String+>                | NoMatchingOperator String [Type]+>                | TypelessEmptyArray+>                | IncompatibleTypeSet [Type]+>                | IncompatibleTypes Type Type+>                | ValuesListsMustBeSameLength+>                | NoRowsGivenForValues+>                | UnrecognisedIdentifier String+>                | UnrecognisedRelation String+>                | UnrecognisedCorrelationName String+>                | AmbiguousIdentifier String+>                | ContextError String+>                | MissingJoinAttribute+>                | ExpressionMustBeBool+>                | WrongNumberOfColumns+>                | ExpectedDomainType Type+>                | DomainDefNotFound Type+>                | BadEnvironmentUpdate String+>                | TypeAlreadyExists Type+>                | InternalError String+>                 --shoved in to humour the Either Monad+>                | MiscError String+>                  deriving (Eq,Show,Typeable,Data)++> instance Error ([TypeError]) where+>   noMsg = [MiscError "Unknown error"]+>   strMsg str = [MiscError str]++=== canonical type name support++Introduce some aliases to protect client code if/when the ast+canonical names are changed:++> typeSmallInt,typeBigInt,typeInt,typeNumeric,typeFloat4,+>   typeFloat8,typeVarChar,typeChar,typeBool :: Type+> typeSmallInt = ScalarType "int2"+> typeBigInt = ScalarType "int8"+> typeInt = ScalarType "int4"+> typeNumeric = ScalarType "numeric"+> typeFloat4 = ScalarType "float4"+> typeFloat8 = ScalarType "float8"+> typeVarChar = ScalarType "varchar"+> typeChar = ScalarType "char"+> typeBool = ScalarType "bool"++this converts the name of a type to its canonical name++> canonicalizeTypeName :: String -> String+> canonicalizeTypeName s =+>   case () of+>                   _ | s `elem` smallIntNames -> "int2"+>                     | s `elem` intNames -> "int4"+>                     | s `elem` bigIntNames -> "int8"+>                     | s `elem` numericNames -> "numeric"+>                     | s `elem` float4Names -> "float4"+>                     | s `elem` float8Names -> "float8"+>                     | s `elem` varcharNames -> "varchar"+>                     | s `elem` charNames -> "char"+>                     | s `elem` boolNames -> "bool"+>                     | otherwise -> s+>   where+>       smallIntNames = ["int2", "smallint"]+>       intNames = ["int4", "integer", "int"]+>       bigIntNames = ["int8", "bigint"]+>       numericNames = ["numeric", "decimal"]+>       float4Names = ["real", "float4"]+>       float8Names = ["double precision", "float"]+>       varcharNames = ["character varying", "varchar"]+>       charNames = ["character", "char"]+>       boolNames = ["boolean", "bool"]++random notes on pg types:++== domains:+the point of domains is you can't put constraints on types, but you+can wrap a type up in a domain and put a constraint on it there.++== literals/selectors++source strings are parsed as unknown type: they can be implicitly cast+to almost any type in the right context.++rows ctors can also be implicitly cast to any composite type matching+the elements (now sure how exactly are they matched? - number of+elements, type compatibility of elements, just by context?).++string literals are not checked for valid syntax currently, but this+will probably change so we can type check string literals statically.+Postgres defers all checking to runtime, because it has to cope with+custom data types. This code will allow adding a grammar checker for+each type so you can optionally check the string lits statically.++== notes on type checking types++=== basic type checking+Currently can lookup type names against a default template1 list of+types, or against the current list in a database (which is read before+processing and sql code).++todo: collect type names from current source file to check against+A lot of the infrastructure to do this is already in place. We also+need to do this for all other definitions, etc.++=== Type aliases++Some types in postgresql have multiple names. I think this is+hardcoded in the pg parser.++For the canonical name in this code, we use the name given in the+postgresql pg_type catalog relvar.++TODO: Change the ast canonical names: where there is a choice, prefer+the sql standard name, where there are multiple sql standard names,+choose the most concise or common one, so the ast will use different+canonical names to postgresql.++planned ast canonical names:+numbers:+int2, int4/integer, int8 -> smallint, int, bigint+numeric, decimal -> numeric+float(1) to float(24), real -> float(24)+float, float(25) to float(53), double precision -> float+serial, serial4 -> int+bigserial, serial8 -> bigint+character varying(n), varchar(n)-> varchar(n)+character(n), char(n) -> char(n)++TODO:++what about PrecTypeName? - need to fix the ast and parser (found out+these are called type modifiers in pg)++also, what can setof be applied to - don't know if it can apply to an+array or setof type++array types have to match an exact array type in the catalog, so we+can't create an arbitrary array of any type. Not sure if this is+handled quite correctly in this code.++================================================================================++utilities for working with Types++These may indicate that the haskell type system isn't being used very well.++> isArrayType :: Type -> Bool+> isArrayType (ArrayType _) = True+> isArrayType _ = False++> unwrapArray :: Type -> Either [TypeError] Type+> unwrapArray (ArrayType t) = Right t+> unwrapArray x = Left [InternalError $ "can't get types from non array " ++ show x]++> unwrapSetOfWhenComposite :: Type -> Either [TypeError] Type+> unwrapSetOfWhenComposite (SetOfType a@(UnnamedCompositeType _)) = Right a+> unwrapSetOfWhenComposite x = Left [InternalError $ "tried to unwrapSetOfWhenComposite on " ++ show x]++> unwrapSetOfComposite :: Type -> Either [TypeError]  [(String,Type)]+> unwrapSetOfComposite (SetOfType (UnnamedCompositeType a)) = Right a+> unwrapSetOfComposite x = Left [InternalError $ "tried to unwrapSetOfComposite on " ++ show x]+++> unwrapSetOf :: Type -> Either [TypeError] Type+> unwrapSetOf (SetOfType a) = Right a+> unwrapSetOf x = Left [InternalError $ "tried to unwrapSetOf on " ++ show x]++> unwrapComposite :: Type -> Either [TypeError] [(String,Type)]+> unwrapComposite (UnnamedCompositeType a) = Right a+> unwrapComposite x = Left [InternalError $ "cannot unwrapComposite on " ++ show x]++> consComposite :: (String,Type) -> Type -> Either [TypeError] Type+> consComposite l (UnnamedCompositeType a) = Right $ UnnamedCompositeType (l:a)+> consComposite a b = Left [InternalError $ "called consComposite on " ++ show (a,b)]++> unwrapRowCtor :: Type -> Either [TypeError] [Type]+> unwrapRowCtor (RowCtor a) = Right a+> unwrapRowCtor x = Left [InternalError $ "cannot unwrapRowCtor on " ++ show x]++++> {-+> instance Binary Database.HsSqlPpp.TypeChecking.TypeType.CompositeFlavour where+>   put Composite = putWord8 0+>   put TableComposite = putWord8 1+>   put ViewComposite = putWord8 2+>   get = do+>     tag_ <- getWord8+>     case tag_ of+>       0 -> return Composite+>       1 -> return TableComposite+>       2 -> return ViewComposite+>       _ -> fail "no parse"++> instance Binary Database.HsSqlPpp.TypeChecking.TypeType.CastContext where+>   put ImplicitCastContext = putWord8 0+>   put AssignmentCastContext = putWord8 1+>   put ExplicitCastContext = putWord8 2+>   get = do+>     tag_ <- getWord8+>     case tag_ of+>       0 -> return ImplicitCastContext+>       1 -> return AssignmentCastContext+>       2 -> return ExplicitCastContext+>       _ -> fail "no parse"++> instance Binary Database.HsSqlPpp.TypeChecking.TypeType.Type where+>   put (ScalarType a) = putWord8 0 >> put a+>   put (ArrayType a) = putWord8 1 >> put a+>   put (SetOfType a) = putWord8 2 >> put a+>   put (CompositeType a) = putWord8 3 >> put a+>   put (UnnamedCompositeType a) = putWord8 4 >> put a+>   put (DomainType a) = putWord8 5 >> put a+>   put (EnumType a) = putWord8 6 >> put a+>   put (RowCtor a) = putWord8 7 >> put a+>   put (Pseudo a) = putWord8 8 >> put a+>   put TypeCheckFailed = putWord8 9+>   put UnknownStringLit = putWord8 10+>   get = do+>     tag_ <- getWord8+>     case tag_ of+>       0 -> get >>= \a -> return (ScalarType a)+>       1 -> get >>= \a -> return (ArrayType a)+>       2 -> get >>= \a -> return (SetOfType a)+>       3 -> get >>= \a -> return (CompositeType a)+>       4 -> get >>= \a -> return (UnnamedCompositeType a)+>       5 -> get >>= \a -> return (DomainType a)+>       6 -> get >>= \a -> return (EnumType a)+>       7 -> get >>= \a -> return (RowCtor a)+>       8 -> get >>= \a -> return (Pseudo a)+>       9 -> return TypeCheckFailed+>       10 -> return UnknownStringLit+>       _ -> fail "no parse"++> instance Binary Database.HsSqlPpp.TypeChecking.TypeType.PseudoType where+>   put Any = putWord8 0+>   put AnyArray = putWord8 1+>   put AnyElement = putWord8 2+>   put AnyEnum = putWord8 3+>   put AnyNonArray = putWord8 4+>   put Cstring = putWord8 5+>   put Record = putWord8 6+>   put Trigger = putWord8 7+>   put Void = putWord8 8+>   put Internal = putWord8 9+>   put LanguageHandler = putWord8 10+>   put Opaque = putWord8 11+>   get = do+>     tag_ <- getWord8+>     case tag_ of+>       0 -> return Any+>       1 -> return AnyArray+>       2 -> return AnyElement+>       3 -> return AnyEnum+>       4 -> return AnyNonArray+>       5 -> return Cstring+>       6 -> return Record+>       7 -> return Trigger+>       8 -> return Void+>       9 -> return Internal+>       10 -> return LanguageHandler+>       11 -> return Opaque+>       _ -> fail "no parse"+>-}
Database/HsSqlPpp/Dbms/DatabaseLoader.lhs view
@@ -10,11 +10,9 @@ from hdbc only supports one command at a time. This might be a postgresql limitation.) -The next todo to help this code move along is to start adding token-position information to the ast, Then when error (and notice, etc.)-messages come back from the database when loading the sql, can show-the pretty printed sql with the error pos highlighted, as well as-providing the original position from the sql file.+The next todo to help this code move along is to use the source+position information in the ast when error (and notice, etc.)+messages come back from the database whilst loading the sql, can try to show the source position from the original file, which will be different to what postgresql reports.  This seems like a whole lot of effort for nothing, but will then allow using transforming the ast so it no longer directly corresponds to the@@ -26,7 +24,7 @@ when it hasn't been changed for a given statement, instead of the pretty printed stuff, don't know how much help this will be. -This code is currently on the backburner, and is a massive mess.+This code is currently on the backburner, and is a mess.  > {- | Routine load SQL into a database. Should work alright, but if >  you get any errors from PostGreSQL it won't be easy to track them@@ -45,7 +43,7 @@ > import Data.Maybe  > import Database.HsSqlPpp.PrettyPrinter.PrettyPrinter-> import Database.HsSqlPpp.TypeChecking.Ast as Ast+> import Database.HsSqlPpp.Ast.Ast as Ast > import Database.HsSqlPpp.Dbms.DBAccess  > loadIntoDatabase :: String -- ^ database name
Database/HsSqlPpp/Parsing/Lexer.lhs view
@@ -32,6 +32,7 @@ > import Data.Char  > import Database.HsSqlPpp.Parsing.ParseErrors+> import Database.HsSqlPpp.Utils  ================================================================================ @@ -186,6 +187,8 @@ '4', but will currently lex as '3' '*-' '4'. This is planned to be fixed in the parser. .. := :: : - other special cases+A single * will lex as an identifier rather than a symbol, the parser+deals with this.  > sqlSymbol :: ParsecT String ParseState Identity Tok > sqlSymbol =@@ -237,12 +240,6 @@ >                               then return "" >                               else (x++) <$> getLinesTillMatches s >     getALine = (++"\n") <$> manyTill anyChar (try newline)--doesn't seem too gratuitous, comes up a few times--> (<:>) :: (Applicative f) =>->          f a -> f [a] -> f [a]-> (<:>) a b = (:) <$> a <*> b  > tryMaybeP :: GenParser tok st a >           -> ParsecT [tok] st Identity (Maybe a)
Database/HsSqlPpp/Parsing/Parser.lhs view
@@ -28,6 +28,8 @@ top level sql text parsers appear first, then the statements, then the fragments, then the utility parsers and other utilities at the bottom. +> {-# LANGUAGE RankNTypes,FlexibleContexts #-}+ > {- | Functions to parse sql. > -} > module Database.HsSqlPpp.Parsing.Parser (@@ -37,6 +39,8 @@ >              -- * Testing >              ,parseExpression >              ,parsePlpgsql+>              -- * errors+>              ,ExtendedError >              ) >     where @@ -52,10 +56,9 @@  > import Database.HsSqlPpp.Parsing.Lexer > import Database.HsSqlPpp.Parsing.ParseErrors-> import Database.HsSqlPpp.TypeChecking.Ast-> import Database.HsSqlPpp.TypeChecking.TypeChecker as A--+> import Database.HsSqlPpp.Ast.Ast+> import Database.HsSqlPpp.Ast.Annotation as A+> import Database.HsSqlPpp.Utils  The parse state is used to keep track of source positions inside function bodies, these bodies are parsed separately to the rest of the@@ -101,6 +104,13 @@  utility function to do error handling in one place +> parseIt :: forall t s u b.(Stream s Identity t) =>+>            Either ExtendedError s+>         -> Parsec s u b+>         -> SourceName+>         -> String+>         -> u+>         -> Either ExtendedError b > parseIt lexed parser fn src ss = >     case lexed of >                Left er -> Left er@@ -125,53 +135,28 @@ > sqlStatement :: Bool -> ParsecT [Token] ParseState Identity Statement > sqlStatement reqSemi = >    (choice [->                          selectStatement->                         ,insert->                         ,update->                         ,delete->                         ,truncateSt->                         ,copy->                         ,keyword "create" *>->                                    choice [->                                       createTable->                                      ,createType->                                      ,createFunction->                                      ,createView->                                      ,createDomain]->                         ,keyword "drop" *>->                                    choice [->                                       dropSomething->                                      ,dropFunction]->                         ]->        <* (if reqSemi->              then symbol ";" >> return ()->              else optional (symbol ";") >> return ()))+>      selectStatement+>     ,insert+>     ,update+>     ,delete+>     ,truncateSt+>     ,copy+>     ,keyword "create" *>+>              choice [+>                 createTable+>                ,createType+>                ,createFunction+>                ,createView+>                ,createDomain]+>     ,keyword "drop" *>+>              choice [+>                 dropSomething+>                ,dropFunction]]+>     <* (if reqSemi+>           then symbol ";" >> return ()+>           else optional (symbol ";") >> return ())) >    <|> copyData -> getAdjustedPosition :: ParsecT [Token] ParseState Identity MySourcePos-> getAdjustedPosition = do->   p <- toMySp <$> getPosition->   s <- getState->   case s of->     [] -> return p->     x:_ -> return $ adjustPosition x p--> pos :: ParsecT [Token] ParseState Identity Annotation-> pos = do->   p <- toSp <$> getPosition->   s <- getState->   case s of->     [] -> return [p]->     x:_ -> return [adjustPos x p]->   where->     toSp sp = A.SourcePos (sourceName sp) (sourceLine sp) (sourceColumn sp)->     adjustPos (fn,pl,_) (A.SourcePos _ l c) = A.SourcePos fn (pl+l-1) c->     adjustPos _ x = error $ "internal error - tried to adjust as sourcepos: " ++ show x---> adjustPosition :: MySourcePos -> MySourcePos -> MySourcePos-> adjustPosition (fn,pl,_) (_,l,c) = (fn,pl+l-1,c)- ================================================================================  statement flavour parsers@@ -199,19 +184,21 @@ >   choice [selectE, values] >   where >     selectE = do+>       p <- pos >       keyword "select"->       s1 <- selQuerySpec+>       s1 <- selQuerySpec p+>       p1 <- pos >       choice [ >         --don't know if this does associativity in the correct order for >         --statements with multiple excepts/ intersects and no parens->         CombineSelect [] Except s1 <$> (keyword "except" *> selectExpression)->        ,CombineSelect [] Intersect s1 <$> (keyword "intersect" *> selectExpression)->        ,CombineSelect [] UnionAll s1 <$> (try (keyword "union"+>         CombineSelect p1 Except s1 <$> (keyword "except" *> selectExpression)+>        ,CombineSelect p1 Intersect s1 <$> (keyword "intersect" *> selectExpression)+>        ,CombineSelect p1 UnionAll s1 <$> (try (keyword "union" >                                              *> keyword "all") *> selectExpression)->        ,CombineSelect [] Union s1 <$> (keyword "union" *> selectExpression)+>        ,CombineSelect p1 Union s1 <$> (keyword "union" *> selectExpression) >        ,return s1] >       where->         selQuerySpec = Select []+>         selQuerySpec p = Select p >                    <$> option Dupes (Distinct <$ keyword "distinct") >                    <*> selectList >                    <*> tryOptionMaybe from@@ -241,22 +228,26 @@ >         --  - these are handled in tref >         -- then cope with joins recursively using joinpart below >         tref = threadOptionalSuffix getFirstTref joinPart->         getFirstTref = choice [->                         SubTref []->                         <$> parens selectExpression->                         <*> (optional (keyword "as") *> nkwid)->                        ,optionalSuffix->                           (TrefFun []) (try $ identifier >>= functionCallSuffix)->                           (TrefFunAlias []) () (optional (keyword "as") *> nkwid)->                        ,optionalSuffix->                           (Tref []) nkwid->                           (TrefAlias []) () (optional (keyword "as") *> nkwid)]+>         getFirstTref = do+>                   p2 <- pos+>                   choice [+>                          SubTref p2+>                          <$> parens selectExpression+>                          <*> (optional (keyword "as") *> nkwid)+>                         ,optionalSuffix+>                           (TrefFun p2) (try $ identifier >>= functionCallSuffix)+>                           (TrefFunAlias p2) () (optional (keyword "as") *> nkwid)+>                         ,optionalSuffix+>                           (Tref p2) nkwid+>                           (TrefAlias p2) () (optional (keyword "as") *> nkwid)] >         --joinpart: parse a join after the first part of the tableref >         --(which is a table name, aliased table name or subselect) - >         --takes this tableref as an arg so it can recurse to multiple >         --joins >         joinPart tr1 = threadOptionalSuffix (readOneJoinPart tr1) joinPart->         readOneJoinPart tr1 = JoinedTref [] tr1+>         readOneJoinPart tr1 = do+>            p2 <- pos+>            JoinedTref p2 tr1 >              --look for the join flavour first >              <$> option Unnatural (Natural <$ keyword "natural") >              <*> choice [@@ -269,8 +260,8 @@ >              <*> (keyword "join" *> tref) >              --now try and read the join condition >              <*> choice [->                  Just <$> (JoinOn <$> (keyword "on" *> expr))->                 ,Just <$> (JoinUsing <$> (keyword "using" *> columnNameList))+>                  Just <$> (JoinOn <$> pos <*> (keyword "on" *> expr))+>                 ,Just <$> (JoinUsing <$> pos <*> (keyword "using" *> columnNameList)) >                 ,return Nothing] >         nkwid = try $ do >                  x <- idString@@ -281,6 +272,7 @@ >                  --works for the tests and the test sql files don't know >                  --if these should be allowed as aliases without "" or >                  --[]+>                  -- TODO find out what the correct behaviour here is. >                  if map toLower x `elem` ["as" >                              ,"where" >                              ,"except"@@ -301,8 +293,7 @@ >                              ,"from"] >                    then fail "not keyword" >                    else return x->     values = keyword "values" >>->              Values [] <$> commaSep1 (parens $ commaSep1 expr)+>     values = Values <$> (pos <* keyword "values") <*> commaSep1 (parens $ commaSep1 expr)   = insert, update and delete@@ -311,41 +302,40 @@ multiple rows to insert and insert from select statements  > insert :: ParsecT [Token] ParseState Identity Statement-> insert = keyword "insert" >> keyword "into" >>->          Insert->          <$> pos+> insert = Insert+>          <$> pos <* keyword "insert" <* keyword "into" >          <*> idString >          <*> option [] (try columnNameList) >          <*> selectExpression >          <*> tryOptionMaybe returning  > update :: ParsecT [Token] ParseState Identity Statement-> update = keyword "update" >>->          Update->          <$> pos+> update = Update+>          <$> pos <* keyword "update" >          <*> idString >          <*> (keyword "set" *> commaSep1 setClause) >          <*> tryOptionMaybe whereClause >          <*> tryOptionMaybe returning >     where >       setClause = choice->             [RowSetClause <$> parens (commaSep1 idString)+>             [RowSetClause <$> pos+>                           <*> parens (commaSep1 idString) >                           <*> (symbol "=" *> parens (commaSep1 expr))->             ,SetClause <$> idString+>             ,SetClause <$> pos+>                        <*> idString >                        <*> (symbol "=" *> expr)]  > delete :: ParsecT [Token] ParseState Identity Statement-> delete = keyword "delete" >> keyword "from" >>->          Delete->          <$> pos+> delete = Delete+>          <$> pos <* keyword "delete" <* keyword "from" >          <*> idString >          <*> tryOptionMaybe whereClause >          <*> tryOptionMaybe returning  > truncateSt :: ParsecT [Token] ParseState Identity Statement-> truncateSt = keyword "truncate" >> optional (keyword "table") >>+> truncateSt = >            Truncate->            <$> pos+>            <$> pos <* keyword "truncate" <* optional (keyword "table") >            <*> commaSep1 idString >            <*> option ContinueIdentity (choice [ >                                 ContinueIdentity <$ (keyword "continue"@@ -393,22 +383,24 @@ >                                          (symbol ",")) >                       where swap (a,b) = (b,a) >     tableAtt = AttributeDef->                <$> idString+>                <$> pos+>                <*> idString >                <*> typeName >                <*> tryOptionMaybe (keyword "default" *> expr) >                <*> many rowConstraint >     tableConstr = choice [ >                    UniqueConstraint->                    <$> try (keyword "unique" *> columnNameList)+>                    <$> pos <*> try (keyword "unique" *> columnNameList) >                    ,PrimaryKeyConstraint->                    <$> try (keyword "primary" *> keyword "key"->                             *> choice [->                                     (:[]) <$> idString->                                    ,parens (commaSep1 idString)])+>                    <$> pos <*> try (keyword "primary" *> keyword "key"+>                                     *> choice [+>                                             (:[]) <$> idString+>                                            ,parens (commaSep1 idString)]) >                    ,CheckConstraint->                    <$> try (keyword "check" *> parens expr)+>                    <$> pos <*> try (keyword "check" *> parens expr) >                    ,ReferenceConstraint->                    <$> try (keyword "foreign" *> keyword "key"+>                    <$> pos+>                    <*> try (keyword "foreign" *> keyword "key" >                             *> parens (commaSep1 idString)) >                    <*> (keyword "references" *> idString) >                    <*> option [] (parens $ commaSep1 idString)@@ -416,13 +408,14 @@ >                    <*> onUpdate] >     rowConstraint = >        choice [->           RowUniqueConstraint <$ keyword "unique"->          ,RowPrimaryKeyConstraint <$ keyword "primary" <* keyword "key"->          ,RowCheckConstraint <$> (keyword "check" *> parens expr)->          ,NullConstraint <$ keyword "null"->          ,NotNullConstraint <$ (keyword "not" *> keyword "null")+>           RowUniqueConstraint <$> pos <* keyword "unique"+>          ,RowPrimaryKeyConstraint <$> pos <* keyword "primary" <* keyword "key"+>          ,RowCheckConstraint <$> pos <*> (keyword "check" *> parens expr)+>          ,NullConstraint <$> pos <* keyword "null"+>          ,NotNullConstraint <$> pos <* (keyword "not" <* keyword "null") >          ,RowReferenceConstraint->          <$> (keyword "references" *> idString)+>          <$> pos+>          <*> (keyword "references" *> idString) >          <*> option Nothing (try $ parens $ Just <$> idString) >          <*> onDelete >          <*> onUpdate@@ -434,13 +427,12 @@   > createType :: ParsecT [Token] ParseState Identity Statement-> createType = keyword "type" >>->              CreateType->              <$> pos+> createType = CreateType+>              <$> pos <* keyword "type" >              <*> idString >              <*> (keyword "as" *> parens (commaSep1 typeAtt)) >   where->     typeAtt = TypeAttDef <$> idString <*> typeName+>     typeAtt = TypeAttDef <$> pos <*> idString <*> typeName   create function, support sql functions and plpgsql functions. Parses@@ -494,17 +486,19 @@ trailing semicolon optional  >         functionBody Sql = do+>            p <- pos >            a <- many (try $ sqlStatement True) >            -- this makes my head hurt, should probably write out >            -- more longhand->            SqlFnBody <$> option a ((\b -> (a++[b])) <$> sqlStatement False)+>            SqlFnBody p <$> option a ((\b -> (a++[b])) <$> sqlStatement False)  plpgsql function has an optional declare section, plus the statements are enclosed in begin ... end; (semi colon after end is optional(  >         functionBody Plpgsql = >             PlpgsqlFnBody->             <$> option [] declarePart+>             <$> pos+>             <*> option [] declarePart >             <*> statementPart >             where >               statementPart = keyword "begin"@@ -517,29 +511,28 @@  > param :: ParsecT [Token] ParseState Identity ParamDef > param = choice [->          try (ParamDef <$> idString <*> typeName)->         ,ParamDefTp <$> typeName]+>          try (ParamDef <$> pos <*> idString <*> typeName)+>         ,ParamDefTp <$> pos <*> typeName]  variable declarations in a plpgsql function  > varDef :: ParsecT [Token] ParseState Identity VarDef > varDef = VarDef->          <$> idString+>          <$> pos+>          <*> idString >          <*> typeName >          <*> tryOptionMaybe ((symbol ":=" <|> symbol "=")*> expr) <* symbol ";"   > createView :: ParsecT [Token] ParseState Identity Statement-> createView = keyword "view" >>->              CreateView->              <$> pos+> createView = CreateView+>              <$> pos <* keyword "view" >              <*> idString >              <*> (keyword "as" *> selectExpression)  > createDomain :: ParsecT [Token] ParseState Identity Statement-> createDomain = keyword "domain" >>->                CreateDomain->                <$> pos+> createDomain = CreateDomain+>                <$> pos <* keyword "domain" >                <*> idString >                <*> (tryOptionMaybe (keyword "as") *> typeName) >                <*> tryOptionMaybe (keyword "check" *> parens expr)@@ -590,15 +583,17 @@  > selectList :: ParsecT [Token] ParseState Identity SelectList > selectList =+>     pos >>= \p -> >     choice [->         flip SelectList <$> readInto <*> itemList->        ,SelectList <$> itemList <*> option [] readInto]+>         flip (SelectList p) <$> readInto <*> itemList+>        ,SelectList p  <$> itemList <*> option [] readInto] >   where >     readInto = keyword "into" *> commaSep1 idString >     itemList = commaSep1 selectItem->     selectItem = optionalSuffix->                    SelExp expr->                    SelectItem () (keyword "as" *> idString)+>     selectItem = pos >>= \p ->+>                  optionalSuffix+>                    (SelExp p) expr+>                    (SelectItem p) () (keyword "as" *> idString)  > returning :: ParsecT [Token] ParseState Identity SelectList > returning = keyword "returning" *> selectList@@ -608,13 +603,14 @@  > typeName :: ParsecT [Token] ParseState Identity TypeName > typeName = choice [->             SetOfTypeName <$> (keyword "setof" *> typeName)+>             SetOfTypeName <$> pos <*> (keyword "setof" *> typeName) >            ,do+>              p <- pos >              s <- map toLower <$> idString >              choice [->                PrecTypeName s <$> parens integer->               ,ArrayTypeName (SimpleTypeName s) <$ symbol "[" <* symbol "]"->               ,return $ SimpleTypeName s]]+>                PrecTypeName p s <$> parens integer+>               ,ArrayTypeName p (SimpleTypeName p s) <$ symbol "[" <* symbol "]"+>               ,return $ SimpleTypeName p s]]  > cascade :: ParsecT [Token] ParseState Identity Cascade > cascade = option Restrict (choice [@@ -629,18 +625,18 @@ > plPgsqlStatement = >    sqlStatement True >     <|> (choice [->                          continue->                         ,execute->                         ,caseStatement->                         ,assignment->                         ,ifStatement->                         ,returnSt->                         ,raise->                         ,forStatement->                         ,whileStatement->                         ,perform->                         ,nullStatement]->                         <* symbol ";")+>           continue+>          ,execute+>          ,caseStatement+>          ,assignment+>          ,ifStatement+>          ,returnSt+>          ,raise+>          ,forStatement+>          ,whileStatement+>          ,perform+>          ,nullStatement]+>          <* symbol ";")  > nullStatement :: ParsecT [Token] ParseState Identity Statement > nullStatement = NullStatement <$> (pos <* keyword "null")@@ -649,8 +645,7 @@ > continue = ContinueStatement <$> (pos <* keyword "continue")  > perform :: ParsecT [Token] ParseState Identity Statement-> perform = keyword "perform" >>->           Perform <$> pos <*> expr+> perform = Perform <$> (pos <* keyword "perform") <*> expr  > execute :: ParsecT [Token] ParseState Identity Statement > execute = pos >>= \p -> keyword "execute" >>@@ -703,16 +698,14 @@ >               <* keyword "end" <* keyword "loop"  > whileStatement :: ParsecT [Token] ParseState Identity Statement-> whileStatement = keyword "while" >>->                  WhileStatement->                  <$> pos+> whileStatement = WhileStatement+>                  <$> (pos <* keyword "while") >                  <*> (expr <* keyword "loop") >                  <*> many plPgsqlStatement <* keyword "end" <* keyword "loop"  > ifStatement :: ParsecT [Token] ParseState Identity Statement-> ifStatement = keyword "if" >>->               If->               <$> pos+> ifStatement = If+>               <$> (pos <* keyword "if") >               <*> (ifPart <:> elseifParts) >               <*> (elsePart <* endIf) >   where@@ -722,13 +715,13 @@ >     endIf = keyword "end" <* keyword "if" >     thn = keyword "then" >     elseif = keyword "elseif"->     --might as well these in as well after all that+>     --might as well throw this in as well after all that >     -- can't do <,> unfortunately, so use <.> instead >     (<.>) a b = (,) <$> a <*> b  > caseStatement :: ParsecT [Token] ParseState Identity Statement-> caseStatement = keyword "case" >>->     CaseStatement <$> pos+> caseStatement =+>     CaseStatement <$> (pos <* keyword "case") >                   <*> expr >                   <*> many whenSt >                   <*> option [] (keyword "else" *> many plPgsqlStatement)@@ -764,7 +757,8 @@ >            fct = choice [  order these so the ones which can be valid prefixes of others appear-further down the list, probably want to refactor this to use the+further down the list (used to be a lot more important when there+wasn't a separate lexer), probably want to refactor this to use the optionalsuffix parsers to improve speed.  One little speed optimisation, to help with pretty printed code which@@ -778,29 +772,22 @@ start with the factors which start with parens - eliminate scalar subqueries since they're easy to distinguish from the others then do in predicate before row constructor, since an in predicate can start with-a row constructor, then finally vanilla parens+a row constructor looking thing, then finally vanilla parens  >               ,scalarSubQuery >               ,try $ threadOptionalSuffix rowCtor inPredicateSuffix >               ,parens expr -we have two things which can start with a $,-do the position arg first, then we can unconditionally-try the dollar quoted string next+try a few random things which can't start a different expression  >               ,positionalArg--string using quotes don't start like anything else and we've-already tried the other thing which starts with a $, so can-parse without a try- >               ,stringLit  >               ,floatLit >               ,integerLit  put the factors which start with keywords before the ones which start-with a function+with a function, so we don't try an parse a keyword as a function name  >               ,caseParse >               ,exists@@ -821,7 +808,11 @@ == operator table  proper hacky, but sort of does the job-the 'missing' notes refer to pg operators which aren't yet supported+the 'missing' notes refer to pg operators which aren't yet supported,+or supported in a different way (e.g. cast uses the type name parser+for one of it's argument, not the expression parser - I don't know if+there is a better way of doing this but there usually is in parsec)+ pg's operator table is on this page: http://www.postgresql.org/docs/8.4/interactive/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS @@ -830,14 +821,15 @@ operators up with irregular syntax operators, you can create new operators during parsing, and some operators are prefix/postfix or binary depending on the types of their operands (how do you parse-something like this?)/+something like this?) -The full list of operators from DefaultScope.hs should be used here.+The full list of operators from a standard template1 database should+be used here.  > table :: [[Operator [Token] ParseState Identity Expression]] > table = [--[binary "::" (BinOpCall Cast) AssocLeft] >          --missing [] for array element select->          [prefix "-" (FunCall [] "u-")]+>          [prefix "-" "u-"] >         ,[binary "^" AssocLeft] >         ,[binary "*" AssocLeft >          ,idHackBinary "*" AssocLeft@@ -846,85 +838,68 @@ >         ,[binary "+" AssocLeft >          ,binary "-" AssocLeft] >          --should be is isnull and notnull->         ,[postfixks ["is", "not", "null"] (FunCall [] "!isNotNull")->          ,postfixks ["is", "null"] (FunCall [] "!isNull")]+>         ,[postfixks ["is", "not", "null"] "!isNotNull"+>          ,postfixks ["is", "null"] "!isNull"] >          --other operators all added in this list according to the pg docs: >         ,[binary "<->" AssocNone >          ,binary "<=" AssocRight >          ,binary ">=" AssocRight >          ,binary "||" AssocLeft->          ,prefix "@" (FunCall [] "@")+>          ,prefix "@" "@" >          ] >          --in should be here, but is treated as a factor instead >          --between >          --overlaps >         ,[binaryk "like" "!like" AssocNone->          ,binarycust "!=" "<>" AssocNone]+>          ,binarycust (symbol "!=") "<>" AssocNone] >          --(also ilike similar)->         ,[lt "<" AssocNone+>         ,[binary "<" AssocNone >          ,binary ">" AssocNone] >         ,[binary "=" AssocRight >          ,binary "<>" AssocNone]->         ,[prefixk "not" (FunCall [] "!not")]+>         ,[prefixk "not" "!not"] >         ,[binaryk "and" "!and" AssocLeft >          ,binaryk "or" "!or" AssocLeft]] >     where->       --use different parsers for symbols and keywords to get the->       --right whitespace behaviour->       binary s->          = Infix (try (symbol s >> return (binaryF s)))->       binarycust s t->          = Infix (try (symbol s >> return (binaryF t)))->       -- * ends up being lexed as an id token rather than a symbol->       -- * token, so work around here->       idHackBinary s->           = Infix (try (keyword s >> return (binaryF s)))->       prefix s f->          = Prefix (try (symbol s >> return (unaryF f)))->       binaryk s o->          = Infix (try (keyword s >> return (binaryF o)))->       prefixk s f->          = Prefix (try (keyword s >> return (unaryF f)))->       --postfixk s f->       --   = Postfix (try (keyword s >> return f))->       postfixks ss f->          = Postfix (try (mapM_ keyword ss >> return (unaryF f)))->       unaryF f l = f [l]->       binaryF s l m = FunCall [] s [l,m]--some custom parsers--fix problem parsing <> - don't parse as "<" if it is immediately-followed by ">"--don't know if this is needed anymore.-->       lt _ = Infix (dontFollowWith "<" ">" >>->                     return (\l -> (\m -> FunCall [] "<" [l,m])))-->       dontFollowWith c1 c2 =->         try $ symbol c1 *> ((do->                                lookAhead $ symbol c2->                                fail "dont follow")->                             <|> return ())+>       binary s = binarycust (symbol s) s+>       -- '*' is lexed as an id token rather than a symbol token, so+>       -- work around here+>       idHackBinary s = binarycust (keyword s) s+>       binaryk = binarycust . keyword+>       prefix = unaryCust Prefix . symbol+>       prefixk = unaryCust Prefix . keyword+>       postfixks = unaryCust Postfix . mapM_ keyword+>       binarycust opParse t =+>         Infix $ try $ do+>              f <- FunCall <$> pos <*> (t <$ opParse)+>              return (\l -> \m -> f [l,m])+>       unaryCust ctor opParse t =+>         ctor $ try $ do+>           f <- FunCall <$> pos <*> (t <$ opParse)+>           return (\l -> f [l])  == factor parsers +I think the lookahead is used in an attempt to help the error messages.+ > scalarSubQuery :: ParsecT [Token] ParseState Identity Expression > scalarSubQuery = try (symbol "(" *> lookAhead (keyword "select")) >>->                  ScalarSubQuery []->                  <$> selectExpression <* symbol ")"+>                  ScalarSubQuery+>                  <$> pos+>                  <*> selectExpression <* symbol ")"  in predicate - an identifier or row constructor followed by 'in' then a list of expressions or a subselect  > inPredicateSuffix :: Expression -> ParsecT [Token] ParseState Identity Expression > inPredicateSuffix e =->   InPredicate [] e->   <$> option True (False <$ keyword "not")->   <*> (keyword "in" *> parens ((InSelect <$> selectExpression)+>   InPredicate+>   <$> pos+>   <*> return e+>   <*> option True (False <$ keyword "not")+>   <*> (keyword "in" *> parens ((InSelect <$> pos <*> selectExpression) >                                <|>->                                (InList <$> commaSep1 expr)))+>                                (InList <$> pos <*> commaSep1 expr)))  row ctor: one of row ()@@ -937,52 +912,59 @@ and () is a syntax error.  > rowCtor :: ParsecT [Token] ParseState Identity Expression-> rowCtor = FunCall [] "!rowCtor" <$> choice [+> rowCtor = FunCall+>           <$> pos+>           <*> return "!rowCtor"+>           <*> choice [ >            keyword "row" *> parens (commaSep expr) >           ,parens $ commaSep2 expr]  > floatLit :: ParsecT [Token] ParseState Identity Expression-> floatLit = FloatLit [] <$> float+> floatLit = FloatLit <$> pos <*> float  > integerLit :: ParsecT [Token] ParseState Identity Expression-> integerLit = IntegerLit [] <$> integer+> integerLit = IntegerLit <$> pos <*> integer  case - only supports 'case when condition' flavour and not 'case expression when value' currently  > caseParse :: ParsecT [Token] ParseState Identity Expression-> caseParse = keyword "case" >>->             choice [->              try $ CaseSimple [] <$> expr->                               <*> many whenParse->                               <*> tryOptionMaybe (keyword "else" *> expr)->                                   <* keyword "end"->             ,Case [] <$> many whenParse->                  <*> tryOptionMaybe (keyword "else" *> expr)->                       <* keyword "end"]+> caseParse = do+>   p <- pos+>   keyword "case"+>   choice [+>              try $ CaseSimple p <$> expr+>                                 <*> many whenParse+>                                 <*> tryOptionMaybe (keyword "else" *> expr)+>                                         <* keyword "end"+>             ,Case p <$> many whenParse+>                     <*> tryOptionMaybe (keyword "else" *> expr)+>                             <* keyword "end"] >   where >     whenParse = (,) <$> (keyword "when" *> commaSep1 expr) >                     <*> (keyword "then" *> expr)  > exists :: ParsecT [Token] ParseState Identity Expression-> exists = keyword "exists" >>->          Exists [] <$> parens selectExpression+> exists = Exists <$> pos <* keyword "exists" <*> parens selectExpression  > booleanLit :: ParsecT [Token] ParseState Identity Expression-> booleanLit = BooleanLit [] <$> (True <$ keyword "true"->                                <|> False <$ keyword "false")+> booleanLit = BooleanLit <$> pos <*> (True <$ keyword "true"+>                                      <|> False <$ keyword "false")  > nullLit :: ParsecT [Token] ParseState Identity Expression-> nullLit = NullLit [] <$ keyword "null"+> nullLit = NullLit <$> pos <* keyword "null"  > arrayLit :: ParsecT [Token] ParseState Identity Expression-> arrayLit = keyword "array" >>->            FunCall [] "!arrayCtor" <$> squares (commaSep expr)+> arrayLit = FunCall <$> pos <* keyword "array"+>                    <*> return "!arrayCtor"+>                    <*> squares (commaSep expr)  > arraySubSuffix :: Expression -> ParsecT [Token] ParseState Identity Expression-> arraySubSuffix e = if e == Identifier [] "array"->                      then fail "can't use array as identifier name"->                      else FunCall [] "!arraySub" <$> ((e:) <$> squares (commaSep1 expr))+> arraySubSuffix e = case e of+>                      Identifier _ "array" -> fail "can't use array as identifier name"+>                      _ -> FunCall <$> pos+>                                   <*> return "!arraySub"+>                                   <*> ((e:) <$> squares (commaSep1 expr))  supports basic window functions of the form fn() over ([partition bit]? [order bit]?)@@ -996,8 +978,8 @@ rows between unbounded preceding and unbounded following  > windowFnSuffix :: Expression -> ParsecT [Token] ParseState Identity Expression-> windowFnSuffix e = WindowFn [] e->                    <$> (keyword "over" *> (symbol "(" *> option [] partitionBy))+> windowFnSuffix e = WindowFn <$> pos <*> return e+>                    <*> (keyword "over" *> (symbol "(" *> option [] partitionBy)) >                    <*> option [] orderBy1 >                    <*> option Asc (try $ choice [ >                                             Asc <$ keyword "asc"@@ -1009,11 +991,12 @@  > betweenSuffix :: Expression -> ParsecT [Token] ParseState Identity Expression > betweenSuffix a = do+>   p <- pos >   keyword "between" >   b <- dodgyParseElement >   keyword "and" >   c <- dodgyParseElement->   return $ FunCall [] "!between" [a,b,c]+>   return $ FunCall p "!between" [a,b,c] >              --can't use the full expression parser at this time >              --because of a conflict between the operator 'and' and >              --the 'and' part of a between@@ -1029,27 +1012,27 @@  * Note that '(' a_expr ')' is a b_expr, so an unrestricted expression can  * always be used by surrounding it with parens. -Thanks to Sam Mason for the heads up on this.- TODO: copy this approach here.  >              where >                dodgyParseElement = factor  > functionCallSuffix :: Expression -> ParsecT [Token] ParseState Identity Expression-> functionCallSuffix (Identifier _ fnName) = FunCall [] fnName <$> parens (commaSep expr)+> functionCallSuffix (Identifier _ fnName) = pos >>= \p -> FunCall p fnName <$> parens (commaSep expr) > functionCallSuffix s = error $ "internal error: cannot make functioncall from " ++ show s  > castKeyword :: ParsecT [Token] ParseState Identity Expression-> castKeyword = keyword "cast" *> symbol "(" >>->               Cast [] <$> expr->                    <*> (keyword "as" *> typeName <* symbol ")")+> castKeyword = Cast+>               <$> pos <* keyword "cast" <* symbol "("+>               <*> expr+>               <*> (keyword "as" *> typeName <* symbol ")")  > castSuffix :: Expression -> ParsecT [Token] ParseState Identity Expression-> castSuffix ex = Cast [] ex <$> (symbol "::" *> typeName)+> castSuffix ex = pos >>= \p -> Cast p ex <$> (symbol "::" *> typeName)  > substring :: ParsecT [Token] ParseState Identity Expression > substring = do+>             p <- pos >             keyword "substring" >             symbol "(" >             a <- expr@@ -1058,10 +1041,10 @@ >             keyword "for" >             c <- expr >             symbol ")"->             return $ FunCall [] "!substring" [a,b,c]+>             return $ FunCall p "!substring" [a,b,c]  > identifier :: ParsecT [Token] ParseState Identity Expression-> identifier = Identifier [] <$> idString+> identifier = Identifier <$> pos <*> idString  ================================================================================ @@ -1154,12 +1137,6 @@ >           -> ParsecT [Token] ParseState Identity [a] > commaSep1 p = sepBy1 p (symbol ",") -doesn't seem too gratuitous, comes up a few times--> (<:>) :: (Applicative f) =>->          f a -> f [a] -> f [a]-> (<:>) a b = (:) <$> a <*> b- pass a list of pairs of strings and values try each pair k,v in turn, if keyword k matches then return v@@ -1276,6 +1253,34 @@ >     parseAorB = choice [ >                   (\x -> (Just x,Nothing)) <$> p1 >                  ,(\y -> (Nothing, Just y)) <$> p2]++== position stuff++getAdjustedPosition is used to modify the positions within a function+body, to absolute positions within the file being parsed.++> getAdjustedPosition :: ParsecT [Token] ParseState Identity MySourcePos+> getAdjustedPosition = do+>   p <- toMySp <$> getPosition+>   s <- getState+>   case s of+>     [] -> return p+>     x:_ -> return $ adjustPosition x p++> adjustPosition :: MySourcePos -> MySourcePos -> MySourcePos+> adjustPosition (fn,pl,_) (_,l,c) = (fn,pl+l-1,c)++> pos :: ParsecT [Token] ParseState Identity Annotation+> pos = do+>   p <- toSp <$> getPosition+>   s <- getState+>   case s of+>     [] -> return [p]+>     x:_ -> return [adjustPos x p]+>   where+>     toSp sp = A.SourcePos (sourceName sp) (sourceLine sp) (sourceColumn sp)+>     adjustPos (fn,pl,_) (A.SourcePos _ l c) = A.SourcePos fn (pl+l-1) c+>     adjustPos _ x = error $ "internal error - tried to adjust as sourcepos: " ++ show x  == lexer stuff 
+ Database/HsSqlPpp/PrettyPrinter/AnnotateSource.lhs view
@@ -0,0 +1,125 @@+Copyright 2009 Jake Wheat++The purpose of this module is to add annotations in comments to the+original source code, so that we can preserve the original formatting+and comments.++A second goal will be to update these comments if they are already+present, so we can run this process repeatedly on a file and not fill+it with junk, or can e.g. make a few changes to the sql, run this+process, then use source control diff to view how the types, etc. have+changed.+++Algorithm design++Get all the annotations ordered by source position. Split the original+text on these points, then zip it and output it.+++> {- | Function to pretty print annotation information interspersed+>      with original source file, so e.g. you can view types,+>      etc. inline in the source whilst preserving the original+>      formatting and comments.  -}+> module Database.HsSqlPpp.PrettyPrinter.AnnotateSource+>     (annotateSource) where++> import Data.List+> import Data.Maybe+> import Debug.Trace++> import Database.HsSqlPpp.Ast.Ast+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.Annotator++> annotateSource :: Bool -> String -> StatementList -> String+> annotateSource doErrs src aast =++Details:++First need better syb so we can get two separate lists of annotations,+one for statements and one for non-statements. This will allow us to+output full information for each statement, but output reduced+information for other nodes - just want to output type error+annotations for now. (This could be made more general by allowing a+different kind of annotation pretty printer depending on the node+type, value or context?)++filter these two lists, mainly to strip all the annotations from the+non-statement annotation list except the source positions and the type+errors.++merge these two lists and sort by source position, then map to get+[(sourceposition, annotation without sourceposition)]++Now we have a list of sourcepositions that we can split the original source with:+0->firstsp, firstsp->secondsp, ... second last sp-> last sp, last sp -> eof+-> this produces a [string] from the original source+use a zip:+zip splitSource $ ([]:map snd mungedAnnotationlist)+to get [(string,annotation)]+then do map second prettyPrint over this+to gives us a [(string,string)] which we can concatenate to produce+the output text.++To replace existing comments rather than repeatedly add them:+1) make sure the pretty printed comments have some marker++2) strip all the comments with this marker out after splitting the+   string on the annotation source positions, i.e. when we get to+   [(string,annotation)] or [(string,string)] stage.+++>    let allAnn = sortBy ordSps $ getStatementPosStringPairs ++ getTypeErrorPosPairs+>        splitPoints = map ((\(SourcePos _ l _) -> l - 1) . fst) allAnn+>        splitsSrc = splitAts src splitPoints+>        anSrcPairs = zip splitsSrc $ map snd allAnn+>    in concatMap (uncurry (++)) anSrcPairs+>           -- make sure we get the last bit of the source code+>           ++ last splitsSrc+>    where+>      ordSps :: (AnnotationElement,String) -> (AnnotationElement,String) -> Ordering+>      ordSps a b = case (a,b) of+>                     ((SourcePos _ l c, _),(SourcePos _ l1 c1, _)) -> compare (l,c) (l1,c1)+>                     _ -> EQ+>      getTypeErrorPosPairs :: [(AnnotationElement, String)]+>      getTypeErrorPosPairs =+>          if doErrs+>            then map (\(a,b) -> (a,"\n/*ERROR:" ++ show b ++ "*/\n")) typeErrorsWithPositions+>            else []+>          where+>            typeErrorsWithPositions = mapMaybe (\(a,b) -> case a of+>                                                                 Nothing -> Nothing+>                                                                 Just a1 -> Just (a1,b)) typeErrors+>            typeErrors = getTypeErrors aast+>      getStatementPosStringPairs :: [(AnnotationElement, String)]+>      getStatementPosStringPairs =+>          let statementAnnotations = map interestingAnn $ getStatementAnnotations aast+>              split = mapMaybe (\l -> let notSp = filter (not.isSp) l+>                                      in if notSp == []+>                                           then Nothing+>                                           else Just (find isSp l, notSp)) statementAnnotations+>              splitsWithSps = mapMaybe (\(a,b) -> case a of+>                                                         Nothing -> Nothing+>                                                         Just a1 -> Just (a1,b)) split+>          in map (\(a,b) -> (a, "\n/*" ++ show b ++ "*/\n")) splitsWithSps+>          where+>            interestingAnn anns =+>              flip filter anns (\a ->+>                                case a of+>                                       TypeAnnotation _ -> False+>                                       EnvUpdates [] -> False+>                                       _ -> True)++>      isSp t = case t of+>                      SourcePos _ _ _ -> True+>                      _ -> False+>      splitAts :: String -> [Int] -> [String]+>      splitAts s splits =+>          let slines = lines s+>              --make sure we get from the last split to the end of the file+>              splits1 = splits ++ [length slines]+>              pairs :: [(Int,Int)]+>              pairs = zip (0:splits) splits1+>          in map (\(st,en) -> unlines $ take (en - st) $ drop st slines) pairs+
Database/HsSqlPpp/PrettyPrinter/PrettyPrinter.lhs view
@@ -23,12 +23,12 @@ >     where  > import Text.PrettyPrint-> import Data.List (stripPrefix) > import Data.Maybe -> import Database.HsSqlPpp.TypeChecking.Ast-> import Database.HsSqlPpp.TypeChecking.TypeChecker-> import Database.HsSqlPpp.TypeChecking.TypeType+> import Database.HsSqlPpp.Ast.Ast+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Utils  ================================================================================ @@ -78,8 +78,8 @@ >    <+> convWhere wh >    $+$ convReturning rt <> statementEnd >    where->      convSetClause (SetClause att ex) = text att <+> text "=" <+> convExp ex->      convSetClause (RowSetClause atts exs) =+>      convSetClause (SetClause _ att ex) = text att <+> text "=" <+> convExp ex+>      convSetClause (RowSetClause _ atts exs) = >        parens (hcatCsvMap text atts) >        <+> text "=" >        <+> parens (hcatCsvMap convExp exs)@@ -111,28 +111,28 @@ >     $+$ nest 2 (vcat (csv (map convAttDef atts ++ map convCon cns))) >     $+$ rparen <> statementEnd >     where->       convAttDef (AttributeDef n t def cons) =+>       convAttDef (AttributeDef _ n t def cons) = >         text n <+> convTypeName t >         <+> maybeConv (\e -> text "default" <+> convExp e) def >         <+> hsep (map (\e -> (case e of->                                 NullConstraint -> text "null"->                                 NotNullConstraint -> text "not null"->                                 RowCheckConstraint ew ->+>                                 NullConstraint _ -> text "null"+>                                 NotNullConstraint _ -> text "not null"+>                                 RowCheckConstraint _ ew -> >                                     text "check" <+> parens (convExp ew)->                                 RowUniqueConstraint -> text "unique"->                                 RowPrimaryKeyConstraint -> text "primary key"->                                 RowReferenceConstraint tb att ondel onupd ->+>                                 RowUniqueConstraint _ -> text "unique"+>                                 RowPrimaryKeyConstraint _ -> text "primary key"+>                                 RowReferenceConstraint _ tb att ondel onupd -> >                                     text "references" <+> text tb >                                     <+> maybeConv (parens . text) att >                                     <+> text "on delete" <+> convCasc ondel >                                     <+> text "on update" <+> convCasc onupd >                         )) cons)->       convCon (UniqueConstraint c) = text "unique"+>       convCon (UniqueConstraint _ c) = text "unique" >                                      <+> parens (hcatCsvMap text c)->       convCon (PrimaryKeyConstraint p) = text "primary key"+>       convCon (PrimaryKeyConstraint _ p) = text "primary key" >                                          <+> parens (hcatCsvMap text p)->       convCon (CheckConstraint c) = text "check" <+> parens (convExp c)->       convCon (ReferenceConstraint at tb rat ondel onupd) =+>       convCon (CheckConstraint _ c) = text "check" <+> parens (convExp c)+>       convCon (ReferenceConstraint _ at tb rat ondel onupd) = >         text "foreign key" <+> parens (hcatCsvMap text at) >         <+> text "references" <+> text tb >         <+> ifNotEmpty (parens . hcatCsvMap text) rat@@ -164,16 +164,19 @@ >                        Immutable -> "immutable") >     <> statementEnd >     where->       convFnBody (SqlFnBody sts) = convNestedStatements ca sts->       convFnBody (PlpgsqlFnBody decls sts) =+>       convFnBody (SqlFnBody ann1 sts) =+>         convPa ca ann1 <+>+>         convNestedStatements ca sts+>       convFnBody (PlpgsqlFnBody ann1 decls sts) =+>           convPa ca ann1 <+> >           ifNotEmpty (\l -> text "declare" >                   $+$ nest 2 (vcat $ map convVarDef l)) decls >           $+$ text "begin" >           $+$ convNestedStatements ca sts >           $+$ text "end;"->       convParamDef (ParamDef n t) = text n <+> convTypeName t->       convParamDef  (ParamDefTp t) = convTypeName t->       convVarDef (VarDef n t v) =+>       convParamDef (ParamDef _ n t) = text n <+> convTypeName t+>       convParamDef  (ParamDefTp _ t) = convTypeName t+>       convVarDef (VarDef _ n t v) = >         text n <+> convTypeName t >         <+> maybeConv (\x -> text ":=" <+> convExp x) v <> semi @@ -218,7 +221,7 @@ >     convPa ca ann <+> >     text "create type" <+> text name <+> text "as" <+> lparen >     $+$ nest 2 (vcat (csv->           (map (\(TypeAttDef n t) -> text n <+> convTypeName t)  atts)))+>           (map (\(TypeAttDef _ n t) -> text n <+> convTypeName t)  atts))) >     $+$ rparen <> statementEnd  == plpgsql@@ -371,8 +374,8 @@ >         <+> convTref t2 >         <+> maybeConv (nest 2 . convJoinExpression) ex >         where->           convJoinExpression (JoinOn e) = text "on" <+> convExp e->           convJoinExpression (JoinUsing ids) =+>           convJoinExpression (JoinOn _ e) = text "on" <+> convExp e+>           convJoinExpression (JoinUsing _ ids) = >               text "using" <+> parens (hcatCsvMap text ids)  >     convTref (SubTref _ sub alias) =@@ -408,12 +411,12 @@ > convWhere Nothing = empty  > convSelList :: SelectList -> Doc-> convSelList (SelectList ex into) =+> convSelList (SelectList _ ex into) = >   hcatCsvMap convSelItem ex >   <+> ifNotEmpty (\i -> text "into" <+> hcatCsvMap text i) into >   where->     convSelItem (SelectItem ex1 nm) = convExp ex1 <+> text "as" <+> text nm->     convSelItem (SelExp e) = convExp e+>     convSelItem (SelectItem _ ex1 nm) = convExp ex1 <+> text "as" <+> text nm+>     convSelItem (SelExp _ e) = convExp e  > convCasc :: Cascade -> Doc > convCasc casc = text $ case casc of@@ -438,10 +441,10 @@ > convNestedStatements pa = nest 2 . vcat . map (convStatement pa)  > convTypeName :: TypeName -> Doc-> convTypeName (SimpleTypeName s) = text s-> convTypeName (PrecTypeName s i) = text s <> parens(integer i)-> convTypeName (ArrayTypeName t) = convTypeName t <> text "[]"-> convTypeName (SetOfTypeName t) = text "setof" <+> convTypeName t+> convTypeName (SimpleTypeName _ s) = text s+> convTypeName (PrecTypeName _ s i) = text s <> parens(integer i)+> convTypeName (ArrayTypeName _ t) = convTypeName t <> text "[]"+> convTypeName (SetOfTypeName _ t) = text "setof" <+> convTypeName t  = Expressions @@ -471,8 +474,8 @@ >                        ((Identifier _ i):es1) -> text i <> brackets (csvExp es1) >                        _ -> parens (convExp (head es)) <> brackets (csvExp (tail es)) >      "!rowCtor" -> text "row" <> parens (hcatCsvMap convExp es)->      _ | isOperator n ->->         case getOperatorType n of+>      _ | isOperatorName n ->+>         case getOperatorType defaultTemplate1Environment n of >                           BinaryOp -> >                               parens (convExp (head es) >                                       <+> text (filterKeyword n)@@ -497,8 +500,8 @@ > convExp (InPredicate _ att t lst) = >   convExp att <+> (if not t then text "not" else empty) <+> text "in" >   <+> parens (case lst of->                        InList expr -> csvExp expr->                        InSelect sel -> convSelectExpression True sel)+>                        InList _ expr -> csvExp expr+>                        InSelect _ sel -> convSelectExpression True sel) > convExp (ScalarSubQuery _ s) = parens (convSelectExpression True s) > convExp (NullLit _) = text "null" > convExp (WindowFn _ fn partition order asc) =@@ -549,8 +552,6 @@ > csvExp :: [Expression] -> Doc > csvExp = hcatCsvMap convExp -run conversion function if Just, return empty if nothing- > maybeConv :: (t -> Doc) -> Maybe t -> Doc > maybeConv f c = >     case c of@@ -566,9 +567,6 @@ > ifNotEmpty :: ([a] -> Doc) -> [a] -> Doc > ifNotEmpty c l = if null l then empty else c l -map the converter ex over a list-then hcatcsv the results- > hcatCsvMap :: (a -> Doc) -> [a] -> Doc > hcatCsvMap ex = hcatCsv . map ex @@ -577,13 +575,6 @@  > newline :: Doc > newline = text "\n"--> replace :: (Eq a) => [a] -> [a] -> [a] -> [a]-> replace _ _ [] = []-> replace old new xs@(y:ys) =->   case stripPrefix old xs of->     Nothing -> y : replace old new ys->     Just ys' -> new ++ replace old new ys'  > convPa :: (Annotation -> String) -> Annotation -> Doc > convPa ca a = let s = ca a
Database/HsSqlPpp/Tests/AstCheckTests.lhs view
@@ -1,4 +1,4 @@-Copyright 2009 Jake Wheat+sCopyright 2009 Jake Wheat  Set of tests to check the type checking code @@ -8,15 +8,13 @@ > import Test.Framework > import Test.Framework.Providers.HUnit > import Data.Char-> import Control.Arrow-> import Debug.Trace+> --import Debug.Trace -> import Database.HsSqlPpp.TypeChecking.Ast-> import Database.HsSqlPpp.TypeChecking.TypeChecker > import Database.HsSqlPpp.Parsing.Parser-> import Database.HsSqlPpp.TypeChecking.Scope-> import Database.HsSqlPpp.TypeChecking.ScopeData-> import Database.HsSqlPpp.TypeChecking.TypeType+> import Database.HsSqlPpp.Ast.Annotator+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.SqlTypes  > astCheckTests :: Test.Framework.Test > astCheckTests = testGroup "astCheckTests" [@@ -163,13 +161,6 @@ >      ]) > ->    ,testGroup "expressions and scope"->     (mapExprScopeType [->      t "a" (makeScope [("test", [("a", typeInt)])]) $ Right typeInt->     ,t "b" (makeScope [("test", [("a", typeInt)])])->        $ Left [UnrecognisedIdentifier "b"]->     ])- >    ,testGroup "random expressions" >     (mapExprType [ >       p "exists (select 1 from pg_type)" $ Right typeBool@@ -277,37 +268,37 @@  >    ,testGroup "simple selects" >     (mapStatementInfo [->       p "select 1;" $ Right [SelectInfo $ SetOfType $+>       p "select 1;" $ Right [Just $ SelectInfo $ SetOfType $ >                              UnnamedCompositeType [("?column?", typeInt)]] >      ,p "select 1 as a;" $->         Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)]]+>         Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)]] >      ,p "select 1,2;" $->         Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("?column?", typeInt)+>         Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("?column?", typeInt) >                                                 ,("?column?", typeInt)]] >      ,p "select 1 as a, 2 as b;" $->         Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                                 ,("b", typeInt)]] >      ,p "select 1+2 as a, 'a' || 'b';" $->         Right [SelectInfo $ SetOfType $+>         Right [Just $ SelectInfo $ SetOfType $ >                UnnamedCompositeType [("a", typeInt) >                                     ,("?column?", ScalarType "text")]]->      ,p "values (1,2);" $ Right [SelectInfo $ SetOfType $+>      ,p "values (1,2);" $ Right [Just $ SelectInfo $ SetOfType $ >                          UnnamedCompositeType >                          [("column1", typeInt) >                          ,("column2", typeInt)]]->      ,p "values (1,2),('3', '4');" $ Right [SelectInfo $ SetOfType $+>      ,p "values (1,2),('3', '4');" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("column1", typeInt) >                                      ,("column2", typeInt)]] >      ,p "values (1,2),('a', true);" $ Left [IncompatibleTypeSet [typeInt >                                                                 ,typeBool]]->      ,p "values ('3', '4'),(1,2);" $ Right [SelectInfo $ SetOfType $+>      ,p "values ('3', '4'),(1,2);" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("column1", typeInt) >                                      ,("column2", typeInt)]] >      ,p "values ('a', true),(1,2);" $ Left [IncompatibleTypeSet [typeBool >                                                                 ,typeInt]]->      ,p "values ('a'::text, '2'::int2),('1','2');" $ Right [SelectInfo $ SetOfType $+>      ,p "values ('a'::text, '2'::int2),('1','2');" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("column1", ScalarType "text") >                                      ,("column2", typeSmallInt)]]@@ -316,25 +307,25 @@  >    ,testGroup "simple combine selects" >     (mapStatementInfo [->      p "select 1,2  union select '3', '4';" $ Right [SelectInfo $ SetOfType $+>      p "select 1,2  union select '3', '4';" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("?column?", typeInt) >                                      ,("?column?", typeInt)]] >      ,p "select 1,2 intersect select 'a', true;" $ Left [IncompatibleTypeSet [typeInt >                                                         ,typeBool]]->      ,p "select '3', '4' except select 1,2;" $ Right [SelectInfo $ SetOfType $+>      ,p "select '3', '4' except select 1,2;" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("?column?", typeInt) >                                      ,("?column?", typeInt)]] >      ,p "select 'a', true union select 1,2;" >                                      $ Left [IncompatibleTypeSet [typeBool >                                                         ,typeInt]]->      ,p "select 'a'::text, '2'::int2 intersect select '1','2';" $ Right [SelectInfo $ SetOfType $+>      ,p "select 'a'::text, '2'::int2 intersect select '1','2';" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("text", ScalarType "text") >                                      ,("int2", typeSmallInt)]] >      ,p "select 1,2,3 except select 1,2;" $ Left [ValuesListsMustBeSameLength]->      ,p "select '3' as a, '4' as b except select 1,2;" $ Right [SelectInfo $ SetOfType $+>      ,p "select '3' as a, '4' as b except select 1,2;" $ Right [Just $ SelectInfo $ SetOfType $ >                                      UnnamedCompositeType >                                      [("a", typeInt) >                                      ,("b", typeInt)]]@@ -344,30 +335,30 @@ >    ,testGroup "simple selects from" >     (mapStatementInfo [ >       p "select a from (select 1 as a, 2 as b) x;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)]] >      ,p "select b from (select 1 as a, 2 as b) x;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("b", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("b", typeInt)]] >      ,p "select c from (select 1 as a, 2 as b) x;" >         $ Left [UnrecognisedIdentifier "c"] >      ,p "select typlen from pg_type;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("typlen", typeSmallInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("typlen", typeSmallInt)]] >      ,p "select oid from pg_type;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("oid", ScalarType "oid")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("oid", ScalarType "oid")]] >      ,p "select p.oid from pg_type p;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("oid", ScalarType "oid")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("oid", ScalarType "oid")]] >      ,p "select typlen from nope;" >         $ Left [UnrecognisedIdentifier "typlen",UnrecognisedRelation "nope"] >      ,p "select generate_series from generate_series(1,7);"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("generate_series", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("generate_series", typeInt)]]  check aliasing  >      ,p "select generate_series.generate_series from generate_series(1,7);"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("generate_series", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("generate_series", typeInt)]] >      ,p "select g from generate_series(1,7) g;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("g", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("g", typeInt)]] >      ,p "select g.g from generate_series(1,7) g;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("g", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("g", typeInt)]] >      ,p "select generate_series.g from generate_series(1,7) g;" >         $ Left [UnrecognisedCorrelationName "generate_series"] >      ,p "select g.generate_series from generate_series(1,7) g;"@@ -375,13 +366,13 @@   >      ,p "select * from pg_attrdef;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType >          [("adrelid",ScalarType "oid") >          ,("adnum",ScalarType "int2") >          ,("adbin",ScalarType "text") >          ,("adsrc",ScalarType "text")]] >      ,p "select abs from abs(3);"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("abs", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("abs", typeInt)]] >         --todo: these are both valid, >         --the second one means select 3+generate_series from generate_series(1,7) >         --  select generate_series(1,7);@@ -390,28 +381,20 @@   >    ,testGroup "simple selects from 2"->     (mapStatementInfoScope [+>     (mapStatementInfoEnv [ >       t "select a,b from testfunc();"->         (let fn = ("testfunc", [], SetOfType $ CompositeType "testType")->          in emptyScope {scopeFunctions = [fn]->                        ,scopeAllFns = [fn]->                        ,scopeAttrDefs =->                         [("testType"->                          ,Composite->                          ,UnnamedCompositeType->                             [("a", ScalarType "text")->                             ,("b", typeInt)->                             ,("c", typeInt)])]})->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType+>         (makeEnv+>              [EnvCreateComposite "testType" [("a", ScalarType "text")+>                                             ,("b", typeInt)+>                                             ,("c", typeInt)]+>              ,EnvCreateFunction FunName "testfunc"  [] (SetOfType $ CompositeType "testType")])+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType >                  [("a",ScalarType "text"),("b",ScalarType "int4")]]  >      ,t "select testfunc();"->         (let fn = ("testfunc", [], Pseudo Void)->          in emptyScope {scopeFunctions = [fn]->                        ,scopeAllFns = [fn]->                        ,scopeAttrDefs =->                         []})->         $ Right [SelectInfo $ Pseudo Void]+>         (makeEnv+>              [EnvCreateFunction FunName "testfunc"  [] $ Pseudo Void])+>         $ Right [Just $ SelectInfo $ Pseudo Void]  >      ]) @@ -419,30 +402,30 @@ >     (mapStatementInfo [ >       p "select * from (select 1 as a, 2 as b) a\n\ >         \  cross join (select true as c, 4.5 as d) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("b", typeInt) >                                           ,("c", typeBool) >                                           ,("d", typeNumeric)]] >      ,p "select * from (select 1 as a, 2 as b) a\n\ >         \  inner join (select true as c, 4.5 as d) b on true;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("b", typeInt) >                                           ,("c", typeBool) >                                           ,("d", typeNumeric)]] >      ,p "select * from (select 1 as a, 2 as b) a\n\ >         \  inner join (select 1 as a, 4.5 as d) b using(a);"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("b", typeInt) >                                           ,("d", typeNumeric)]] >      ,p "select * from (select 1 as a, 2 as b) a\n\ >         \ natural inner join (select 1 as a, 4.5 as d) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("b", typeInt) >                                           ,("d", typeNumeric)]] >         --check the attribute order >      ,p "select * from (select 2 as b, 1 as a) a\n\ >         \ natural inner join (select 4.5 as d, 1 as a) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("b", typeInt) >                                           ,("d", typeNumeric)]] >      ,p "select * from (select 1 as a, 2 as b) a\n\@@ -456,7 +439,7 @@ >       p "select a.* from \n\ >         \(select 1 as a, 2 as b) a \n\ >         \cross join (select 3 as c, 4 as d) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("b", typeInt)]] >      ,p "select nothere.* from \n\ >         \(select 1 as a, 2 as b) a \n\@@ -465,26 +448,26 @@ >      ,p "select a.b,b.c from \n\ >         \(select 1 as a, 2 as b) a \n\ >         \natural inner join (select 3 as a, 4 as c) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("b", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("b", typeInt) >                                           ,("c", typeInt)]] >      ,p "select a.a,b.a from \n\ >         \(select 1 as a, 2 as b) a \n\ >         \natural inner join (select 3 as a, 4 as c) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt) >                                           ,("a", typeInt)]]  >      ,p "select pg_attrdef.adsrc from pg_attrdef;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("adsrc", ScalarType "text")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("adsrc", ScalarType "text")]]  >      ,p "select a.adsrc from pg_attrdef a;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("adsrc", ScalarType "text")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("adsrc", ScalarType "text")]]  >      ,p "select pg_attrdef.adsrc from pg_attrdef a;" >         $ Left [UnrecognisedCorrelationName "pg_attrdef"]  >      ,p "select a from (select 2 as b, 1 as a) a\n\ >         \natural inner join (select 4.5 as d, 1 as a) b;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("a", typeInt)]]  select g.fn from fn() g @@ -494,23 +477,26 @@ >    ,testGroup "aggregates" >     (mapStatementInfo [ >        p "select max(prorettype::int) from pg_proc;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("max", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("max", typeInt)]] >      ])  >    ,testGroup "simple wheres" >     (mapStatementInfo [ >       p "select 1 from pg_type where true;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("?column?", typeInt)]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("?column?", typeInt)]] >      ,p "select 1 from pg_type where 1;" >         $ Left [ExpressionMustBeBool] >      ,p "select typname from pg_type where typbyval;"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("typname", ScalarType "name")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("typname", ScalarType "name")]] >      ,p "select typname from pg_type where typtype = 'b';"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("typname", ScalarType "name")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("typname", ScalarType "name")]] >      ,p "select typname from pg_type where what = 'b';" >         $ Left [UnrecognisedIdentifier "what"] >      ]) +TODO: check identifier stacking working, then remove the pg_namespace+qualifier before oid and this should still work+ >    ,testGroup "subqueries" >     (mapStatementInfo [ >       p "select relname as relvar_name\n\@@ -519,12 +505,12 @@ >         \           (select oid\n\ >         \              from pg_namespace\n\ >         \              where (nspname = 'public'))) and (relkind = 'r'));"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("relvar_name",ScalarType "name")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("relvar_name",ScalarType "name")]] >      ,p "select relname from pg_class where relkind in ('r', 'v');"->         $ Right [SelectInfo $ SetOfType $ UnnamedCompositeType [("relname",ScalarType "name")]]+>         $ Right [Just $ SelectInfo $ SetOfType $ UnnamedCompositeType [("relname",ScalarType "name")]] >      ,p "select * from generate_series(1,7) g\n\ >         \where g not in (select * from generate_series(3,5));"->         $ Right [SelectInfo $ SetOfType (UnnamedCompositeType [("g",ScalarType "int4")])]+>         $ Right [Just $ SelectInfo $ SetOfType (UnnamedCompositeType [("g",ScalarType "int4")])] >      ])  insert@@ -535,14 +521,14 @@ >         $ Left [UnrecognisedRelation "nope",UnrecognisedIdentifier "c",UnrecognisedIdentifier "d"] >      ,p "insert into pg_attrdef (adrelid,adnum,adbin,adsrc)\n\ >         \values (1,2, 'a', 'b');"->         $ Right [InsertInfo "pg_attrdef"+>         $ Right [Just $ InsertInfo "pg_attrdef" >          (UnnamedCompositeType [("adrelid",ScalarType "oid") >                                 ,("adnum",ScalarType "int2") >                                 ,("adbin",ScalarType "text") >                                 ,("adsrc",ScalarType "text")])] >      ,p "insert into pg_attrdef\n\ >         \values (1,2, 'a', 'b');"->         $ Right [InsertInfo "pg_attrdef"+>         $ Right [Just $ InsertInfo "pg_attrdef" >          (UnnamedCompositeType [("adrelid",ScalarType "oid") >                                 ,("adnum",ScalarType "int2") >                                 ,("adbin",ScalarType "text")@@ -572,12 +558,12 @@ >      ,p "update pg_attrdef set (shmadrelid,adsrc) = ('a','b');" >         $ Left [UnrecognisedIdentifier "shmadrelid"] >      ,p "update pg_attrdef set adsrc='';"->         $ Right [UpdateInfo "pg_attrdef" (UnnamedCompositeType [("adsrc",ScalarType "text")])]+>         $ Right [Just $ UpdateInfo "pg_attrdef" (UnnamedCompositeType [("adsrc",ScalarType "text")])] >      ,p "update pg_attrdef set adsrc='' where 1=2;"->         $ Right [UpdateInfo "pg_attrdef" (UnnamedCompositeType [("adsrc",ScalarType "text")])]+>         $ Right [Just $ UpdateInfo "pg_attrdef" (UnnamedCompositeType [("adsrc",ScalarType "text")])] >       -- TODO: actually, pg doesn't support this so need to generate error instead >      ,p "update pg_attrdef set (adbin,adsrc) = ((select 'a','b'));"->         $ Right [UpdateInfo "pg_attrdef" (UnnamedCompositeType [("adbin",ScalarType "text"),("adsrc",ScalarType "text")])]+>         $ Right [Just $ UpdateInfo "pg_attrdef" (UnnamedCompositeType [("adbin",ScalarType "text"),("adsrc",ScalarType "text")])] >      ])  >    ,testGroup "delete"@@ -585,59 +571,160 @@ >       p "delete from nope;" >         $ Left [UnrecognisedRelation "nope"] >      ,p "delete from pg_attrdef where 1=2;"->         $ Right [DeleteInfo "pg_attrdef"]+>         $ Right [Just $ DeleteInfo "pg_attrdef"] >      ,p "delete from pg_attrdef where 1;" >         $ Left [ExpressionMustBeBool] >      ])+++================================================================================++>    ,testGroup "creates"+>     (mapStatementInfoEu [+>       t "create table t1 (\n\+>         \   a int,\n\+>         \   b text\n\+>         \);"+>         (Right [Nothing])+>         [[EnvCreateTable "t1" [("a",ScalarType "int4")+>                               ,("b",ScalarType "text")]+>           []]]+>      ,t "create type t1 as (\n\+>         \   a int,\n\+>         \   b text\n\+>         \);"+>         (Right [Nothing])+>         [[EnvCreateComposite "t1" [("a",ScalarType "int4")+>                                   ,("b",ScalarType "text")]]]++>      ,t "create domain t1 as text;"+>         (Right [Nothing])+>         [[EnvCreateDomain (ScalarType "t1") (ScalarType "text")]]+++>      ,t "create view v1 as select * from pg_attrdef;"+>         (Right [Nothing])+>         [[EnvCreateView "v1" [("adrelid",ScalarType "oid")+>                              ,("adnum",ScalarType "int2")+>                              ,("adbin",ScalarType "text")+>                              ,("adsrc",ScalarType "text")]]]++>      ,t "create function t1(text) returns text as $$\n\+>         \null;\n\+>         \$$ language sql stable;"+>         (Right [Nothing])+>         [[EnvCreateFunction FunName "t1" [ScalarType "text"]+>                             (ScalarType "text")]]++>      ])++================================================================================++check the identifier resolution for functions:+parameters+variable declarations+select expressions inside these:+refer to param+refer to variable+override var with var+override var with select iden+todo: override var with param, override select iden with param++check var defs:+check type exists+check type of initial values++>    ,testGroup "create function identifier resolution"+>     (mapStatementInfo [+>       p "create function t1(stuff text) returns text as $$\n\+>         \begin\n\+>         \  return stuff || ' and stuff';\n\+>         \end;\n\+>         \$$ language plpgsql stable;"+>         (Right [Nothing])+>      ,p "create function t1(stuff text) returns text as $$\n\+>         \begin\n\+>         \  return badstuff || ' and stuff';\n\+>         \end;\n\+>         \$$ language plpgsql stable;"+>         (Left [UnrecognisedIdentifier "badstuff"])+>      ,p "create function t1() returns text as $$\n\+>         \declare\n\+>         \  stuff text;\n\+>         \begin\n\+>         \  return stuff || ' and stuff';\n\+>         \end;\n\+>         \$$ language plpgsql stable;"+>         (Right [Nothing])+>      ]) > >    ] >         where >           --mapAttr = map $ uncurry checkAttrs >           p a b = (a,b) >           t a b c = (a,b,c)->           mapExprType = map (uncurry $ checkExpressionType emptyScope)+>           mapExprType = map (uncurry $ checkExpressionType defaultTemplate1Environment) >           --mapStatementType = map $ uncurry checkStatementType >           mapStatementInfo = map $ uncurry checkStatementInfo->           mapExprScopeType = map (\(a,b,c) -> checkExpressionType b a c)->           makeScope l = scopeReplaceIds defaultScope (map (second (\a->(a,[]))) l) []->           mapStatementInfoScope = map (\(a,b,c) -> checkStatementInfoScope b a c)+>           mapStatementInfoEu = map (\(a,b,c) ->  checkStatementInfoEu a b c)+>           {-mapExprEnvType = map (\(a,b,c) -> checkExpressionType b a c)-}+>           makeEnv eu = case updateEnvironment defaultTemplate1Environment eu of+>                         Left x -> error $ show x+>                         Right e -> e+>           mapStatementInfoEnv = map (\(a,b,c) -> checkStatementInfoEnv b a c) -> checkExpressionType :: Scope -> String -> Either [TypeError] Type -> Test.Framework.Test-> checkExpressionType scope src typ = testCase ("typecheck " ++ src) $+> checkExpressionType :: Environment -> String -> Either [TypeError] Type -> Test.Framework.Test+> checkExpressionType env src typ = testCase ("typecheck " ++ src) $ >   let ast = case parseExpression src of >                                      Left e -> error $ show e >                                      Right l -> l->       aast = annotateExpression scope ast+>       aast = annotateExpression env ast >       ty = getTopLevelTypes [aast]->       er = getTypeErrors [aast]+>       er = concatMap snd $ getTypeErrors aast >   in case (length er, length ty) of >        (0,0) -> assertFailure "didn't get any types?" >        (0,1) -> assertEqual ("typecheck " ++ src) typ $ Right $ head ty >        (0,_) -> assertFailure "got too many types" >        _ -> assertEqual ("typecheck " ++ src) typ $ Left er -> checkStatementInfo :: String -> Either [TypeError] [StatementInfo] -> Test.Framework.Test+> checkStatementInfo :: String -> Either [TypeError] [Maybe StatementInfo] -> Test.Framework.Test > checkStatementInfo src sis = testCase ("typecheck " ++ src) $ >   let ast = case parseSql src of >                               Left e -> error $ show e >                               Right l -> l >       aast = annotateAst ast >       is = getTopLevelInfos aast->       er = getTypeErrors aast->   in {-trace (show aast) $-} case (length er, length is) of+>       er = concatMap snd $ getTypeErrors aast+>   in {-trace (show $ map getAnnotation aast) $-} case (length er, length is) of >        (0,0) -> assertFailure "didn't get any infos?" >        (0,_) -> assertEqual ("typecheck " ++ src) sis $ Right is >        _ -> assertEqual ("typecheck " ++ src) sis $ Left er -> checkStatementInfoScope :: Scope -> String -> Either [TypeError] [StatementInfo] -> Test.Framework.Test-> checkStatementInfoScope scope src sis = testCase ("typecheck " ++ src) $+> checkStatementInfoEnv :: Environment -> String -> Either [TypeError] [Maybe StatementInfo] -> Test.Framework.Test+> checkStatementInfoEnv env src sis = testCase ("typecheck " ++ src) $ >   let ast = case parseSql src of >                               Left e -> error $ show e >                               Right l -> l->       aast = annotateAstScope scope ast+>       aast = annotateAstEnv env ast >       is = getTopLevelInfos aast->       er = getTypeErrors aast->   in case (length er, length is) of+>       er = concatMap snd $ getTypeErrors aast+>   in {-trace (show aast) $-} case (length er, length is) of >        (0,0) -> assertFailure "didn't get any infos?" >        (0,_) -> assertEqual ("typecheck " ++ src) sis $ Right is+>        _ -> assertEqual ("typecheck " ++ src) sis $ Left er++> checkStatementInfoEu :: String -> Either [TypeError] [Maybe StatementInfo] -> [[EnvironmentUpdate]] -> Test.Framework.Test+> checkStatementInfoEu src sis eu = testCase ("typecheck " ++ src) $+>   let ast = case parseSql src of+>                               Left e -> error $ show e+>                               Right l -> l+>       aast = annotateAst ast+>       is = getTopLevelInfos aast+>       er = concatMap snd $ getTypeErrors aast+>       eu' = getTopLevelEnvUpdates aast+>   in {-trace (show aast) $-} case (length er, length is, length eu') of+>        (0,0,0) -> assertFailure "didn't get any infos or envupdates?"+>        (0,_,_) -> do+>          assertEqual ("typecheck " ++ src) sis $ Right is+>          assertEqual ("eu " ++ src) eu eu' >        _ -> assertEqual ("typecheck " ++ src) sis $ Left er
Database/HsSqlPpp/Tests/ParserTests.lhs view
@@ -14,8 +14,9 @@ > import Test.Framework.Providers.HUnit > import Data.Char -> import Database.HsSqlPpp.TypeChecking.Ast-> import Database.HsSqlPpp.TypeChecking.TypeChecker+> import Database.HsSqlPpp.Ast.Ast+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.Annotation > import Database.HsSqlPpp.Parsing.Parser > import Database.HsSqlPpp.PrettyPrinter.PrettyPrinter @@ -88,13 +89,13 @@ >                                  ,Identifier [] "tst1"]) >      ,p "'a' || 'b'" (FunCall [] "||" [stringQ "a" >                                   ,stringQ "b"])->      ,p "'stuff'::text" (Cast [] (stringQ "stuff") (SimpleTypeName "text"))->      ,p "245::float(24)" (Cast [] (IntegerLit [] 245) (PrecTypeName "float" 24))+>      ,p "'stuff'::text" (Cast [] (stringQ "stuff") (SimpleTypeName [] "text"))+>      ,p "245::float(24)" (Cast [] (IntegerLit [] 245) (PrecTypeName [] "float" 24))  >      ,p "a between 1 and 3" >         (FunCall [] "!between" [Identifier [] "a", IntegerLit [] 1, IntegerLit [] 3]) >      ,p "cast(a as text)"->         (Cast [] (Identifier [] "a") (SimpleTypeName "text"))+>         (Cast [] (Identifier [] "a") (SimpleTypeName [] "text")) >      ,p "@ a" >         (FunCall [] "@" [Identifier [] "a"]) @@ -149,24 +150,24 @@ >      ,p "$1" (PositionalArg [] 1)  >      ,p "exists (select 1 from a)"->       (Exists [] (selectFrom [SelExp (IntegerLit [] 1)] (Tref [] "a")))+>       (Exists [] (selectFrom [SelExp [] (IntegerLit [] 1)] (Tref [] "a")))   >       (Exists (makeSelect {  >                 selSelectList = sle [(IntegerLit [] 1)]  >                ,selTref = Just $ Tref "a"}))  -selectFrom [SelExp (IntegerLit [] 1)] (Tref "a")))+selectFrom [SelExp [] (IntegerLit [] 1)] (Tref "a")))  in variants, including using row constructors  >      ,p "t in (1,2)"->       (InPredicate [] (Identifier [] "t") True (InList [IntegerLit [] 1,IntegerLit [] 2]))+>       (InPredicate [] (Identifier [] "t") True (InList [] [IntegerLit [] 1,IntegerLit [] 2])) >      ,p "t not in (1,2)"->       (InPredicate [] (Identifier [] "t") False (InList [IntegerLit [] 1,IntegerLit [] 2]))+>       (InPredicate [] (Identifier [] "t") False (InList [] [IntegerLit [] 1,IntegerLit [] 2])) >      ,p "(t,u) in (1,2)" >       (InPredicate [] (FunCall [] "!rowCtor" [Identifier [] "t",Identifier [] "u"]) True->        (InList [IntegerLit [] 1,IntegerLit [] 2]))+>        (InList [] [IntegerLit [] 1,IntegerLit [] 2]))  >      ,p "a < b" >       (FunCall [] "<" [Identifier [] "a", Identifier [] "b"])@@ -203,7 +204,7 @@  >     ,testGroup "select expression" >     (mapSql [->       p "select 1;" [SelectStatement [] $ selectE (SelectList [SelExp (IntegerLit [] 1)] [])]+>       p "select 1;" [SelectStatement [] $ selectE (SelectList [] [SelExp [] (IntegerLit [] 1)] [])] >      ])  ================================================================================@@ -221,7 +222,7 @@ >       [SelectStatement [] $ selectFrom (selIL ["a", "b"]) (Tref [] "inf.tbl")]  >      ,p "select distinct * from tbl;"->       [SelectStatement [] $ Select [] Distinct (SelectList (selIL ["*"]) []) (Just $ Tref [] "tbl")+>       [SelectStatement [] $ Select [] Distinct (SelectList [] (selIL ["*"]) []) (Just $ Tref [] "tbl") >        Nothing [] Nothing [] Asc Nothing Nothing]  >      ,p "select a from tbl where b=2;"@@ -264,10 +265,10 @@ >        (selectFrom (selIL ["a"]) (Tref [] "tbl1"))]  >      ,p "select a as b from tbl;"->       [SelectStatement [] $ selectFrom [SelectItem (Identifier [] "a") "b"] (Tref [] "tbl")]+>       [SelectStatement [] $ selectFrom [SelectItem [] (Identifier [] "a") "b"] (Tref [] "tbl")] >      ,p "select a + b as b from tbl;" >       [SelectStatement [] $ selectFrom->        [SelectItem+>        [SelectItem [] >         (FunCall [] "+" >          [Identifier [] "a", Identifier [] "b"]) "b"] >        (Tref [] "tbl")]@@ -278,20 +279,20 @@ >       [SelectStatement [] $ selectFrom >        (selIL ["a"]) >        (JoinedTref [] (Tref [] "b") Unnatural Inner (Tref [] "c")->           (Just (JoinOn+>           (Just (JoinOn [] >            (FunCall [] "=" [Identifier [] "b.a", Identifier [] "c.a"]))))] >      ,p "select a from b inner join c as d on b.a=d.a;" >       [SelectStatement [] $ selectFrom >        (selIL ["a"]) >        (JoinedTref [] (Tref [] "b") Unnatural Inner (TrefAlias [] "c" "d")->           (Just (JoinOn+>           (Just (JoinOn [] >            (FunCall [] "=" [Identifier [] "b.a", Identifier [] "d.a"]))))]  >      ,p "select a from b inner join c using(d,e);" >       [SelectStatement [] $ selectFrom >        (selIL ["a"]) >        (JoinedTref [] (Tref [] "b") Unnatural Inner (Tref [] "c")->           (Just (JoinUsing ["d","e"])))]+>           (Just (JoinUsing [] ["d","e"])))]  >      ,p "select a from b natural inner join c;" >       [SelectStatement [] $ selectFrom@@ -320,16 +321,16 @@ >         \    inner join d\n\ >         \      on 1=1;" >       [SelectStatement [] $ selectFrom->        [SelExp (Identifier [] "a")]->        (JoinedTref [] +>        [SelExp [] (Identifier [] "a")]+>        (JoinedTref [] >         (JoinedTref [] (Tref [] "b") Unnatural Inner (Tref [] "c")->          (Just $ JoinOn (BooleanLit [] True)))+>          (Just $ JoinOn [] (BooleanLit [] True))) >         Unnatural Inner (Tref [] "d")->         (Just  $ JoinOn (FunCall [] "="+>         (Just  $ JoinOn [] (FunCall [] "=" >                [IntegerLit [] 1, IntegerLit [] 1])))]  >      ,p "select row_number() over(order by a) as place from tbl;"->       [SelectStatement [] $ selectFrom [SelectItem+>       [SelectStatement [] $ selectFrom [SelectItem [] >                    (WindowFn [] >                     (FunCall [] "row_number" []) >                     []@@ -337,7 +338,7 @@ >                    "place"] >        (Tref [] "tbl")] >      ,p "select row_number() over(order by a asc) as place from tbl;"->       [SelectStatement [] $ selectFrom [SelectItem+>       [SelectStatement [] $ selectFrom [SelectItem [] >                    (WindowFn [] >                     (FunCall [] "row_number" []) >                     []@@ -345,7 +346,7 @@ >                    "place"] >        (Tref [] "tbl")] >      ,p "select row_number() over(order by a desc) as place from tbl;"->       [SelectStatement [] $ selectFrom [SelectItem+>       [SelectStatement [] $ selectFrom [SelectItem [] >                    (WindowFn [] >                     (FunCall [] "row_number" []) >                     []@@ -355,7 +356,7 @@ >      ,p "select row_number()\n\ >         \over(partition by (a,b) order by c) as place\n\ >         \from tbl;"->       [SelectStatement [] $ selectFrom [SelectItem+>       [SelectStatement [] $ selectFrom [SelectItem [] >                    (WindowFn [] >                     (FunCall [] "row_number" []) >                     [FunCall [] "!rowCtor" [Identifier [] "a",Identifier [] "b"]]@@ -419,13 +420,13 @@  >      ,p "select a, count(b) from c group by a;" >         [SelectStatement [] $ Select [] Dupes->          (sl [selI "a", SelExp (FunCall [] "count" [Identifier [] "b"])])+>          (sl [selI "a", SelExp [] (FunCall [] "count" [Identifier [] "b"])]) >          (Just $ Tref [] "c") Nothing [Identifier [] "a"] >          Nothing [] Asc Nothing Nothing]  >      ,p "select a, count(b) as cnt from c group by a having cnt > 4;" >         [SelectStatement [] $ Select [] Dupes->          (sl [selI "a", SelectItem (FunCall [] "count" [Identifier [] "b"]) "cnt"])+>          (sl [selI "a", SelectItem [] (FunCall [] "count" [Identifier [] "b"]) "cnt"]) >          (Just $ Tref [] "c") Nothing [Identifier [] "a"] >          (Just $ FunCall [] ">" [Identifier [] "cnt", IntegerLit [] 4]) >          [] Asc Nothing Nothing]@@ -433,9 +434,9 @@ >      ,p "select a from (select 1 as a, 2 as b) x;" >         [SelectStatement [] $ selectFrom >          [selI "a"]->          (SubTref [] (selectE $ SelectList->                                [SelectItem (IntegerLit [] 1) "a"->                                ,SelectItem (IntegerLit [] 2) "b"] [])+>          (SubTref [] (selectE $ SelectList []+>                                [SelectItem [] (IntegerLit [] 1) "a"+>                                ,SelectItem [] (IntegerLit [] 2) "b"] []) >                   "x")] >      ]) @@ -445,8 +446,8 @@  >     ,testGroup "multiple statements" >     (mapSql [->       p "select 1;\nselect 2;" [SelectStatement [] $ selectE $ sl [SelExp (IntegerLit [] 1)]->                                ,SelectStatement [] $ selectE $ sl [SelExp (IntegerLit [] 2)]]+>       p "select 1;\nselect 2;" [SelectStatement [] $ selectE $ sl [SelExp [] (IntegerLit [] 1)]+>                                ,SelectStatement [] $ selectE $ sl [SelExp [] (IntegerLit [] 2)]] >      ])  ================================================================================@@ -466,15 +467,15 @@ >      ,p "select 1;\n\ >         \-- this is a test\n\ >         \select -- this is a test\n\->         \2;" [SelectStatement [] $ selectE $ sl [SelExp (IntegerLit [] 1)]->              ,SelectStatement [] $ selectE $ sl [SelExp (IntegerLit [] 2)]+>         \2;" [SelectStatement [] $ selectE $ sl [SelExp [] (IntegerLit [] 1)]+>              ,SelectStatement [] $ selectE $ sl [SelExp [] (IntegerLit [] 2)] >              ] >      ,p "select 1;\n\ >         \/* this is\n\ >         \a test*/\n\ >         \select /* this is a test*/2;"->                     [SelectStatement [] $ selectE $ sl [SelExp (IntegerLit [] 1)]->                     ,SelectStatement [] $ selectE $ sl [SelExp (IntegerLit [] 2)]+>                     [SelectStatement [] $ selectE $ sl [SelExp [] (IntegerLit [] 1)]+>                     ,SelectStatement [] $ selectE $ sl [SelExp [] (IntegerLit [] 2)] >                     ] >      ]) @@ -534,30 +535,30 @@  >      ,p "update tb\n\ >         \  set x = 1, y = 2;"->       [Update [] "tb" [SetClause "x" (IntegerLit [] 1)->                    ,SetClause "y" (IntegerLit [] 2)]+>       [Update [] "tb" [SetClause [] "x" (IntegerLit [] 1)+>                    ,SetClause [] "y" (IntegerLit [] 2)] >        Nothing Nothing] >      ,p "update tb\n\ >         \  set x = 1, y = 2 where z = true;"->       [Update [] "tb" [SetClause "x" (IntegerLit [] 1)->                    ,SetClause "y" (IntegerLit [] 2)]+>       [Update [] "tb" [SetClause [] "x" (IntegerLit [] 1)+>                    ,SetClause [] "y" (IntegerLit [] 2)] >        (Just $ FunCall [] "=" >         [Identifier [] "z", BooleanLit [] True]) >        Nothing] >      ,p "update tb\n\ >         \  set x = 1, y = 2 returning id;"->       [Update [] "tb" [SetClause "x" (IntegerLit [] 1)->                    ,SetClause "y" (IntegerLit [] 2)]+>       [Update [] "tb" [SetClause [] "x" (IntegerLit [] 1)+>                    ,SetClause [] "y" (IntegerLit [] 2)] >        Nothing (Just $ sl [selI "id"])] >      ,p "update pieces\n\ >         \set a=b returning tag into r.tag;"->       [Update [] "pieces" [SetClause "a" (Identifier [] "b")]->        Nothing (Just (SelectList->                       [SelExp (Identifier [] "tag")]+>       [Update [] "pieces" [SetClause [] "a" (Identifier [] "b")]+>        Nothing (Just (SelectList []+>                       [SelExp [] (Identifier [] "tag")] >                       ["r.tag"]))] >      ,p "update tb\n\ >         \  set (x,y) = (1,2);"->       [Update [] "tb" [RowSetClause+>       [Update [] "tb" [RowSetClause [] >                     ["x","y"] >                     [IntegerLit [] 1,IntegerLit [] 2]] >        Nothing Nothing]@@ -612,12 +613,12 @@ >        []] >      ,p "create table tbl (\n\ >         \  fld boolean default false);"->       [CreateTable [] "tbl" [AttributeDef "fld" (SimpleTypeName "boolean")+>       [CreateTable [] "tbl" [AttributeDef [] "fld" (SimpleTypeName [] "boolean") >                           (Just $ BooleanLit [] False) []][]]  >      ,p "create table tbl as select 1;" >       [CreateTableAs [] "tbl"->        (selectE (SelectList [SelExp (IntegerLit [] 1)] []))]+>        (selectE (SelectList [] [SelExp [] (IntegerLit [] 1)] []))]  other creates @@ -627,15 +628,15 @@ >        "v1" >        (selectFrom [selI "a", selI "b"] (Tref [] "t"))] >      ,p "create domain td as text check (value in ('t1', 't2'));"->       [CreateDomain [] "td" (SimpleTypeName "text")+>       [CreateDomain [] "td" (SimpleTypeName [] "text") >        (Just (InPredicate [] (Identifier [] "value") True->               (InList [stringQ "t1" ,stringQ "t2"])))]+>               (InList [] [stringQ "t1" ,stringQ "t2"])))] >      ,p "create type tp1 as (\n\ >         \  f1 text,\n\ >         \  f2 text\n\ >         \);"->       [CreateType [] "tp1" [TypeAttDef "f1" (SimpleTypeName "text")->                         ,TypeAttDef "f2" (SimpleTypeName "text")]]+>       [CreateType [] "tp1" [TypeAttDef [] "f1" (SimpleTypeName [] "text")+>                         ,TypeAttDef [] "f2" (SimpleTypeName [] "text")]]  drops @@ -665,14 +666,14 @@ >       p "create table t1 (\n\ >         \ a text null\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "a" (SimpleTypeName "text")->                            Nothing [NullConstraint]]+>         [CreateTable [] "t1" [AttributeDef [] "a" (SimpleTypeName [] "text")+>                            Nothing [NullConstraint []]] >          []] >      ,p "create table t1 (\n\ >         \ a text not null\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "a" (SimpleTypeName "text")->                            Nothing [NotNullConstraint]]+>         [CreateTable [] "t1" [AttributeDef [] "a" (SimpleTypeName [] "text")+>                            Nothing [NotNullConstraint []]] >          []]  unique table@@ -684,7 +685,7 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [UniqueConstraint ["x","y"]]]+>          [UniqueConstraint [] ["x","y"]]]  test arbitrary ordering @@ -695,39 +696,39 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [UniqueConstraint ["x"]]]+>          [UniqueConstraint [] ["x"]]]  unique row  >      ,p "create table t1 (\n\ >         \ x int unique\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowUniqueConstraint]][]]+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowUniqueConstraint []]][]]  >      ,p "create table t1 (\n\ >         \ x int unique not null\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowUniqueConstraint->                            ,NotNullConstraint]][]]+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowUniqueConstraint []+>                            ,NotNullConstraint []]][]]  quick sanity check  >      ,p "create table t1 (\n\ >         \ x int not null unique\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [NotNullConstraint->                            ,RowUniqueConstraint]][]]+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [NotNullConstraint []+>                            ,RowUniqueConstraint []]][]]  primary key row, table  >      ,p "create table t1 (\n\ >         \ x int primary key\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowPrimaryKeyConstraint]][]]+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowPrimaryKeyConstraint []]][]]  >      ,p "create table t1 (\n\ >         \ x int,\n\@@ -736,7 +737,7 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [PrimaryKeyConstraint ["x", "y"]]]+>          [PrimaryKeyConstraint [] ["x", "y"]]]  check row, table @@ -744,10 +745,10 @@ >         \f text check (f in('a', 'b'))\n\ >         \);" >         [CreateTable [] "t"->          [AttributeDef "f" (SimpleTypeName "text") Nothing->           [RowCheckConstraint (InPredicate []+>          [AttributeDef [] "f" (SimpleTypeName [] "text") Nothing+>           [RowCheckConstraint [] (InPredicate [] >                                   (Identifier [] "f") True->                                   (InList [stringQ "a", stringQ "b"]))]] []]+>                                   (InList [] [stringQ "a", stringQ "b"]))]] []]  >      ,p "create table t1 (\n\ >         \ x int,\n\@@ -756,7 +757,7 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [CheckConstraint (FunCall [] ">" [Identifier [] "x", Identifier [] "y"])]]+>          [CheckConstraint [] (FunCall [] ">" [Identifier [] "x", Identifier [] "y"])]]  row, whole load of constraints, todo: add reference here @@ -764,12 +765,12 @@ >         \f text not null unique check (f in('a', 'b'))\n\ >         \);" >         [CreateTable [] "t"->          [AttributeDef "f" (SimpleTypeName "text") Nothing->           [NotNullConstraint->            ,RowUniqueConstraint->            ,RowCheckConstraint (InPredicate []+>          [AttributeDef [] "f" (SimpleTypeName [] "text") Nothing+>           [NotNullConstraint []+>            ,RowUniqueConstraint []+>            ,RowCheckConstraint [] (InPredicate [] >                                    (Identifier [] "f") True->                                    (InList [stringQ "a"+>                                    (InList [] [stringQ "a" >                                            ,stringQ "b"]))]] []]  reference row, table@@ -777,15 +778,15 @@ >      ,p "create table t1 (\n\ >         \ x int references t2\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowReferenceConstraint "t2" Nothing+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowReferenceConstraint [] "t2" Nothing >                             Restrict Restrict]][]]  >      ,p "create table t1 (\n\ >         \ x int references t2(y)\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowReferenceConstraint "t2" (Just "y")+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowReferenceConstraint [] "t2" (Just "y") >                             Restrict Restrict]][]]  @@ -796,7 +797,7 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [ReferenceConstraint ["x", "y"] "t2" []+>          [ReferenceConstraint [] ["x", "y"] "t2" [] >           Restrict Restrict]]  >      ,p "create table t1 (\n\@@ -806,21 +807,21 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [ReferenceConstraint ["x", "y"] "t2" ["z", "w"]+>          [ReferenceConstraint [] ["x", "y"] "t2" ["z", "w"] >           Restrict Restrict]]  >      ,p "create table t1 (\n\ >         \ x int references t2 on delete cascade\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowReferenceConstraint "t2" Nothing+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowReferenceConstraint [] "t2" Nothing >                             Cascade Restrict]][]]  >      ,p "create table t1 (\n\ >         \ x int references t2 on update cascade\n\ >         \);"->         [CreateTable [] "t1" [AttributeDef "x" (SimpleTypeName "int") Nothing->                            [RowReferenceConstraint "t2" Nothing+>         [CreateTable [] "t1" [AttributeDef [] "x" (SimpleTypeName [] "int") Nothing+>                            [RowReferenceConstraint [] "t2" Nothing >                             Restrict Cascade]][]]  >      ,p "create table t1 (\n\@@ -830,7 +831,7 @@ >         \);" >         [CreateTable [] "t1" [att "x" "int" >                           ,att "y" "int"]->          [ReferenceConstraint ["x", "y"] "t2" []+>          [ReferenceConstraint [] ["x", "y"] "t2" [] >           Cascade Cascade]]  >      ])@@ -844,10 +845,10 @@ >       p "create function t1(text) returns text as $$\n\ >         \select a from t1 where b = $1;\n\ >         \$$ language sql stable;"->       [CreateFunction [] Sql "t1" [ParamDefTp $ SimpleTypeName "text"]->        (SimpleTypeName "text") "$$"->        (SqlFnBody->         [SelectStatement [] $ selectFromWhere [SelExp (Identifier [] "a")] (Tref [] "t1")+>       [CreateFunction [] Sql "t1" [ParamDefTp [] $ SimpleTypeName [] "text"]+>        (SimpleTypeName [] "text") "$$"+>        (SqlFnBody []+>         [SelectStatement [] $ selectFromWhere [SelExp [] (Identifier [] "a")] (Tref [] "t1") >          (FunCall [] "=" >           [Identifier [] "b", PositionalArg [] 1])]) >        Stable]@@ -859,9 +860,9 @@ >         \  null;\n\ >         \end;\n\ >         \$$ language plpgsql volatile;"->       [CreateFunction [] Plpgsql "fn" [] (SimpleTypeName "void") "$$"->        (PlpgsqlFnBody [VarDef "a" (SimpleTypeName "int") Nothing->                       ,VarDef "b" (SimpleTypeName "text") Nothing]+>       [CreateFunction [] Plpgsql "fn" [] (SimpleTypeName [] "void") "$$"+>        (PlpgsqlFnBody [] [VarDef [] "a" (SimpleTypeName [] "int") Nothing+>                          ,VarDef [] "b" (SimpleTypeName [] "text") Nothing] >         [NullStatement []]) >        Volatile] >      ,p "create function fn() returns void as $$\n\@@ -872,9 +873,9 @@ >         \  null;\n\ >         \end;\n\ >         \$$ language plpgsql volatile;"->       [CreateFunction [] Plpgsql "fn" [] (SimpleTypeName "void") "$$"->        (PlpgsqlFnBody [VarDef "a" (SimpleTypeName "int") Nothing->                       ,VarDef "b" (SimpleTypeName "text") Nothing]+>       [CreateFunction [] Plpgsql "fn" [] (SimpleTypeName [] "void") "$$"+>        (PlpgsqlFnBody [] [VarDef [] "a" (SimpleTypeName [] "int") Nothing+>                          ,VarDef [] "b" (SimpleTypeName [] "text") Nothing] >         [NullStatement []]) >        Volatile] >      ,p "create function fn(a text[]) returns int[] as $$\n\@@ -885,10 +886,10 @@ >         \end;\n\ >         \$$ language plpgsql immutable;" >       [CreateFunction [] Plpgsql "fn"->        [ParamDef "a" $ ArrayTypeName $ SimpleTypeName "text"]->        (ArrayTypeName $ SimpleTypeName "int") "$$"->        (PlpgsqlFnBody->         [VarDef "b" (ArrayTypeName $ SimpleTypeName "xtype") (Just $ stringQ "{}")]+>        [ParamDef [] "a" $ ArrayTypeName [] $ SimpleTypeName [] "text"]+>        (ArrayTypeName [] $ SimpleTypeName [] "int") "$$"+>        (PlpgsqlFnBody []+>         [VarDef [] "b" (ArrayTypeName [] $ SimpleTypeName [] "xtype") (Just $ stringQ "{}")] >         [NullStatement []]) >        Immutable] >      ,p "create function fn() returns void as '\n\@@ -898,8 +899,8 @@ >         \  null;\n\ >         \end;\n\ >         \' language plpgsql stable;"->       [CreateFunction [] Plpgsql "fn" [] (SimpleTypeName "void") "'"->        (PlpgsqlFnBody [VarDef "a" (SimpleTypeName "int") (Just $ IntegerLit [] 3)]+>       [CreateFunction [] Plpgsql "fn" [] (SimpleTypeName [] "void") "'"+>        (PlpgsqlFnBody [] [VarDef [] "a" (SimpleTypeName [] "int") (Just $ IntegerLit [] 3)] >         [NullStatement []]) >        Stable] >      ,p "create function fn() returns setof int as $$\n\@@ -908,8 +909,8 @@ >         \end;\n\ >         \$$ language plpgsql stable;" >       [CreateFunction [] Plpgsql "fn" []->        (SetOfTypeName $ SimpleTypeName "int") "$$"->        (PlpgsqlFnBody [] [NullStatement []])+>        (SetOfTypeName [] $ SimpleTypeName [] "int") "$$"+>        (PlpgsqlFnBody [] [] [NullStatement []]) >        Stable] >      ,p "create function fn() returns void as $$\n\ >         \begin\n\@@ -917,8 +918,8 @@ >         \end\n\ >         \$$ language plpgsql stable;" >       [CreateFunction [] Plpgsql "fn" []->        (SimpleTypeName "void") "$$"->        (PlpgsqlFnBody [] [NullStatement []])+>        (SimpleTypeName [] "void") "$$"+>        (PlpgsqlFnBody [] [] [NullStatement []]) >        Stable] >      ,p "drop function test(text);" >       [DropFunction [] Require [("test",["text"])] Restrict]@@ -959,10 +960,10 @@ >                     FunCall [] "||" [Identifier [] "r.relvar_name" >                                 ,stringQ "_and_stuff"]]] >      ,p "select into a,b c,d from e;"->       [SelectStatement [] $ Select [] Dupes (SelectList [selI "c", selI "d"] ["a", "b"])+>       [SelectStatement [] $ Select [] Dupes (SelectList [] [selI "c", selI "d"] ["a", "b"]) >                   (Just $ Tref [] "e") Nothing [] Nothing [] Asc Nothing Nothing] >      ,p "select c,d into a,b from e;"->       [SelectStatement [] $ Select [] Dupes (SelectList [selI "c", selI "d"] ["a", "b"])+>       [SelectStatement [] $ Select [] Dupes (SelectList [] [selI "c", selI "d"] ["a", "b"]) >                   (Just $ Tref [] "e") Nothing [] Nothing [] Asc Nothing Nothing]  >      ,p "execute s;"@@ -996,7 +997,7 @@ >         \  update c set d = e;\n\ >         \end if;" >       [If [] [((FunCall [] "=" [Identifier [] "a", Identifier [] "b"])->           ,[Update [] "c" [SetClause "d" (Identifier [] "e")] Nothing Nothing])]+>           ,[Update [] "c" [SetClause [] "d" (Identifier [] "e")] Nothing Nothing])] >        []] >      ,p "if true then\n\ >         \  null;\n\@@ -1045,18 +1046,18 @@ >           mapPlpgsql = map $ uncurry checkParsePlpgsql >           p a b = (a,b) >           selIL = map selI->           selI = SelExp . Identifier []->           sl a = SelectList a []+>           selI = SelExp [] . Identifier []+>           sl a = SelectList [] a [] >           selectE selList = Select [] Dupes selList >                             Nothing Nothing [] Nothing [] Asc Nothing Nothing >           selectFrom selList frm =->             Select [] Dupes (SelectList selList [])+>             Select [] Dupes (SelectList [] selList []) >                    (Just frm) Nothing [] Nothing [] Asc Nothing Nothing >           selectFromWhere selList frm whr =->             Select [] Dupes (SelectList selList [])+>             Select [] Dupes (SelectList [] selList []) >                    (Just frm) (Just whr) [] Nothing [] Asc Nothing Nothing >           stringQ = StringLit [] "'"->           att n t = AttributeDef n (SimpleTypeName t) Nothing []+>           att n t = AttributeDef [] n (SimpleTypeName [] t) Nothing []  ================================================================================ @@ -1076,23 +1077,24 @@ > checkParsePlpgsql :: String -> [Statement] -> Test.Framework.Test > checkParsePlpgsql src ast = parseUtil1 src ast parsePlpgsql -> parseUtil :: (Show t, Eq b, Show b) =>->              String->           -> b->           -> (String -> Either t b)->           -> (b -> String)->           -> Test.Framework.Test+ > parseUtil :: (Show t, Eq b, Show b, Data b, Annotated b) =>+ >              String+ >           -> b+ >           -> (String -> Either t b)+ >           -> (b -> String)+ >           -> Test.Framework.Test+ > parseUtil src ast parser printer = testCase ("parse " ++ src) $ do >   let ast' = case parser src of >               Left er -> error $ show er >               Right l -> l->   assertEqual ("parse " ++ src) ast ast'+>   assertEqual ("parse " ++ src) ast $ stripAnnotations ast' >   -- pretty print then parse to check >   let pp = printer ast >   let ast'' = case parser pp of >               Left er -> error $ "reparse\n" ++ show er ++ "\n" -- ++ pp ++ "\n" >               Right l -> l->   assertEqual ("reparse " ++ pp) ast ast''+>   assertEqual ("reparse " ++ pp) ast $ stripAnnotations ast''  > parseUtil1 :: (Show a) => String >            -> [Statement]
− Database/HsSqlPpp/TypeChecking/Ast.lhs
@@ -1,85 +0,0 @@-Copyright 2009 Jake Wheat--This is the public module for the ast nodes.--> {- | This module contains the ast node data types.->    -}-> module Database.HsSqlPpp.TypeChecking.Ast->     (->      -- * Main nodes->      StatementList->     ,Statement (..)->     ,Expression (..)->     ,SelectExpression (..)->      -- * Components->      -- ** Selects->     ,SelectList (..)->     ,SelectItem (..)->     ,TableRef (..)->     ,JoinExpression (..)->     ,JoinType (..)->     ,Natural (..)->     ,CombineType (..)->     ,Direction (..)->     ,Distinct (..)->     ,InList (..)->      -- ** dml->     ,SetClause (..)->     ,CopySource (..)->     ,RestartIdentity (..)->      -- ** ddl->     ,AttributeDef (..)->     ,RowConstraint (..)->     ,Constraint (..)->     ,TypeAttributeDef (..)->     ,TypeName (..)->     ,DropType (..)->     ,IfExists (..)->     ,Cascade (..)->      -- ** functions->     ,FnBody (..)->     ,ParamDef (..)->     ,VarDef (..)->     ,RaiseType (..)->     ,Volatility (..)->     ,Language (..)->      -- ** typedefs->     ,ExpressionListStatementListPairList->     ,ExpressionListStatementListPair->     ,ExpressionList->     ,StringList->     ,ParamDefList->     ,AttributeDefList->     ,ConstraintList->     ,TypeAttributeDefList->     ,Where->     ,StringStringListPairList->     ,StringStringListPair->     ,ExpressionStatementListPairList->     ,SetClauseList->     ,CaseExpressionListExpressionPairList->     ,MaybeExpression->     ,MTableRef->     ,ExpressionListList->     ,SelectItemList->     ,OnExpr->     ,RowConstraintList->     ,VarDefList->     ,ExpressionStatementListPair->     ,MExpression->     ,CaseExpressionListExpressionPair->     ,CaseExpressionList-->      -- * operator utils->     ,OperatorType(..)->     ,getOperatorType->      -- * type aliases->      -- | aliases for all the sql types with multiple names->      -- these give you the canonical names->     ,typeSmallInt,typeBigInt,typeInt,typeNumeric,typeFloat4->     ,typeFloat8,typeVarChar,typeChar,typeBool->     ) where--> import Database.HsSqlPpp.TypeChecking.AstInternal-> import Database.HsSqlPpp.TypeChecking.AstUtils-
− Database/HsSqlPpp/TypeChecking/AstAnnotation.lhs
@@ -1,149 +0,0 @@-Copyright 2009 Jake Wheat--The annotation data types and utilities for working with them.--Annotations are used to store source positions, types, errors,-warnings, scope deltas, information, and other stuff a client might-want to use when looking at an ast. Internal annotations which are-used in the type-checking/ annotation process use the attribute-grammar code and aren't exposed.--> {-# LANGUAGE ExistentialQuantification #-}-> {-# OPTIONS_HADDOCK hide #-}--> module Database.HsSqlPpp.TypeChecking.AstAnnotation->     (->      Annotated(..)->     ,Annotation->     ,AnnotationElement(..)->     ,stripAnnotations->     ,getTopLevelTypes->     ,getTopLevelInfos->     ,getTypeAnnotation->     ,getTypeErrors->     ,pack->     ,StatementInfo(..)->     ,getSIAnnotation->     ) where--> import Database.HsSqlPpp.TypeChecking.TypeType--> -- | Annotation type - one of these is attached to most of the-> -- data types used in the ast.-> type Annotation = [AnnotationElement]--> -- | the elements of an annotation. Source positions are generated by-> -- the parser, the rest come from the separate ast annotation process.-> data AnnotationElement = SourcePos String Int Int->                        | TypeAnnotation Type->                        | TypeErrorA TypeError->                        | StatementInfoA StatementInfo->                          deriving (Eq, Show)--> class Annotated a where->     ann :: a -> Annotation->     setAnn :: a -> Annotation -> a->     changeAnn :: a -> (Annotation -> Annotation) -> a->     changeAnn a = setAnn a . ($ ann a)->     changeAnnRecurse :: (Annotation -> Annotation) -> a -> a->     getAnnChildren :: a -> [Annotatable]--> data Annotatable = forall a . (Annotated a, Show a) => MkAnnotatable a--> instance Show Annotatable->   where->   showsPrec p (MkAnnotatable a) = showsPrec p a--> pack :: (Annotated a, Show a) => a -> Annotatable-> pack = MkAnnotatable--hack job, often not interested in the source positions when testing-the asts produced, so this function will reset all the source-positions to empty ("", 0, 0) so we can compare them for equality, etc.-without having to get the positions correct.--> -- | strip all the annotations from a tree. E.g. can be used to compare-> -- two asts are the same, ignoring any source position annotation differences.-> stripAnnotations :: Annotated a => a -> a-> stripAnnotations = changeAnnRecurse (const [])--> -- | run through the ast, and pull the type annotation from each-> -- of the top level items.-> getTopLevelTypes :: Annotated a =>->                     [a] -- ^ the ast items->                  -> [Type] -- ^ the type annotations, this list should be the same->                            -- length as the argument-> getTopLevelTypes = map getTypeAnnotation--> getTypeAnnotation :: Annotated a => a  -> Type-> getTypeAnnotation at = let as = ann at->                        in gta as->                        where->                          gta (x:xs) = case x of->                                         TypeAnnotation t -> t->                                         _ -> gta xs->                          gta _ = TypeCheckFailed -- error "couldn't find type annotation"--> getSIAnnotation :: Annotated a => a  -> StatementInfo-> getSIAnnotation at = let as = ann at->                        in gta as->                        where->                          gta (x:xs) = case x of->                                         StatementInfoA t -> t->                                         _ -> gta xs->                          gta _ = error "couldn't find statement info annotation"---> getAnnotationsRecurse :: Annotated a => a -> [Annotation]-> getAnnotationsRecurse a =->   ann a : concatMap getAnnotationsRecurse' (getAnnChildren a)->   where->     getAnnotationsRecurse' :: Annotatable -> [Annotation]->     getAnnotationsRecurse' an =->       hann an : concatMap getAnnotationsRecurse' (hgac an)->     hann (MkAnnotatable an) = ann an->     hgac (MkAnnotatable an) = getAnnChildren an--> -- | runs through the ast given and returns a list of all the type errors-> -- in the ast. Recurses into all ast nodes to find type errors.-> -- This is the function to use to see if an ast has passed the type checking process.-> -- Source position information will be added to the return type at some point-> getTypeErrors :: Annotated a => [a] -> [TypeError]-> getTypeErrors sts =->     concatMap (concatMap gte . getAnnotationsRecurse) sts->     where->       gte (a:as) = case a of->                     TypeErrorA e -> [e]->                     _ -> gte as->       gte _ = []--> -- | Run through the ast given and return a list of statementinfos-> -- from the top level items.-> getTopLevelInfos :: Annotated a =>->                     [a] -- ^ the ast to check->                  -> [StatementInfo]-> getTopLevelInfos = map getSIAnnotation---> data StatementInfo = DefaultStatementInfo Type->                    | RelvarInfo CompositeDef->                    | CreateFunctionInfo FunctionPrototype->                    | SelectInfo Type->                    | InsertInfo String Type->                    | UpdateInfo String Type->                    | DeleteInfo String->                    | CreateDomainInfo String Type->                    | DropInfo [(String,String)]->                    | DropFunctionInfo [(String,[Type])]->                      deriving (Eq,Show)--todo:-add scope deltas to statementinfo--question:-if a node has no source position e.g. the all in select all or select-   distinct may correspond to a token or may be synthesized as the-   default if neither all or distinct is present. Should this have the-   source position of where the token would have appeared, should it-   inherit it from its parent, should there be a separate ctor to-   represent a fake node with no source position?
− Database/HsSqlPpp/TypeChecking/AstInternal.ag
@@ -1,961 +0,0 @@-{--Copyright 2009 Jake Wheat--This file contains the ast nodes, and the api functions to pass an ast-and get back type information.--It uses the Utrecht University Attribute Grammar system:--http://www.cs.uu.nl/wiki/bin/view/HUT/AttributeGrammarSystem-http://www.haskell.org/haskellwiki/The_Monad.Reader/Issue4/Why_Attribute_Grammars_Matter--The attr and sem definitions are in TypeChecking.ag, which is included-into this file.--These ast nodes are both used as the result of successful parsing, and-as the input to the type checker and the pretty printer.--= compiling--use--uuagc -dcfws AstInternal.ag--to generate a new AstInternal.hs from this file--(install uuagc with-cabal install uuagc-)---}-MODULE {Database.HsSqlPpp.TypeChecking.AstInternal}-{-    --from the ag files:-    --ast nodes-    Statement (..)-   ,SelectExpression (..)-   ,FnBody (..)-   ,SetClause (..)-   ,TableRef (..)-   ,JoinExpression (..)-   ,JoinType (..)-   ,SelectList (..)-   ,SelectItem (..)-   ,CopySource (..)-   ,AttributeDef (..)-   ,RowConstraint (..)-   ,Constraint (..)-   ,TypeAttributeDef (..)-   ,ParamDef (..)-   ,VarDef (..)-   ,RaiseType (..)-   ,CombineType (..)-   ,Volatility (..)-   ,Language (..)-   ,TypeName (..)-   ,DropType (..)-   ,Cascade (..)-   ,Direction (..)-   ,Distinct (..)-   ,Natural (..)-   ,IfExists (..)-   ,RestartIdentity (..)-   ,Expression (..)-   ,InList (..)-   ,StatementList-   ,ExpressionListStatementListPairList-   ,ExpressionListStatementListPair-   ,ExpressionList-   ,StringList-   ,ParamDefList-   ,AttributeDefList-   ,ConstraintList-   ,TypeAttributeDefList-   ,Where-   ,StringStringListPairList-   ,StringStringListPair-   ,ExpressionStatementListPairList-   ,SetClauseList-   ,CaseExpressionListExpressionPairList-   ,MaybeExpression-   ,MTableRef-   ,ExpressionListList-   ,SelectItemList-   ,OnExpr-   ,RowConstraintList-   ,VarDefList-   ,ExpressionStatementListPair-   ,MExpression-   ,CaseExpressionListExpressionPair-   ,CaseExpressionList-   -- annotations-   ,annotateAst-   ,annotateAstScope-   ,annotateExpression-}--{-import Data.Maybe-import Data.List-import Debug.Trace-import Control.Monad.Error-import Control.Arrow-import Data.Either-import Control.Applicative--import Database.HsSqlPpp.TypeChecking.TypeType-import Database.HsSqlPpp.TypeChecking.AstUtils-import Database.HsSqlPpp.TypeChecking.TypeConversion-import Database.HsSqlPpp.TypeChecking.TypeCheckingH-import Database.HsSqlPpp.TypeChecking.Scope-import Database.HsSqlPpp.TypeChecking.ScopeData-import Database.HsSqlPpp.TypeChecking.AstAnnotation--}--{--================================================================================--SQL top level statements--everything is chucked in here: dml, ddl, plpgsql statements---}--DATA Statement----queries--    | SelectStatement ann:Annotation ex:SelectExpression---- dml--    --table targetcolumns insertdata(values or select statement) returning-    | Insert ann:Annotation-             table : String-             targetCols : StringList-             insData : SelectExpression-             returning : (Maybe SelectList)-    --tablename setitems where returning-    | Update ann:Annotation-             table : String-             assigns : SetClauseList-             whr : Where-             returning : (Maybe SelectList)-    --tablename, where, returning-    | Delete ann:Annotation-             table : String-             whr : Where-             returning : (Maybe SelectList)-    --tablename column names, from-    | Copy ann:Annotation-           table : String-           targetCols : StringList-           source : CopySource-    --represents inline data for copy statement-    | CopyData ann:Annotation insData : String-    | Truncate ann:Annotation-               tables: StringList-               restartIdentity : RestartIdentity-               cascade : Cascade---- ddl--    | CreateTable ann:Annotation-                  name : String-                  atts : AttributeDefList-                  cons : ConstraintList-    | CreateTableAs ann:Annotation-                    name : String-                    expr : SelectExpression-    | CreateView ann:Annotation-                 name : String-                 expr : SelectExpression-    | CreateType ann:Annotation-                 name : String-                 atts : TypeAttributeDefList-    -- language name args rettype bodyquoteused body vol-    | CreateFunction ann:Annotation-                     lang : Language-                     name : String-                     params : ParamDefList-                     rettype : TypeName-                     bodyQuote : String-                     body : FnBody-                     vol : Volatility-    -- name type checkexpression-    | CreateDomain ann:Annotation-                   name : String-                   typ : TypeName-                   check : (Maybe Expression)-    -- ifexists (name,argtypes)* cascadeorrestrict-    | DropFunction ann:Annotation-                   ifE : IfExists-                   sigs : StringStringListPairList-                   cascade : Cascade-    -- ifexists names cascadeorrestrict-    | DropSomething ann:Annotation-                    dropType : DropType-                    ifE : IfExists-                    names : StringList-                    cascade : Cascade-    | Assignment ann:Annotation-                 target : String-                 value : Expression-    | Return ann:Annotation-             value : (Maybe Expression)-    | ReturnNext ann:Annotation-                 expr : Expression-    | ReturnQuery ann:Annotation-                  sel : SelectExpression-    | Raise ann:Annotation-            level : RaiseType-            message : String-            args : ExpressionList-    | NullStatement ann:Annotation-    | Perform ann:Annotation-              expr : Expression-    | Execute ann:Annotation-              expr : Expression-    | ExecuteInto ann:Annotation-                  expr : Expression-                  targets : StringList-    | ForSelectStatement ann:Annotation-                         var : String-                         sel : SelectExpression-                         sts : StatementList-    | ForIntegerStatement ann:Annotation-                          var : String-                          from : Expression-                          to : Expression-                          sts : StatementList-    | WhileStatement ann:Annotation-                     expr : Expression-                     sts : StatementList-    | ContinueStatement ann:Annotation-    --variable, list of when parts, else part-    | CaseStatement ann:Annotation-                    val : Expression-                    cases : ExpressionListStatementListPairList-                    els : StatementList-    --list is-    --first if (condition, statements):elseifs(condition, statements)-    --last bit is else statements-    | If ann:Annotation-         cases : ExpressionStatementListPairList-         els : StatementList---- =============================================================================----Statement components---- maybe this should be called relation valued expression?-DATA SelectExpression-    | Select ann:Annotation-             selDistinct : Distinct-             selSelectList : SelectList-             selTref : MTableRef-             selWhere : Where-             selGroupBy : ExpressionList-             selHaving : MExpression-             selOrderBy : ExpressionList-             selDir : Direction-             selLimit : MExpression-             selOffset : MExpression-    | CombineSelect ann:Annotation-                    ctype : CombineType-                    sel1 : SelectExpression-                    sel2 : SelectExpression-    | Values ann:Annotation-             vll:ExpressionListList--TYPE MTableRef = MAYBE TableRef-TYPE Where = MAYBE Expression-TYPE MExpression = MAYBE Expression--DATA FnBody | SqlFnBody sts : StatementList-            | PlpgsqlFnBody VarDefList sts : StatementList--DATA SetClause | SetClause att:String val:Expression-               | RowSetClause atts:StringList vals:ExpressionList--DATA TableRef | Tref ann:Annotation-                     tbl:String-              | TrefAlias ann:Annotation-                          tbl : String-                          alias : String-              | JoinedTref ann:Annotation-                           tbl : TableRef-                           nat : Natural-                           joinType : JoinType-                           tbl1 : TableRef-                           onExpr : OnExpr-              | SubTref ann:Annotation-                        sel : SelectExpression-                        alias : String-              | TrefFun ann:Annotation-                        fn:Expression-              | TrefFunAlias ann:Annotation-                             fn:Expression-                             alias:String--TYPE OnExpr = MAYBE JoinExpression--DATA JoinExpression | JoinOn Expression | JoinUsing StringList--DATA JoinType | Inner | LeftOuter| RightOuter | FullOuter | Cross---- select columns, into columns--DATA SelectList | SelectList items:SelectItemList StringList--DATA SelectItem | SelExp ex:Expression-                | SelectItem ex:Expression name:String--DATA CopySource | CopyFilename String | Stdin----name type default null constraint--DATA AttributeDef | AttributeDef name : String-                                 typ : TypeName-                                 check : (Maybe Expression)-                                 cons : RowConstraintList----Constraints which appear attached to an individual field--DATA RowConstraint | NullConstraint-                   | NotNullConstraint-                   | RowCheckConstraint Expression-                   | RowUniqueConstraint-                   | RowPrimaryKeyConstraint-                   | RowReferenceConstraint table : String-                                            att : (Maybe String)-                                            onUpdate : Cascade-                                            onDelete : Cascade----constraints which appear on a separate row in the create table--DATA Constraint | UniqueConstraint StringList-                | PrimaryKeyConstraint StringList-                | CheckConstraint Expression-                  -- sourcecols targettable targetcols ondelete onupdate-                | ReferenceConstraint atts : StringList-                                      table : String-                                      tableAtts : StringList-                                      onUpdate : Cascade-                                      onDelete : Cascade--DATA TypeAttributeDef | TypeAttDef name : String-                                   typ : TypeName--DATA ParamDef | ParamDef name:String typ:TypeName-              | ParamDefTp typ:TypeName--DATA VarDef | VarDef name : String-                     typ : TypeName-                     value : (Maybe Expression)--DATA RaiseType | RNotice | RException | RError--DATA CombineType | Except | Union | Intersect | UnionAll--DATA Volatility | Volatile | Stable | Immutable--DATA Language | Sql | Plpgsql--DATA TypeName | SimpleTypeName tn:String-              | PrecTypeName tn:String prec:Integer-              | ArrayTypeName typ:TypeName-              | SetOfTypeName typ:TypeName--DATA DropType | Table-              | Domain-              | View-              | Type--DATA Cascade | Cascade | Restrict--DATA Direction | Asc | Desc--DATA Distinct | Distinct | Dupes--DATA Natural | Natural | Unnatural--DATA IfExists | Require | IfExists--DATA RestartIdentity | RestartIdentity | ContinueIdentity--{--================================================================================--Expressions--Similarly to the statement type, all expressions are chucked into one-even though there are many restrictions on which expressions can-appear in different places.  Maybe this should be called scalar-expression?---}-DATA Expression | IntegerLit ann:Annotation i:Integer-                | FloatLit ann:Annotation d:Double-                | StringLit ann:Annotation-                            quote : String-                            value : String-                | NullLit ann:Annotation-                | BooleanLit ann:Annotation b:Bool-                | PositionalArg ann:Annotation p:Integer-                | Cast ann:Annotation-                       expr:Expression-                       tn:TypeName-                | Identifier ann:Annotation-                             i:String-                | Case ann:Annotation-                       cases : CaseExpressionListExpressionPairList-                       els : MaybeExpression-                | CaseSimple ann:Annotation-                             value : Expression-                             cases : CaseExpressionListExpressionPairList-                             els : MaybeExpression-                | Exists ann:Annotation-                         sel : SelectExpression-                | FunCall ann:Annotation-                          funName:String-                          args:ExpressionList-                | InPredicate ann:Annotation-                              expr:Expression-                              i:Bool-                              list:InList-                  -- windowfn selectitem partitionby orderby orderbyasc?-                | WindowFn ann:Annotation-                           fn : Expression-                           partitionBy : ExpressionList-                           orderBy : ExpressionList-                           dir : Direction-                | ScalarSubQuery ann:Annotation-                                 sel : SelectExpression--DATA InList | InList exprs : ExpressionList-            | InSelect sel : SelectExpression--TYPE MaybeExpression = MAYBE Expression--{---list of expression flavours from postgresql with the equivalents in this ast-pg                                here---                                -----constant/literal                  integerlit, floatlit, unknownstringlit, nulllit, boollit-column reference                  identifier-positional parameter reference    positionalarg-subscripted expression            funcall-field selection expression        identifier-operator invocation               funcall-function call                     funcall-aggregate expression              funcall-window function call              windowfn-type cast                         cast-scalar subquery                   scalarsubquery-array constructor                 funcall-row constructor                   funall--Anything that is represented in the ast as some sort of name plus a-list of expressions as arguments is treated as the same type of node:-FunCall.--This includes-symbol operators-regular function calls-keyword operators e.g. and, like (ones which can be parsed as normal-  syntactic operators)-unusual syntax operators, e.g. between-unusual syntax function calls e.g. substring(x from 5 for 3)-arrayctors e.g. array[3,5,6]-rowctors e.g. ROW (2,4,6)-array subscripting--list of keyword operators (regular prefix, infix and postfix):-and, or, not-is null, is not null, isnull, notnull-is distinct from, is not distinct from-is true, is not true,is false, is not false, is unknown, is not unknown-like, not like, ilike, not ilike-similar to, not similar to-in, not in (don't include these here since the argument isn't always an expr)--unusual syntax operators and fn calls-between, not between, between symmetric-overlay, substring, trim-any, some, all--Most of unusual syntax forms and keywords operators are not yet-supported, so this is mainly a todo list.--Keyword operators are encoded with the function name as a ! followed-by a string-e.g.-operator 'and' -> FunCall "!and" ...-see keywordOperatorTypes value in AstUtils.lhs for the list of-currently supported keyword operators.---}---- some list nodes, not sure if all of these are needed as separately--- named node types--TYPE ExpressionList = [Expression]-TYPE ExpressionListList = [ExpressionList]-TYPE StringList = [String]-TYPE SetClauseList = [SetClause]-TYPE AttributeDefList = [AttributeDef]-TYPE ConstraintList = [Constraint]-TYPE TypeAttributeDefList = [TypeAttributeDef]-TYPE ParamDefList = [ParamDef]-TYPE StringStringListPair = (String,StringList)-TYPE StringStringListPairList = [StringStringListPair]-TYPE ExpressionListStatementListPair = (ExpressionList,StatementList)-TYPE ExpressionListStatementListPairList = [ExpressionListStatementListPair]-TYPE ExpressionStatementListPair = (Expression, StatementList)-TYPE ExpressionStatementListPairList = [ExpressionStatementListPair]-TYPE VarDefList = [VarDef]-TYPE SelectItemList = [SelectItem]-TYPE RowConstraintList = [RowConstraint]-TYPE CaseExpressionListExpressionPair = (CaseExpressionList,Expression)-TYPE CaseExpressionList = [Expression]-TYPE CaseExpressionListExpressionPairList = [CaseExpressionListExpressionPair]-TYPE StatementList = [Statement]---- Add a root data type so we can put initial values for inherited--- attributes in the section which defines and uses those attributes--- rather than in the sem_ calls--DATA Root | Root statements:StatementList-DERIVING Root: Show---- use an expression root also to support type checking,--- etc., individual expressions--DATA ExpressionRoot | ExpressionRoot expr:Expression-DERIVING ExpressionRoot: Show--{--================================================================================--=some basic bookkeeping--attributes which every node has--}--SET AllNodes = Statement SelectExpression FnBody SetClause TableRef-               JoinExpression JoinType-               SelectList SelectItem CopySource AttributeDef RowConstraint-               Constraint TypeAttributeDef ParamDef VarDef RaiseType-               CombineType Volatility Language TypeName DropType Cascade-               Direction Distinct Natural IfExists RestartIdentity-               Expression InList MaybeExpression-               ExpressionList ExpressionListList StringList SetClauseList-               AttributeDefList ConstraintList TypeAttributeDefList-               ParamDefList StringStringListPair StringStringListPairList-               StatementList ExpressionListStatementListPair-               ExpressionListStatementListPairList ExpressionStatementListPair-               ExpressionStatementListPairList VarDefList SelectItemList-               RowConstraintList CaseExpressionListExpressionPair-               CaseExpressionListExpressionPairList CaseExpressionList-               MTableRef TableRef OnExpr Where MExpression--DERIVING AllNodes: Show,Eq--INCLUDE "TypeChecking.ag"--{---================================================================================--used to use record syntax to try to insulate code from field changes,-and not have to write out loads of nothings and [] for simple selects,-but don't know how to create haskell named records from uuagc DATA-things--makeSelect :: Statement-makeSelect = Select Dupes (SelectList [SelExp (Identifier "*")] [])-                   Nothing Nothing [] Nothing [] Asc Nothing Nothing---================================================================================--= annotation functions---}-{--- | Takes an ast, and adds annotations, including types, type errors,--- and statement info. Type checks against defaultScope.-annotateAst :: StatementList -> StatementList-annotateAst = annotateAstScope defaultScope---- | As annotateAst but you supply an additional scope to add to the--- defaultScope to type check against. See Scope module for how to--- read a scope from an existing database so you can type check--- against it.-annotateAstScope :: Scope -> StatementList -> StatementList-annotateAstScope scope sts =-    let t = sem_Root (Root sts)-        ta = wrap_Root t Inh_Root {scope_Inh_Root = combineScopes defaultScope scope}-        tl = annotatedTree_Syn_Root ta-    in case tl of-         Root r -> r---- | Testing utility, mainly used to check an expression for type errors--- or to get its type.-annotateExpression :: Scope -> Expression -> Expression-annotateExpression scope ex =-    let t = sem_ExpressionRoot (ExpressionRoot ex)-        rt = (annotatedTree_Syn_ExpressionRoot-              (wrap_ExpressionRoot t Inh_ExpressionRoot {scope_Inh_ExpressionRoot = combineScopes defaultScope scope}))-    in case rt of-         ExpressionRoot e -> e--{---================================================================================--= instances for Annotated.--Hopefully, some sort of SYB approach can be used to autogenerate these-in the future. It is imperative that this or template haskell or-something similar be used because doing it by hand guarantees some-bits will be missed.--Stupidity watch update: use attributes to do this. Doh.---}--instance Annotated Statement where-  ann a =-      case a of-        SelectStatement ann _ -> ann-        Insert ann _ _ _ _ -> ann-        Update ann _ _ _ _ -> ann-        Delete ann _ _ _ -> ann-        Copy ann _ _ _ -> ann-        CopyData ann _ -> ann-        Truncate ann _ _ _ -> ann-        CreateTable ann _ _ _ -> ann-        CreateTableAs ann _ _ -> ann-        CreateView ann _ _ -> ann-        CreateType ann _ _ -> ann-        CreateFunction ann _ _ _ _ _ _ _ -> ann-        CreateDomain ann _ _ _ -> ann-        DropFunction ann _ _ _ -> ann-        DropSomething ann _ _ _ _ -> ann-        Assignment ann _ _ -> ann-        Return ann _ -> ann-        ReturnNext ann _ -> ann-        ReturnQuery ann _ -> ann-        Raise ann _ _ _ -> ann-        NullStatement  ann -> ann-        Perform ann _ -> ann-        Execute ann _ -> ann-        ExecuteInto ann _ _ -> ann-        ForSelectStatement ann _ _ _ -> ann-        ForIntegerStatement ann _ _ _ _ -> ann-        WhileStatement ann _ _ -> ann-        ContinueStatement ann -> ann-        CaseStatement ann _ _ _ -> ann-        If ann _ _  -> ann-  setAnn st a =-      case st of-        SelectStatement _ ex -> SelectStatement a ex-        Insert _ tbl cols ins ret -> Insert a tbl cols ins ret-        Update _ tbl as whr ret -> Update a tbl as whr ret-        Delete _ tbl whr ret -> Delete a tbl whr ret-        Copy _ tbl cols src -> Copy a tbl cols src-        CopyData _ i -> CopyData a i-        Truncate _ tbls ri cs -> Truncate a tbls ri cs-        CreateTable _ name atts cons -> CreateTable a name atts cons-        CreateTableAs _ name ex -> CreateTableAs a name ex-        CreateView _ name expr -> CreateView a name expr-        CreateType _ name atts -> CreateType a name atts-        CreateFunction _ lang name params rettype bodyQuote body vol ->-            CreateFunction a lang name params rettype bodyQuote body vol-        CreateDomain _ name typ check -> CreateDomain a name typ check-        DropFunction _ i s cs -> DropFunction a i s cs-        DropSomething _ dt i nms cs -> DropSomething a dt i nms cs-        Assignment _ tgt val -> Assignment a tgt val-        Return _ v -> Return a v-        ReturnNext _ ex -> ReturnNext a ex-        ReturnQuery _ sel -> ReturnQuery a sel-        Raise _ l m args -> Raise a l m args-        NullStatement _ -> NullStatement a-        Perform _ expr -> Perform a expr-        Execute _ expr -> Execute a expr-        ExecuteInto _ expr tgts -> ExecuteInto a expr tgts-        ForSelectStatement _ var sel sts -> ForSelectStatement a var sel sts-        ForIntegerStatement _ var from to sts -> ForIntegerStatement a var from to sts-        WhileStatement _ expr sts -> WhileStatement a expr sts-        ContinueStatement _ -> ContinueStatement a-        CaseStatement _ val cases els -> CaseStatement a val cases els-        If _ cases els -> If a cases els--  changeAnnRecurse f st =-    case st of-        SelectStatement a ex -> SelectStatement (f a) ex-        Insert a tbl cols ins ret -> Insert (f a) tbl cols ins ret-        Update a tbl as whr ret -> Update (f a) tbl as whr ret-        Delete a tbl whr ret -> Delete (f a) tbl whr ret-        Copy a tbl cols src -> Copy (f a) tbl cols src-        CopyData a i -> CopyData (f a) i-        Truncate a tbls ri cs -> Truncate (f a) tbls ri cs-        CreateTable a name atts cons -> CreateTable (f a) name atts cons-        CreateTableAs a name ex -> CreateTableAs (f a) name ex-        CreateView a name expr -> CreateView (f a) name expr-        CreateType a name atts -> CreateType (f a) name atts-        CreateFunction a lang name params rettype bodyQuote body vol ->-            CreateFunction (f a) lang name params rettype bodyQuote doBody vol-            where-              doBody = case body of-                         SqlFnBody sts -> SqlFnBody $ cars f sts-                         PlpgsqlFnBody vars sts -> PlpgsqlFnBody vars $ cars f sts-        CreateDomain a name typ check -> CreateDomain (f a) name typ check-        DropFunction a i s cs -> DropFunction (f a) i s cs-        DropSomething a dt i nms cs -> DropSomething (f a) dt i nms cs-        Assignment a tgt val -> Assignment (f a) tgt val-        Return a v -> Return (f a) v-        ReturnNext a ex -> ReturnNext (f a) ex-        ReturnQuery a sel -> ReturnQuery (f a) sel-        Raise a l m args -> Raise (f a) l m args-        NullStatement a -> NullStatement (f a)-        Perform a expr -> Perform (f a) expr-        Execute a expr -> Execute (f a) expr-        ExecuteInto a expr tgts -> ExecuteInto (f a) expr tgts-        ForSelectStatement a var sel sts -> ForSelectStatement (f a) var sel $ cars f sts-        ForIntegerStatement a var from to sts -> ForIntegerStatement (f a) var from to $ cars f sts-        WhileStatement a expr sts -> WhileStatement (f a) expr $ cars f sts-        ContinueStatement a -> ContinueStatement (f a)-        CaseStatement a val cases els -> CaseStatement (f a) val doCases $ cars f els-            where-              doCases = map (second (cars f)) cases-        If a cases els -> If (f a) doCases $ cars f els-            where-              doCases = map (second (cars f)) cases-    --where-     -- doCases cs = map (\(ex,sts) -> (ex,cars f sts)) cs-  getAnnChildren st =-    case st of-        SelectStatement _ ex -> gacse ex-        Insert _ _ _ ins _ -> gacse ins-        Update _ _ as whr _ -> mp (gacscl as) ++ gacme whr-        Delete _ _ whr _ -> gacme whr-        --Copy _ _ _ _ -> []-        --CopyData _ _ -> []-        --Truncate _ _ _ _ -> []-        --CreateTable _ _ _ _ -> []-        --CreateTableAs _ _ _ -> []-        CreateView _ _ expr -> gacse expr-        --CreateType _ _ _ -> []-        --CreateFunction a lang name params rettype bodyQuote body vol ->-        CreateFunction _ _    _    _      _       _         body _   ->-            case body of-              SqlFnBody sts -> mp sts-              PlpgsqlFnBody _ sts -> mp sts-        --CreateDomain _ _ _ _ -> []-        --DropFunction _ _ _ _ -> []-        --DropSomething _ _ _ _ _ -> []-        --Assignment _ _ _ -> []-        --Return a v -> Return (f a) v-        --ReturnNext a ex -> ReturnNext (f a) ex-        --ReturnQuery a sel -> ReturnQuery (f a) sel-        --Raise a l m args -> Raise (f a) l m args-        --NullStatement a -> NullStatement (f a)-        --Perform a expr -> Perform (f a) expr-        --Execute a expr -> Execute (f a) expr-        --ExecuteInto a expr tgts -> ExecuteInto (f a) expr tgts-        ForSelectStatement _ _ sel sts -> gacse sel ++ mp sts-        ForIntegerStatement _ _ _ _ sts -> mp sts-        WhileStatement _ expr sts -> pack expr : mp sts-        --ContinueStatement a -> ContinueStatement (f a)-        CaseStatement _ val cases els -> pack val : mp (doCases cases) ++ mp els-        If _ cases els -> mp $ doCases cases ++ els-        _ -> []-    where-      doCases = concatMap snd-      --gacse :: Annotated a => SelectExpression -> [a]-      gacse se = [pack se]-      gacscl :: Annotated a => SetClauseList -> [a]-      gacscl _ = []-      --gacme :: Annotated a => Maybe Expression -> [a]-      gacme e = case e of-                  Nothing -> []-                  Just e1 -> [pack e1]-      mp = map pack--cars = map . changeAnnRecurse--instance Annotated Expression where-  ann a =-      case a of-        IntegerLit ann _ -> ann-        FloatLit ann _ -> ann-        StringLit ann _ _ -> ann-        NullLit ann -> ann-        BooleanLit ann _ -> ann-        PositionalArg ann _ -> ann-        Cast ann _ _ -> ann-        Identifier ann _ -> ann-        Case ann _ _ -> ann-        CaseSimple ann _ _ _ -> ann-        Exists ann _ -> ann-        FunCall ann _ _ -> ann-        InPredicate ann _ _ _ -> ann-        WindowFn ann _ _ _ _ -> ann-        ScalarSubQuery ann _ -> ann-  setAnn ex a =-    case ex of-      IntegerLit _ i -> IntegerLit a i-      FloatLit _ d -> FloatLit a d-      StringLit _ q v -> StringLit a q v-      NullLit _ -> NullLit a-      BooleanLit _ b -> BooleanLit a b-      PositionalArg _ p -> PositionalArg a p-      Cast _ expr tn -> Cast a expr tn-      Identifier _ i -> Identifier a i-      Case _ cases els -> Case a cases els-      CaseSimple _ val cases els -> CaseSimple a val cases els-      Exists _ sel -> Exists a sel-      FunCall _ funName args -> FunCall a funName args-      InPredicate _ expr i list -> InPredicate a expr i list-      WindowFn _ fn par ord dir -> WindowFn a fn par ord dir-      ScalarSubQuery _ sel -> ScalarSubQuery a sel--  changeAnnRecurse f ex =-    case ex of-      IntegerLit a i -> IntegerLit (f a) i-      FloatLit a d -> FloatLit (f a) d-      StringLit a q v -> StringLit (f a) q v-      NullLit a -> NullLit a-      BooleanLit a b -> BooleanLit (f a) b-      PositionalArg a p -> PositionalArg (f a) p-      Cast a expr tn -> Cast (f a) (changeAnnRecurse f expr) tn-      Identifier a i -> Identifier (f a) i-      Case a cases els -> Case (f a) cases els-      CaseSimple a val cases els -> CaseSimple (f a) val cases els-      Exists a sel -> Exists (f a) sel-      FunCall a funName args -> FunCall (f a) funName args-      InPredicate a expr i list -> InPredicate (f a) expr i list-      WindowFn a fn par ord dir -> WindowFn (f a) fn par ord dir-      ScalarSubQuery a sel -> ScalarSubQuery (f a) sel--  getAnnChildren ex =-    case ex of-      Cast _ expr _ -> mp [expr]-      Case _ cases els -> gacce cases els-      CaseSimple _ val cases els -> pack val : gacce cases els-      Exists a sel -> [pack sel]-      FunCall _ _ args -> mp args-      --InPredicate a expr i list -> InPredicate (f a) expr i list-      --WindowFn a fn par ord dir -> WindowFn (f a) fn par ord dir-      --ScalarSubQuery a sel -> ScalarSubQuery (f a) sel-      _ -> []-    where-      gacme e = case e of-                  Nothing -> []-                  Just e1 -> [pack e1]-      gacce cs el = mp (concatMap (\(el,e) -> el ++ [e]) cs) ++ gacme el-      mp = map pack----instance Annotated SelectExpression where-  ann a =-      case a of-        Select ann _ _ _ _ _ _ _ _ _ _ -> ann-        CombineSelect ann _ _ _ -> ann-        Values ann _ -> ann-  setAnn ex a =-    case ex of-        Select _ dis sl tref whr grp hav ord dir lim off ->-          Select a dis sl tref whr grp hav ord dir lim off-        CombineSelect _ ctype sel1 sel2 -> CombineSelect a ctype sel1 sel2-        Values _ vll -> Values a vll-  changeAnnRecurse f ex =-    case ex of-      Select a dis sl tref whr grp hav ord dir lim off ->-          Select (f a) dis sl tref whr grp hav ord dir lim off-      CombineSelect a ctype sel1 sel2 -> CombineSelect (f a) ctype-                                             (changeAnnRecurse f sel1)-                                             (changeAnnRecurse f sel2)-      Values a vll -> Values (f a) vll-  getAnnChildren ex =-    case ex of-      Select a dis sl tref whr grp hav ord dir lim off ->-          doSl ++-          map pack (maybeToList tref) ++-          doME whr ++ mp grp ++ doME hav ++ mp ord ++ doME lim ++ doME off-          where-            doSl = let SelectList x _ = sl-                       ses = map (\s -> case s of-                                         SelExp se -> se-                                         SelectItem se _ -> se) x-                   in map pack ses-            doME me = case me of-                        Nothing -> []-                        Just e -> [pack e]-      CombineSelect _ _ sel1 sel2 -> [pack sel1,pack sel2]-      Values _ vll -> mp $ concat vll-    where-      mp = map pack--instance Annotated TableRef where-  ann a =-      case a of-        Tref ann _ -> ann-        TrefAlias ann _ _ -> ann-        JoinedTref ann _ _ _ _ _ -> ann-        SubTref ann _ _ -> ann-        TrefFun ann _ -> ann-        TrefFunAlias ann _ _ -> ann-  setAnn ex a =-    case ex of-        Tref _ tbl -> Tref a tbl-        TrefAlias _ tbl alias -> TrefAlias a tbl alias-        JoinedTref _ tbl nat joinType tbl1 onExpr -> JoinedTref a tbl nat joinType tbl1 onExpr-        SubTref _ sel alias -> SubTref a sel alias-        TrefFun _ fn -> TrefFun a fn-        TrefFunAlias _ fn alias -> TrefFunAlias a fn alias-  changeAnnRecurse f ex =-    case ex of-        Tref a tbl -> Tref (f a) tbl-        TrefAlias a tbl alias -> TrefAlias (f a) tbl alias-        JoinedTref a tbl nat joinType tbl1 onExpr ->-          JoinedTref (f a)-                     (changeAnnRecurse f tbl)-                     nat-                     joinType-                     (changeAnnRecurse f tbl1)-                     onExpr-        SubTref a sel alias -> SubTref (f a) (changeAnnRecurse f sel) alias-        TrefFun a fn -> TrefFun (f a) (changeAnnRecurse f fn)-        TrefFunAlias a fn alias -> TrefFunAlias (f a) (changeAnnRecurse f fn) alias-  getAnnChildren ex =-    case ex of-        Tref a tbl -> []-        TrefAlias a tbl alias -> []-        JoinedTref _ tbl _ _ tbl1 onExpr ->-          getAnnChildren tbl ++ getAnnChildren tbl1-        SubTref a sel alias -> getAnnChildren sel-        TrefFun a fn -> getAnnChildren fn-        TrefFunAlias a fn alias -> getAnnChildren fn-}--{---Future plans:--Investigate how much mileage can get out of making these nodes the-parse tree nodes, and using a separate ast. Hinges on how much extra-value can get from making the types more restrictive for the ast nodes-compared to the parse tree. Starting to think this won't be worth it.--Would like to turn this back into regular Haskell file, maybe could-use AspectAG instead of uuagc to make this happen?----}
− Database/HsSqlPpp/TypeChecking/AstInternal.hs
@@ -1,5468 +0,0 @@-{-# OPTIONS_HADDOCK hide #-}----- UUAGC 0.9.10 (AstInternal.ag)-module Database.HsSqlPpp.TypeChecking.AstInternal(-    --from the ag files:-    --ast nodes-    Statement (..)-   ,SelectExpression (..)-   ,FnBody (..)-   ,SetClause (..)-   ,TableRef (..)-   ,JoinExpression (..)-   ,JoinType (..)-   ,SelectList (..)-   ,SelectItem (..)-   ,CopySource (..)-   ,AttributeDef (..)-   ,RowConstraint (..)-   ,Constraint (..)-   ,TypeAttributeDef (..)-   ,ParamDef (..)-   ,VarDef (..)-   ,RaiseType (..)-   ,CombineType (..)-   ,Volatility (..)-   ,Language (..)-   ,TypeName (..)-   ,DropType (..)-   ,Cascade (..)-   ,Direction (..)-   ,Distinct (..)-   ,Natural (..)-   ,IfExists (..)-   ,RestartIdentity (..)-   ,Expression (..)-   ,InList (..)-   ,StatementList-   ,ExpressionListStatementListPairList-   ,ExpressionListStatementListPair-   ,ExpressionList-   ,StringList-   ,ParamDefList-   ,AttributeDefList-   ,ConstraintList-   ,TypeAttributeDefList-   ,Where-   ,StringStringListPairList-   ,StringStringListPair-   ,ExpressionStatementListPairList-   ,SetClauseList-   ,CaseExpressionListExpressionPairList-   ,MaybeExpression-   ,MTableRef-   ,ExpressionListList-   ,SelectItemList-   ,OnExpr-   ,RowConstraintList-   ,VarDefList-   ,ExpressionStatementListPair-   ,MExpression-   ,CaseExpressionListExpressionPair-   ,CaseExpressionList-   -- annotations-   ,annotateAst-   ,annotateAstScope-   ,annotateExpression-) where--import Data.Maybe-import Data.List-import Debug.Trace-import Control.Monad.Error-import Control.Arrow-import Data.Either-import Control.Applicative--import Database.HsSqlPpp.TypeChecking.TypeType-import Database.HsSqlPpp.TypeChecking.AstUtils-import Database.HsSqlPpp.TypeChecking.TypeConversion-import Database.HsSqlPpp.TypeChecking.TypeCheckingH-import Database.HsSqlPpp.TypeChecking.Scope-import Database.HsSqlPpp.TypeChecking.ScopeData-import Database.HsSqlPpp.TypeChecking.AstAnnotation------ | Takes an ast, and adds annotations, including types, type errors,--- and statement info. Type checks against defaultScope.-annotateAst :: StatementList -> StatementList-annotateAst = annotateAstScope defaultScope---- | As annotateAst but you supply an additional scope to add to the--- defaultScope to type check against. See Scope module for how to--- read a scope from an existing database so you can type check--- against it.-annotateAstScope :: Scope -> StatementList -> StatementList-annotateAstScope scope sts =-    let t = sem_Root (Root sts)-        ta = wrap_Root t Inh_Root {scope_Inh_Root = combineScopes defaultScope scope}-        tl = annotatedTree_Syn_Root ta-    in case tl of-         Root r -> r---- | Testing utility, mainly used to check an expression for type errors--- or to get its type.-annotateExpression :: Scope -> Expression -> Expression-annotateExpression scope ex =-    let t = sem_ExpressionRoot (ExpressionRoot ex)-        rt = (annotatedTree_Syn_ExpressionRoot-              (wrap_ExpressionRoot t Inh_ExpressionRoot {scope_Inh_ExpressionRoot = combineScopes defaultScope scope}))-    in case rt of-         ExpressionRoot e -> e--{---================================================================================--= instances for Annotated.--Hopefully, some sort of SYB approach can be used to autogenerate these-in the future. It is imperative that this or template haskell or-something similar be used because doing it by hand guarantees some-bits will be missed.--Stupidity watch update: use attributes to do this. Doh.---}--instance Annotated Statement where-  ann a =-      case a of-        SelectStatement ann _ -> ann-        Insert ann _ _ _ _ -> ann-        Update ann _ _ _ _ -> ann-        Delete ann _ _ _ -> ann-        Copy ann _ _ _ -> ann-        CopyData ann _ -> ann-        Truncate ann _ _ _ -> ann-        CreateTable ann _ _ _ -> ann-        CreateTableAs ann _ _ -> ann-        CreateView ann _ _ -> ann-        CreateType ann _ _ -> ann-        CreateFunction ann _ _ _ _ _ _ _ -> ann-        CreateDomain ann _ _ _ -> ann-        DropFunction ann _ _ _ -> ann-        DropSomething ann _ _ _ _ -> ann-        Assignment ann _ _ -> ann-        Return ann _ -> ann-        ReturnNext ann _ -> ann-        ReturnQuery ann _ -> ann-        Raise ann _ _ _ -> ann-        NullStatement  ann -> ann-        Perform ann _ -> ann-        Execute ann _ -> ann-        ExecuteInto ann _ _ -> ann-        ForSelectStatement ann _ _ _ -> ann-        ForIntegerStatement ann _ _ _ _ -> ann-        WhileStatement ann _ _ -> ann-        ContinueStatement ann -> ann-        CaseStatement ann _ _ _ -> ann-        If ann _ _  -> ann-  setAnn st a =-      case st of-        SelectStatement _ ex -> SelectStatement a ex-        Insert _ tbl cols ins ret -> Insert a tbl cols ins ret-        Update _ tbl as whr ret -> Update a tbl as whr ret-        Delete _ tbl whr ret -> Delete a tbl whr ret-        Copy _ tbl cols src -> Copy a tbl cols src-        CopyData _ i -> CopyData a i-        Truncate _ tbls ri cs -> Truncate a tbls ri cs-        CreateTable _ name atts cons -> CreateTable a name atts cons-        CreateTableAs _ name ex -> CreateTableAs a name ex-        CreateView _ name expr -> CreateView a name expr-        CreateType _ name atts -> CreateType a name atts-        CreateFunction _ lang name params rettype bodyQuote body vol ->-            CreateFunction a lang name params rettype bodyQuote body vol-        CreateDomain _ name typ check -> CreateDomain a name typ check-        DropFunction _ i s cs -> DropFunction a i s cs-        DropSomething _ dt i nms cs -> DropSomething a dt i nms cs-        Assignment _ tgt val -> Assignment a tgt val-        Return _ v -> Return a v-        ReturnNext _ ex -> ReturnNext a ex-        ReturnQuery _ sel -> ReturnQuery a sel-        Raise _ l m args -> Raise a l m args-        NullStatement _ -> NullStatement a-        Perform _ expr -> Perform a expr-        Execute _ expr -> Execute a expr-        ExecuteInto _ expr tgts -> ExecuteInto a expr tgts-        ForSelectStatement _ var sel sts -> ForSelectStatement a var sel sts-        ForIntegerStatement _ var from to sts -> ForIntegerStatement a var from to sts-        WhileStatement _ expr sts -> WhileStatement a expr sts-        ContinueStatement _ -> ContinueStatement a-        CaseStatement _ val cases els -> CaseStatement a val cases els-        If _ cases els -> If a cases els--  changeAnnRecurse f st =-    case st of-        SelectStatement a ex -> SelectStatement (f a) ex-        Insert a tbl cols ins ret -> Insert (f a) tbl cols ins ret-        Update a tbl as whr ret -> Update (f a) tbl as whr ret-        Delete a tbl whr ret -> Delete (f a) tbl whr ret-        Copy a tbl cols src -> Copy (f a) tbl cols src-        CopyData a i -> CopyData (f a) i-        Truncate a tbls ri cs -> Truncate (f a) tbls ri cs-        CreateTable a name atts cons -> CreateTable (f a) name atts cons-        CreateTableAs a name ex -> CreateTableAs (f a) name ex-        CreateView a name expr -> CreateView (f a) name expr-        CreateType a name atts -> CreateType (f a) name atts-        CreateFunction a lang name params rettype bodyQuote body vol ->-            CreateFunction (f a) lang name params rettype bodyQuote doBody vol-            where-              doBody = case body of-                         SqlFnBody sts -> SqlFnBody $ cars f sts-                         PlpgsqlFnBody vars sts -> PlpgsqlFnBody vars $ cars f sts-        CreateDomain a name typ check -> CreateDomain (f a) name typ check-        DropFunction a i s cs -> DropFunction (f a) i s cs-        DropSomething a dt i nms cs -> DropSomething (f a) dt i nms cs-        Assignment a tgt val -> Assignment (f a) tgt val-        Return a v -> Return (f a) v-        ReturnNext a ex -> ReturnNext (f a) ex-        ReturnQuery a sel -> ReturnQuery (f a) sel-        Raise a l m args -> Raise (f a) l m args-        NullStatement a -> NullStatement (f a)-        Perform a expr -> Perform (f a) expr-        Execute a expr -> Execute (f a) expr-        ExecuteInto a expr tgts -> ExecuteInto (f a) expr tgts-        ForSelectStatement a var sel sts -> ForSelectStatement (f a) var sel $ cars f sts-        ForIntegerStatement a var from to sts -> ForIntegerStatement (f a) var from to $ cars f sts-        WhileStatement a expr sts -> WhileStatement (f a) expr $ cars f sts-        ContinueStatement a -> ContinueStatement (f a)-        CaseStatement a val cases els -> CaseStatement (f a) val doCases $ cars f els-            where-              doCases = map (second (cars f)) cases-        If a cases els -> If (f a) doCases $ cars f els-            where-              doCases = map (second (cars f)) cases-    --where-     -- doCases cs = map (\(ex,sts) -> (ex,cars f sts)) cs-  getAnnChildren st =-    case st of-        SelectStatement _ ex -> gacse ex-        Insert _ _ _ ins _ -> gacse ins-        Update _ _ as whr _ -> mp (gacscl as) ++ gacme whr-        Delete _ _ whr _ -> gacme whr-        --Copy _ _ _ _ -> []-        --CopyData _ _ -> []-        --Truncate _ _ _ _ -> []-        --CreateTable _ _ _ _ -> []-        --CreateTableAs _ _ _ -> []-        CreateView _ _ expr -> gacse expr-        --CreateType _ _ _ -> []-        --CreateFunction a lang name params rettype bodyQuote body vol ->-        CreateFunction _ _    _    _      _       _         body _   ->-            case body of-              SqlFnBody sts -> mp sts-              PlpgsqlFnBody _ sts -> mp sts-        --CreateDomain _ _ _ _ -> []-        --DropFunction _ _ _ _ -> []-        --DropSomething _ _ _ _ _ -> []-        --Assignment _ _ _ -> []-        --Return a v -> Return (f a) v-        --ReturnNext a ex -> ReturnNext (f a) ex-        --ReturnQuery a sel -> ReturnQuery (f a) sel-        --Raise a l m args -> Raise (f a) l m args-        --NullStatement a -> NullStatement (f a)-        --Perform a expr -> Perform (f a) expr-        --Execute a expr -> Execute (f a) expr-        --ExecuteInto a expr tgts -> ExecuteInto (f a) expr tgts-        ForSelectStatement _ _ sel sts -> gacse sel ++ mp sts-        ForIntegerStatement _ _ _ _ sts -> mp sts-        WhileStatement _ expr sts -> pack expr : mp sts-        --ContinueStatement a -> ContinueStatement (f a)-        CaseStatement _ val cases els -> pack val : mp (doCases cases) ++ mp els-        If _ cases els -> mp $ doCases cases ++ els-        _ -> []-    where-      doCases = concatMap snd-      --gacse :: Annotated a => SelectExpression -> [a]-      gacse se = [pack se]-      gacscl :: Annotated a => SetClauseList -> [a]-      gacscl _ = []-      --gacme :: Annotated a => Maybe Expression -> [a]-      gacme e = case e of-                  Nothing -> []-                  Just e1 -> [pack e1]-      mp = map pack--cars = map . changeAnnRecurse--instance Annotated Expression where-  ann a =-      case a of-        IntegerLit ann _ -> ann-        FloatLit ann _ -> ann-        StringLit ann _ _ -> ann-        NullLit ann -> ann-        BooleanLit ann _ -> ann-        PositionalArg ann _ -> ann-        Cast ann _ _ -> ann-        Identifier ann _ -> ann-        Case ann _ _ -> ann-        CaseSimple ann _ _ _ -> ann-        Exists ann _ -> ann-        FunCall ann _ _ -> ann-        InPredicate ann _ _ _ -> ann-        WindowFn ann _ _ _ _ -> ann-        ScalarSubQuery ann _ -> ann-  setAnn ex a =-    case ex of-      IntegerLit _ i -> IntegerLit a i-      FloatLit _ d -> FloatLit a d-      StringLit _ q v -> StringLit a q v-      NullLit _ -> NullLit a-      BooleanLit _ b -> BooleanLit a b-      PositionalArg _ p -> PositionalArg a p-      Cast _ expr tn -> Cast a expr tn-      Identifier _ i -> Identifier a i-      Case _ cases els -> Case a cases els-      CaseSimple _ val cases els -> CaseSimple a val cases els-      Exists _ sel -> Exists a sel-      FunCall _ funName args -> FunCall a funName args-      InPredicate _ expr i list -> InPredicate a expr i list-      WindowFn _ fn par ord dir -> WindowFn a fn par ord dir-      ScalarSubQuery _ sel -> ScalarSubQuery a sel--  changeAnnRecurse f ex =-    case ex of-      IntegerLit a i -> IntegerLit (f a) i-      FloatLit a d -> FloatLit (f a) d-      StringLit a q v -> StringLit (f a) q v-      NullLit a -> NullLit a-      BooleanLit a b -> BooleanLit (f a) b-      PositionalArg a p -> PositionalArg (f a) p-      Cast a expr tn -> Cast (f a) (changeAnnRecurse f expr) tn-      Identifier a i -> Identifier (f a) i-      Case a cases els -> Case (f a) cases els-      CaseSimple a val cases els -> CaseSimple (f a) val cases els-      Exists a sel -> Exists (f a) sel-      FunCall a funName args -> FunCall (f a) funName args-      InPredicate a expr i list -> InPredicate (f a) expr i list-      WindowFn a fn par ord dir -> WindowFn (f a) fn par ord dir-      ScalarSubQuery a sel -> ScalarSubQuery (f a) sel--  getAnnChildren ex =-    case ex of-      Cast _ expr _ -> mp [expr]-      Case _ cases els -> gacce cases els-      CaseSimple _ val cases els -> pack val : gacce cases els-      Exists a sel -> [pack sel]-      FunCall _ _ args -> mp args-      --InPredicate a expr i list -> InPredicate (f a) expr i list-      --WindowFn a fn par ord dir -> WindowFn (f a) fn par ord dir-      --ScalarSubQuery a sel -> ScalarSubQuery (f a) sel-      _ -> []-    where-      gacme e = case e of-                  Nothing -> []-                  Just e1 -> [pack e1]-      gacce cs el = mp (concatMap (\(el,e) -> el ++ [e]) cs) ++ gacme el-      mp = map pack----instance Annotated SelectExpression where-  ann a =-      case a of-        Select ann _ _ _ _ _ _ _ _ _ _ -> ann-        CombineSelect ann _ _ _ -> ann-        Values ann _ -> ann-  setAnn ex a =-    case ex of-        Select _ dis sl tref whr grp hav ord dir lim off ->-          Select a dis sl tref whr grp hav ord dir lim off-        CombineSelect _ ctype sel1 sel2 -> CombineSelect a ctype sel1 sel2-        Values _ vll -> Values a vll-  changeAnnRecurse f ex =-    case ex of-      Select a dis sl tref whr grp hav ord dir lim off ->-          Select (f a) dis sl tref whr grp hav ord dir lim off-      CombineSelect a ctype sel1 sel2 -> CombineSelect (f a) ctype-                                             (changeAnnRecurse f sel1)-                                             (changeAnnRecurse f sel2)-      Values a vll -> Values (f a) vll-  getAnnChildren ex =-    case ex of-      Select a dis sl tref whr grp hav ord dir lim off ->-          doSl ++-          map pack (maybeToList tref) ++-          doME whr ++ mp grp ++ doME hav ++ mp ord ++ doME lim ++ doME off-          where-            doSl = let SelectList x _ = sl-                       ses = map (\s -> case s of-                                         SelExp se -> se-                                         SelectItem se _ -> se) x-                   in map pack ses-            doME me = case me of-                        Nothing -> []-                        Just e -> [pack e]-      CombineSelect _ _ sel1 sel2 -> [pack sel1,pack sel2]-      Values _ vll -> mp $ concat vll-    where-      mp = map pack--instance Annotated TableRef where-  ann a =-      case a of-        Tref ann _ -> ann-        TrefAlias ann _ _ -> ann-        JoinedTref ann _ _ _ _ _ -> ann-        SubTref ann _ _ -> ann-        TrefFun ann _ -> ann-        TrefFunAlias ann _ _ -> ann-  setAnn ex a =-    case ex of-        Tref _ tbl -> Tref a tbl-        TrefAlias _ tbl alias -> TrefAlias a tbl alias-        JoinedTref _ tbl nat joinType tbl1 onExpr -> JoinedTref a tbl nat joinType tbl1 onExpr-        SubTref _ sel alias -> SubTref a sel alias-        TrefFun _ fn -> TrefFun a fn-        TrefFunAlias _ fn alias -> TrefFunAlias a fn alias-  changeAnnRecurse f ex =-    case ex of-        Tref a tbl -> Tref (f a) tbl-        TrefAlias a tbl alias -> TrefAlias (f a) tbl alias-        JoinedTref a tbl nat joinType tbl1 onExpr ->-          JoinedTref (f a)-                     (changeAnnRecurse f tbl)-                     nat-                     joinType-                     (changeAnnRecurse f tbl1)-                     onExpr-        SubTref a sel alias -> SubTref (f a) (changeAnnRecurse f sel) alias-        TrefFun a fn -> TrefFun (f a) (changeAnnRecurse f fn)-        TrefFunAlias a fn alias -> TrefFunAlias (f a) (changeAnnRecurse f fn) alias-  getAnnChildren ex =-    case ex of-        Tref a tbl -> []-        TrefAlias a tbl alias -> []-        JoinedTref _ tbl _ _ tbl1 onExpr ->-          getAnnChildren tbl ++ getAnnChildren tbl1-        SubTref a sel alias -> getAnnChildren sel-        TrefFun a fn -> getAnnChildren fn-        TrefFunAlias a fn alias -> getAnnChildren fn---annTypesAndErrors :: Annotated a => a -> Type -> [TypeError]-                  -> Maybe AnnotationElement -> a-annTypesAndErrors item nt errs add =-    changeAnn item $-     (([TypeAnnotation nt] ++ maybeToList add ++-       map TypeErrorA errs) ++)---checkExpressionBool :: Maybe Expression -> Either [TypeError] Type-checkExpressionBool whr = do-  let ty = fromMaybe typeBool $ fmap getTypeAnnotation whr-  when (ty `notElem` [typeBool, TypeCheckFailed]) $-       Left [ExpressionMustBeBool]-  return ty---getTbCols = unwrapComposite . unwrapSetOf . getTypeAnnotation----getFnType :: Scope -> String -> Expression -> Either [TypeError] Type-getFnType scope alias =-    either Left (Right . snd) . getFunIdens scope alias--getFunIdens :: Scope -> String -> Expression -> Either [TypeError] (String,Type)-getFunIdens scope alias fnVal =-   case fnVal of-       FunCall _ f _ ->-           let correlationName = if alias /= ""-                                   then alias-                                   else f-           in Right (correlationName, case getTypeAnnotation fnVal of-                SetOfType (CompositeType t) -> getCompositeType t-                SetOfType x -> UnnamedCompositeType [(correlationName,x)]-                y -> UnnamedCompositeType [(correlationName,y)])-       x -> Left [ContextError "FunCall"]-   where-     getCompositeType t =-                    case getAttrs scope [Composite-                                              ,TableComposite-                                              ,ViewComposite] t of-                      Just ((_,_,a@(UnnamedCompositeType _)), _) -> a-                      _ -> UnnamedCompositeType []---fixStar ex =-  changeAnnRecurse fs ex-  where-    fs a = if TypeAnnotation TypeCheckFailed `elem` a-              && any (\an ->-                       case an of-                         TypeErrorA (UnrecognisedIdentifier x) |-                           let (_,iden) = splitIdentifier x-                           in iden == "*" -> True-                         _ -> False) a-             then filter (\an -> case an of-                                   TypeAnnotation TypeCheckFailed -> False-                                   TypeErrorA (UnrecognisedIdentifier _) -> False-                                   _ -> True) a-             else a---fixedValue :: a -> a -> a -> a-fixedValue a _ _ = a------getRowTypes :: [Type] -> [Type]-getRowTypes [RowCtor ts] = ts-getRowTypes ts = ts--- AttributeDef -------------------------------------------------data AttributeDef  = AttributeDef (String) (TypeName) (Maybe Expression) (RowConstraintList) -                   deriving ( Eq,Show)--- cata-sem_AttributeDef :: AttributeDef  ->-                    T_AttributeDef -sem_AttributeDef (AttributeDef _name _typ _check _cons )  =-    (sem_AttributeDef_AttributeDef _name (sem_TypeName _typ ) _check (sem_RowConstraintList _cons ) )--- semantic domain-type T_AttributeDef  = Scope ->-                       ( AttributeDef,String,(Either [TypeError] Type))-data Inh_AttributeDef  = Inh_AttributeDef {scope_Inh_AttributeDef :: Scope}-data Syn_AttributeDef  = Syn_AttributeDef {annotatedTree_Syn_AttributeDef :: AttributeDef,attrName_Syn_AttributeDef :: String,namedType_Syn_AttributeDef :: Either [TypeError] Type}-wrap_AttributeDef :: T_AttributeDef  ->-                     Inh_AttributeDef  ->-                     Syn_AttributeDef -wrap_AttributeDef sem (Inh_AttributeDef _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType) =-             (sem _lhsIscope )-     in  (Syn_AttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType ))-sem_AttributeDef_AttributeDef :: String ->-                                 T_TypeName  ->-                                 (Maybe Expression) ->-                                 T_RowConstraintList  ->-                                 T_AttributeDef -sem_AttributeDef_AttributeDef name_ typ_ check_ cons_  =-    (\ _lhsIscope ->-         (let _lhsOattrName :: String-              _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: AttributeDef-              _typOscope :: Scope-              _consOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _consIannotatedTree :: RowConstraintList-              _lhsOattrName =-                  name_-              _lhsOnamedType =-                  _typInamedType-              _annotatedTree =-                  AttributeDef name_ _typIannotatedTree check_ _consIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _typOscope =-                  _lhsIscope-              _consOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-              ( _consIannotatedTree) =-                  (cons_ _consOscope )-          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType)))--- AttributeDefList ---------------------------------------------type AttributeDefList  = [(AttributeDef)]--- cata-sem_AttributeDefList :: AttributeDefList  ->-                        T_AttributeDefList -sem_AttributeDefList list  =-    (Prelude.foldr sem_AttributeDefList_Cons sem_AttributeDefList_Nil (Prelude.map sem_AttributeDef list) )--- semantic domain-type T_AttributeDefList  = Scope ->-                           ( AttributeDefList,([(String, Either [TypeError] Type)]))-data Inh_AttributeDefList  = Inh_AttributeDefList {scope_Inh_AttributeDefList :: Scope}-data Syn_AttributeDefList  = Syn_AttributeDefList {annotatedTree_Syn_AttributeDefList :: AttributeDefList,attrs_Syn_AttributeDefList :: [(String, Either [TypeError] Type)]}-wrap_AttributeDefList :: T_AttributeDefList  ->-                         Inh_AttributeDefList  ->-                         Syn_AttributeDefList -wrap_AttributeDefList sem (Inh_AttributeDefList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOattrs) =-             (sem _lhsIscope )-     in  (Syn_AttributeDefList _lhsOannotatedTree _lhsOattrs ))-sem_AttributeDefList_Cons :: T_AttributeDef  ->-                             T_AttributeDefList  ->-                             T_AttributeDefList -sem_AttributeDefList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOattrs :: ([(String, Either [TypeError] Type)])-              _lhsOannotatedTree :: AttributeDefList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: AttributeDef-              _hdIattrName :: String-              _hdInamedType :: (Either [TypeError] Type)-              _tlIannotatedTree :: AttributeDefList-              _tlIattrs :: ([(String, Either [TypeError] Type)])-              _lhsOattrs =-                  (_hdIattrName, _hdInamedType) : _tlIattrs-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdIattrName,_hdInamedType) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlIattrs) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOattrs)))-sem_AttributeDefList_Nil :: T_AttributeDefList -sem_AttributeDefList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOattrs :: ([(String, Either [TypeError] Type)])-              _lhsOannotatedTree :: AttributeDefList-              _lhsOattrs =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOattrs)))--- Cascade ------------------------------------------------------data Cascade  = Cascade -              | Restrict -              deriving ( Eq,Show)--- cata-sem_Cascade :: Cascade  ->-               T_Cascade -sem_Cascade (Cascade )  =-    (sem_Cascade_Cascade )-sem_Cascade (Restrict )  =-    (sem_Cascade_Restrict )--- semantic domain-type T_Cascade  = Scope ->-                  ( Cascade)-data Inh_Cascade  = Inh_Cascade {scope_Inh_Cascade :: Scope}-data Syn_Cascade  = Syn_Cascade {annotatedTree_Syn_Cascade :: Cascade}-wrap_Cascade :: T_Cascade  ->-                Inh_Cascade  ->-                Syn_Cascade -wrap_Cascade sem (Inh_Cascade _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Cascade _lhsOannotatedTree ))-sem_Cascade_Cascade :: T_Cascade -sem_Cascade_Cascade  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Cascade-              _annotatedTree =-                  Cascade-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Cascade_Restrict :: T_Cascade -sem_Cascade_Restrict  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Cascade-              _annotatedTree =-                  Restrict-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- CaseExpressionList -------------------------------------------type CaseExpressionList  = [(Expression)]--- cata-sem_CaseExpressionList :: CaseExpressionList  ->-                          T_CaseExpressionList -sem_CaseExpressionList list  =-    (Prelude.foldr sem_CaseExpressionList_Cons sem_CaseExpressionList_Nil (Prelude.map sem_Expression list) )--- semantic domain-type T_CaseExpressionList  = Scope ->-                             ( CaseExpressionList)-data Inh_CaseExpressionList  = Inh_CaseExpressionList {scope_Inh_CaseExpressionList :: Scope}-data Syn_CaseExpressionList  = Syn_CaseExpressionList {annotatedTree_Syn_CaseExpressionList :: CaseExpressionList}-wrap_CaseExpressionList :: T_CaseExpressionList  ->-                           Inh_CaseExpressionList  ->-                           Syn_CaseExpressionList -wrap_CaseExpressionList sem (Inh_CaseExpressionList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_CaseExpressionList _lhsOannotatedTree ))-sem_CaseExpressionList_Cons :: T_Expression  ->-                               T_CaseExpressionList  ->-                               T_CaseExpressionList -sem_CaseExpressionList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CaseExpressionList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: Expression-              _hdIliftedColumnName :: String-              _tlIannotatedTree :: CaseExpressionList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdIliftedColumnName) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_CaseExpressionList_Nil :: T_CaseExpressionList -sem_CaseExpressionList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CaseExpressionList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- CaseExpressionListExpressionPair -----------------------------type CaseExpressionListExpressionPair  = ( (CaseExpressionList),(Expression))--- cata-sem_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair  ->-                                        T_CaseExpressionListExpressionPair -sem_CaseExpressionListExpressionPair ( x1,x2)  =-    (sem_CaseExpressionListExpressionPair_Tuple (sem_CaseExpressionList x1 ) (sem_Expression x2 ) )--- semantic domain-type T_CaseExpressionListExpressionPair  = Scope ->-                                           ( CaseExpressionListExpressionPair)-data Inh_CaseExpressionListExpressionPair  = Inh_CaseExpressionListExpressionPair {scope_Inh_CaseExpressionListExpressionPair :: Scope}-data Syn_CaseExpressionListExpressionPair  = Syn_CaseExpressionListExpressionPair {annotatedTree_Syn_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair}-wrap_CaseExpressionListExpressionPair :: T_CaseExpressionListExpressionPair  ->-                                         Inh_CaseExpressionListExpressionPair  ->-                                         Syn_CaseExpressionListExpressionPair -wrap_CaseExpressionListExpressionPair sem (Inh_CaseExpressionListExpressionPair _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_CaseExpressionListExpressionPair _lhsOannotatedTree ))-sem_CaseExpressionListExpressionPair_Tuple :: T_CaseExpressionList  ->-                                              T_Expression  ->-                                              T_CaseExpressionListExpressionPair -sem_CaseExpressionListExpressionPair_Tuple x1_ x2_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CaseExpressionListExpressionPair-              _x1Oscope :: Scope-              _x2Oscope :: Scope-              _x1IannotatedTree :: CaseExpressionList-              _x2IannotatedTree :: Expression-              _x2IliftedColumnName :: String-              _annotatedTree =-                  (_x1IannotatedTree,_x2IannotatedTree)-              _lhsOannotatedTree =-                  _annotatedTree-              _x1Oscope =-                  _lhsIscope-              _x2Oscope =-                  _lhsIscope-              ( _x1IannotatedTree) =-                  (x1_ _x1Oscope )-              ( _x2IannotatedTree,_x2IliftedColumnName) =-                  (x2_ _x2Oscope )-          in  ( _lhsOannotatedTree)))--- CaseExpressionListExpressionPairList -------------------------type CaseExpressionListExpressionPairList  = [(CaseExpressionListExpressionPair)]--- cata-sem_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList  ->-                                            T_CaseExpressionListExpressionPairList -sem_CaseExpressionListExpressionPairList list  =-    (Prelude.foldr sem_CaseExpressionListExpressionPairList_Cons sem_CaseExpressionListExpressionPairList_Nil (Prelude.map sem_CaseExpressionListExpressionPair list) )--- semantic domain-type T_CaseExpressionListExpressionPairList  = Scope ->-                                               ( CaseExpressionListExpressionPairList)-data Inh_CaseExpressionListExpressionPairList  = Inh_CaseExpressionListExpressionPairList {scope_Inh_CaseExpressionListExpressionPairList :: Scope}-data Syn_CaseExpressionListExpressionPairList  = Syn_CaseExpressionListExpressionPairList {annotatedTree_Syn_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList}-wrap_CaseExpressionListExpressionPairList :: T_CaseExpressionListExpressionPairList  ->-                                             Inh_CaseExpressionListExpressionPairList  ->-                                             Syn_CaseExpressionListExpressionPairList -wrap_CaseExpressionListExpressionPairList sem (Inh_CaseExpressionListExpressionPairList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_CaseExpressionListExpressionPairList _lhsOannotatedTree ))-sem_CaseExpressionListExpressionPairList_Cons :: T_CaseExpressionListExpressionPair  ->-                                                 T_CaseExpressionListExpressionPairList  ->-                                                 T_CaseExpressionListExpressionPairList -sem_CaseExpressionListExpressionPairList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: CaseExpressionListExpressionPair-              _tlIannotatedTree :: CaseExpressionListExpressionPairList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_CaseExpressionListExpressionPairList_Nil :: T_CaseExpressionListExpressionPairList -sem_CaseExpressionListExpressionPairList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- CombineType --------------------------------------------------data CombineType  = Except -                  | Intersect -                  | Union -                  | UnionAll -                  deriving ( Eq,Show)--- cata-sem_CombineType :: CombineType  ->-                   T_CombineType -sem_CombineType (Except )  =-    (sem_CombineType_Except )-sem_CombineType (Intersect )  =-    (sem_CombineType_Intersect )-sem_CombineType (Union )  =-    (sem_CombineType_Union )-sem_CombineType (UnionAll )  =-    (sem_CombineType_UnionAll )--- semantic domain-type T_CombineType  = Scope ->-                      ( CombineType)-data Inh_CombineType  = Inh_CombineType {scope_Inh_CombineType :: Scope}-data Syn_CombineType  = Syn_CombineType {annotatedTree_Syn_CombineType :: CombineType}-wrap_CombineType :: T_CombineType  ->-                    Inh_CombineType  ->-                    Syn_CombineType -wrap_CombineType sem (Inh_CombineType _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_CombineType _lhsOannotatedTree ))-sem_CombineType_Except :: T_CombineType -sem_CombineType_Except  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CombineType-              _annotatedTree =-                  Except-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_CombineType_Intersect :: T_CombineType -sem_CombineType_Intersect  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CombineType-              _annotatedTree =-                  Intersect-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_CombineType_Union :: T_CombineType -sem_CombineType_Union  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CombineType-              _annotatedTree =-                  Union-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_CombineType_UnionAll :: T_CombineType -sem_CombineType_UnionAll  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CombineType-              _annotatedTree =-                  UnionAll-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Constraint ---------------------------------------------------data Constraint  = CheckConstraint (Expression) -                 | PrimaryKeyConstraint (StringList) -                 | ReferenceConstraint (StringList) (String) (StringList) (Cascade) (Cascade) -                 | UniqueConstraint (StringList) -                 deriving ( Eq,Show)--- cata-sem_Constraint :: Constraint  ->-                  T_Constraint -sem_Constraint (CheckConstraint _expression )  =-    (sem_Constraint_CheckConstraint (sem_Expression _expression ) )-sem_Constraint (PrimaryKeyConstraint _stringList )  =-    (sem_Constraint_PrimaryKeyConstraint (sem_StringList _stringList ) )-sem_Constraint (ReferenceConstraint _atts _table _tableAtts _onUpdate _onDelete )  =-    (sem_Constraint_ReferenceConstraint (sem_StringList _atts ) _table (sem_StringList _tableAtts ) (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )-sem_Constraint (UniqueConstraint _stringList )  =-    (sem_Constraint_UniqueConstraint (sem_StringList _stringList ) )--- semantic domain-type T_Constraint  = Scope ->-                     ( Constraint)-data Inh_Constraint  = Inh_Constraint {scope_Inh_Constraint :: Scope}-data Syn_Constraint  = Syn_Constraint {annotatedTree_Syn_Constraint :: Constraint}-wrap_Constraint :: T_Constraint  ->-                   Inh_Constraint  ->-                   Syn_Constraint -wrap_Constraint sem (Inh_Constraint _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Constraint _lhsOannotatedTree ))-sem_Constraint_CheckConstraint :: T_Expression  ->-                                  T_Constraint -sem_Constraint_CheckConstraint expression_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Constraint-              _expressionOscope :: Scope-              _expressionIannotatedTree :: Expression-              _expressionIliftedColumnName :: String-              _annotatedTree =-                  CheckConstraint _expressionIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _expressionOscope =-                  _lhsIscope-              ( _expressionIannotatedTree,_expressionIliftedColumnName) =-                  (expression_ _expressionOscope )-          in  ( _lhsOannotatedTree)))-sem_Constraint_PrimaryKeyConstraint :: T_StringList  ->-                                       T_Constraint -sem_Constraint_PrimaryKeyConstraint stringList_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Constraint-              _stringListOscope :: Scope-              _stringListIannotatedTree :: StringList-              _stringListIstrings :: ([String])-              _annotatedTree =-                  PrimaryKeyConstraint _stringListIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _stringListOscope =-                  _lhsIscope-              ( _stringListIannotatedTree,_stringListIstrings) =-                  (stringList_ _stringListOscope )-          in  ( _lhsOannotatedTree)))-sem_Constraint_ReferenceConstraint :: T_StringList  ->-                                      String ->-                                      T_StringList  ->-                                      T_Cascade  ->-                                      T_Cascade  ->-                                      T_Constraint -sem_Constraint_ReferenceConstraint atts_ table_ tableAtts_ onUpdate_ onDelete_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Constraint-              _attsOscope :: Scope-              _tableAttsOscope :: Scope-              _onUpdateOscope :: Scope-              _onDeleteOscope :: Scope-              _attsIannotatedTree :: StringList-              _attsIstrings :: ([String])-              _tableAttsIannotatedTree :: StringList-              _tableAttsIstrings :: ([String])-              _onUpdateIannotatedTree :: Cascade-              _onDeleteIannotatedTree :: Cascade-              _annotatedTree =-                  ReferenceConstraint _attsIannotatedTree table_ _tableAttsIannotatedTree _onUpdateIannotatedTree _onDeleteIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _attsOscope =-                  _lhsIscope-              _tableAttsOscope =-                  _lhsIscope-              _onUpdateOscope =-                  _lhsIscope-              _onDeleteOscope =-                  _lhsIscope-              ( _attsIannotatedTree,_attsIstrings) =-                  (atts_ _attsOscope )-              ( _tableAttsIannotatedTree,_tableAttsIstrings) =-                  (tableAtts_ _tableAttsOscope )-              ( _onUpdateIannotatedTree) =-                  (onUpdate_ _onUpdateOscope )-              ( _onDeleteIannotatedTree) =-                  (onDelete_ _onDeleteOscope )-          in  ( _lhsOannotatedTree)))-sem_Constraint_UniqueConstraint :: T_StringList  ->-                                   T_Constraint -sem_Constraint_UniqueConstraint stringList_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Constraint-              _stringListOscope :: Scope-              _stringListIannotatedTree :: StringList-              _stringListIstrings :: ([String])-              _annotatedTree =-                  UniqueConstraint _stringListIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _stringListOscope =-                  _lhsIscope-              ( _stringListIannotatedTree,_stringListIstrings) =-                  (stringList_ _stringListOscope )-          in  ( _lhsOannotatedTree)))--- ConstraintList -----------------------------------------------type ConstraintList  = [(Constraint)]--- cata-sem_ConstraintList :: ConstraintList  ->-                      T_ConstraintList -sem_ConstraintList list  =-    (Prelude.foldr sem_ConstraintList_Cons sem_ConstraintList_Nil (Prelude.map sem_Constraint list) )--- semantic domain-type T_ConstraintList  = Scope ->-                         ( ConstraintList)-data Inh_ConstraintList  = Inh_ConstraintList {scope_Inh_ConstraintList :: Scope}-data Syn_ConstraintList  = Syn_ConstraintList {annotatedTree_Syn_ConstraintList :: ConstraintList}-wrap_ConstraintList :: T_ConstraintList  ->-                       Inh_ConstraintList  ->-                       Syn_ConstraintList -wrap_ConstraintList sem (Inh_ConstraintList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_ConstraintList _lhsOannotatedTree ))-sem_ConstraintList_Cons :: T_Constraint  ->-                           T_ConstraintList  ->-                           T_ConstraintList -sem_ConstraintList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ConstraintList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: Constraint-              _tlIannotatedTree :: ConstraintList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_ConstraintList_Nil :: T_ConstraintList -sem_ConstraintList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ConstraintList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- CopySource ---------------------------------------------------data CopySource  = CopyFilename (String) -                 | Stdin -                 deriving ( Eq,Show)--- cata-sem_CopySource :: CopySource  ->-                  T_CopySource -sem_CopySource (CopyFilename _string )  =-    (sem_CopySource_CopyFilename _string )-sem_CopySource (Stdin )  =-    (sem_CopySource_Stdin )--- semantic domain-type T_CopySource  = Scope ->-                     ( CopySource)-data Inh_CopySource  = Inh_CopySource {scope_Inh_CopySource :: Scope}-data Syn_CopySource  = Syn_CopySource {annotatedTree_Syn_CopySource :: CopySource}-wrap_CopySource :: T_CopySource  ->-                   Inh_CopySource  ->-                   Syn_CopySource -wrap_CopySource sem (Inh_CopySource _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_CopySource _lhsOannotatedTree ))-sem_CopySource_CopyFilename :: String ->-                               T_CopySource -sem_CopySource_CopyFilename string_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CopySource-              _annotatedTree =-                  CopyFilename string_-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_CopySource_Stdin :: T_CopySource -sem_CopySource_Stdin  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: CopySource-              _annotatedTree =-                  Stdin-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Direction ----------------------------------------------------data Direction  = Asc -                | Desc -                deriving ( Eq,Show)--- cata-sem_Direction :: Direction  ->-                 T_Direction -sem_Direction (Asc )  =-    (sem_Direction_Asc )-sem_Direction (Desc )  =-    (sem_Direction_Desc )--- semantic domain-type T_Direction  = Scope ->-                    ( Direction)-data Inh_Direction  = Inh_Direction {scope_Inh_Direction :: Scope}-data Syn_Direction  = Syn_Direction {annotatedTree_Syn_Direction :: Direction}-wrap_Direction :: T_Direction  ->-                  Inh_Direction  ->-                  Syn_Direction -wrap_Direction sem (Inh_Direction _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Direction _lhsOannotatedTree ))-sem_Direction_Asc :: T_Direction -sem_Direction_Asc  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Direction-              _annotatedTree =-                  Asc-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Direction_Desc :: T_Direction -sem_Direction_Desc  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Direction-              _annotatedTree =-                  Desc-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Distinct -----------------------------------------------------data Distinct  = Distinct -               | Dupes -               deriving ( Eq,Show)--- cata-sem_Distinct :: Distinct  ->-                T_Distinct -sem_Distinct (Distinct )  =-    (sem_Distinct_Distinct )-sem_Distinct (Dupes )  =-    (sem_Distinct_Dupes )--- semantic domain-type T_Distinct  = Scope ->-                   ( Distinct)-data Inh_Distinct  = Inh_Distinct {scope_Inh_Distinct :: Scope}-data Syn_Distinct  = Syn_Distinct {annotatedTree_Syn_Distinct :: Distinct}-wrap_Distinct :: T_Distinct  ->-                 Inh_Distinct  ->-                 Syn_Distinct -wrap_Distinct sem (Inh_Distinct _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Distinct _lhsOannotatedTree ))-sem_Distinct_Distinct :: T_Distinct -sem_Distinct_Distinct  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Distinct-              _annotatedTree =-                  Distinct-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Distinct_Dupes :: T_Distinct -sem_Distinct_Dupes  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Distinct-              _annotatedTree =-                  Dupes-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- DropType -----------------------------------------------------data DropType  = Domain -               | Table -               | Type -               | View -               deriving ( Eq,Show)--- cata-sem_DropType :: DropType  ->-                T_DropType -sem_DropType (Domain )  =-    (sem_DropType_Domain )-sem_DropType (Table )  =-    (sem_DropType_Table )-sem_DropType (Type )  =-    (sem_DropType_Type )-sem_DropType (View )  =-    (sem_DropType_View )--- semantic domain-type T_DropType  = Scope ->-                   ( DropType)-data Inh_DropType  = Inh_DropType {scope_Inh_DropType :: Scope}-data Syn_DropType  = Syn_DropType {annotatedTree_Syn_DropType :: DropType}-wrap_DropType :: T_DropType  ->-                 Inh_DropType  ->-                 Syn_DropType -wrap_DropType sem (Inh_DropType _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_DropType _lhsOannotatedTree ))-sem_DropType_Domain :: T_DropType -sem_DropType_Domain  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: DropType-              _annotatedTree =-                  Domain-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_DropType_Table :: T_DropType -sem_DropType_Table  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: DropType-              _annotatedTree =-                  Table-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_DropType_Type :: T_DropType -sem_DropType_Type  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: DropType-              _annotatedTree =-                  Type-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_DropType_View :: T_DropType -sem_DropType_View  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: DropType-              _annotatedTree =-                  View-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Expression ---------------------------------------------------data Expression  = BooleanLit (Annotation) (Bool) -                 | Case (Annotation) (CaseExpressionListExpressionPairList) (MaybeExpression) -                 | CaseSimple (Annotation) (Expression) (CaseExpressionListExpressionPairList) (MaybeExpression) -                 | Cast (Annotation) (Expression) (TypeName) -                 | Exists (Annotation) (SelectExpression) -                 | FloatLit (Annotation) (Double) -                 | FunCall (Annotation) (String) (ExpressionList) -                 | Identifier (Annotation) (String) -                 | InPredicate (Annotation) (Expression) (Bool) (InList) -                 | IntegerLit (Annotation) (Integer) -                 | NullLit (Annotation) -                 | PositionalArg (Annotation) (Integer) -                 | ScalarSubQuery (Annotation) (SelectExpression) -                 | StringLit (Annotation) (String) (String) -                 | WindowFn (Annotation) (Expression) (ExpressionList) (ExpressionList) (Direction) -                 deriving ( Eq,Show)--- cata-sem_Expression :: Expression  ->-                  T_Expression -sem_Expression (BooleanLit _ann _b )  =-    (sem_Expression_BooleanLit _ann _b )-sem_Expression (Case _ann _cases _els )  =-    (sem_Expression_Case _ann (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )-sem_Expression (CaseSimple _ann _value _cases _els )  =-    (sem_Expression_CaseSimple _ann (sem_Expression _value ) (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )-sem_Expression (Cast _ann _expr _tn )  =-    (sem_Expression_Cast _ann (sem_Expression _expr ) (sem_TypeName _tn ) )-sem_Expression (Exists _ann _sel )  =-    (sem_Expression_Exists _ann (sem_SelectExpression _sel ) )-sem_Expression (FloatLit _ann _d )  =-    (sem_Expression_FloatLit _ann _d )-sem_Expression (FunCall _ann _funName _args )  =-    (sem_Expression_FunCall _ann _funName (sem_ExpressionList _args ) )-sem_Expression (Identifier _ann _i )  =-    (sem_Expression_Identifier _ann _i )-sem_Expression (InPredicate _ann _expr _i _list )  =-    (sem_Expression_InPredicate _ann (sem_Expression _expr ) _i (sem_InList _list ) )-sem_Expression (IntegerLit _ann _i )  =-    (sem_Expression_IntegerLit _ann _i )-sem_Expression (NullLit _ann )  =-    (sem_Expression_NullLit _ann )-sem_Expression (PositionalArg _ann _p )  =-    (sem_Expression_PositionalArg _ann _p )-sem_Expression (ScalarSubQuery _ann _sel )  =-    (sem_Expression_ScalarSubQuery _ann (sem_SelectExpression _sel ) )-sem_Expression (StringLit _ann _quote _value )  =-    (sem_Expression_StringLit _ann _quote _value )-sem_Expression (WindowFn _ann _fn _partitionBy _orderBy _dir )  =-    (sem_Expression_WindowFn _ann (sem_Expression _fn ) (sem_ExpressionList _partitionBy ) (sem_ExpressionList _orderBy ) (sem_Direction _dir ) )--- semantic domain-type T_Expression  = Scope ->-                     ( Expression,String)-data Inh_Expression  = Inh_Expression {scope_Inh_Expression :: Scope}-data Syn_Expression  = Syn_Expression {annotatedTree_Syn_Expression :: Expression,liftedColumnName_Syn_Expression :: String}-wrap_Expression :: T_Expression  ->-                   Inh_Expression  ->-                   Syn_Expression -wrap_Expression sem (Inh_Expression _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOliftedColumnName) =-             (sem _lhsIscope )-     in  (Syn_Expression _lhsOannotatedTree _lhsOliftedColumnName ))-sem_Expression_BooleanLit :: Annotation ->-                             Bool ->-                             T_Expression -sem_Expression_BooleanLit ann_ b_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _backTree =-                  BooleanLit ann_ b_-              _tpe =-                  Right typeBool-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  BooleanLit ann_ b_-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_Case :: Annotation ->-                       T_CaseExpressionListExpressionPairList  ->-                       T_MaybeExpression  ->-                       T_Expression -sem_Expression_Case ann_ cases_ els_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _casesOscope :: Scope-              _elsOscope :: Scope-              _casesIannotatedTree :: CaseExpressionListExpressionPairList-              _elsIannotatedTree :: MaybeExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _whenTypes =-                  map getTypeAnnotation $ concatMap fst $-                  _casesIannotatedTree-              _thenTypes =-                  map getTypeAnnotation $-                      (map snd $ _casesIannotatedTree) ++-                        maybeToList _elsIannotatedTree-              _tpe =-                  checkTypes _whenTypes     $ do-                     when (any (/= typeBool) _whenTypes    ) $-                       Left [WrongTypes typeBool _whenTypes    ]-                     checkTypes _thenTypes     $-                              resolveResultSetType-                                _lhsIscope-                                _thenTypes-              _backTree =-                  Case ann_ _casesIannotatedTree _elsIannotatedTree-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  Case ann_ _casesIannotatedTree _elsIannotatedTree-              _casesOscope =-                  _lhsIscope-              _elsOscope =-                  _lhsIscope-              ( _casesIannotatedTree) =-                  (cases_ _casesOscope )-              ( _elsIannotatedTree) =-                  (els_ _elsOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_CaseSimple :: Annotation ->-                             T_Expression  ->-                             T_CaseExpressionListExpressionPairList  ->-                             T_MaybeExpression  ->-                             T_Expression -sem_Expression_CaseSimple ann_ value_ cases_ els_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _valueOscope :: Scope-              _casesOscope :: Scope-              _elsOscope :: Scope-              _valueIannotatedTree :: Expression-              _valueIliftedColumnName :: String-              _casesIannotatedTree :: CaseExpressionListExpressionPairList-              _elsIannotatedTree :: MaybeExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _whenTypes =-                  map getTypeAnnotation $ concatMap fst $-                  _casesIannotatedTree-              _thenTypes =-                  map getTypeAnnotation $-                      (map snd $ _casesIannotatedTree) ++-                        maybeToList _elsIannotatedTree-              _tpe =-                  checkTypes _whenTypes     $ do-                  checkWhenTypes <- resolveResultSetType-                                         _lhsIscope-                                         (getTypeAnnotation _valueIannotatedTree: _whenTypes    )-                  checkTypes _thenTypes     $-                             resolveResultSetType-                                      _lhsIscope-                                      _thenTypes-              _backTree =-                  CaseSimple ann_ _valueIannotatedTree _casesIannotatedTree _elsIannotatedTree-              _lhsOliftedColumnName =-                  _valueIliftedColumnName-              _annotatedTree =-                  CaseSimple ann_ _valueIannotatedTree _casesIannotatedTree _elsIannotatedTree-              _valueOscope =-                  _lhsIscope-              _casesOscope =-                  _lhsIscope-              _elsOscope =-                  _lhsIscope-              ( _valueIannotatedTree,_valueIliftedColumnName) =-                  (value_ _valueOscope )-              ( _casesIannotatedTree) =-                  (cases_ _casesOscope )-              ( _elsIannotatedTree) =-                  (els_ _elsOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_Cast :: Annotation ->-                       T_Expression  ->-                       T_TypeName  ->-                       T_Expression -sem_Expression_Cast ann_ expr_ tn_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _exprOscope :: Scope-              _tnOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _tnIannotatedTree :: TypeName-              _tnInamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  _tnInamedType-              _backTree =-                  Cast ann_ _exprIannotatedTree _tnIannotatedTree-              _lhsOliftedColumnName =-                  case _tnIannotatedTree of-                    SimpleTypeName tn -> tn-                    _ -> ""-              _annotatedTree =-                  Cast ann_ _exprIannotatedTree _tnIannotatedTree-              _exprOscope =-                  _lhsIscope-              _tnOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-              ( _tnIannotatedTree,_tnInamedType) =-                  (tn_ _tnOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_Exists :: Annotation ->-                         T_SelectExpression  ->-                         T_Expression -sem_Expression_Exists ann_ sel_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _selOscope :: Scope-              _selIannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  Right typeBool-              _backTree =-                  Exists ann_ _selIannotatedTree-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  Exists ann_ _selIannotatedTree-              _selOscope =-                  _lhsIscope-              ( _selIannotatedTree) =-                  (sel_ _selOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_FloatLit :: Annotation ->-                           Double ->-                           T_Expression -sem_Expression_FloatLit ann_ d_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _backTree =-                  FloatLit ann_ d_-              _tpe =-                  Right typeNumeric-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  FloatLit ann_ d_-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_FunCall :: Annotation ->-                          String ->-                          T_ExpressionList  ->-                          T_Expression -sem_Expression_FunCall ann_ funName_ args_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _argsOscope :: Scope-              _argsIannotatedTree :: ExpressionList-              _argsItypeList :: ([Type])-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  checkTypes _argsItypeList $-                    typeCheckFunCall-                      _lhsIscope-                      funName_-                      _argsItypeList-              _backTree =-                  FunCall ann_ funName_ _argsIannotatedTree-              _lhsOliftedColumnName =-                  if isOperator funName_-                     then ""-                     else funName_-              _annotatedTree =-                  FunCall ann_ funName_ _argsIannotatedTree-              _argsOscope =-                  _lhsIscope-              ( _argsIannotatedTree,_argsItypeList) =-                  (args_ _argsOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_Identifier :: Annotation ->-                             String ->-                             T_Expression -sem_Expression_Identifier ann_ i_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  let (correlationName,iden) = splitIdentifier i_-                  in scopeLookupID _lhsIscope correlationName iden-              _backTree =-                  Identifier ann_ i_-              _lhsOliftedColumnName =-                  i_-              _annotatedTree =-                  Identifier ann_ i_-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_InPredicate :: Annotation ->-                              T_Expression  ->-                              Bool ->-                              T_InList  ->-                              T_Expression -sem_Expression_InPredicate ann_ expr_ i_ list_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _exprOscope :: Scope-              _listOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _listIannotatedTree :: InList-              _listIlistType :: (Either [TypeError] Type)-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  do-                    lt <- _listIlistType-                    ty <- resolveResultSetType-                            _lhsIscope-                            [getTypeAnnotation _exprIannotatedTree, lt]-                    return typeBool-              _backTree =-                  InPredicate ann_ _exprIannotatedTree i_ _listIannotatedTree-              _lhsOliftedColumnName =-                  _exprIliftedColumnName-              _annotatedTree =-                  InPredicate ann_ _exprIannotatedTree i_ _listIannotatedTree-              _exprOscope =-                  _lhsIscope-              _listOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-              ( _listIannotatedTree,_listIlistType) =-                  (list_ _listOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_IntegerLit :: Annotation ->-                             Integer ->-                             T_Expression -sem_Expression_IntegerLit ann_ i_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _backTree =-                  IntegerLit ann_ i_-              _tpe =-                  Right typeInt-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  IntegerLit ann_ i_-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_NullLit :: Annotation ->-                          T_Expression -sem_Expression_NullLit ann_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _backTree =-                  NullLit ann_-              _tpe =-                  Right UnknownStringLit-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  NullLit ann_-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_PositionalArg :: Annotation ->-                                Integer ->-                                T_Expression -sem_Expression_PositionalArg ann_ p_  =-    (\ _lhsIscope ->-         (let _lhsOliftedColumnName :: String-              _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  PositionalArg ann_ p_-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_ScalarSubQuery :: Annotation ->-                                 T_SelectExpression  ->-                                 T_Expression -sem_Expression_ScalarSubQuery ann_ sel_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _selOscope :: Scope-              _selIannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  let selType = getTypeAnnotation _selIannotatedTree-                  in checkTypes [selType]-                       $ let f = map snd $ unwrapComposite $ unwrapSetOf selType-                         in case length f of-                              0 -> error "internal error: no columns in scalar subquery?"-                              1 -> Right $ head f-                              _ -> Right $ RowCtor f-              _backTree =-                  ScalarSubQuery ann_ _selIannotatedTree-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  ScalarSubQuery ann_ _selIannotatedTree-              _selOscope =-                  _lhsIscope-              ( _selIannotatedTree) =-                  (sel_ _selOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_StringLit :: Annotation ->-                            String ->-                            String ->-                            T_Expression -sem_Expression_StringLit ann_ quote_ value_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _backTree =-                  StringLit ann_ quote_ value_-              _tpe =-                  Right UnknownStringLit-              _lhsOliftedColumnName =-                  ""-              _annotatedTree =-                  StringLit ann_ quote_ value_-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))-sem_Expression_WindowFn :: Annotation ->-                           T_Expression  ->-                           T_ExpressionList  ->-                           T_ExpressionList  ->-                           T_Direction  ->-                           T_Expression -sem_Expression_WindowFn ann_ fn_ partitionBy_ orderBy_ dir_  =-    (\ _lhsIscope ->-         (let _lhsOliftedColumnName :: String-              _lhsOannotatedTree :: Expression-              _fnOscope :: Scope-              _partitionByOscope :: Scope-              _orderByOscope :: Scope-              _dirOscope :: Scope-              _fnIannotatedTree :: Expression-              _fnIliftedColumnName :: String-              _partitionByIannotatedTree :: ExpressionList-              _partitionByItypeList :: ([Type])-              _orderByIannotatedTree :: ExpressionList-              _orderByItypeList :: ([Type])-              _dirIannotatedTree :: Direction-              _lhsOliftedColumnName =-                  _fnIliftedColumnName-              _annotatedTree =-                  WindowFn ann_ _fnIannotatedTree _partitionByIannotatedTree _orderByIannotatedTree _dirIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _fnOscope =-                  _lhsIscope-              _partitionByOscope =-                  _lhsIscope-              _orderByOscope =-                  _lhsIscope-              _dirOscope =-                  _lhsIscope-              ( _fnIannotatedTree,_fnIliftedColumnName) =-                  (fn_ _fnOscope )-              ( _partitionByIannotatedTree,_partitionByItypeList) =-                  (partitionBy_ _partitionByOscope )-              ( _orderByIannotatedTree,_orderByItypeList) =-                  (orderBy_ _orderByOscope )-              ( _dirIannotatedTree) =-                  (dir_ _dirOscope )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName)))--- ExpressionList -----------------------------------------------type ExpressionList  = [(Expression)]--- cata-sem_ExpressionList :: ExpressionList  ->-                      T_ExpressionList -sem_ExpressionList list  =-    (Prelude.foldr sem_ExpressionList_Cons sem_ExpressionList_Nil (Prelude.map sem_Expression list) )--- semantic domain-type T_ExpressionList  = Scope ->-                         ( ExpressionList,([Type]))-data Inh_ExpressionList  = Inh_ExpressionList {scope_Inh_ExpressionList :: Scope}-data Syn_ExpressionList  = Syn_ExpressionList {annotatedTree_Syn_ExpressionList :: ExpressionList,typeList_Syn_ExpressionList :: [Type]}-wrap_ExpressionList :: T_ExpressionList  ->-                       Inh_ExpressionList  ->-                       Syn_ExpressionList -wrap_ExpressionList sem (Inh_ExpressionList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOtypeList) =-             (sem _lhsIscope )-     in  (Syn_ExpressionList _lhsOannotatedTree _lhsOtypeList ))-sem_ExpressionList_Cons :: T_Expression  ->-                           T_ExpressionList  ->-                           T_ExpressionList -sem_ExpressionList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOtypeList :: ([Type])-              _lhsOannotatedTree :: ExpressionList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: Expression-              _hdIliftedColumnName :: String-              _tlIannotatedTree :: ExpressionList-              _tlItypeList :: ([Type])-              _lhsOtypeList =-                  getTypeAnnotation _hdIannotatedTree : _tlItypeList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdIliftedColumnName) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlItypeList) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOtypeList)))-sem_ExpressionList_Nil :: T_ExpressionList -sem_ExpressionList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOtypeList :: ([Type])-              _lhsOannotatedTree :: ExpressionList-              _lhsOtypeList =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOtypeList)))--- ExpressionListList -------------------------------------------type ExpressionListList  = [(ExpressionList)]--- cata-sem_ExpressionListList :: ExpressionListList  ->-                          T_ExpressionListList -sem_ExpressionListList list  =-    (Prelude.foldr sem_ExpressionListList_Cons sem_ExpressionListList_Nil (Prelude.map sem_ExpressionList list) )--- semantic domain-type T_ExpressionListList  = Scope ->-                             ( ExpressionListList,([[Type]]))-data Inh_ExpressionListList  = Inh_ExpressionListList {scope_Inh_ExpressionListList :: Scope}-data Syn_ExpressionListList  = Syn_ExpressionListList {annotatedTree_Syn_ExpressionListList :: ExpressionListList,typeListList_Syn_ExpressionListList :: [[Type]]}-wrap_ExpressionListList :: T_ExpressionListList  ->-                           Inh_ExpressionListList  ->-                           Syn_ExpressionListList -wrap_ExpressionListList sem (Inh_ExpressionListList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOtypeListList) =-             (sem _lhsIscope )-     in  (Syn_ExpressionListList _lhsOannotatedTree _lhsOtypeListList ))-sem_ExpressionListList_Cons :: T_ExpressionList  ->-                               T_ExpressionListList  ->-                               T_ExpressionListList -sem_ExpressionListList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOtypeListList :: ([[Type]])-              _lhsOannotatedTree :: ExpressionListList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: ExpressionList-              _hdItypeList :: ([Type])-              _tlIannotatedTree :: ExpressionListList-              _tlItypeListList :: ([[Type]])-              _lhsOtypeListList =-                  _hdItypeList : _tlItypeListList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdItypeList) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlItypeListList) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOtypeListList)))-sem_ExpressionListList_Nil :: T_ExpressionListList -sem_ExpressionListList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOtypeListList :: ([[Type]])-              _lhsOannotatedTree :: ExpressionListList-              _lhsOtypeListList =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOtypeListList)))--- ExpressionListStatementListPair ------------------------------type ExpressionListStatementListPair  = ( (ExpressionList),(StatementList))--- cata-sem_ExpressionListStatementListPair :: ExpressionListStatementListPair  ->-                                       T_ExpressionListStatementListPair -sem_ExpressionListStatementListPair ( x1,x2)  =-    (sem_ExpressionListStatementListPair_Tuple (sem_ExpressionList x1 ) (sem_StatementList x2 ) )--- semantic domain-type T_ExpressionListStatementListPair  = Scope ->-                                          ( ExpressionListStatementListPair)-data Inh_ExpressionListStatementListPair  = Inh_ExpressionListStatementListPair {scope_Inh_ExpressionListStatementListPair :: Scope}-data Syn_ExpressionListStatementListPair  = Syn_ExpressionListStatementListPair {annotatedTree_Syn_ExpressionListStatementListPair :: ExpressionListStatementListPair}-wrap_ExpressionListStatementListPair :: T_ExpressionListStatementListPair  ->-                                        Inh_ExpressionListStatementListPair  ->-                                        Syn_ExpressionListStatementListPair -wrap_ExpressionListStatementListPair sem (Inh_ExpressionListStatementListPair _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_ExpressionListStatementListPair _lhsOannotatedTree ))-sem_ExpressionListStatementListPair_Tuple :: T_ExpressionList  ->-                                             T_StatementList  ->-                                             T_ExpressionListStatementListPair -sem_ExpressionListStatementListPair_Tuple x1_ x2_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionListStatementListPair-              _x1Oscope :: Scope-              _x2Oscope :: Scope-              _x1IannotatedTree :: ExpressionList-              _x1ItypeList :: ([Type])-              _x2IannotatedTree :: StatementList-              _annotatedTree =-                  (_x1IannotatedTree,_x2IannotatedTree)-              _lhsOannotatedTree =-                  _annotatedTree-              _x1Oscope =-                  _lhsIscope-              _x2Oscope =-                  _lhsIscope-              ( _x1IannotatedTree,_x1ItypeList) =-                  (x1_ _x1Oscope )-              ( _x2IannotatedTree) =-                  (x2_ _x2Oscope )-          in  ( _lhsOannotatedTree)))--- ExpressionListStatementListPairList --------------------------type ExpressionListStatementListPairList  = [(ExpressionListStatementListPair)]--- cata-sem_ExpressionListStatementListPairList :: ExpressionListStatementListPairList  ->-                                           T_ExpressionListStatementListPairList -sem_ExpressionListStatementListPairList list  =-    (Prelude.foldr sem_ExpressionListStatementListPairList_Cons sem_ExpressionListStatementListPairList_Nil (Prelude.map sem_ExpressionListStatementListPair list) )--- semantic domain-type T_ExpressionListStatementListPairList  = Scope ->-                                              ( ExpressionListStatementListPairList)-data Inh_ExpressionListStatementListPairList  = Inh_ExpressionListStatementListPairList {scope_Inh_ExpressionListStatementListPairList :: Scope}-data Syn_ExpressionListStatementListPairList  = Syn_ExpressionListStatementListPairList {annotatedTree_Syn_ExpressionListStatementListPairList :: ExpressionListStatementListPairList}-wrap_ExpressionListStatementListPairList :: T_ExpressionListStatementListPairList  ->-                                            Inh_ExpressionListStatementListPairList  ->-                                            Syn_ExpressionListStatementListPairList -wrap_ExpressionListStatementListPairList sem (Inh_ExpressionListStatementListPairList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_ExpressionListStatementListPairList _lhsOannotatedTree ))-sem_ExpressionListStatementListPairList_Cons :: T_ExpressionListStatementListPair  ->-                                                T_ExpressionListStatementListPairList  ->-                                                T_ExpressionListStatementListPairList -sem_ExpressionListStatementListPairList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionListStatementListPairList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: ExpressionListStatementListPair-              _tlIannotatedTree :: ExpressionListStatementListPairList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_ExpressionListStatementListPairList_Nil :: T_ExpressionListStatementListPairList -sem_ExpressionListStatementListPairList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionListStatementListPairList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- ExpressionRoot -----------------------------------------------data ExpressionRoot  = ExpressionRoot (Expression) -                     deriving ( Show)--- cata-sem_ExpressionRoot :: ExpressionRoot  ->-                      T_ExpressionRoot -sem_ExpressionRoot (ExpressionRoot _expr )  =-    (sem_ExpressionRoot_ExpressionRoot (sem_Expression _expr ) )--- semantic domain-type T_ExpressionRoot  = Scope ->-                         ( ExpressionRoot)-data Inh_ExpressionRoot  = Inh_ExpressionRoot {scope_Inh_ExpressionRoot :: Scope}-data Syn_ExpressionRoot  = Syn_ExpressionRoot {annotatedTree_Syn_ExpressionRoot :: ExpressionRoot}-wrap_ExpressionRoot :: T_ExpressionRoot  ->-                       Inh_ExpressionRoot  ->-                       Syn_ExpressionRoot -wrap_ExpressionRoot sem (Inh_ExpressionRoot _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_ExpressionRoot _lhsOannotatedTree ))-sem_ExpressionRoot_ExpressionRoot :: T_Expression  ->-                                     T_ExpressionRoot -sem_ExpressionRoot_ExpressionRoot expr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionRoot-              _exprOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _annotatedTree =-                  ExpressionRoot _exprIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-          in  ( _lhsOannotatedTree)))--- ExpressionStatementListPair ----------------------------------type ExpressionStatementListPair  = ( (Expression),(StatementList))--- cata-sem_ExpressionStatementListPair :: ExpressionStatementListPair  ->-                                   T_ExpressionStatementListPair -sem_ExpressionStatementListPair ( x1,x2)  =-    (sem_ExpressionStatementListPair_Tuple (sem_Expression x1 ) (sem_StatementList x2 ) )--- semantic domain-type T_ExpressionStatementListPair  = Scope ->-                                      ( ExpressionStatementListPair)-data Inh_ExpressionStatementListPair  = Inh_ExpressionStatementListPair {scope_Inh_ExpressionStatementListPair :: Scope}-data Syn_ExpressionStatementListPair  = Syn_ExpressionStatementListPair {annotatedTree_Syn_ExpressionStatementListPair :: ExpressionStatementListPair}-wrap_ExpressionStatementListPair :: T_ExpressionStatementListPair  ->-                                    Inh_ExpressionStatementListPair  ->-                                    Syn_ExpressionStatementListPair -wrap_ExpressionStatementListPair sem (Inh_ExpressionStatementListPair _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_ExpressionStatementListPair _lhsOannotatedTree ))-sem_ExpressionStatementListPair_Tuple :: T_Expression  ->-                                         T_StatementList  ->-                                         T_ExpressionStatementListPair -sem_ExpressionStatementListPair_Tuple x1_ x2_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionStatementListPair-              _x1Oscope :: Scope-              _x2Oscope :: Scope-              _x1IannotatedTree :: Expression-              _x1IliftedColumnName :: String-              _x2IannotatedTree :: StatementList-              _annotatedTree =-                  (_x1IannotatedTree,_x2IannotatedTree)-              _lhsOannotatedTree =-                  _annotatedTree-              _x1Oscope =-                  _lhsIscope-              _x2Oscope =-                  _lhsIscope-              ( _x1IannotatedTree,_x1IliftedColumnName) =-                  (x1_ _x1Oscope )-              ( _x2IannotatedTree) =-                  (x2_ _x2Oscope )-          in  ( _lhsOannotatedTree)))--- ExpressionStatementListPairList ------------------------------type ExpressionStatementListPairList  = [(ExpressionStatementListPair)]--- cata-sem_ExpressionStatementListPairList :: ExpressionStatementListPairList  ->-                                       T_ExpressionStatementListPairList -sem_ExpressionStatementListPairList list  =-    (Prelude.foldr sem_ExpressionStatementListPairList_Cons sem_ExpressionStatementListPairList_Nil (Prelude.map sem_ExpressionStatementListPair list) )--- semantic domain-type T_ExpressionStatementListPairList  = Scope ->-                                          ( ExpressionStatementListPairList)-data Inh_ExpressionStatementListPairList  = Inh_ExpressionStatementListPairList {scope_Inh_ExpressionStatementListPairList :: Scope}-data Syn_ExpressionStatementListPairList  = Syn_ExpressionStatementListPairList {annotatedTree_Syn_ExpressionStatementListPairList :: ExpressionStatementListPairList}-wrap_ExpressionStatementListPairList :: T_ExpressionStatementListPairList  ->-                                        Inh_ExpressionStatementListPairList  ->-                                        Syn_ExpressionStatementListPairList -wrap_ExpressionStatementListPairList sem (Inh_ExpressionStatementListPairList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_ExpressionStatementListPairList _lhsOannotatedTree ))-sem_ExpressionStatementListPairList_Cons :: T_ExpressionStatementListPair  ->-                                            T_ExpressionStatementListPairList  ->-                                            T_ExpressionStatementListPairList -sem_ExpressionStatementListPairList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionStatementListPairList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: ExpressionStatementListPair-              _tlIannotatedTree :: ExpressionStatementListPairList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_ExpressionStatementListPairList_Nil :: T_ExpressionStatementListPairList -sem_ExpressionStatementListPairList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: ExpressionStatementListPairList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- FnBody -------------------------------------------------------data FnBody  = PlpgsqlFnBody (VarDefList) (StatementList) -             | SqlFnBody (StatementList) -             deriving ( Eq,Show)--- cata-sem_FnBody :: FnBody  ->-              T_FnBody -sem_FnBody (PlpgsqlFnBody _varDefList _sts )  =-    (sem_FnBody_PlpgsqlFnBody (sem_VarDefList _varDefList ) (sem_StatementList _sts ) )-sem_FnBody (SqlFnBody _sts )  =-    (sem_FnBody_SqlFnBody (sem_StatementList _sts ) )--- semantic domain-type T_FnBody  = Scope ->-                 ( FnBody)-data Inh_FnBody  = Inh_FnBody {scope_Inh_FnBody :: Scope}-data Syn_FnBody  = Syn_FnBody {annotatedTree_Syn_FnBody :: FnBody}-wrap_FnBody :: T_FnBody  ->-               Inh_FnBody  ->-               Syn_FnBody -wrap_FnBody sem (Inh_FnBody _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_FnBody _lhsOannotatedTree ))-sem_FnBody_PlpgsqlFnBody :: T_VarDefList  ->-                            T_StatementList  ->-                            T_FnBody -sem_FnBody_PlpgsqlFnBody varDefList_ sts_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: FnBody-              _varDefListOscope :: Scope-              _stsOscope :: Scope-              _varDefListIannotatedTree :: VarDefList-              _stsIannotatedTree :: StatementList-              _annotatedTree =-                  PlpgsqlFnBody _varDefListIannotatedTree _stsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _varDefListOscope =-                  _lhsIscope-              _stsOscope =-                  _lhsIscope-              ( _varDefListIannotatedTree) =-                  (varDefList_ _varDefListOscope )-              ( _stsIannotatedTree) =-                  (sts_ _stsOscope )-          in  ( _lhsOannotatedTree)))-sem_FnBody_SqlFnBody :: T_StatementList  ->-                        T_FnBody -sem_FnBody_SqlFnBody sts_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: FnBody-              _stsOscope :: Scope-              _stsIannotatedTree :: StatementList-              _annotatedTree =-                  SqlFnBody _stsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _stsOscope =-                  _lhsIscope-              ( _stsIannotatedTree) =-                  (sts_ _stsOscope )-          in  ( _lhsOannotatedTree)))--- IfExists -----------------------------------------------------data IfExists  = IfExists -               | Require -               deriving ( Eq,Show)--- cata-sem_IfExists :: IfExists  ->-                T_IfExists -sem_IfExists (IfExists )  =-    (sem_IfExists_IfExists )-sem_IfExists (Require )  =-    (sem_IfExists_Require )--- semantic domain-type T_IfExists  = Scope ->-                   ( IfExists)-data Inh_IfExists  = Inh_IfExists {scope_Inh_IfExists :: Scope}-data Syn_IfExists  = Syn_IfExists {annotatedTree_Syn_IfExists :: IfExists}-wrap_IfExists :: T_IfExists  ->-                 Inh_IfExists  ->-                 Syn_IfExists -wrap_IfExists sem (Inh_IfExists _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_IfExists _lhsOannotatedTree ))-sem_IfExists_IfExists :: T_IfExists -sem_IfExists_IfExists  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: IfExists-              _annotatedTree =-                  IfExists-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_IfExists_Require :: T_IfExists -sem_IfExists_Require  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: IfExists-              _annotatedTree =-                  Require-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- InList -------------------------------------------------------data InList  = InList (ExpressionList) -             | InSelect (SelectExpression) -             deriving ( Eq,Show)--- cata-sem_InList :: InList  ->-              T_InList -sem_InList (InList _exprs )  =-    (sem_InList_InList (sem_ExpressionList _exprs ) )-sem_InList (InSelect _sel )  =-    (sem_InList_InSelect (sem_SelectExpression _sel ) )--- semantic domain-type T_InList  = Scope ->-                 ( InList,(Either [TypeError] Type))-data Inh_InList  = Inh_InList {scope_Inh_InList :: Scope}-data Syn_InList  = Syn_InList {annotatedTree_Syn_InList :: InList,listType_Syn_InList :: Either [TypeError] Type}-wrap_InList :: T_InList  ->-               Inh_InList  ->-               Syn_InList -wrap_InList sem (Inh_InList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOlistType) =-             (sem _lhsIscope )-     in  (Syn_InList _lhsOannotatedTree _lhsOlistType ))-sem_InList_InList :: T_ExpressionList  ->-                     T_InList -sem_InList_InList exprs_  =-    (\ _lhsIscope ->-         (let _lhsOlistType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: InList-              _exprsOscope :: Scope-              _exprsIannotatedTree :: ExpressionList-              _exprsItypeList :: ([Type])-              _lhsOlistType =-                  resolveResultSetType-                    _lhsIscope-                    _exprsItypeList-              _annotatedTree =-                  InList _exprsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprsOscope =-                  _lhsIscope-              ( _exprsIannotatedTree,_exprsItypeList) =-                  (exprs_ _exprsOscope )-          in  ( _lhsOannotatedTree,_lhsOlistType)))-sem_InList_InSelect :: T_SelectExpression  ->-                       T_InList -sem_InList_InSelect sel_  =-    (\ _lhsIscope ->-         (let _lhsOlistType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: InList-              _selOscope :: Scope-              _selIannotatedTree :: SelectExpression-              _lhsOlistType =-                  let attrs = map snd $ unwrapComposite $ unwrapSetOf $ getTypeAnnotation _selIannotatedTree-                      typ =  case length attrs of-                               0 -> error "internal error - got subquery with no columns? in inselect"-                               1 -> head attrs-                               _ -> RowCtor attrs-                  in checkTypes attrs $ Right typ-              _annotatedTree =-                  InSelect _selIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _selOscope =-                  _lhsIscope-              ( _selIannotatedTree) =-                  (sel_ _selOscope )-          in  ( _lhsOannotatedTree,_lhsOlistType)))--- JoinExpression -----------------------------------------------data JoinExpression  = JoinOn (Expression) -                     | JoinUsing (StringList) -                     deriving ( Eq,Show)--- cata-sem_JoinExpression :: JoinExpression  ->-                      T_JoinExpression -sem_JoinExpression (JoinOn _expression )  =-    (sem_JoinExpression_JoinOn (sem_Expression _expression ) )-sem_JoinExpression (JoinUsing _stringList )  =-    (sem_JoinExpression_JoinUsing (sem_StringList _stringList ) )--- semantic domain-type T_JoinExpression  = Scope ->-                         ( JoinExpression)-data Inh_JoinExpression  = Inh_JoinExpression {scope_Inh_JoinExpression :: Scope}-data Syn_JoinExpression  = Syn_JoinExpression {annotatedTree_Syn_JoinExpression :: JoinExpression}-wrap_JoinExpression :: T_JoinExpression  ->-                       Inh_JoinExpression  ->-                       Syn_JoinExpression -wrap_JoinExpression sem (Inh_JoinExpression _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_JoinExpression _lhsOannotatedTree ))-sem_JoinExpression_JoinOn :: T_Expression  ->-                             T_JoinExpression -sem_JoinExpression_JoinOn expression_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinExpression-              _expressionOscope :: Scope-              _expressionIannotatedTree :: Expression-              _expressionIliftedColumnName :: String-              _annotatedTree =-                  JoinOn _expressionIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _expressionOscope =-                  _lhsIscope-              ( _expressionIannotatedTree,_expressionIliftedColumnName) =-                  (expression_ _expressionOscope )-          in  ( _lhsOannotatedTree)))-sem_JoinExpression_JoinUsing :: T_StringList  ->-                                T_JoinExpression -sem_JoinExpression_JoinUsing stringList_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinExpression-              _stringListOscope :: Scope-              _stringListIannotatedTree :: StringList-              _stringListIstrings :: ([String])-              _annotatedTree =-                  JoinUsing _stringListIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _stringListOscope =-                  _lhsIscope-              ( _stringListIannotatedTree,_stringListIstrings) =-                  (stringList_ _stringListOscope )-          in  ( _lhsOannotatedTree)))--- JoinType -----------------------------------------------------data JoinType  = Cross -               | FullOuter -               | Inner -               | LeftOuter -               | RightOuter -               deriving ( Eq,Show)--- cata-sem_JoinType :: JoinType  ->-                T_JoinType -sem_JoinType (Cross )  =-    (sem_JoinType_Cross )-sem_JoinType (FullOuter )  =-    (sem_JoinType_FullOuter )-sem_JoinType (Inner )  =-    (sem_JoinType_Inner )-sem_JoinType (LeftOuter )  =-    (sem_JoinType_LeftOuter )-sem_JoinType (RightOuter )  =-    (sem_JoinType_RightOuter )--- semantic domain-type T_JoinType  = Scope ->-                   ( JoinType)-data Inh_JoinType  = Inh_JoinType {scope_Inh_JoinType :: Scope}-data Syn_JoinType  = Syn_JoinType {annotatedTree_Syn_JoinType :: JoinType}-wrap_JoinType :: T_JoinType  ->-                 Inh_JoinType  ->-                 Syn_JoinType -wrap_JoinType sem (Inh_JoinType _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_JoinType _lhsOannotatedTree ))-sem_JoinType_Cross :: T_JoinType -sem_JoinType_Cross  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinType-              _annotatedTree =-                  Cross-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_JoinType_FullOuter :: T_JoinType -sem_JoinType_FullOuter  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinType-              _annotatedTree =-                  FullOuter-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_JoinType_Inner :: T_JoinType -sem_JoinType_Inner  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinType-              _annotatedTree =-                  Inner-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_JoinType_LeftOuter :: T_JoinType -sem_JoinType_LeftOuter  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinType-              _annotatedTree =-                  LeftOuter-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_JoinType_RightOuter :: T_JoinType -sem_JoinType_RightOuter  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: JoinType-              _annotatedTree =-                  RightOuter-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Language -----------------------------------------------------data Language  = Plpgsql -               | Sql -               deriving ( Eq,Show)--- cata-sem_Language :: Language  ->-                T_Language -sem_Language (Plpgsql )  =-    (sem_Language_Plpgsql )-sem_Language (Sql )  =-    (sem_Language_Sql )--- semantic domain-type T_Language  = Scope ->-                   ( Language)-data Inh_Language  = Inh_Language {scope_Inh_Language :: Scope}-data Syn_Language  = Syn_Language {annotatedTree_Syn_Language :: Language}-wrap_Language :: T_Language  ->-                 Inh_Language  ->-                 Syn_Language -wrap_Language sem (Inh_Language _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Language _lhsOannotatedTree ))-sem_Language_Plpgsql :: T_Language -sem_Language_Plpgsql  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Language-              _annotatedTree =-                  Plpgsql-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Language_Sql :: T_Language -sem_Language_Sql  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Language-              _annotatedTree =-                  Sql-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- MExpression --------------------------------------------------type MExpression  = (Maybe (Expression))--- cata-sem_MExpression :: MExpression  ->-                   T_MExpression -sem_MExpression (Prelude.Just x )  =-    (sem_MExpression_Just (sem_Expression x ) )-sem_MExpression Prelude.Nothing  =-    sem_MExpression_Nothing--- semantic domain-type T_MExpression  = Scope ->-                      ( MExpression)-data Inh_MExpression  = Inh_MExpression {scope_Inh_MExpression :: Scope}-data Syn_MExpression  = Syn_MExpression {annotatedTree_Syn_MExpression :: MExpression}-wrap_MExpression :: T_MExpression  ->-                    Inh_MExpression  ->-                    Syn_MExpression -wrap_MExpression sem (Inh_MExpression _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_MExpression _lhsOannotatedTree ))-sem_MExpression_Just :: T_Expression  ->-                        T_MExpression -sem_MExpression_Just just_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: MExpression-              _justOscope :: Scope-              _justIannotatedTree :: Expression-              _justIliftedColumnName :: String-              _annotatedTree =-                  Just _justIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _justOscope =-                  _lhsIscope-              ( _justIannotatedTree,_justIliftedColumnName) =-                  (just_ _justOscope )-          in  ( _lhsOannotatedTree)))-sem_MExpression_Nothing :: T_MExpression -sem_MExpression_Nothing  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: MExpression-              _annotatedTree =-                  Nothing-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- MTableRef ----------------------------------------------------type MTableRef  = (Maybe (TableRef))--- cata-sem_MTableRef :: MTableRef  ->-                 T_MTableRef -sem_MTableRef (Prelude.Just x )  =-    (sem_MTableRef_Just (sem_TableRef x ) )-sem_MTableRef Prelude.Nothing  =-    sem_MTableRef_Nothing--- semantic domain-type T_MTableRef  = Scope ->-                    ( MTableRef,([QualifiedScope]),([String]))-data Inh_MTableRef  = Inh_MTableRef {scope_Inh_MTableRef :: Scope}-data Syn_MTableRef  = Syn_MTableRef {annotatedTree_Syn_MTableRef :: MTableRef,idens_Syn_MTableRef :: [QualifiedScope],joinIdens_Syn_MTableRef :: [String]}-wrap_MTableRef :: T_MTableRef  ->-                  Inh_MTableRef  ->-                  Syn_MTableRef -wrap_MTableRef sem (Inh_MTableRef _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens) =-             (sem _lhsIscope )-     in  (Syn_MTableRef _lhsOannotatedTree _lhsOidens _lhsOjoinIdens ))-sem_MTableRef_Just :: T_TableRef  ->-                      T_MTableRef -sem_MTableRef_Just just_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: MTableRef-              _lhsOidens :: ([QualifiedScope])-              _lhsOjoinIdens :: ([String])-              _justOscope :: Scope-              _justIannotatedTree :: TableRef-              _justIidens :: ([QualifiedScope])-              _justIjoinIdens :: ([String])-              _annotatedTree =-                  Just _justIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _lhsOidens =-                  _justIidens-              _lhsOjoinIdens =-                  _justIjoinIdens-              _justOscope =-                  _lhsIscope-              ( _justIannotatedTree,_justIidens,_justIjoinIdens) =-                  (just_ _justOscope )-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))-sem_MTableRef_Nothing :: T_MTableRef -sem_MTableRef_Nothing  =-    (\ _lhsIscope ->-         (let _lhsOidens :: ([QualifiedScope])-              _lhsOjoinIdens :: ([String])-              _lhsOannotatedTree :: MTableRef-              _lhsOidens =-                  []-              _lhsOjoinIdens =-                  []-              _annotatedTree =-                  Nothing-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))--- MaybeExpression ----------------------------------------------type MaybeExpression  = (Maybe (Expression))--- cata-sem_MaybeExpression :: MaybeExpression  ->-                       T_MaybeExpression -sem_MaybeExpression (Prelude.Just x )  =-    (sem_MaybeExpression_Just (sem_Expression x ) )-sem_MaybeExpression Prelude.Nothing  =-    sem_MaybeExpression_Nothing--- semantic domain-type T_MaybeExpression  = Scope ->-                          ( MaybeExpression)-data Inh_MaybeExpression  = Inh_MaybeExpression {scope_Inh_MaybeExpression :: Scope}-data Syn_MaybeExpression  = Syn_MaybeExpression {annotatedTree_Syn_MaybeExpression :: MaybeExpression}-wrap_MaybeExpression :: T_MaybeExpression  ->-                        Inh_MaybeExpression  ->-                        Syn_MaybeExpression -wrap_MaybeExpression sem (Inh_MaybeExpression _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_MaybeExpression _lhsOannotatedTree ))-sem_MaybeExpression_Just :: T_Expression  ->-                            T_MaybeExpression -sem_MaybeExpression_Just just_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: MaybeExpression-              _justOscope :: Scope-              _justIannotatedTree :: Expression-              _justIliftedColumnName :: String-              _annotatedTree =-                  Just _justIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _justOscope =-                  _lhsIscope-              ( _justIannotatedTree,_justIliftedColumnName) =-                  (just_ _justOscope )-          in  ( _lhsOannotatedTree)))-sem_MaybeExpression_Nothing :: T_MaybeExpression -sem_MaybeExpression_Nothing  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: MaybeExpression-              _annotatedTree =-                  Nothing-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Natural ------------------------------------------------------data Natural  = Natural -              | Unnatural -              deriving ( Eq,Show)--- cata-sem_Natural :: Natural  ->-               T_Natural -sem_Natural (Natural )  =-    (sem_Natural_Natural )-sem_Natural (Unnatural )  =-    (sem_Natural_Unnatural )--- semantic domain-type T_Natural  = Scope ->-                  ( Natural)-data Inh_Natural  = Inh_Natural {scope_Inh_Natural :: Scope}-data Syn_Natural  = Syn_Natural {annotatedTree_Syn_Natural :: Natural}-wrap_Natural :: T_Natural  ->-                Inh_Natural  ->-                Syn_Natural -wrap_Natural sem (Inh_Natural _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Natural _lhsOannotatedTree ))-sem_Natural_Natural :: T_Natural -sem_Natural_Natural  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Natural-              _annotatedTree =-                  Natural-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Natural_Unnatural :: T_Natural -sem_Natural_Unnatural  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Natural-              _annotatedTree =-                  Unnatural-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- OnExpr -------------------------------------------------------type OnExpr  = (Maybe (JoinExpression))--- cata-sem_OnExpr :: OnExpr  ->-              T_OnExpr -sem_OnExpr (Prelude.Just x )  =-    (sem_OnExpr_Just (sem_JoinExpression x ) )-sem_OnExpr Prelude.Nothing  =-    sem_OnExpr_Nothing--- semantic domain-type T_OnExpr  = Scope ->-                 ( OnExpr)-data Inh_OnExpr  = Inh_OnExpr {scope_Inh_OnExpr :: Scope}-data Syn_OnExpr  = Syn_OnExpr {annotatedTree_Syn_OnExpr :: OnExpr}-wrap_OnExpr :: T_OnExpr  ->-               Inh_OnExpr  ->-               Syn_OnExpr -wrap_OnExpr sem (Inh_OnExpr _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_OnExpr _lhsOannotatedTree ))-sem_OnExpr_Just :: T_JoinExpression  ->-                   T_OnExpr -sem_OnExpr_Just just_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: OnExpr-              _justOscope :: Scope-              _justIannotatedTree :: JoinExpression-              _annotatedTree =-                  Just _justIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _justOscope =-                  _lhsIscope-              ( _justIannotatedTree) =-                  (just_ _justOscope )-          in  ( _lhsOannotatedTree)))-sem_OnExpr_Nothing :: T_OnExpr -sem_OnExpr_Nothing  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: OnExpr-              _annotatedTree =-                  Nothing-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- ParamDef -----------------------------------------------------data ParamDef  = ParamDef (String) (TypeName) -               | ParamDefTp (TypeName) -               deriving ( Eq,Show)--- cata-sem_ParamDef :: ParamDef  ->-                T_ParamDef -sem_ParamDef (ParamDef _name _typ )  =-    (sem_ParamDef_ParamDef _name (sem_TypeName _typ ) )-sem_ParamDef (ParamDefTp _typ )  =-    (sem_ParamDef_ParamDefTp (sem_TypeName _typ ) )--- semantic domain-type T_ParamDef  = Scope ->-                   ( ParamDef,(Either [TypeError] Type),String)-data Inh_ParamDef  = Inh_ParamDef {scope_Inh_ParamDef :: Scope}-data Syn_ParamDef  = Syn_ParamDef {annotatedTree_Syn_ParamDef :: ParamDef,namedType_Syn_ParamDef :: Either [TypeError] Type,paramName_Syn_ParamDef :: String}-wrap_ParamDef :: T_ParamDef  ->-                 Inh_ParamDef  ->-                 Syn_ParamDef -wrap_ParamDef sem (Inh_ParamDef _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOnamedType,_lhsOparamName) =-             (sem _lhsIscope )-     in  (Syn_ParamDef _lhsOannotatedTree _lhsOnamedType _lhsOparamName ))-sem_ParamDef_ParamDef :: String ->-                         T_TypeName  ->-                         T_ParamDef -sem_ParamDef_ParamDef name_ typ_  =-    (\ _lhsIscope ->-         (let _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOparamName :: String-              _lhsOannotatedTree :: ParamDef-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _lhsOnamedType =-                  _typInamedType-              _lhsOparamName =-                  name_-              _annotatedTree =-                  ParamDef name_ _typIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOparamName)))-sem_ParamDef_ParamDefTp :: T_TypeName  ->-                           T_ParamDef -sem_ParamDef_ParamDefTp typ_  =-    (\ _lhsIscope ->-         (let _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOparamName :: String-              _lhsOannotatedTree :: ParamDef-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _lhsOnamedType =-                  _typInamedType-              _lhsOparamName =-                  ""-              _annotatedTree =-                  ParamDefTp _typIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOparamName)))--- ParamDefList -------------------------------------------------type ParamDefList  = [(ParamDef)]--- cata-sem_ParamDefList :: ParamDefList  ->-                    T_ParamDefList -sem_ParamDefList list  =-    (Prelude.foldr sem_ParamDefList_Cons sem_ParamDefList_Nil (Prelude.map sem_ParamDef list) )--- semantic domain-type T_ParamDefList  = Scope ->-                       ( ParamDefList,([(String,Either [TypeError] Type)]))-data Inh_ParamDefList  = Inh_ParamDefList {scope_Inh_ParamDefList :: Scope}-data Syn_ParamDefList  = Syn_ParamDefList {annotatedTree_Syn_ParamDefList :: ParamDefList,params_Syn_ParamDefList :: [(String,Either [TypeError] Type)]}-wrap_ParamDefList :: T_ParamDefList  ->-                     Inh_ParamDefList  ->-                     Syn_ParamDefList -wrap_ParamDefList sem (Inh_ParamDefList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOparams) =-             (sem _lhsIscope )-     in  (Syn_ParamDefList _lhsOannotatedTree _lhsOparams ))-sem_ParamDefList_Cons :: T_ParamDef  ->-                         T_ParamDefList  ->-                         T_ParamDefList -sem_ParamDefList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOparams :: ([(String,Either [TypeError] Type)])-              _lhsOannotatedTree :: ParamDefList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: ParamDef-              _hdInamedType :: (Either [TypeError] Type)-              _hdIparamName :: String-              _tlIannotatedTree :: ParamDefList-              _tlIparams :: ([(String,Either [TypeError] Type)])-              _lhsOparams =-                  ((_hdIparamName, _hdInamedType) : _tlIparams)-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdInamedType,_hdIparamName) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlIparams) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOparams)))-sem_ParamDefList_Nil :: T_ParamDefList -sem_ParamDefList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOparams :: ([(String,Either [TypeError] Type)])-              _lhsOannotatedTree :: ParamDefList-              _lhsOparams =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOparams)))--- RaiseType ----------------------------------------------------data RaiseType  = RError -                | RException -                | RNotice -                deriving ( Eq,Show)--- cata-sem_RaiseType :: RaiseType  ->-                 T_RaiseType -sem_RaiseType (RError )  =-    (sem_RaiseType_RError )-sem_RaiseType (RException )  =-    (sem_RaiseType_RException )-sem_RaiseType (RNotice )  =-    (sem_RaiseType_RNotice )--- semantic domain-type T_RaiseType  = Scope ->-                    ( RaiseType)-data Inh_RaiseType  = Inh_RaiseType {scope_Inh_RaiseType :: Scope}-data Syn_RaiseType  = Syn_RaiseType {annotatedTree_Syn_RaiseType :: RaiseType}-wrap_RaiseType :: T_RaiseType  ->-                  Inh_RaiseType  ->-                  Syn_RaiseType -wrap_RaiseType sem (Inh_RaiseType _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_RaiseType _lhsOannotatedTree ))-sem_RaiseType_RError :: T_RaiseType -sem_RaiseType_RError  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RaiseType-              _annotatedTree =-                  RError-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_RaiseType_RException :: T_RaiseType -sem_RaiseType_RException  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RaiseType-              _annotatedTree =-                  RException-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_RaiseType_RNotice :: T_RaiseType -sem_RaiseType_RNotice  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RaiseType-              _annotatedTree =-                  RNotice-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- RestartIdentity ----------------------------------------------data RestartIdentity  = ContinueIdentity -                      | RestartIdentity -                      deriving ( Eq,Show)--- cata-sem_RestartIdentity :: RestartIdentity  ->-                       T_RestartIdentity -sem_RestartIdentity (ContinueIdentity )  =-    (sem_RestartIdentity_ContinueIdentity )-sem_RestartIdentity (RestartIdentity )  =-    (sem_RestartIdentity_RestartIdentity )--- semantic domain-type T_RestartIdentity  = Scope ->-                          ( RestartIdentity)-data Inh_RestartIdentity  = Inh_RestartIdentity {scope_Inh_RestartIdentity :: Scope}-data Syn_RestartIdentity  = Syn_RestartIdentity {annotatedTree_Syn_RestartIdentity :: RestartIdentity}-wrap_RestartIdentity :: T_RestartIdentity  ->-                        Inh_RestartIdentity  ->-                        Syn_RestartIdentity -wrap_RestartIdentity sem (Inh_RestartIdentity _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_RestartIdentity _lhsOannotatedTree ))-sem_RestartIdentity_ContinueIdentity :: T_RestartIdentity -sem_RestartIdentity_ContinueIdentity  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RestartIdentity-              _annotatedTree =-                  ContinueIdentity-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_RestartIdentity_RestartIdentity :: T_RestartIdentity -sem_RestartIdentity_RestartIdentity  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RestartIdentity-              _annotatedTree =-                  RestartIdentity-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Root ---------------------------------------------------------data Root  = Root (StatementList) -           deriving ( Show)--- cata-sem_Root :: Root  ->-            T_Root -sem_Root (Root _statements )  =-    (sem_Root_Root (sem_StatementList _statements ) )--- semantic domain-type T_Root  = Scope ->-               ( Root)-data Inh_Root  = Inh_Root {scope_Inh_Root :: Scope}-data Syn_Root  = Syn_Root {annotatedTree_Syn_Root :: Root}-wrap_Root :: T_Root  ->-             Inh_Root  ->-             Syn_Root -wrap_Root sem (Inh_Root _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Root _lhsOannotatedTree ))-sem_Root_Root :: T_StatementList  ->-                 T_Root -sem_Root_Root statements_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Root-              _statementsOscope :: Scope-              _statementsIannotatedTree :: StatementList-              _annotatedTree =-                  Root _statementsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _statementsOscope =-                  _lhsIscope-              ( _statementsIannotatedTree) =-                  (statements_ _statementsOscope )-          in  ( _lhsOannotatedTree)))--- RowConstraint ------------------------------------------------data RowConstraint  = NotNullConstraint -                    | NullConstraint -                    | RowCheckConstraint (Expression) -                    | RowPrimaryKeyConstraint -                    | RowReferenceConstraint (String) (Maybe String) (Cascade) (Cascade) -                    | RowUniqueConstraint -                    deriving ( Eq,Show)--- cata-sem_RowConstraint :: RowConstraint  ->-                     T_RowConstraint -sem_RowConstraint (NotNullConstraint )  =-    (sem_RowConstraint_NotNullConstraint )-sem_RowConstraint (NullConstraint )  =-    (sem_RowConstraint_NullConstraint )-sem_RowConstraint (RowCheckConstraint _expression )  =-    (sem_RowConstraint_RowCheckConstraint (sem_Expression _expression ) )-sem_RowConstraint (RowPrimaryKeyConstraint )  =-    (sem_RowConstraint_RowPrimaryKeyConstraint )-sem_RowConstraint (RowReferenceConstraint _table _att _onUpdate _onDelete )  =-    (sem_RowConstraint_RowReferenceConstraint _table _att (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )-sem_RowConstraint (RowUniqueConstraint )  =-    (sem_RowConstraint_RowUniqueConstraint )--- semantic domain-type T_RowConstraint  = Scope ->-                        ( RowConstraint)-data Inh_RowConstraint  = Inh_RowConstraint {scope_Inh_RowConstraint :: Scope}-data Syn_RowConstraint  = Syn_RowConstraint {annotatedTree_Syn_RowConstraint :: RowConstraint}-wrap_RowConstraint :: T_RowConstraint  ->-                      Inh_RowConstraint  ->-                      Syn_RowConstraint -wrap_RowConstraint sem (Inh_RowConstraint _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_RowConstraint _lhsOannotatedTree ))-sem_RowConstraint_NotNullConstraint :: T_RowConstraint -sem_RowConstraint_NotNullConstraint  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraint-              _annotatedTree =-                  NotNullConstraint-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_RowConstraint_NullConstraint :: T_RowConstraint -sem_RowConstraint_NullConstraint  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraint-              _annotatedTree =-                  NullConstraint-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_RowConstraint_RowCheckConstraint :: T_Expression  ->-                                        T_RowConstraint -sem_RowConstraint_RowCheckConstraint expression_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraint-              _expressionOscope :: Scope-              _expressionIannotatedTree :: Expression-              _expressionIliftedColumnName :: String-              _annotatedTree =-                  RowCheckConstraint _expressionIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _expressionOscope =-                  _lhsIscope-              ( _expressionIannotatedTree,_expressionIliftedColumnName) =-                  (expression_ _expressionOscope )-          in  ( _lhsOannotatedTree)))-sem_RowConstraint_RowPrimaryKeyConstraint :: T_RowConstraint -sem_RowConstraint_RowPrimaryKeyConstraint  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraint-              _annotatedTree =-                  RowPrimaryKeyConstraint-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_RowConstraint_RowReferenceConstraint :: String ->-                                            (Maybe String) ->-                                            T_Cascade  ->-                                            T_Cascade  ->-                                            T_RowConstraint -sem_RowConstraint_RowReferenceConstraint table_ att_ onUpdate_ onDelete_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraint-              _onUpdateOscope :: Scope-              _onDeleteOscope :: Scope-              _onUpdateIannotatedTree :: Cascade-              _onDeleteIannotatedTree :: Cascade-              _annotatedTree =-                  RowReferenceConstraint table_ att_ _onUpdateIannotatedTree _onDeleteIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _onUpdateOscope =-                  _lhsIscope-              _onDeleteOscope =-                  _lhsIscope-              ( _onUpdateIannotatedTree) =-                  (onUpdate_ _onUpdateOscope )-              ( _onDeleteIannotatedTree) =-                  (onDelete_ _onDeleteOscope )-          in  ( _lhsOannotatedTree)))-sem_RowConstraint_RowUniqueConstraint :: T_RowConstraint -sem_RowConstraint_RowUniqueConstraint  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraint-              _annotatedTree =-                  RowUniqueConstraint-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- RowConstraintList --------------------------------------------type RowConstraintList  = [(RowConstraint)]--- cata-sem_RowConstraintList :: RowConstraintList  ->-                         T_RowConstraintList -sem_RowConstraintList list  =-    (Prelude.foldr sem_RowConstraintList_Cons sem_RowConstraintList_Nil (Prelude.map sem_RowConstraint list) )--- semantic domain-type T_RowConstraintList  = Scope ->-                            ( RowConstraintList)-data Inh_RowConstraintList  = Inh_RowConstraintList {scope_Inh_RowConstraintList :: Scope}-data Syn_RowConstraintList  = Syn_RowConstraintList {annotatedTree_Syn_RowConstraintList :: RowConstraintList}-wrap_RowConstraintList :: T_RowConstraintList  ->-                          Inh_RowConstraintList  ->-                          Syn_RowConstraintList -wrap_RowConstraintList sem (Inh_RowConstraintList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_RowConstraintList _lhsOannotatedTree ))-sem_RowConstraintList_Cons :: T_RowConstraint  ->-                              T_RowConstraintList  ->-                              T_RowConstraintList -sem_RowConstraintList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraintList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: RowConstraint-              _tlIannotatedTree :: RowConstraintList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_RowConstraintList_Nil :: T_RowConstraintList -sem_RowConstraintList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: RowConstraintList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- SelectExpression ---------------------------------------------data SelectExpression  = CombineSelect (Annotation) (CombineType) (SelectExpression) (SelectExpression) -                       | Select (Annotation) (Distinct) (SelectList) (MTableRef) (Where) (ExpressionList) (MExpression) (ExpressionList) (Direction) (MExpression) (MExpression) -                       | Values (Annotation) (ExpressionListList) -                       deriving ( Eq,Show)--- cata-sem_SelectExpression :: SelectExpression  ->-                        T_SelectExpression -sem_SelectExpression (CombineSelect _ann _ctype _sel1 _sel2 )  =-    (sem_SelectExpression_CombineSelect _ann (sem_CombineType _ctype ) (sem_SelectExpression _sel1 ) (sem_SelectExpression _sel2 ) )-sem_SelectExpression (Select _ann _selDistinct _selSelectList _selTref _selWhere _selGroupBy _selHaving _selOrderBy _selDir _selLimit _selOffset )  =-    (sem_SelectExpression_Select _ann (sem_Distinct _selDistinct ) (sem_SelectList _selSelectList ) (sem_MTableRef _selTref ) (sem_Where _selWhere ) (sem_ExpressionList _selGroupBy ) (sem_MExpression _selHaving ) (sem_ExpressionList _selOrderBy ) (sem_Direction _selDir ) (sem_MExpression _selLimit ) (sem_MExpression _selOffset ) )-sem_SelectExpression (Values _ann _vll )  =-    (sem_SelectExpression_Values _ann (sem_ExpressionListList _vll ) )--- semantic domain-type T_SelectExpression  = Scope ->-                           ( SelectExpression)-data Inh_SelectExpression  = Inh_SelectExpression {scope_Inh_SelectExpression :: Scope}-data Syn_SelectExpression  = Syn_SelectExpression {annotatedTree_Syn_SelectExpression :: SelectExpression}-wrap_SelectExpression :: T_SelectExpression  ->-                         Inh_SelectExpression  ->-                         Syn_SelectExpression -wrap_SelectExpression sem (Inh_SelectExpression _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_SelectExpression _lhsOannotatedTree ))-sem_SelectExpression_CombineSelect :: Annotation ->-                                      T_CombineType  ->-                                      T_SelectExpression  ->-                                      T_SelectExpression  ->-                                      T_SelectExpression -sem_SelectExpression_CombineSelect ann_ ctype_ sel1_ sel2_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: SelectExpression-              _ctypeOscope :: Scope-              _sel1Oscope :: Scope-              _sel2Oscope :: Scope-              _ctypeIannotatedTree :: CombineType-              _sel1IannotatedTree :: SelectExpression-              _sel2IannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  let sel1t = getTypeAnnotation _sel1IannotatedTree-                      sel2t = getTypeAnnotation _sel2IannotatedTree-                  in checkTypes [sel1t, sel2t] $-                        typeCheckCombineSelect _lhsIscope sel1t sel2t-              _backTree =-                  CombineSelect ann_ _ctypeIannotatedTree-                                _sel1IannotatedTree-                                _sel2IannotatedTree-              _annotatedTree =-                  CombineSelect ann_ _ctypeIannotatedTree _sel1IannotatedTree _sel2IannotatedTree-              _ctypeOscope =-                  _lhsIscope-              _sel1Oscope =-                  _lhsIscope-              _sel2Oscope =-                  _lhsIscope-              ( _ctypeIannotatedTree) =-                  (ctype_ _ctypeOscope )-              ( _sel1IannotatedTree) =-                  (sel1_ _sel1Oscope )-              ( _sel2IannotatedTree) =-                  (sel2_ _sel2Oscope )-          in  ( _lhsOannotatedTree)))-sem_SelectExpression_Select :: Annotation ->-                               T_Distinct  ->-                               T_SelectList  ->-                               T_MTableRef  ->-                               T_Where  ->-                               T_ExpressionList  ->-                               T_MExpression  ->-                               T_ExpressionList  ->-                               T_Direction  ->-                               T_MExpression  ->-                               T_MExpression  ->-                               T_SelectExpression -sem_SelectExpression_Select ann_ selDistinct_ selSelectList_ selTref_ selWhere_ selGroupBy_ selHaving_ selOrderBy_ selDir_ selLimit_ selOffset_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: SelectExpression-              _selSelectListOscope :: Scope-              _selWhereOscope :: Scope-              _selDistinctOscope :: Scope-              _selTrefOscope :: Scope-              _selGroupByOscope :: Scope-              _selHavingOscope :: Scope-              _selOrderByOscope :: Scope-              _selDirOscope :: Scope-              _selLimitOscope :: Scope-              _selOffsetOscope :: Scope-              _selDistinctIannotatedTree :: Distinct-              _selSelectListIannotatedTree :: SelectList-              _selSelectListIlistType :: Type-              _selTrefIannotatedTree :: MTableRef-              _selTrefIidens :: ([QualifiedScope])-              _selTrefIjoinIdens :: ([String])-              _selWhereIannotatedTree :: Where-              _selGroupByIannotatedTree :: ExpressionList-              _selGroupByItypeList :: ([Type])-              _selHavingIannotatedTree :: MExpression-              _selOrderByIannotatedTree :: ExpressionList-              _selOrderByItypeList :: ([Type])-              _selDirIannotatedTree :: Direction-              _selLimitIannotatedTree :: MExpression-              _selOffsetIannotatedTree :: MExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  do-                  whereType <- checkExpressionBool _selWhereIannotatedTree-                  let trefType = fromMaybe typeBool $ fmap getTypeAnnotation-                                                           _selTrefIannotatedTree-                      slType = _selSelectListIlistType-                  chainTypeCheckFailed [trefType, whereType, slType] $-                    Right $ case slType of-                              UnnamedCompositeType [(_,Pseudo Void)] -> Pseudo Void-                              _ -> SetOfType slType-              _backTree =-                  Select ann_-                         _selDistinctIannotatedTree-                         _selSelectListIannotatedTree-                         _selTrefIannotatedTree-                         _selWhereIannotatedTree-                         _selGroupByIannotatedTree-                         _selHavingIannotatedTree-                         _selOrderByIannotatedTree-                         _selDirIannotatedTree-                         _selLimitIannotatedTree-                         _selOffsetIannotatedTree-              _selSelectListOscope =-                  scopeReplaceIds _lhsIscope _selTrefIidens _selTrefIjoinIdens-              _selWhereOscope =-                  scopeReplaceIds _lhsIscope _selTrefIidens _selTrefIjoinIdens-              _annotatedTree =-                  Select ann_ _selDistinctIannotatedTree _selSelectListIannotatedTree _selTrefIannotatedTree _selWhereIannotatedTree _selGroupByIannotatedTree _selHavingIannotatedTree _selOrderByIannotatedTree _selDirIannotatedTree _selLimitIannotatedTree _selOffsetIannotatedTree-              _selDistinctOscope =-                  _lhsIscope-              _selTrefOscope =-                  _lhsIscope-              _selGroupByOscope =-                  _lhsIscope-              _selHavingOscope =-                  _lhsIscope-              _selOrderByOscope =-                  _lhsIscope-              _selDirOscope =-                  _lhsIscope-              _selLimitOscope =-                  _lhsIscope-              _selOffsetOscope =-                  _lhsIscope-              ( _selDistinctIannotatedTree) =-                  (selDistinct_ _selDistinctOscope )-              ( _selSelectListIannotatedTree,_selSelectListIlistType) =-                  (selSelectList_ _selSelectListOscope )-              ( _selTrefIannotatedTree,_selTrefIidens,_selTrefIjoinIdens) =-                  (selTref_ _selTrefOscope )-              ( _selWhereIannotatedTree) =-                  (selWhere_ _selWhereOscope )-              ( _selGroupByIannotatedTree,_selGroupByItypeList) =-                  (selGroupBy_ _selGroupByOscope )-              ( _selHavingIannotatedTree) =-                  (selHaving_ _selHavingOscope )-              ( _selOrderByIannotatedTree,_selOrderByItypeList) =-                  (selOrderBy_ _selOrderByOscope )-              ( _selDirIannotatedTree) =-                  (selDir_ _selDirOscope )-              ( _selLimitIannotatedTree) =-                  (selLimit_ _selLimitOscope )-              ( _selOffsetIannotatedTree) =-                  (selOffset_ _selOffsetOscope )-          in  ( _lhsOannotatedTree)))-sem_SelectExpression_Values :: Annotation ->-                               T_ExpressionListList  ->-                               T_SelectExpression -sem_SelectExpression_Values ann_ vll_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: SelectExpression-              _vllOscope :: Scope-              _vllIannotatedTree :: ExpressionListList-              _vllItypeListList :: ([[Type]])-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  typeCheckValuesExpr-                              _lhsIscope-                              _vllItypeListList-              _backTree =-                  Values ann_ _vllIannotatedTree-              _annotatedTree =-                  Values ann_ _vllIannotatedTree-              _vllOscope =-                  _lhsIscope-              ( _vllIannotatedTree,_vllItypeListList) =-                  (vll_ _vllOscope )-          in  ( _lhsOannotatedTree)))--- SelectItem ---------------------------------------------------data SelectItem  = SelExp (Expression) -                 | SelectItem (Expression) (String) -                 deriving ( Eq,Show)--- cata-sem_SelectItem :: SelectItem  ->-                  T_SelectItem -sem_SelectItem (SelExp _ex )  =-    (sem_SelectItem_SelExp (sem_Expression _ex ) )-sem_SelectItem (SelectItem _ex _name )  =-    (sem_SelectItem_SelectItem (sem_Expression _ex ) _name )--- semantic domain-type T_SelectItem  = Scope ->-                     ( SelectItem,String,Type)-data Inh_SelectItem  = Inh_SelectItem {scope_Inh_SelectItem :: Scope}-data Syn_SelectItem  = Syn_SelectItem {annotatedTree_Syn_SelectItem :: SelectItem,columnName_Syn_SelectItem :: String,itemType_Syn_SelectItem :: Type}-wrap_SelectItem :: T_SelectItem  ->-                   Inh_SelectItem  ->-                   Syn_SelectItem -wrap_SelectItem sem (Inh_SelectItem _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType) =-             (sem _lhsIscope )-     in  (Syn_SelectItem _lhsOannotatedTree _lhsOcolumnName _lhsOitemType ))-sem_SelectItem_SelExp :: T_Expression  ->-                         T_SelectItem -sem_SelectItem_SelExp ex_  =-    (\ _lhsIscope ->-         (let _lhsOitemType :: Type-              _lhsOcolumnName :: String-              _lhsOannotatedTree :: SelectItem-              _exOscope :: Scope-              _exIannotatedTree :: Expression-              _exIliftedColumnName :: String-              _lhsOitemType =-                  getTypeAnnotation _exIannotatedTree-              _annotatedTree =-                  SelExp $ fixStar _exIannotatedTree-              _lhsOcolumnName =-                  case _exIliftedColumnName of-                    "" -> "?column?"-                    s -> s-              _lhsOannotatedTree =-                  _annotatedTree-              _exOscope =-                  _lhsIscope-              ( _exIannotatedTree,_exIliftedColumnName) =-                  (ex_ _exOscope )-          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType)))-sem_SelectItem_SelectItem :: T_Expression  ->-                             String ->-                             T_SelectItem -sem_SelectItem_SelectItem ex_ name_  =-    (\ _lhsIscope ->-         (let _lhsOitemType :: Type-              _lhsOcolumnName :: String-              _lhsOannotatedTree :: SelectItem-              _exOscope :: Scope-              _exIannotatedTree :: Expression-              _exIliftedColumnName :: String-              _lhsOitemType =-                  getTypeAnnotation _exIannotatedTree-              _backTree =-                  SelectItem (fixStar _exIannotatedTree) name_-              _lhsOcolumnName =-                  name_-              _annotatedTree =-                  SelectItem _exIannotatedTree name_-              _lhsOannotatedTree =-                  _annotatedTree-              _exOscope =-                  _lhsIscope-              ( _exIannotatedTree,_exIliftedColumnName) =-                  (ex_ _exOscope )-          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType)))--- SelectItemList -----------------------------------------------type SelectItemList  = [(SelectItem)]--- cata-sem_SelectItemList :: SelectItemList  ->-                      T_SelectItemList -sem_SelectItemList list  =-    (Prelude.foldr sem_SelectItemList_Cons sem_SelectItemList_Nil (Prelude.map sem_SelectItem list) )--- semantic domain-type T_SelectItemList  = Scope ->-                         ( SelectItemList,Type)-data Inh_SelectItemList  = Inh_SelectItemList {scope_Inh_SelectItemList :: Scope}-data Syn_SelectItemList  = Syn_SelectItemList {annotatedTree_Syn_SelectItemList :: SelectItemList,listType_Syn_SelectItemList :: Type}-wrap_SelectItemList :: T_SelectItemList  ->-                       Inh_SelectItemList  ->-                       Syn_SelectItemList -wrap_SelectItemList sem (Inh_SelectItemList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOlistType) =-             (sem _lhsIscope )-     in  (Syn_SelectItemList _lhsOannotatedTree _lhsOlistType ))-sem_SelectItemList_Cons :: T_SelectItem  ->-                           T_SelectItemList  ->-                           T_SelectItemList -sem_SelectItemList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOlistType :: Type-              _lhsOannotatedTree :: SelectItemList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: SelectItem-              _hdIcolumnName :: String-              _hdIitemType :: Type-              _tlIannotatedTree :: SelectItemList-              _tlIlistType :: Type-              _lhsOlistType =-                  doSelectItemListTpe _lhsIscope _hdIcolumnName _hdIitemType _tlIlistType-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdIcolumnName,_hdIitemType) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlIlistType) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOlistType)))-sem_SelectItemList_Nil :: T_SelectItemList -sem_SelectItemList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOlistType :: Type-              _lhsOannotatedTree :: SelectItemList-              _lhsOlistType =-                  UnnamedCompositeType []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOlistType)))--- SelectList ---------------------------------------------------data SelectList  = SelectList (SelectItemList) (StringList) -                 deriving ( Eq,Show)--- cata-sem_SelectList :: SelectList  ->-                  T_SelectList -sem_SelectList (SelectList _items _stringList )  =-    (sem_SelectList_SelectList (sem_SelectItemList _items ) (sem_StringList _stringList ) )--- semantic domain-type T_SelectList  = Scope ->-                     ( SelectList,Type)-data Inh_SelectList  = Inh_SelectList {scope_Inh_SelectList :: Scope}-data Syn_SelectList  = Syn_SelectList {annotatedTree_Syn_SelectList :: SelectList,listType_Syn_SelectList :: Type}-wrap_SelectList :: T_SelectList  ->-                   Inh_SelectList  ->-                   Syn_SelectList -wrap_SelectList sem (Inh_SelectList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOlistType) =-             (sem _lhsIscope )-     in  (Syn_SelectList _lhsOannotatedTree _lhsOlistType ))-sem_SelectList_SelectList :: T_SelectItemList  ->-                             T_StringList  ->-                             T_SelectList -sem_SelectList_SelectList items_ stringList_  =-    (\ _lhsIscope ->-         (let _lhsOlistType :: Type-              _lhsOannotatedTree :: SelectList-              _itemsOscope :: Scope-              _stringListOscope :: Scope-              _itemsIannotatedTree :: SelectItemList-              _itemsIlistType :: Type-              _stringListIannotatedTree :: StringList-              _stringListIstrings :: ([String])-              _lhsOlistType =-                  _itemsIlistType-              _annotatedTree =-                  SelectList _itemsIannotatedTree _stringListIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _itemsOscope =-                  _lhsIscope-              _stringListOscope =-                  _lhsIscope-              ( _itemsIannotatedTree,_itemsIlistType) =-                  (items_ _itemsOscope )-              ( _stringListIannotatedTree,_stringListIstrings) =-                  (stringList_ _stringListOscope )-          in  ( _lhsOannotatedTree,_lhsOlistType)))--- SetClause ----------------------------------------------------data SetClause  = RowSetClause (StringList) (ExpressionList) -                | SetClause (String) (Expression) -                deriving ( Eq,Show)--- cata-sem_SetClause :: SetClause  ->-                 T_SetClause -sem_SetClause (RowSetClause _atts _vals )  =-    (sem_SetClause_RowSetClause (sem_StringList _atts ) (sem_ExpressionList _vals ) )-sem_SetClause (SetClause _att _val )  =-    (sem_SetClause_SetClause _att (sem_Expression _val ) )--- semantic domain-type T_SetClause  = Scope ->-                    ( SetClause,([(String,Type)]),(Maybe TypeError))-data Inh_SetClause  = Inh_SetClause {scope_Inh_SetClause :: Scope}-data Syn_SetClause  = Syn_SetClause {annotatedTree_Syn_SetClause :: SetClause,pairs_Syn_SetClause :: [(String,Type)],rowSetError_Syn_SetClause :: Maybe TypeError}-wrap_SetClause :: T_SetClause  ->-                  Inh_SetClause  ->-                  Syn_SetClause -wrap_SetClause sem (Inh_SetClause _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetError) =-             (sem _lhsIscope )-     in  (Syn_SetClause _lhsOannotatedTree _lhsOpairs _lhsOrowSetError ))-sem_SetClause_RowSetClause :: T_StringList  ->-                              T_ExpressionList  ->-                              T_SetClause -sem_SetClause_RowSetClause atts_ vals_  =-    (\ _lhsIscope ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOannotatedTree :: SetClause-              _lhsOrowSetError :: (Maybe TypeError)-              _attsOscope :: Scope-              _valsOscope :: Scope-              _attsIannotatedTree :: StringList-              _attsIstrings :: ([String])-              _valsIannotatedTree :: ExpressionList-              _valsItypeList :: ([Type])-              _rowSetError =-                  let atts = _attsIstrings-                      types = getRowTypes _valsItypeList-                  in if length atts /= length types-                       then Just WrongNumberOfColumns-                       else Nothing-              _lhsOpairs =-                  zip _attsIstrings $ getRowTypes _valsItypeList-              _annotatedTree =-                  RowSetClause _attsIannotatedTree _valsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _lhsOrowSetError =-                  _rowSetError-              _attsOscope =-                  _lhsIscope-              _valsOscope =-                  _lhsIscope-              ( _attsIannotatedTree,_attsIstrings) =-                  (atts_ _attsOscope )-              ( _valsIannotatedTree,_valsItypeList) =-                  (vals_ _valsOscope )-          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetError)))-sem_SetClause_SetClause :: String ->-                           T_Expression  ->-                           T_SetClause -sem_SetClause_SetClause att_ val_  =-    (\ _lhsIscope ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOrowSetError :: (Maybe TypeError)-              _lhsOannotatedTree :: SetClause-              _valOscope :: Scope-              _valIannotatedTree :: Expression-              _valIliftedColumnName :: String-              _lhsOpairs =-                  [(att_, getTypeAnnotation _valIannotatedTree)]-              _lhsOrowSetError =-                  Nothing-              _annotatedTree =-                  SetClause att_ _valIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _valOscope =-                  _lhsIscope-              ( _valIannotatedTree,_valIliftedColumnName) =-                  (val_ _valOscope )-          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetError)))--- SetClauseList ------------------------------------------------type SetClauseList  = [(SetClause)]--- cata-sem_SetClauseList :: SetClauseList  ->-                     T_SetClauseList -sem_SetClauseList list  =-    (Prelude.foldr sem_SetClauseList_Cons sem_SetClauseList_Nil (Prelude.map sem_SetClause list) )--- semantic domain-type T_SetClauseList  = Scope ->-                        ( SetClauseList,([(String,Type)]),([TypeError]))-data Inh_SetClauseList  = Inh_SetClauseList {scope_Inh_SetClauseList :: Scope}-data Syn_SetClauseList  = Syn_SetClauseList {annotatedTree_Syn_SetClauseList :: SetClauseList,pairs_Syn_SetClauseList :: [(String,Type)],rowSetErrors_Syn_SetClauseList :: [TypeError]}-wrap_SetClauseList :: T_SetClauseList  ->-                      Inh_SetClauseList  ->-                      Syn_SetClauseList -wrap_SetClauseList sem (Inh_SetClauseList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetErrors) =-             (sem _lhsIscope )-     in  (Syn_SetClauseList _lhsOannotatedTree _lhsOpairs _lhsOrowSetErrors ))-sem_SetClauseList_Cons :: T_SetClause  ->-                          T_SetClauseList  ->-                          T_SetClauseList -sem_SetClauseList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOrowSetErrors :: ([TypeError])-              _lhsOannotatedTree :: SetClauseList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: SetClause-              _hdIpairs :: ([(String,Type)])-              _hdIrowSetError :: (Maybe TypeError)-              _tlIannotatedTree :: SetClauseList-              _tlIpairs :: ([(String,Type)])-              _tlIrowSetErrors :: ([TypeError])-              _lhsOpairs =-                  _hdIpairs ++ _tlIpairs-              _lhsOrowSetErrors =-                  maybeToList _hdIrowSetError ++ _tlIrowSetErrors-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdIpairs,_hdIrowSetError) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlIpairs,_tlIrowSetErrors) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetErrors)))-sem_SetClauseList_Nil :: T_SetClauseList -sem_SetClauseList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOrowSetErrors :: ([TypeError])-              _lhsOannotatedTree :: SetClauseList-              _lhsOpairs =-                  []-              _lhsOrowSetErrors =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOpairs,_lhsOrowSetErrors)))--- Statement ----------------------------------------------------data Statement  = Assignment (Annotation) (String) (Expression) -                | CaseStatement (Annotation) (Expression) (ExpressionListStatementListPairList) (StatementList) -                | ContinueStatement (Annotation) -                | Copy (Annotation) (String) (StringList) (CopySource) -                | CopyData (Annotation) (String) -                | CreateDomain (Annotation) (String) (TypeName) (Maybe Expression) -                | CreateFunction (Annotation) (Language) (String) (ParamDefList) (TypeName) (String) (FnBody) (Volatility) -                | CreateTable (Annotation) (String) (AttributeDefList) (ConstraintList) -                | CreateTableAs (Annotation) (String) (SelectExpression) -                | CreateType (Annotation) (String) (TypeAttributeDefList) -                | CreateView (Annotation) (String) (SelectExpression) -                | Delete (Annotation) (String) (Where) (Maybe SelectList) -                | DropFunction (Annotation) (IfExists) (StringStringListPairList) (Cascade) -                | DropSomething (Annotation) (DropType) (IfExists) (StringList) (Cascade) -                | Execute (Annotation) (Expression) -                | ExecuteInto (Annotation) (Expression) (StringList) -                | ForIntegerStatement (Annotation) (String) (Expression) (Expression) (StatementList) -                | ForSelectStatement (Annotation) (String) (SelectExpression) (StatementList) -                | If (Annotation) (ExpressionStatementListPairList) (StatementList) -                | Insert (Annotation) (String) (StringList) (SelectExpression) (Maybe SelectList) -                | NullStatement (Annotation) -                | Perform (Annotation) (Expression) -                | Raise (Annotation) (RaiseType) (String) (ExpressionList) -                | Return (Annotation) (Maybe Expression) -                | ReturnNext (Annotation) (Expression) -                | ReturnQuery (Annotation) (SelectExpression) -                | SelectStatement (Annotation) (SelectExpression) -                | Truncate (Annotation) (StringList) (RestartIdentity) (Cascade) -                | Update (Annotation) (String) (SetClauseList) (Where) (Maybe SelectList) -                | WhileStatement (Annotation) (Expression) (StatementList) -                deriving ( Eq,Show)--- cata-sem_Statement :: Statement  ->-                 T_Statement -sem_Statement (Assignment _ann _target _value )  =-    (sem_Statement_Assignment _ann _target (sem_Expression _value ) )-sem_Statement (CaseStatement _ann _val _cases _els )  =-    (sem_Statement_CaseStatement _ann (sem_Expression _val ) (sem_ExpressionListStatementListPairList _cases ) (sem_StatementList _els ) )-sem_Statement (ContinueStatement _ann )  =-    (sem_Statement_ContinueStatement _ann )-sem_Statement (Copy _ann _table _targetCols _source )  =-    (sem_Statement_Copy _ann _table (sem_StringList _targetCols ) (sem_CopySource _source ) )-sem_Statement (CopyData _ann _insData )  =-    (sem_Statement_CopyData _ann _insData )-sem_Statement (CreateDomain _ann _name _typ _check )  =-    (sem_Statement_CreateDomain _ann _name (sem_TypeName _typ ) _check )-sem_Statement (CreateFunction _ann _lang _name _params _rettype _bodyQuote _body _vol )  =-    (sem_Statement_CreateFunction _ann (sem_Language _lang ) _name (sem_ParamDefList _params ) (sem_TypeName _rettype ) _bodyQuote (sem_FnBody _body ) (sem_Volatility _vol ) )-sem_Statement (CreateTable _ann _name _atts _cons )  =-    (sem_Statement_CreateTable _ann _name (sem_AttributeDefList _atts ) (sem_ConstraintList _cons ) )-sem_Statement (CreateTableAs _ann _name _expr )  =-    (sem_Statement_CreateTableAs _ann _name (sem_SelectExpression _expr ) )-sem_Statement (CreateType _ann _name _atts )  =-    (sem_Statement_CreateType _ann _name (sem_TypeAttributeDefList _atts ) )-sem_Statement (CreateView _ann _name _expr )  =-    (sem_Statement_CreateView _ann _name (sem_SelectExpression _expr ) )-sem_Statement (Delete _ann _table _whr _returning )  =-    (sem_Statement_Delete _ann _table (sem_Where _whr ) _returning )-sem_Statement (DropFunction _ann _ifE _sigs _cascade )  =-    (sem_Statement_DropFunction _ann (sem_IfExists _ifE ) (sem_StringStringListPairList _sigs ) (sem_Cascade _cascade ) )-sem_Statement (DropSomething _ann _dropType _ifE _names _cascade )  =-    (sem_Statement_DropSomething _ann (sem_DropType _dropType ) (sem_IfExists _ifE ) (sem_StringList _names ) (sem_Cascade _cascade ) )-sem_Statement (Execute _ann _expr )  =-    (sem_Statement_Execute _ann (sem_Expression _expr ) )-sem_Statement (ExecuteInto _ann _expr _targets )  =-    (sem_Statement_ExecuteInto _ann (sem_Expression _expr ) (sem_StringList _targets ) )-sem_Statement (ForIntegerStatement _ann _var _from _to _sts )  =-    (sem_Statement_ForIntegerStatement _ann _var (sem_Expression _from ) (sem_Expression _to ) (sem_StatementList _sts ) )-sem_Statement (ForSelectStatement _ann _var _sel _sts )  =-    (sem_Statement_ForSelectStatement _ann _var (sem_SelectExpression _sel ) (sem_StatementList _sts ) )-sem_Statement (If _ann _cases _els )  =-    (sem_Statement_If _ann (sem_ExpressionStatementListPairList _cases ) (sem_StatementList _els ) )-sem_Statement (Insert _ann _table _targetCols _insData _returning )  =-    (sem_Statement_Insert _ann _table (sem_StringList _targetCols ) (sem_SelectExpression _insData ) _returning )-sem_Statement (NullStatement _ann )  =-    (sem_Statement_NullStatement _ann )-sem_Statement (Perform _ann _expr )  =-    (sem_Statement_Perform _ann (sem_Expression _expr ) )-sem_Statement (Raise _ann _level _message _args )  =-    (sem_Statement_Raise _ann (sem_RaiseType _level ) _message (sem_ExpressionList _args ) )-sem_Statement (Return _ann _value )  =-    (sem_Statement_Return _ann _value )-sem_Statement (ReturnNext _ann _expr )  =-    (sem_Statement_ReturnNext _ann (sem_Expression _expr ) )-sem_Statement (ReturnQuery _ann _sel )  =-    (sem_Statement_ReturnQuery _ann (sem_SelectExpression _sel ) )-sem_Statement (SelectStatement _ann _ex )  =-    (sem_Statement_SelectStatement _ann (sem_SelectExpression _ex ) )-sem_Statement (Truncate _ann _tables _restartIdentity _cascade )  =-    (sem_Statement_Truncate _ann (sem_StringList _tables ) (sem_RestartIdentity _restartIdentity ) (sem_Cascade _cascade ) )-sem_Statement (Update _ann _table _assigns _whr _returning )  =-    (sem_Statement_Update _ann _table (sem_SetClauseList _assigns ) (sem_Where _whr ) _returning )-sem_Statement (WhileStatement _ann _expr _sts )  =-    (sem_Statement_WhileStatement _ann (sem_Expression _expr ) (sem_StatementList _sts ) )--- semantic domain-type T_Statement  = Scope ->-                    ( Statement)-data Inh_Statement  = Inh_Statement {scope_Inh_Statement :: Scope}-data Syn_Statement  = Syn_Statement {annotatedTree_Syn_Statement :: Statement}-wrap_Statement :: T_Statement  ->-                  Inh_Statement  ->-                  Syn_Statement -wrap_Statement sem (Inh_Statement _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Statement _lhsOannotatedTree ))-sem_Statement_Assignment :: Annotation ->-                            String ->-                            T_Expression  ->-                            T_Statement -sem_Statement_Assignment ann_ target_ value_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _valueOscope :: Scope-              _valueIannotatedTree :: Expression-              _valueIliftedColumnName :: String-              _annotatedTree =-                  Assignment ann_ target_ _valueIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _valueOscope =-                  _lhsIscope-              ( _valueIannotatedTree,_valueIliftedColumnName) =-                  (value_ _valueOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CaseStatement :: Annotation ->-                               T_Expression  ->-                               T_ExpressionListStatementListPairList  ->-                               T_StatementList  ->-                               T_Statement -sem_Statement_CaseStatement ann_ val_ cases_ els_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _valOscope :: Scope-              _casesOscope :: Scope-              _elsOscope :: Scope-              _valIannotatedTree :: Expression-              _valIliftedColumnName :: String-              _casesIannotatedTree :: ExpressionListStatementListPairList-              _elsIannotatedTree :: StatementList-              _annotatedTree =-                  CaseStatement ann_ _valIannotatedTree _casesIannotatedTree _elsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _valOscope =-                  _lhsIscope-              _casesOscope =-                  _lhsIscope-              _elsOscope =-                  _lhsIscope-              ( _valIannotatedTree,_valIliftedColumnName) =-                  (val_ _valOscope )-              ( _casesIannotatedTree) =-                  (cases_ _casesOscope )-              ( _elsIannotatedTree) =-                  (els_ _elsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_ContinueStatement :: Annotation ->-                                   T_Statement -sem_Statement_ContinueStatement ann_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _annotatedTree =-                  ContinueStatement ann_-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Statement_Copy :: Annotation ->-                      String ->-                      T_StringList  ->-                      T_CopySource  ->-                      T_Statement -sem_Statement_Copy ann_ table_ targetCols_ source_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _targetColsOscope :: Scope-              _sourceOscope :: Scope-              _targetColsIannotatedTree :: StringList-              _targetColsIstrings :: ([String])-              _sourceIannotatedTree :: CopySource-              _annotatedTree =-                  Copy ann_ table_ _targetColsIannotatedTree _sourceIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _targetColsOscope =-                  _lhsIscope-              _sourceOscope =-                  _lhsIscope-              ( _targetColsIannotatedTree,_targetColsIstrings) =-                  (targetCols_ _targetColsOscope )-              ( _sourceIannotatedTree) =-                  (source_ _sourceOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CopyData :: Annotation ->-                          String ->-                          T_Statement -sem_Statement_CopyData ann_ insData_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _annotatedTree =-                  CopyData ann_ insData_-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Statement_CreateDomain :: Annotation ->-                              String ->-                              T_TypeName  ->-                              (Maybe Expression) ->-                              T_Statement -sem_Statement_CreateDomain ann_ name_ typ_ check_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _namedTypeType =-                  case _typInamedType of-                    Left _ -> TypeCheckFailed-                    Right x -> x-              _tpe =-                  checkTypes [_namedTypeType    ] $ Right $ Pseudo Void-              _backTree =-                  CreateDomain ann_ name_ _typIannotatedTree check_-              _statementInfo =-                  CreateDomainInfo name_ _namedTypeType-              _annotatedTree =-                  CreateDomain ann_ name_ _typIannotatedTree check_-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CreateFunction :: Annotation ->-                                T_Language  ->-                                String ->-                                T_ParamDefList  ->-                                T_TypeName  ->-                                String ->-                                T_FnBody  ->-                                T_Volatility  ->-                                T_Statement -sem_Statement_CreateFunction ann_ lang_ name_ params_ rettype_ bodyQuote_ body_ vol_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _langOscope :: Scope-              _paramsOscope :: Scope-              _rettypeOscope :: Scope-              _bodyOscope :: Scope-              _volOscope :: Scope-              _langIannotatedTree :: Language-              _paramsIannotatedTree :: ParamDefList-              _paramsIparams :: ([(String,Either [TypeError] Type)])-              _rettypeIannotatedTree :: TypeName-              _rettypeInamedType :: (Either [TypeError] Type)-              _bodyIannotatedTree :: FnBody-              _volIannotatedTree :: Volatility-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _retTypeType =-                  errorToTypeFail _rettypeInamedType-              _paramTypes =-                  let tpes = map snd _paramsIparams-                  in if null $ concat $ lefts tpes-                     then rights tpes-                     else [TypeCheckFailed]-              _tpe =-                  do-                    _rettypeInamedType-                    let tpes = map snd _paramsIparams-                    checkErrorList (concat $ lefts tpes) $ Pseudo Void-              _backTree =-                  CreateFunction ann_-                                 _langIannotatedTree-                                 name_-                                 _paramsIannotatedTree-                                 _rettypeIannotatedTree-                                 bodyQuote_-                                 _bodyIannotatedTree-                                 _volIannotatedTree-              _statementInfo =-                  CreateFunctionInfo (name_,_paramTypes    ,_retTypeType    )-              _annotatedTree =-                  CreateFunction ann_ _langIannotatedTree name_ _paramsIannotatedTree _rettypeIannotatedTree bodyQuote_ _bodyIannotatedTree _volIannotatedTree-              _langOscope =-                  _lhsIscope-              _paramsOscope =-                  _lhsIscope-              _rettypeOscope =-                  _lhsIscope-              _bodyOscope =-                  _lhsIscope-              _volOscope =-                  _lhsIscope-              ( _langIannotatedTree) =-                  (lang_ _langOscope )-              ( _paramsIannotatedTree,_paramsIparams) =-                  (params_ _paramsOscope )-              ( _rettypeIannotatedTree,_rettypeInamedType) =-                  (rettype_ _rettypeOscope )-              ( _bodyIannotatedTree) =-                  (body_ _bodyOscope )-              ( _volIannotatedTree) =-                  (vol_ _volOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CreateTable :: Annotation ->-                             String ->-                             T_AttributeDefList  ->-                             T_ConstraintList  ->-                             T_Statement -sem_Statement_CreateTable ann_ name_ atts_ cons_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _attsOscope :: Scope-              _consOscope :: Scope-              _attsIannotatedTree :: AttributeDefList-              _attsIattrs :: ([(String, Either [TypeError] Type)])-              _consIannotatedTree :: ConstraintList-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _attrTypes =-                  map snd _attsIattrs-              _tpe =-                  checkErrorList (concat $ lefts _attrTypes    ) $ Pseudo Void-              _compositeType =-                  errorToTypeFailF (const $ UnnamedCompositeType doneAtts) _tpe-                  where-                    doneAtts = map (second errorToTypeFail) _attsIattrs-              _backTree =-                  CreateTable ann_ name_ _attsIannotatedTree _consIannotatedTree-              _statementInfo =-                  RelvarInfo (name_, TableComposite, _compositeType    )-              _annotatedTree =-                  CreateTable ann_ name_ _attsIannotatedTree _consIannotatedTree-              _attsOscope =-                  _lhsIscope-              _consOscope =-                  _lhsIscope-              ( _attsIannotatedTree,_attsIattrs) =-                  (atts_ _attsOscope )-              ( _consIannotatedTree) =-                  (cons_ _consOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CreateTableAs :: Annotation ->-                               String ->-                               T_SelectExpression  ->-                               T_Statement -sem_Statement_CreateTableAs ann_ name_ expr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _exprIannotatedTree :: SelectExpression-              _selType =-                  getTypeAnnotation _exprIannotatedTree-              _tpe =-                  Right _selType-              _backTree =-                  CreateTableAs ann_ name_ _exprIannotatedTree-              _statementInfo =-                  RelvarInfo (name_, TableComposite, _selType    )-              _annotatedTree =-                  CreateTableAs ann_ name_ _exprIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              ( _exprIannotatedTree) =-                  (expr_ _exprOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CreateType :: Annotation ->-                            String ->-                            T_TypeAttributeDefList  ->-                            T_Statement -sem_Statement_CreateType ann_ name_ atts_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _attsOscope :: Scope-              _attsIannotatedTree :: TypeAttributeDefList-              _attsIattrs :: ([(String, Either [TypeError] Type)])-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _attrTypes =-                  map snd _attsIattrs-              _tpe =-                  checkErrorList (concat $ lefts _attrTypes    ) $ Pseudo Void-              _compositeType =-                  errorToTypeFailF (const $ UnnamedCompositeType doneAtts) _tpe-                  where-                    doneAtts = map (second errorToTypeFail) _attsIattrs-              _backTree =-                  CreateType ann_ name_ _attsIannotatedTree-              _statementInfo =-                  RelvarInfo (name_, Composite, _compositeType    )-              _annotatedTree =-                  CreateType ann_ name_ _attsIannotatedTree-              _attsOscope =-                  _lhsIscope-              ( _attsIannotatedTree,_attsIattrs) =-                  (atts_ _attsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_CreateView :: Annotation ->-                            String ->-                            T_SelectExpression  ->-                            T_Statement -sem_Statement_CreateView ann_ name_ expr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _exprIannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _tpe =-                  checkTypes [getTypeAnnotation _exprIannotatedTree] $ Right $ Pseudo Void-              _backTree =-                  CreateView ann_ name_ _exprIannotatedTree-              _statementInfo =-                  RelvarInfo (name_, ViewComposite, getTypeAnnotation _exprIannotatedTree)-              _annotatedTree =-                  CreateView ann_ name_ _exprIannotatedTree-              _exprOscope =-                  _lhsIscope-              ( _exprIannotatedTree) =-                  (expr_ _exprOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Delete :: Annotation ->-                        String ->-                        T_Where  ->-                        (Maybe SelectList) ->-                        T_Statement -sem_Statement_Delete ann_ table_ whr_ returning_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _whrOscope :: Scope-              _whrIannotatedTree :: Where-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _tpe =-                  case checkRelationExists _lhsIscope table_ of-                    Just e -> Left [e]-                    Nothing -> do-                      whereType <- checkExpressionBool _whrIannotatedTree-                      return $ Pseudo Void-              _statementInfo =-                  DeleteInfo table_-              _backTree =-                  Delete ann_ table_ _whrIannotatedTree returning_-              _annotatedTree =-                  Delete ann_ table_ _whrIannotatedTree returning_-              _whrOscope =-                  _lhsIscope-              ( _whrIannotatedTree) =-                  (whr_ _whrOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_DropFunction :: Annotation ->-                              T_IfExists  ->-                              T_StringStringListPairList  ->-                              T_Cascade  ->-                              T_Statement -sem_Statement_DropFunction ann_ ifE_ sigs_ cascade_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _ifEOscope :: Scope-              _sigsOscope :: Scope-              _cascadeOscope :: Scope-              _ifEIannotatedTree :: IfExists-              _sigsIannotatedTree :: StringStringListPairList-              _cascadeIannotatedTree :: Cascade-              _annotatedTree =-                  DropFunction ann_ _ifEIannotatedTree _sigsIannotatedTree _cascadeIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _ifEOscope =-                  _lhsIscope-              _sigsOscope =-                  _lhsIscope-              _cascadeOscope =-                  _lhsIscope-              ( _ifEIannotatedTree) =-                  (ifE_ _ifEOscope )-              ( _sigsIannotatedTree) =-                  (sigs_ _sigsOscope )-              ( _cascadeIannotatedTree) =-                  (cascade_ _cascadeOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_DropSomething :: Annotation ->-                               T_DropType  ->-                               T_IfExists  ->-                               T_StringList  ->-                               T_Cascade  ->-                               T_Statement -sem_Statement_DropSomething ann_ dropType_ ifE_ names_ cascade_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _dropTypeOscope :: Scope-              _ifEOscope :: Scope-              _namesOscope :: Scope-              _cascadeOscope :: Scope-              _dropTypeIannotatedTree :: DropType-              _ifEIannotatedTree :: IfExists-              _namesIannotatedTree :: StringList-              _namesIstrings :: ([String])-              _cascadeIannotatedTree :: Cascade-              _annotatedTree =-                  DropSomething ann_ _dropTypeIannotatedTree _ifEIannotatedTree _namesIannotatedTree _cascadeIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _dropTypeOscope =-                  _lhsIscope-              _ifEOscope =-                  _lhsIscope-              _namesOscope =-                  _lhsIscope-              _cascadeOscope =-                  _lhsIscope-              ( _dropTypeIannotatedTree) =-                  (dropType_ _dropTypeOscope )-              ( _ifEIannotatedTree) =-                  (ifE_ _ifEOscope )-              ( _namesIannotatedTree,_namesIstrings) =-                  (names_ _namesOscope )-              ( _cascadeIannotatedTree) =-                  (cascade_ _cascadeOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Execute :: Annotation ->-                         T_Expression  ->-                         T_Statement -sem_Statement_Execute ann_ expr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _annotatedTree =-                  Execute ann_ _exprIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_ExecuteInto :: Annotation ->-                             T_Expression  ->-                             T_StringList  ->-                             T_Statement -sem_Statement_ExecuteInto ann_ expr_ targets_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _targetsOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _targetsIannotatedTree :: StringList-              _targetsIstrings :: ([String])-              _annotatedTree =-                  ExecuteInto ann_ _exprIannotatedTree _targetsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              _targetsOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-              ( _targetsIannotatedTree,_targetsIstrings) =-                  (targets_ _targetsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_ForIntegerStatement :: Annotation ->-                                     String ->-                                     T_Expression  ->-                                     T_Expression  ->-                                     T_StatementList  ->-                                     T_Statement -sem_Statement_ForIntegerStatement ann_ var_ from_ to_ sts_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _fromOscope :: Scope-              _toOscope :: Scope-              _stsOscope :: Scope-              _fromIannotatedTree :: Expression-              _fromIliftedColumnName :: String-              _toIannotatedTree :: Expression-              _toIliftedColumnName :: String-              _stsIannotatedTree :: StatementList-              _annotatedTree =-                  ForIntegerStatement ann_ var_ _fromIannotatedTree _toIannotatedTree _stsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _fromOscope =-                  _lhsIscope-              _toOscope =-                  _lhsIscope-              _stsOscope =-                  _lhsIscope-              ( _fromIannotatedTree,_fromIliftedColumnName) =-                  (from_ _fromOscope )-              ( _toIannotatedTree,_toIliftedColumnName) =-                  (to_ _toOscope )-              ( _stsIannotatedTree) =-                  (sts_ _stsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_ForSelectStatement :: Annotation ->-                                    String ->-                                    T_SelectExpression  ->-                                    T_StatementList  ->-                                    T_Statement -sem_Statement_ForSelectStatement ann_ var_ sel_ sts_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _selOscope :: Scope-              _stsOscope :: Scope-              _selIannotatedTree :: SelectExpression-              _stsIannotatedTree :: StatementList-              _annotatedTree =-                  ForSelectStatement ann_ var_ _selIannotatedTree _stsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _selOscope =-                  _lhsIscope-              _stsOscope =-                  _lhsIscope-              ( _selIannotatedTree) =-                  (sel_ _selOscope )-              ( _stsIannotatedTree) =-                  (sts_ _stsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_If :: Annotation ->-                    T_ExpressionStatementListPairList  ->-                    T_StatementList  ->-                    T_Statement -sem_Statement_If ann_ cases_ els_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _casesOscope :: Scope-              _elsOscope :: Scope-              _casesIannotatedTree :: ExpressionStatementListPairList-              _elsIannotatedTree :: StatementList-              _annotatedTree =-                  If ann_ _casesIannotatedTree _elsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _casesOscope =-                  _lhsIscope-              _elsOscope =-                  _lhsIscope-              ( _casesIannotatedTree) =-                  (cases_ _casesOscope )-              ( _elsIannotatedTree) =-                  (els_ _elsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Insert :: Annotation ->-                        String ->-                        T_StringList  ->-                        T_SelectExpression  ->-                        (Maybe SelectList) ->-                        T_Statement -sem_Statement_Insert ann_ table_ targetCols_ insData_ returning_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _targetColsOscope :: Scope-              _insDataOscope :: Scope-              _targetColsIannotatedTree :: StringList-              _targetColsIstrings :: ([String])-              _insDataIannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _columnStuff =-                  checkColumnConsistency _lhsIscope-                                         table_-                                         _targetColsIstrings-                                         (unwrapComposite $ unwrapSetOf $-                                                          getTypeAnnotation _insDataIannotatedTree)-              _tpe =-                  checkTypes [getTypeAnnotation _insDataIannotatedTree] $ do-                    _columnStuff-                    Right $ Pseudo Void-              _statementInfo =-                  InsertInfo table_ $ errorToTypeFailF UnnamedCompositeType _columnStuff-              _backTree =-                  Insert ann_ table_ _targetColsIannotatedTree-                         _insDataIannotatedTree returning_-              _annotatedTree =-                  Insert ann_ table_ _targetColsIannotatedTree _insDataIannotatedTree returning_-              _targetColsOscope =-                  _lhsIscope-              _insDataOscope =-                  _lhsIscope-              ( _targetColsIannotatedTree,_targetColsIstrings) =-                  (targetCols_ _targetColsOscope )-              ( _insDataIannotatedTree) =-                  (insData_ _insDataOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_NullStatement :: Annotation ->-                               T_Statement -sem_Statement_NullStatement ann_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _annotatedTree =-                  NullStatement ann_-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Statement_Perform :: Annotation ->-                         T_Expression  ->-                         T_Statement -sem_Statement_Perform ann_ expr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _annotatedTree =-                  Perform ann_ _exprIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Raise :: Annotation ->-                       T_RaiseType  ->-                       String ->-                       T_ExpressionList  ->-                       T_Statement -sem_Statement_Raise ann_ level_ message_ args_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _levelOscope :: Scope-              _argsOscope :: Scope-              _levelIannotatedTree :: RaiseType-              _argsIannotatedTree :: ExpressionList-              _argsItypeList :: ([Type])-              _annotatedTree =-                  Raise ann_ _levelIannotatedTree message_ _argsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _levelOscope =-                  _lhsIscope-              _argsOscope =-                  _lhsIscope-              ( _levelIannotatedTree) =-                  (level_ _levelOscope )-              ( _argsIannotatedTree,_argsItypeList) =-                  (args_ _argsOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Return :: Annotation ->-                        (Maybe Expression) ->-                        T_Statement -sem_Statement_Return ann_ value_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _annotatedTree =-                  Return ann_ value_-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Statement_ReturnNext :: Annotation ->-                            T_Expression  ->-                            T_Statement -sem_Statement_ReturnNext ann_ expr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _annotatedTree =-                  ReturnNext ann_ _exprIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_ReturnQuery :: Annotation ->-                             T_SelectExpression  ->-                             T_Statement -sem_Statement_ReturnQuery ann_ sel_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _selOscope :: Scope-              _selIannotatedTree :: SelectExpression-              _annotatedTree =-                  ReturnQuery ann_ _selIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _selOscope =-                  _lhsIscope-              ( _selIannotatedTree) =-                  (sel_ _selOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_SelectStatement :: Annotation ->-                                 T_SelectExpression  ->-                                 T_Statement -sem_Statement_SelectStatement ann_ ex_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exOscope :: Scope-              _exIannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _tpe =-                  checkTypes [getTypeAnnotation _exIannotatedTree] $ Right $ Pseudo Void-              _statementInfo =-                  SelectInfo $ getTypeAnnotation _exIannotatedTree-              _backTree =-                  SelectStatement ann_ _exIannotatedTree-              _annotatedTree =-                  SelectStatement ann_ _exIannotatedTree-              _exOscope =-                  _lhsIscope-              ( _exIannotatedTree) =-                  (ex_ _exOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Truncate :: Annotation ->-                          T_StringList  ->-                          T_RestartIdentity  ->-                          T_Cascade  ->-                          T_Statement -sem_Statement_Truncate ann_ tables_ restartIdentity_ cascade_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _tablesOscope :: Scope-              _restartIdentityOscope :: Scope-              _cascadeOscope :: Scope-              _tablesIannotatedTree :: StringList-              _tablesIstrings :: ([String])-              _restartIdentityIannotatedTree :: RestartIdentity-              _cascadeIannotatedTree :: Cascade-              _annotatedTree =-                  Truncate ann_ _tablesIannotatedTree _restartIdentityIannotatedTree _cascadeIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _tablesOscope =-                  _lhsIscope-              _restartIdentityOscope =-                  _lhsIscope-              _cascadeOscope =-                  _lhsIscope-              ( _tablesIannotatedTree,_tablesIstrings) =-                  (tables_ _tablesOscope )-              ( _restartIdentityIannotatedTree) =-                  (restartIdentity_ _restartIdentityOscope )-              ( _cascadeIannotatedTree) =-                  (cascade_ _cascadeOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_Update :: Annotation ->-                        String ->-                        T_SetClauseList  ->-                        T_Where  ->-                        (Maybe SelectList) ->-                        T_Statement -sem_Statement_Update ann_ table_ assigns_ whr_ returning_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _assignsOscope :: Scope-              _whrOscope :: Scope-              _assignsIannotatedTree :: SetClauseList-              _assignsIpairs :: ([(String,Type)])-              _assignsIrowSetErrors :: ([TypeError])-              _whrIannotatedTree :: Where-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    $ Just $ StatementInfoA _statementInfo-              _tpe =-                  do-                  let re = checkRelationExists _lhsIscope table_-                  when (isJust re) $-                       Left [fromJust $ re]-                  whereType <- checkExpressionBool _whrIannotatedTree-                  chainTypeCheckFailed (whereType:map snd _assignsIpairs) $ do-                    _columnsConsistent-                    checkErrorList _assignsIrowSetErrors $ Pseudo Void-              _columnsConsistent =-                  checkColumnConsistency _lhsIscope table_ (map fst _assignsIpairs) _assignsIpairs-              _statementInfo =-                  UpdateInfo table_ $ flip errorToTypeFailF _columnsConsistent     $-                                           \c -> let colNames = map fst _assignsIpairs-                                                 in UnnamedCompositeType $ map (\t -> (t,getType c t)) colNames-                  where-                    getType cols t = fromJust $ lookup t cols-              _backTree =-                  Update ann_ table_ _assignsIannotatedTree _whrIannotatedTree returning_-              _annotatedTree =-                  Update ann_ table_ _assignsIannotatedTree _whrIannotatedTree returning_-              _assignsOscope =-                  _lhsIscope-              _whrOscope =-                  _lhsIscope-              ( _assignsIannotatedTree,_assignsIpairs,_assignsIrowSetErrors) =-                  (assigns_ _assignsOscope )-              ( _whrIannotatedTree) =-                  (whr_ _whrOscope )-          in  ( _lhsOannotatedTree)))-sem_Statement_WhileStatement :: Annotation ->-                                T_Expression  ->-                                T_StatementList  ->-                                T_Statement -sem_Statement_WhileStatement ann_ expr_ sts_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Statement-              _exprOscope :: Scope-              _stsOscope :: Scope-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _stsIannotatedTree :: StatementList-              _annotatedTree =-                  WhileStatement ann_ _exprIannotatedTree _stsIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _exprOscope =-                  _lhsIscope-              _stsOscope =-                  _lhsIscope-              ( _exprIannotatedTree,_exprIliftedColumnName) =-                  (expr_ _exprOscope )-              ( _stsIannotatedTree) =-                  (sts_ _stsOscope )-          in  ( _lhsOannotatedTree)))--- StatementList ------------------------------------------------type StatementList  = [(Statement)]--- cata-sem_StatementList :: StatementList  ->-                     T_StatementList -sem_StatementList list  =-    (Prelude.foldr sem_StatementList_Cons sem_StatementList_Nil (Prelude.map sem_Statement list) )--- semantic domain-type T_StatementList  = Scope ->-                        ( StatementList)-data Inh_StatementList  = Inh_StatementList {scope_Inh_StatementList :: Scope}-data Syn_StatementList  = Syn_StatementList {annotatedTree_Syn_StatementList :: StatementList}-wrap_StatementList :: T_StatementList  ->-                      Inh_StatementList  ->-                      Syn_StatementList -wrap_StatementList sem (Inh_StatementList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_StatementList _lhsOannotatedTree ))-sem_StatementList_Cons :: T_Statement  ->-                          T_StatementList  ->-                          T_StatementList -sem_StatementList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: StatementList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: Statement-              _tlIannotatedTree :: StatementList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_StatementList_Nil :: T_StatementList -sem_StatementList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: StatementList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- StringList ---------------------------------------------------type StringList  = [(String)]--- cata-sem_StringList :: StringList  ->-                  T_StringList -sem_StringList list  =-    (Prelude.foldr sem_StringList_Cons sem_StringList_Nil list )--- semantic domain-type T_StringList  = Scope ->-                     ( StringList,([String]))-data Inh_StringList  = Inh_StringList {scope_Inh_StringList :: Scope}-data Syn_StringList  = Syn_StringList {annotatedTree_Syn_StringList :: StringList,strings_Syn_StringList :: [String]}-wrap_StringList :: T_StringList  ->-                   Inh_StringList  ->-                   Syn_StringList -wrap_StringList sem (Inh_StringList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOstrings) =-             (sem _lhsIscope )-     in  (Syn_StringList _lhsOannotatedTree _lhsOstrings ))-sem_StringList_Cons :: String ->-                       T_StringList  ->-                       T_StringList -sem_StringList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOstrings :: ([String])-              _lhsOannotatedTree :: StringList-              _tlOscope :: Scope-              _tlIannotatedTree :: StringList-              _tlIstrings :: ([String])-              _lhsOstrings =-                  hd_ : _tlIstrings-              _annotatedTree =-                  (:) hd_ _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _tlOscope =-                  _lhsIscope-              ( _tlIannotatedTree,_tlIstrings) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOstrings)))-sem_StringList_Nil :: T_StringList -sem_StringList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOstrings :: ([String])-              _lhsOannotatedTree :: StringList-              _lhsOstrings =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOstrings)))--- StringStringListPair -----------------------------------------type StringStringListPair  = ( (String),(StringList))--- cata-sem_StringStringListPair :: StringStringListPair  ->-                            T_StringStringListPair -sem_StringStringListPair ( x1,x2)  =-    (sem_StringStringListPair_Tuple x1 (sem_StringList x2 ) )--- semantic domain-type T_StringStringListPair  = Scope ->-                               ( StringStringListPair)-data Inh_StringStringListPair  = Inh_StringStringListPair {scope_Inh_StringStringListPair :: Scope}-data Syn_StringStringListPair  = Syn_StringStringListPair {annotatedTree_Syn_StringStringListPair :: StringStringListPair}-wrap_StringStringListPair :: T_StringStringListPair  ->-                             Inh_StringStringListPair  ->-                             Syn_StringStringListPair -wrap_StringStringListPair sem (Inh_StringStringListPair _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_StringStringListPair _lhsOannotatedTree ))-sem_StringStringListPair_Tuple :: String ->-                                  T_StringList  ->-                                  T_StringStringListPair -sem_StringStringListPair_Tuple x1_ x2_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: StringStringListPair-              _x2Oscope :: Scope-              _x2IannotatedTree :: StringList-              _x2Istrings :: ([String])-              _annotatedTree =-                  (x1_,_x2IannotatedTree)-              _lhsOannotatedTree =-                  _annotatedTree-              _x2Oscope =-                  _lhsIscope-              ( _x2IannotatedTree,_x2Istrings) =-                  (x2_ _x2Oscope )-          in  ( _lhsOannotatedTree)))--- StringStringListPairList -------------------------------------type StringStringListPairList  = [(StringStringListPair)]--- cata-sem_StringStringListPairList :: StringStringListPairList  ->-                                T_StringStringListPairList -sem_StringStringListPairList list  =-    (Prelude.foldr sem_StringStringListPairList_Cons sem_StringStringListPairList_Nil (Prelude.map sem_StringStringListPair list) )--- semantic domain-type T_StringStringListPairList  = Scope ->-                                   ( StringStringListPairList)-data Inh_StringStringListPairList  = Inh_StringStringListPairList {scope_Inh_StringStringListPairList :: Scope}-data Syn_StringStringListPairList  = Syn_StringStringListPairList {annotatedTree_Syn_StringStringListPairList :: StringStringListPairList}-wrap_StringStringListPairList :: T_StringStringListPairList  ->-                                 Inh_StringStringListPairList  ->-                                 Syn_StringStringListPairList -wrap_StringStringListPairList sem (Inh_StringStringListPairList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_StringStringListPairList _lhsOannotatedTree ))-sem_StringStringListPairList_Cons :: T_StringStringListPair  ->-                                     T_StringStringListPairList  ->-                                     T_StringStringListPairList -sem_StringStringListPairList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: StringStringListPairList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: StringStringListPair-              _tlIannotatedTree :: StringStringListPairList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_StringStringListPairList_Nil :: T_StringStringListPairList -sem_StringStringListPairList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: StringStringListPairList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- TableRef -----------------------------------------------------data TableRef  = JoinedTref (Annotation) (TableRef) (Natural) (JoinType) (TableRef) (OnExpr) -               | SubTref (Annotation) (SelectExpression) (String) -               | Tref (Annotation) (String) -               | TrefAlias (Annotation) (String) (String) -               | TrefFun (Annotation) (Expression) -               | TrefFunAlias (Annotation) (Expression) (String) -               deriving ( Eq,Show)--- cata-sem_TableRef :: TableRef  ->-                T_TableRef -sem_TableRef (JoinedTref _ann _tbl _nat _joinType _tbl1 _onExpr )  =-    (sem_TableRef_JoinedTref _ann (sem_TableRef _tbl ) (sem_Natural _nat ) (sem_JoinType _joinType ) (sem_TableRef _tbl1 ) (sem_OnExpr _onExpr ) )-sem_TableRef (SubTref _ann _sel _alias )  =-    (sem_TableRef_SubTref _ann (sem_SelectExpression _sel ) _alias )-sem_TableRef (Tref _ann _tbl )  =-    (sem_TableRef_Tref _ann _tbl )-sem_TableRef (TrefAlias _ann _tbl _alias )  =-    (sem_TableRef_TrefAlias _ann _tbl _alias )-sem_TableRef (TrefFun _ann _fn )  =-    (sem_TableRef_TrefFun _ann (sem_Expression _fn ) )-sem_TableRef (TrefFunAlias _ann _fn _alias )  =-    (sem_TableRef_TrefFunAlias _ann (sem_Expression _fn ) _alias )--- semantic domain-type T_TableRef  = Scope ->-                   ( TableRef,([QualifiedScope]),([String]))-data Inh_TableRef  = Inh_TableRef {scope_Inh_TableRef :: Scope}-data Syn_TableRef  = Syn_TableRef {annotatedTree_Syn_TableRef :: TableRef,idens_Syn_TableRef :: [QualifiedScope],joinIdens_Syn_TableRef :: [String]}-wrap_TableRef :: T_TableRef  ->-                 Inh_TableRef  ->-                 Syn_TableRef -wrap_TableRef sem (Inh_TableRef _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens) =-             (sem _lhsIscope )-     in  (Syn_TableRef _lhsOannotatedTree _lhsOidens _lhsOjoinIdens ))-sem_TableRef_JoinedTref :: Annotation ->-                           T_TableRef  ->-                           T_Natural  ->-                           T_JoinType  ->-                           T_TableRef  ->-                           T_OnExpr  ->-                           T_TableRef -sem_TableRef_JoinedTref ann_ tbl_ nat_ joinType_ tbl1_ onExpr_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: TableRef-              _lhsOidens :: ([QualifiedScope])-              _lhsOjoinIdens :: ([String])-              _tblOscope :: Scope-              _natOscope :: Scope-              _joinTypeOscope :: Scope-              _tbl1Oscope :: Scope-              _onExprOscope :: Scope-              _tblIannotatedTree :: TableRef-              _tblIidens :: ([QualifiedScope])-              _tblIjoinIdens :: ([String])-              _natIannotatedTree :: Natural-              _joinTypeIannotatedTree :: JoinType-              _tbl1IannotatedTree :: TableRef-              _tbl1Iidens :: ([QualifiedScope])-              _tbl1IjoinIdens :: ([String])-              _onExprIannotatedTree :: OnExpr-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  checkTypes [tblt-                            ,tbl1t] $-                     case (_natIannotatedTree, _onExprIannotatedTree) of-                            (Natural, _) -> unionJoinList $-                                            commonFieldNames tblt tbl1t-                            (_,Just (JoinUsing s)) -> unionJoinList s-                            _ -> unionJoinList []-                  where-                    tblt = getTypeAnnotation _tblIannotatedTree-                    tbl1t = getTypeAnnotation _tbl1IannotatedTree-                    unionJoinList s =-                        combineTableTypesWithUsingList _lhsIscope s tblt tbl1t-              _lhsOidens =-                  _tblIidens ++ _tbl1Iidens-              _lhsOjoinIdens =-                  commonFieldNames (getTypeAnnotation _tblIannotatedTree)-                                   (getTypeAnnotation _tbl1IannotatedTree)-              _backTree =-                  JoinedTref ann_-                             _tblIannotatedTree-                             _natIannotatedTree-                             _joinTypeIannotatedTree-                             _tbl1IannotatedTree-                             _onExprIannotatedTree-              _annotatedTree =-                  JoinedTref ann_ _tblIannotatedTree _natIannotatedTree _joinTypeIannotatedTree _tbl1IannotatedTree _onExprIannotatedTree-              _tblOscope =-                  _lhsIscope-              _natOscope =-                  _lhsIscope-              _joinTypeOscope =-                  _lhsIscope-              _tbl1Oscope =-                  _lhsIscope-              _onExprOscope =-                  _lhsIscope-              ( _tblIannotatedTree,_tblIidens,_tblIjoinIdens) =-                  (tbl_ _tblOscope )-              ( _natIannotatedTree) =-                  (nat_ _natOscope )-              ( _joinTypeIannotatedTree) =-                  (joinType_ _joinTypeOscope )-              ( _tbl1IannotatedTree,_tbl1Iidens,_tbl1IjoinIdens) =-                  (tbl1_ _tbl1Oscope )-              ( _onExprIannotatedTree) =-                  (onExpr_ _onExprOscope )-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))-sem_TableRef_SubTref :: Annotation ->-                        T_SelectExpression  ->-                        String ->-                        T_TableRef -sem_TableRef_SubTref ann_ sel_ alias_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: TableRef-              _lhsOidens :: ([QualifiedScope])-              _lhsOjoinIdens :: ([String])-              _selOscope :: Scope-              _selIannotatedTree :: SelectExpression-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  checkTypes [getTypeAnnotation _selIannotatedTree] $-                  Right $ unwrapSetOfComposite $ getTypeAnnotation _selIannotatedTree-              _backTree =-                  SubTref ann_ _selIannotatedTree alias_-              _lhsOidens =-                  [(alias_, (getTbCols _selIannotatedTree, []))]-              _lhsOjoinIdens =-                  []-              _annotatedTree =-                  SubTref ann_ _selIannotatedTree alias_-              _selOscope =-                  _lhsIscope-              ( _selIannotatedTree) =-                  (sel_ _selOscope )-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))-sem_TableRef_Tref :: Annotation ->-                     String ->-                     T_TableRef -sem_TableRef_Tref ann_ tbl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: TableRef-              _lhsOjoinIdens :: ([String])-              _lhsOidens :: ([QualifiedScope])-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  either Left (Right . fst) _relType-              _lhsOjoinIdens =-                  []-              _relType =-                  getRelationType _lhsIscope tbl_-              _unwrappedRelType =-                  either (const ([], [])) (both unwrapComposite) _relType-              _lhsOidens =-                  [(tbl_, _unwrappedRelType    )]-              _backTree =-                  Tref ann_ tbl_-              _annotatedTree =-                  Tref ann_ tbl_-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))-sem_TableRef_TrefAlias :: Annotation ->-                          String ->-                          String ->-                          T_TableRef -sem_TableRef_TrefAlias ann_ tbl_ alias_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: TableRef-              _lhsOjoinIdens :: ([String])-              _lhsOidens :: ([QualifiedScope])-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  either Left (Right . fst) _relType-              _lhsOjoinIdens =-                  []-              _relType =-                  getRelationType _lhsIscope tbl_-              _unwrappedRelType =-                  either (const ([], [])) (both unwrapComposite) _relType-              _lhsOidens =-                  [(alias_, _unwrappedRelType    )]-              _backTree =-                  TrefAlias ann_ tbl_ alias_-              _annotatedTree =-                  TrefAlias ann_ tbl_ alias_-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))-sem_TableRef_TrefFun :: Annotation ->-                        T_Expression  ->-                        T_TableRef -sem_TableRef_TrefFun ann_ fn_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: TableRef-              _lhsOjoinIdens :: ([String])-              _lhsOidens :: ([QualifiedScope])-              _fnOscope :: Scope-              _fnIannotatedTree :: Expression-              _fnIliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  getFnType _lhsIscope _alias _fnIannotatedTree-              _lhsOjoinIdens =-                  []-              _lhsOidens =-                  case getFunIdens-                            _lhsIscope _alias-                            _fnIannotatedTree of-                    Left e -> []-                    Right x -> [second (\l -> (unwrapComposite l, [])) x]-              _alias =-                  ""-              _backTree =-                  TrefFun ann_ _fnIannotatedTree-              _annotatedTree =-                  TrefFun ann_ _fnIannotatedTree-              _fnOscope =-                  _lhsIscope-              ( _fnIannotatedTree,_fnIliftedColumnName) =-                  (fn_ _fnOscope )-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))-sem_TableRef_TrefFunAlias :: Annotation ->-                             T_Expression  ->-                             String ->-                             T_TableRef -sem_TableRef_TrefFunAlias ann_ fn_ alias_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: TableRef-              _lhsOjoinIdens :: ([String])-              _lhsOidens :: ([QualifiedScope])-              _fnOscope :: Scope-              _fnIannotatedTree :: Expression-              _fnIliftedColumnName :: String-              _lhsOannotatedTree =-                  annTypesAndErrors _backTree-                    (errorToTypeFail _tpe    )-                    (getErrors _tpe    )-                    Nothing-              _tpe =-                  getFnType _lhsIscope alias_ _fnIannotatedTree-              _lhsOjoinIdens =-                  []-              _lhsOidens =-                  case getFunIdens-                            _lhsIscope _alias-                            _fnIannotatedTree of-                    Left e -> []-                    Right x -> [second (\l -> (unwrapComposite l, [])) x]-              _alias =-                  alias_-              _backTree =-                  TrefFunAlias ann_ _fnIannotatedTree alias_-              _annotatedTree =-                  TrefFunAlias ann_ _fnIannotatedTree _alias-              _fnOscope =-                  _lhsIscope-              ( _fnIannotatedTree,_fnIliftedColumnName) =-                  (fn_ _fnOscope )-          in  ( _lhsOannotatedTree,_lhsOidens,_lhsOjoinIdens)))--- TypeAttributeDef ---------------------------------------------data TypeAttributeDef  = TypeAttDef (String) (TypeName) -                       deriving ( Eq,Show)--- cata-sem_TypeAttributeDef :: TypeAttributeDef  ->-                        T_TypeAttributeDef -sem_TypeAttributeDef (TypeAttDef _name _typ )  =-    (sem_TypeAttributeDef_TypeAttDef _name (sem_TypeName _typ ) )--- semantic domain-type T_TypeAttributeDef  = Scope ->-                           ( TypeAttributeDef,String,(Either [TypeError] Type))-data Inh_TypeAttributeDef  = Inh_TypeAttributeDef {scope_Inh_TypeAttributeDef :: Scope}-data Syn_TypeAttributeDef  = Syn_TypeAttributeDef {annotatedTree_Syn_TypeAttributeDef :: TypeAttributeDef,attrName_Syn_TypeAttributeDef :: String,namedType_Syn_TypeAttributeDef :: Either [TypeError] Type}-wrap_TypeAttributeDef :: T_TypeAttributeDef  ->-                         Inh_TypeAttributeDef  ->-                         Syn_TypeAttributeDef -wrap_TypeAttributeDef sem (Inh_TypeAttributeDef _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType) =-             (sem _lhsIscope )-     in  (Syn_TypeAttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType ))-sem_TypeAttributeDef_TypeAttDef :: String ->-                                   T_TypeName  ->-                                   T_TypeAttributeDef -sem_TypeAttributeDef_TypeAttDef name_ typ_  =-    (\ _lhsIscope ->-         (let _lhsOattrName :: String-              _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: TypeAttributeDef-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _lhsOattrName =-                  name_-              _lhsOnamedType =-                  _typInamedType-              _annotatedTree =-                  TypeAttDef name_ _typIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType)))--- TypeAttributeDefList -----------------------------------------type TypeAttributeDefList  = [(TypeAttributeDef)]--- cata-sem_TypeAttributeDefList :: TypeAttributeDefList  ->-                            T_TypeAttributeDefList -sem_TypeAttributeDefList list  =-    (Prelude.foldr sem_TypeAttributeDefList_Cons sem_TypeAttributeDefList_Nil (Prelude.map sem_TypeAttributeDef list) )--- semantic domain-type T_TypeAttributeDefList  = Scope ->-                               ( TypeAttributeDefList,([(String, Either [TypeError] Type)]))-data Inh_TypeAttributeDefList  = Inh_TypeAttributeDefList {scope_Inh_TypeAttributeDefList :: Scope}-data Syn_TypeAttributeDefList  = Syn_TypeAttributeDefList {annotatedTree_Syn_TypeAttributeDefList :: TypeAttributeDefList,attrs_Syn_TypeAttributeDefList :: [(String, Either [TypeError] Type)]}-wrap_TypeAttributeDefList :: T_TypeAttributeDefList  ->-                             Inh_TypeAttributeDefList  ->-                             Syn_TypeAttributeDefList -wrap_TypeAttributeDefList sem (Inh_TypeAttributeDefList _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOattrs) =-             (sem _lhsIscope )-     in  (Syn_TypeAttributeDefList _lhsOannotatedTree _lhsOattrs ))-sem_TypeAttributeDefList_Cons :: T_TypeAttributeDef  ->-                                 T_TypeAttributeDefList  ->-                                 T_TypeAttributeDefList -sem_TypeAttributeDefList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOattrs :: ([(String, Either [TypeError] Type)])-              _lhsOannotatedTree :: TypeAttributeDefList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: TypeAttributeDef-              _hdIattrName :: String-              _hdInamedType :: (Either [TypeError] Type)-              _tlIannotatedTree :: TypeAttributeDefList-              _tlIattrs :: ([(String, Either [TypeError] Type)])-              _lhsOattrs =-                  (_hdIattrName, _hdInamedType) : _tlIattrs-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree,_hdIattrName,_hdInamedType) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree,_tlIattrs) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree,_lhsOattrs)))-sem_TypeAttributeDefList_Nil :: T_TypeAttributeDefList -sem_TypeAttributeDefList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOattrs :: ([(String, Either [TypeError] Type)])-              _lhsOannotatedTree :: TypeAttributeDefList-              _lhsOattrs =-                  []-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree,_lhsOattrs)))--- TypeName -----------------------------------------------------data TypeName  = ArrayTypeName (TypeName) -               | PrecTypeName (String) (Integer) -               | SetOfTypeName (TypeName) -               | SimpleTypeName (String) -               deriving ( Eq,Show)--- cata-sem_TypeName :: TypeName  ->-                T_TypeName -sem_TypeName (ArrayTypeName _typ )  =-    (sem_TypeName_ArrayTypeName (sem_TypeName _typ ) )-sem_TypeName (PrecTypeName _tn _prec )  =-    (sem_TypeName_PrecTypeName _tn _prec )-sem_TypeName (SetOfTypeName _typ )  =-    (sem_TypeName_SetOfTypeName (sem_TypeName _typ ) )-sem_TypeName (SimpleTypeName _tn )  =-    (sem_TypeName_SimpleTypeName _tn )--- semantic domain-type T_TypeName  = Scope ->-                   ( TypeName,(Either [TypeError] Type))-data Inh_TypeName  = Inh_TypeName {scope_Inh_TypeName :: Scope}-data Syn_TypeName  = Syn_TypeName {annotatedTree_Syn_TypeName :: TypeName,namedType_Syn_TypeName :: Either [TypeError] Type}-wrap_TypeName :: T_TypeName  ->-                 Inh_TypeName  ->-                 Syn_TypeName -wrap_TypeName sem (Inh_TypeName _lhsIscope )  =-    (let ( _lhsOannotatedTree,_lhsOnamedType) =-             (sem _lhsIscope )-     in  (Syn_TypeName _lhsOannotatedTree _lhsOnamedType ))-sem_TypeName_ArrayTypeName :: T_TypeName  ->-                              T_TypeName -sem_TypeName_ArrayTypeName typ_  =-    (\ _lhsIscope ->-         (let _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: TypeName-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _lhsOnamedType =-                  ArrayType <$> _typInamedType-              _lhsOannotatedTree =-                  ArrayTypeName _typIannotatedTree-              _annotatedTree =-                  ArrayTypeName _typIannotatedTree-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree,_lhsOnamedType)))-sem_TypeName_PrecTypeName :: String ->-                             Integer ->-                             T_TypeName -sem_TypeName_PrecTypeName tn_ prec_  =-    (\ _lhsIscope ->-         (let _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: TypeName-              _lhsOnamedType =-                  Right TypeCheckFailed-              _lhsOannotatedTree =-                  PrecTypeName tn_ prec_-              _annotatedTree =-                  PrecTypeName tn_ prec_-          in  ( _lhsOannotatedTree,_lhsOnamedType)))-sem_TypeName_SetOfTypeName :: T_TypeName  ->-                              T_TypeName -sem_TypeName_SetOfTypeName typ_  =-    (\ _lhsIscope ->-         (let _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: TypeName-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _lhsOnamedType =-                  SetOfType <$> _typInamedType-              _lhsOannotatedTree =-                  SetOfTypeName _typIannotatedTree-              _annotatedTree =-                  SetOfTypeName _typIannotatedTree-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree,_lhsOnamedType)))-sem_TypeName_SimpleTypeName :: String ->-                               T_TypeName -sem_TypeName_SimpleTypeName tn_  =-    (\ _lhsIscope ->-         (let _lhsOnamedType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: TypeName-              _lhsOnamedType =-                  lookupTypeByName _lhsIscope $ canonicalizeTypeName tn_-              _lhsOannotatedTree =-                  SimpleTypeName tn_-              _annotatedTree =-                  SimpleTypeName tn_-          in  ( _lhsOannotatedTree,_lhsOnamedType)))--- VarDef -------------------------------------------------------data VarDef  = VarDef (String) (TypeName) (Maybe Expression) -             deriving ( Eq,Show)--- cata-sem_VarDef :: VarDef  ->-              T_VarDef -sem_VarDef (VarDef _name _typ _value )  =-    (sem_VarDef_VarDef _name (sem_TypeName _typ ) _value )--- semantic domain-type T_VarDef  = Scope ->-                 ( VarDef)-data Inh_VarDef  = Inh_VarDef {scope_Inh_VarDef :: Scope}-data Syn_VarDef  = Syn_VarDef {annotatedTree_Syn_VarDef :: VarDef}-wrap_VarDef :: T_VarDef  ->-               Inh_VarDef  ->-               Syn_VarDef -wrap_VarDef sem (Inh_VarDef _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_VarDef _lhsOannotatedTree ))-sem_VarDef_VarDef :: String ->-                     T_TypeName  ->-                     (Maybe Expression) ->-                     T_VarDef -sem_VarDef_VarDef name_ typ_ value_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: VarDef-              _typOscope :: Scope-              _typIannotatedTree :: TypeName-              _typInamedType :: (Either [TypeError] Type)-              _annotatedTree =-                  VarDef name_ _typIannotatedTree value_-              _lhsOannotatedTree =-                  _annotatedTree-              _typOscope =-                  _lhsIscope-              ( _typIannotatedTree,_typInamedType) =-                  (typ_ _typOscope )-          in  ( _lhsOannotatedTree)))--- VarDefList ---------------------------------------------------type VarDefList  = [(VarDef)]--- cata-sem_VarDefList :: VarDefList  ->-                  T_VarDefList -sem_VarDefList list  =-    (Prelude.foldr sem_VarDefList_Cons sem_VarDefList_Nil (Prelude.map sem_VarDef list) )--- semantic domain-type T_VarDefList  = Scope ->-                     ( VarDefList)-data Inh_VarDefList  = Inh_VarDefList {scope_Inh_VarDefList :: Scope}-data Syn_VarDefList  = Syn_VarDefList {annotatedTree_Syn_VarDefList :: VarDefList}-wrap_VarDefList :: T_VarDefList  ->-                   Inh_VarDefList  ->-                   Syn_VarDefList -wrap_VarDefList sem (Inh_VarDefList _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_VarDefList _lhsOannotatedTree ))-sem_VarDefList_Cons :: T_VarDef  ->-                       T_VarDefList  ->-                       T_VarDefList -sem_VarDefList_Cons hd_ tl_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: VarDefList-              _hdOscope :: Scope-              _tlOscope :: Scope-              _hdIannotatedTree :: VarDef-              _tlIannotatedTree :: VarDefList-              _annotatedTree =-                  (:) _hdIannotatedTree _tlIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _hdOscope =-                  _lhsIscope-              _tlOscope =-                  _lhsIscope-              ( _hdIannotatedTree) =-                  (hd_ _hdOscope )-              ( _tlIannotatedTree) =-                  (tl_ _tlOscope )-          in  ( _lhsOannotatedTree)))-sem_VarDefList_Nil :: T_VarDefList -sem_VarDefList_Nil  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: VarDefList-              _annotatedTree =-                  []-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Volatility ---------------------------------------------------data Volatility  = Immutable -                 | Stable -                 | Volatile -                 deriving ( Eq,Show)--- cata-sem_Volatility :: Volatility  ->-                  T_Volatility -sem_Volatility (Immutable )  =-    (sem_Volatility_Immutable )-sem_Volatility (Stable )  =-    (sem_Volatility_Stable )-sem_Volatility (Volatile )  =-    (sem_Volatility_Volatile )--- semantic domain-type T_Volatility  = Scope ->-                     ( Volatility)-data Inh_Volatility  = Inh_Volatility {scope_Inh_Volatility :: Scope}-data Syn_Volatility  = Syn_Volatility {annotatedTree_Syn_Volatility :: Volatility}-wrap_Volatility :: T_Volatility  ->-                   Inh_Volatility  ->-                   Syn_Volatility -wrap_Volatility sem (Inh_Volatility _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Volatility _lhsOannotatedTree ))-sem_Volatility_Immutable :: T_Volatility -sem_Volatility_Immutable  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Volatility-              _annotatedTree =-                  Immutable-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Volatility_Stable :: T_Volatility -sem_Volatility_Stable  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Volatility-              _annotatedTree =-                  Stable-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))-sem_Volatility_Volatile :: T_Volatility -sem_Volatility_Volatile  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Volatility-              _annotatedTree =-                  Volatile-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))--- Where --------------------------------------------------------type Where  = (Maybe (Expression))--- cata-sem_Where :: Where  ->-             T_Where -sem_Where (Prelude.Just x )  =-    (sem_Where_Just (sem_Expression x ) )-sem_Where Prelude.Nothing  =-    sem_Where_Nothing--- semantic domain-type T_Where  = Scope ->-                ( Where)-data Inh_Where  = Inh_Where {scope_Inh_Where :: Scope}-data Syn_Where  = Syn_Where {annotatedTree_Syn_Where :: Where}-wrap_Where :: T_Where  ->-              Inh_Where  ->-              Syn_Where -wrap_Where sem (Inh_Where _lhsIscope )  =-    (let ( _lhsOannotatedTree) =-             (sem _lhsIscope )-     in  (Syn_Where _lhsOannotatedTree ))-sem_Where_Just :: T_Expression  ->-                  T_Where -sem_Where_Just just_  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Where-              _justOscope :: Scope-              _justIannotatedTree :: Expression-              _justIliftedColumnName :: String-              _annotatedTree =-                  Just _justIannotatedTree-              _lhsOannotatedTree =-                  _annotatedTree-              _justOscope =-                  _lhsIscope-              ( _justIannotatedTree,_justIliftedColumnName) =-                  (just_ _justOscope )-          in  ( _lhsOannotatedTree)))-sem_Where_Nothing :: T_Where -sem_Where_Nothing  =-    (\ _lhsIscope ->-         (let _lhsOannotatedTree :: Where-              _annotatedTree =-                  Nothing-              _lhsOannotatedTree =-                  _annotatedTree-          in  ( _lhsOannotatedTree)))
− Database/HsSqlPpp/TypeChecking/AstUtils.lhs
@@ -1,343 +0,0 @@-Copyright 2009 Jake Wheat--This file contains a bunch of small low level utilities to help with-type checking.--> {-# OPTIONS_HADDOCK hide #-}--> module Database.HsSqlPpp.TypeChecking.AstUtils->     (->      OperatorType(..)->     ,getOperatorType->     ,checkTypes->     ,chainTypeCheckFailed->     ,errorToTypeFail->     ,errorToTypeFailF->     ,checkErrorList->     ,getErrors->     ,typeSmallInt,typeBigInt,typeInt,typeNumeric,typeFloat4->     ,typeFloat8,typeVarChar,typeChar,typeBool->     ,canonicalizeTypeName->     ,checkTypeExists->     ,lookupTypeByName->     ,keywordOperatorTypes->     ,specialFunctionTypes->     ,isArrayType->     ,unwrapArray->     ,unwrapSetOfComposite->     ,unwrapSetOf->     ,unwrapComposite->     ,consComposite->     ,unwrapRowCtor->     ) where--> import Data.Maybe-> import Data.List-> import Control.Monad.Error--> import Database.HsSqlPpp.TypeChecking.TypeType-> import Database.HsSqlPpp.TypeChecking.Scope-> import Database.HsSqlPpp.TypeChecking.DefaultScope--================================================================================--= getOperatorType--used by the pretty printer, not sure this is a very good design--for now, assume that all the overloaded operators that have the-same name are all either binary, prefix or postfix, otherwise the-getoperatortype would need the types of the arguments to determine-the operator type, and the parser would have to be a lot cleverer--this is why binary @ operator isn't currently supported--> data OperatorType = BinaryOp | PrefixOp | PostfixOp->                   deriving (Eq,Show)--> getOperatorType :: String -> OperatorType-> getOperatorType s = case () of->                       _ | any (\(x,_,_) -> x == s) (scopeBinaryOperators defaultScope) ->->                             BinaryOp->                         | any (\(x,_,_) -> x == s ||->                                            (x=="-" && s=="u-"))->                               (scopePrefixOperators defaultScope) ->->                             PrefixOp->                         | any (\(x,_,_) -> x == s) (scopePostfixOperators defaultScope) ->->                             PostfixOp->                         | s `elem` ["!and", "!or","!like"] -> BinaryOp->                         | s `elem` ["!not"] -> PrefixOp->                         | s `elem` ["!isNull", "!isNotNull"] -> PostfixOp->                         | otherwise ->->                             error $ "don't know flavour of operator " ++ s--================================================================================--= type checking utils--== checkErrors--if we find a typecheckfailed in the list, then propagate that, else-use the final argument.--> checkTypes :: [Type] -> Either [TypeError] Type -> Either [TypeError] Type-> checkTypes (TypeCheckFailed:_) _ = Right TypeCheckFailed-> checkTypes (_:ts) r = checkTypes ts r-> checkTypes [] r = r--small variant, not sure if both are needed--> chainTypeCheckFailed :: [Type] -> Either a Type -> Either a Type-> chainTypeCheckFailed a b =->   if any (==TypeCheckFailed) a->     then Right TypeCheckFailed->     else b--convert an 'either [typeerror] type' to a type--> errorToTypeFail :: Either [TypeError] Type -> Type-> errorToTypeFail tpe = case tpe of->                         Left _ -> TypeCheckFailed->                         Right t -> t--convert an 'either [typeerror] x' to a type, using an x->type function--> errorToTypeFailF :: (t -> Type) -> Either [TypeError] t -> Type-> errorToTypeFailF f tpe = case tpe of->                                   Left _ -> TypeCheckFailed->                                   Right t -> f t--used to pass a regular type on iff the list of errors is null--> checkErrorList :: [TypeError] -> Type -> Either [TypeError] Type-> checkErrorList es t = if null es->                         then Right t->                         else Left es--extract errors from an either, gives empty list if right--> getErrors :: Either [TypeError] Type -> [TypeError]-> getErrors e = either id (const []) e--===============================================================================--= basic types--random notes on pg types:--== domains:-the point of domains is you can't put constraints on types, but you-can wrap a type up in a domain and put a constraint on it there.--== literals/selectors--source strings are parsed as unknown type: they can be implicitly cast-to almost any type in the right context.--rows ctors can also be implicitly cast to any composite type matching-the elements (now sure how exactly are they matched? - number of-elements, type compatibility of elements, just by context?).--string literals are not checked for valid syntax currently, but this-will probably change so we can type check string literals statically.-Postgres defers all checking to runtime, because it has to cope with-custom data types. This code will allow adding a grammar checker for-each type so you can optionally check the string lits statically.--== notes on type checking types--=== basic type checking-Currently can lookup type names against a default template1 list of-types, or against the current list in a database (which is read before-processing and sql code).--todo: collect type names from current source file to check against-A lot of the infrastructure to do this is already in place. We also-need to do this for all other definitions, etc.--=== Type aliases--Some types in postgresql have multiple names. I think this is-hardcoded in the pg parser.--For the canonical name in this code, we use the name given in the-postgresql pg_type catalog relvar.--TODO: Change the ast canonical names: where there is a choice, prefer-the sql standard name, where there are multiple sql standard names,-choose the most concise or common one, so the ast will use different-canonical names to postgresql.--planned ast canonical names:-numbers:-int2, int4/integer, int8 -> smallint, int, bigint-numeric, decimal -> numeric-float(1) to float(24), real -> float(24)-float, float(25) to float(53), double precision -> float-serial, serial4 -> int-bigserial, serial8 -> bigint-character varying(n), varchar(n)-> varchar(n)-character(n), char(n) -> char(n)--TODO:--what about PrecTypeName? - need to fix the ast and parser (found out-these are called type modifiers in pg)--also, what can setof be applied to - don't know if it can apply to an-array or setof type--array types have to match an exact array type in the catalog, so we-can't create an arbitrary array of any type. Not sure if this is-handled quite correctly in this code.--=== canonical type name support--Introduce some aliases to protect client code if/when the ast-canonical names are changed:--> typeSmallInt,typeBigInt,typeInt,typeNumeric,typeFloat4,->   typeFloat8,typeVarChar,typeChar,typeBool :: Type-> typeSmallInt = ScalarType "int2"-> typeBigInt = ScalarType "int8"-> typeInt = ScalarType "int4"-> typeNumeric = ScalarType "numeric"-> typeFloat4 = ScalarType "float4"-> typeFloat8 = ScalarType "float8"-> typeVarChar = ScalarType "varchar"-> typeChar = ScalarType "char"-> typeBool = ScalarType "bool"--this converts the name of a type to its canonical name--> canonicalizeTypeName :: String -> String-> canonicalizeTypeName s =->   case () of->                   _ | s `elem` smallIntNames -> "int2"->                     | s `elem` intNames -> "int4"->                     | s `elem` bigIntNames -> "int8"->                     | s `elem` numericNames -> "numeric"->                     | s `elem` float4Names -> "float4"->                     | s `elem` float8Names -> "float8"->                     | s `elem` varcharNames -> "varchar"->                     | s `elem` charNames -> "char"->                     | s `elem` boolNames -> "bool"->                     | otherwise -> s->   where->       smallIntNames = ["int2", "smallint"]->       intNames = ["int4", "integer", "int"]->       bigIntNames = ["int8", "bigint"]->       numericNames = ["numeric", "decimal"]->       float4Names = ["real", "float4"]->       float8Names = ["double precision", "float"]->       varcharNames = ["character varying", "varchar"]->       charNames = ["character", "char"]->       boolNames = ["boolean", "bool"]--> checkTypeExists :: Scope -> Type -> Either [TypeError] Type-> checkTypeExists scope t =->     if t `elem` scopeTypes scope->       then Right t->       else Left [UnknownTypeError t]--> liftME :: a -> Maybe b -> Either a b-> liftME d m = case m of->                Nothing -> Left d->                Just b -> Right b--> lookupTypeByName :: Scope -> String -> Either [TypeError] Type-> lookupTypeByName scope name =->     liftME [UnknownTypeName name] $->       lookup name (scopeTypeNames scope)---================================================================================--Internal errors--TODO: work out monad transformers and try to use these. Want to throw-an internal error when a programming error is detected (instead of-e.g. letting the haskell runtime throw a pattern match failure), then-catch it in the top level type check routines in ast.ag, convert it to-a regular either style error, all without dropping into IO.--This isn't used at the moment.--> data TInternalError = TInternalError String->                      deriving (Eq, Ord, Show)--> instance Error TInternalError where->    noMsg  = TInternalError "oh noes!"->    strMsg = TInternalError--================================================================================--types for the keyword operators, for use in findCallMatch. Not sure-where these should live but probably not here.--> keywordOperatorTypes :: [(String,[Type],Type)]-> keywordOperatorTypes = [->   ("!and", [typeBool, typeBool], typeBool)->  ,("!or", [typeBool, typeBool], typeBool)->  ,("!like", [ScalarType "text", ScalarType "text"], typeBool)->  ,("!not", [typeBool], typeBool)->  ,("!isNull", [Pseudo AnyElement], typeBool)->  ,("!isNotNull", [Pseudo AnyElement], typeBool)->  ,("!arrayCtor", [Pseudo AnyElement], Pseudo AnyArray) -- not quite right,->                                         -- needs variadic support->                                         -- currently works via a special case->                                         -- in the type checking code->  ,("!between", [Pseudo AnyElement->               ,Pseudo AnyElement->               ,Pseudo AnyElement], Pseudo AnyElement)->  ,("!substring", [ScalarType "text",typeInt,typeInt], ScalarType "text")->  ,("!arraySub", [Pseudo AnyArray,typeInt], Pseudo AnyElement)->  ]--special functions, stuck in here at random also, these look like-functions, but don't appear in the postgresql catalog.--> specialFunctionTypes :: [(String,[Type],Type)]-> specialFunctionTypes = [->   ("coalesce", [Pseudo AnyElement],->     Pseudo AnyElement) -- needs variadic support to be correct,->                        -- uses special case in type checking->                        -- currently->  ,("nullif", [Pseudo AnyElement, Pseudo AnyElement], Pseudo AnyElement)->  ,("greatest", [Pseudo AnyElement], Pseudo AnyElement) --variadic, blah->  ,("least", [Pseudo AnyElement], Pseudo AnyElement) --also->  ]---================================================================================--utilities for working with Types--> isArrayType :: Type -> Bool-> isArrayType (ArrayType _) = True-> isArrayType _ = False--> unwrapArray :: Type -> Type-> unwrapArray (ArrayType t) = t-> unwrapArray x = error $ "internal error: can't get types from non array " ++ show x--> unwrapSetOfComposite :: Type -> Type-> unwrapSetOfComposite (SetOfType a@(UnnamedCompositeType _)) = a-> unwrapSetOfComposite x = error $ "internal error: tried to unwrapSetOfComposite on " ++ show x--> unwrapSetOf :: Type -> Type-> unwrapSetOf (SetOfType a) = a-> unwrapSetOf x = error $ "internal error: tried to unwrapSetOf on " ++ show x--> unwrapComposite :: Type -> [(String,Type)]-> unwrapComposite (UnnamedCompositeType a) = a-> unwrapComposite x = error $ "internal error: cannot unwrapComposite on " ++ show x--> consComposite :: (String,Type) -> Type -> Type-> consComposite l (UnnamedCompositeType a) =->     UnnamedCompositeType (l:a)-> consComposite a b = error $ "internal error: called consComposite on " ++ show (a,b)--> unwrapRowCtor :: Type -> [Type]-> unwrapRowCtor (RowCtor a) = a-> unwrapRowCtor x = error $ "internal error: cannot unwrapRowCtor on " ++ show x
− Database/HsSqlPpp/TypeChecking/DefaultScope.hs
@@ -1,7 +0,0 @@-{-# OPTIONS_HADDOCK hide #-}-module Database.HsSqlPpp.TypeChecking.DefaultScope where-import Database.HsSqlPpp.TypeChecking.TypeType-import Database.HsSqlPpp.TypeChecking.ScopeData--- | Scope value representing the catalog from a default template1 database-defaultScope :: Scope-defaultScope = Scope {scopeTypes = [ArrayType (ScalarType "abstime"),ScalarType "abstime",ArrayType (ScalarType "aclitem"),ScalarType "aclitem",Pseudo Any,Pseudo AnyArray,Pseudo AnyElement,Pseudo AnyEnum,Pseudo AnyNonArray,ArrayType (ScalarType "bit"),ScalarType "bit",ArrayType (ScalarType "bool"),ScalarType "bool",ArrayType (ScalarType "box"),ScalarType "box",ArrayType (ScalarType "bpchar"),ScalarType "bpchar",ArrayType (ScalarType "bytea"),ScalarType "bytea",ArrayType (ScalarType "char"),ScalarType "char",ArrayType (ScalarType "cid"),ScalarType "cid",ArrayType (ScalarType "cidr"),ScalarType "cidr",ArrayType (ScalarType "circle"),ScalarType "circle",ArrayType (Pseudo Cstring),Pseudo Cstring,ArrayType (ScalarType "date"),ScalarType "date",ArrayType (ScalarType "float4"),ScalarType "float4",ArrayType (ScalarType "float8"),ScalarType "float8",ArrayType (ScalarType "gtsvector"),ScalarType "gtsvector",ArrayType (ScalarType "inet"),ScalarType "inet",ArrayType (ScalarType "int2"),ScalarType "int2",ArrayType (ScalarType "int2vector"),ScalarType "int2vector",ArrayType (ScalarType "int4"),ScalarType "int4",ArrayType (ScalarType "int8"),ScalarType "int8",Pseudo Internal,ArrayType (ScalarType "interval"),ScalarType "interval",Pseudo LanguageHandler,ArrayType (ScalarType "line"),ScalarType "line",ArrayType (ScalarType "lseg"),ScalarType "lseg",ArrayType (ScalarType "macaddr"),ScalarType "macaddr",ArrayType (ScalarType "money"),ScalarType "money",ArrayType (ScalarType "name"),ScalarType "name",ArrayType (ScalarType "numeric"),ScalarType "numeric",ArrayType (ScalarType "oid"),ScalarType "oid",ArrayType (ScalarType "oidvector"),ScalarType "oidvector",Pseudo Opaque,ArrayType (ScalarType "path"),ScalarType "path",CompositeType "pg_aggregate",CompositeType "pg_am",CompositeType "pg_amop",CompositeType "pg_amproc",CompositeType "pg_attrdef",CompositeType "pg_attribute",CompositeType "pg_auth_members",CompositeType "pg_authid",CompositeType "pg_cast",CompositeType "pg_class",CompositeType "pg_constraint",CompositeType "pg_conversion",CompositeType "pg_cursors",CompositeType "pg_database",CompositeType "pg_depend",CompositeType "pg_description",CompositeType "pg_enum",CompositeType "pg_foreign_data_wrapper",CompositeType "pg_foreign_server",CompositeType "pg_group",CompositeType "pg_index",CompositeType "pg_indexes",CompositeType "pg_inherits",CompositeType "pg_language",CompositeType "pg_largeobject",CompositeType "pg_listener",CompositeType "pg_locks",CompositeType "pg_namespace",CompositeType "pg_opclass",CompositeType "pg_operator",CompositeType "pg_opfamily",CompositeType "pg_pltemplate",CompositeType "pg_prepared_statements",CompositeType "pg_prepared_xacts",CompositeType "pg_proc",CompositeType "pg_rewrite",CompositeType "pg_roles",CompositeType "pg_rules",CompositeType "pg_settings",CompositeType "pg_shadow",CompositeType "pg_shdepend",CompositeType "pg_shdescription",CompositeType "pg_stat_activity",CompositeType "pg_stat_all_indexes",CompositeType "pg_stat_all_tables",CompositeType "pg_stat_bgwriter",CompositeType "pg_stat_database",CompositeType "pg_stat_sys_indexes",CompositeType "pg_stat_sys_tables",CompositeType "pg_stat_user_functions",CompositeType "pg_stat_user_indexes",CompositeType "pg_stat_user_tables",CompositeType "pg_statio_all_indexes",CompositeType "pg_statio_all_sequences",CompositeType "pg_statio_all_tables",CompositeType "pg_statio_sys_indexes",CompositeType "pg_statio_sys_sequences",CompositeType "pg_statio_sys_tables",CompositeType "pg_statio_user_indexes",CompositeType "pg_statio_user_sequences",CompositeType "pg_statio_user_tables",CompositeType "pg_statistic",CompositeType "pg_stats",CompositeType "pg_tables",CompositeType "pg_tablespace",CompositeType "pg_timezone_abbrevs",CompositeType "pg_timezone_names",CompositeType "pg_trigger",CompositeType "pg_ts_config",CompositeType "pg_ts_config_map",CompositeType "pg_ts_dict",CompositeType "pg_ts_parser",CompositeType "pg_ts_template",CompositeType "pg_type",CompositeType "pg_user",CompositeType "pg_user_mapping",CompositeType "pg_user_mappings",CompositeType "pg_views",ArrayType (ScalarType "point"),ScalarType "point",ArrayType (ScalarType "polygon"),ScalarType "polygon",ArrayType (Pseudo Record),Pseudo Record,ArrayType (ScalarType "refcursor"),ScalarType "refcursor",ArrayType (ScalarType "regclass"),ScalarType "regclass",ArrayType (ScalarType "regconfig"),ScalarType "regconfig",ArrayType (ScalarType "regdictionary"),ScalarType "regdictionary",ArrayType (ScalarType "regoper"),ScalarType "regoper",ArrayType (ScalarType "regoperator"),ScalarType "regoperator",ArrayType (ScalarType "regproc"),ScalarType "regproc",ArrayType (ScalarType "regprocedure"),ScalarType "regprocedure",ArrayType (ScalarType "regtype"),ScalarType "regtype",ArrayType (ScalarType "reltime"),ScalarType "reltime",ScalarType "smgr",ArrayType (ScalarType "text"),ScalarType "text",ArrayType (ScalarType "tid"),ScalarType "tid",ArrayType (ScalarType "time"),ScalarType "time",ArrayType (ScalarType "timestamp"),ScalarType "timestamp",ArrayType (ScalarType "timestamptz"),ScalarType "timestamptz",ArrayType (ScalarType "timetz"),ScalarType "timetz",ArrayType (ScalarType "tinterval"),ScalarType "tinterval",Pseudo Trigger,ArrayType (ScalarType "tsquery"),ScalarType "tsquery",ArrayType (ScalarType "tsvector"),ScalarType "tsvector",ArrayType (ScalarType "txid_snapshot"),ScalarType "txid_snapshot",ScalarType "unknown",ArrayType (ScalarType "uuid"),ScalarType "uuid",ArrayType (ScalarType "varbit"),ScalarType "varbit",ArrayType (ScalarType "varchar"),ScalarType "varchar",Pseudo Void,ArrayType (ScalarType "xid"),ScalarType "xid",ArrayType (ScalarType "xml"),ScalarType "xml"], scopeTypeNames = [("_abstime",ArrayType (ScalarType "abstime")),("abstime",ScalarType "abstime"),("_aclitem",ArrayType (ScalarType "aclitem")),("aclitem",ScalarType "aclitem"),("any",Pseudo Any),("anyarray",Pseudo AnyArray),("anyelement",Pseudo AnyElement),("anyenum",Pseudo AnyEnum),("anynonarray",Pseudo AnyNonArray),("_bit",ArrayType (ScalarType "bit")),("bit",ScalarType "bit"),("_bool",ArrayType (ScalarType "bool")),("bool",ScalarType "bool"),("_box",ArrayType (ScalarType "box")),("box",ScalarType "box"),("_bpchar",ArrayType (ScalarType "bpchar")),("bpchar",ScalarType "bpchar"),("_bytea",ArrayType (ScalarType "bytea")),("bytea",ScalarType "bytea"),("_char",ArrayType (ScalarType "char")),("char",ScalarType "char"),("_cid",ArrayType (ScalarType "cid")),("cid",ScalarType "cid"),("_cidr",ArrayType (ScalarType "cidr")),("cidr",ScalarType "cidr"),("_circle",ArrayType (ScalarType "circle")),("circle",ScalarType "circle"),("_cstring",ArrayType (Pseudo Cstring)),("cstring",Pseudo Cstring),("_date",ArrayType (ScalarType "date")),("date",ScalarType "date"),("_float4",ArrayType (ScalarType "float4")),("float4",ScalarType "float4"),("_float8",ArrayType (ScalarType "float8")),("float8",ScalarType "float8"),("_gtsvector",ArrayType (ScalarType "gtsvector")),("gtsvector",ScalarType "gtsvector"),("_inet",ArrayType (ScalarType "inet")),("inet",ScalarType "inet"),("_int2",ArrayType (ScalarType "int2")),("int2",ScalarType "int2"),("_int2vector",ArrayType (ScalarType "int2vector")),("int2vector",ScalarType "int2vector"),("_int4",ArrayType (ScalarType "int4")),("int4",ScalarType "int4"),("_int8",ArrayType (ScalarType "int8")),("int8",ScalarType "int8"),("internal",Pseudo Internal),("_interval",ArrayType (ScalarType "interval")),("interval",ScalarType "interval"),("language_handler",Pseudo LanguageHandler),("_line",ArrayType (ScalarType "line")),("line",ScalarType "line"),("_lseg",ArrayType (ScalarType "lseg")),("lseg",ScalarType "lseg"),("_macaddr",ArrayType (ScalarType "macaddr")),("macaddr",ScalarType "macaddr"),("_money",ArrayType (ScalarType "money")),("money",ScalarType "money"),("_name",ArrayType (ScalarType "name")),("name",ScalarType "name"),("_numeric",ArrayType (ScalarType "numeric")),("numeric",ScalarType "numeric"),("_oid",ArrayType (ScalarType "oid")),("oid",ScalarType "oid"),("_oidvector",ArrayType (ScalarType "oidvector")),("oidvector",ScalarType "oidvector"),("opaque",Pseudo Opaque),("_path",ArrayType (ScalarType "path")),("path",ScalarType "path"),("pg_aggregate",CompositeType "pg_aggregate"),("pg_am",CompositeType "pg_am"),("pg_amop",CompositeType "pg_amop"),("pg_amproc",CompositeType "pg_amproc"),("pg_attrdef",CompositeType "pg_attrdef"),("pg_attribute",CompositeType "pg_attribute"),("pg_auth_members",CompositeType "pg_auth_members"),("pg_authid",CompositeType "pg_authid"),("pg_cast",CompositeType "pg_cast"),("pg_class",CompositeType "pg_class"),("pg_constraint",CompositeType "pg_constraint"),("pg_conversion",CompositeType "pg_conversion"),("pg_cursors",CompositeType "pg_cursors"),("pg_database",CompositeType "pg_database"),("pg_depend",CompositeType "pg_depend"),("pg_description",CompositeType "pg_description"),("pg_enum",CompositeType "pg_enum"),("pg_foreign_data_wrapper",CompositeType "pg_foreign_data_wrapper"),("pg_foreign_server",CompositeType "pg_foreign_server"),("pg_group",CompositeType "pg_group"),("pg_index",CompositeType "pg_index"),("pg_indexes",CompositeType "pg_indexes"),("pg_inherits",CompositeType "pg_inherits"),("pg_language",CompositeType "pg_language"),("pg_largeobject",CompositeType "pg_largeobject"),("pg_listener",CompositeType "pg_listener"),("pg_locks",CompositeType "pg_locks"),("pg_namespace",CompositeType "pg_namespace"),("pg_opclass",CompositeType "pg_opclass"),("pg_operator",CompositeType "pg_operator"),("pg_opfamily",CompositeType "pg_opfamily"),("pg_pltemplate",CompositeType "pg_pltemplate"),("pg_prepared_statements",CompositeType "pg_prepared_statements"),("pg_prepared_xacts",CompositeType "pg_prepared_xacts"),("pg_proc",CompositeType "pg_proc"),("pg_rewrite",CompositeType "pg_rewrite"),("pg_roles",CompositeType "pg_roles"),("pg_rules",CompositeType "pg_rules"),("pg_settings",CompositeType "pg_settings"),("pg_shadow",CompositeType "pg_shadow"),("pg_shdepend",CompositeType "pg_shdepend"),("pg_shdescription",CompositeType "pg_shdescription"),("pg_stat_activity",CompositeType "pg_stat_activity"),("pg_stat_all_indexes",CompositeType "pg_stat_all_indexes"),("pg_stat_all_tables",CompositeType "pg_stat_all_tables"),("pg_stat_bgwriter",CompositeType "pg_stat_bgwriter"),("pg_stat_database",CompositeType "pg_stat_database"),("pg_stat_sys_indexes",CompositeType "pg_stat_sys_indexes"),("pg_stat_sys_tables",CompositeType "pg_stat_sys_tables"),("pg_stat_user_functions",CompositeType "pg_stat_user_functions"),("pg_stat_user_indexes",CompositeType "pg_stat_user_indexes"),("pg_stat_user_tables",CompositeType "pg_stat_user_tables"),("pg_statio_all_indexes",CompositeType "pg_statio_all_indexes"),("pg_statio_all_sequences",CompositeType "pg_statio_all_sequences"),("pg_statio_all_tables",CompositeType "pg_statio_all_tables"),("pg_statio_sys_indexes",CompositeType "pg_statio_sys_indexes"),("pg_statio_sys_sequences",CompositeType "pg_statio_sys_sequences"),("pg_statio_sys_tables",CompositeType "pg_statio_sys_tables"),("pg_statio_user_indexes",CompositeType "pg_statio_user_indexes"),("pg_statio_user_sequences",CompositeType "pg_statio_user_sequences"),("pg_statio_user_tables",CompositeType "pg_statio_user_tables"),("pg_statistic",CompositeType "pg_statistic"),("pg_stats",CompositeType "pg_stats"),("pg_tables",CompositeType "pg_tables"),("pg_tablespace",CompositeType "pg_tablespace"),("pg_timezone_abbrevs",CompositeType "pg_timezone_abbrevs"),("pg_timezone_names",CompositeType "pg_timezone_names"),("pg_trigger",CompositeType "pg_trigger"),("pg_ts_config",CompositeType "pg_ts_config"),("pg_ts_config_map",CompositeType "pg_ts_config_map"),("pg_ts_dict",CompositeType "pg_ts_dict"),("pg_ts_parser",CompositeType "pg_ts_parser"),("pg_ts_template",CompositeType "pg_ts_template"),("pg_type",CompositeType "pg_type"),("pg_user",CompositeType "pg_user"),("pg_user_mapping",CompositeType "pg_user_mapping"),("pg_user_mappings",CompositeType "pg_user_mappings"),("pg_views",CompositeType "pg_views"),("_point",ArrayType (ScalarType "point")),("point",ScalarType "point"),("_polygon",ArrayType (ScalarType "polygon")),("polygon",ScalarType "polygon"),("_record",ArrayType (Pseudo Record)),("record",Pseudo Record),("_refcursor",ArrayType (ScalarType "refcursor")),("refcursor",ScalarType "refcursor"),("_regclass",ArrayType (ScalarType "regclass")),("regclass",ScalarType "regclass"),("_regconfig",ArrayType (ScalarType "regconfig")),("regconfig",ScalarType "regconfig"),("_regdictionary",ArrayType (ScalarType "regdictionary")),("regdictionary",ScalarType "regdictionary"),("_regoper",ArrayType (ScalarType "regoper")),("regoper",ScalarType "regoper"),("_regoperator",ArrayType (ScalarType "regoperator")),("regoperator",ScalarType "regoperator"),("_regproc",ArrayType (ScalarType "regproc")),("regproc",ScalarType "regproc"),("_regprocedure",ArrayType (ScalarType "regprocedure")),("regprocedure",ScalarType "regprocedure"),("_regtype",ArrayType (ScalarType "regtype")),("regtype",ScalarType "regtype"),("_reltime",ArrayType (ScalarType "reltime")),("reltime",ScalarType "reltime"),("smgr",ScalarType "smgr"),("_text",ArrayType (ScalarType "text")),("text",ScalarType "text"),("_tid",ArrayType (ScalarType "tid")),("tid",ScalarType "tid"),("_time",ArrayType (ScalarType "time")),("time",ScalarType "time"),("_timestamp",ArrayType (ScalarType "timestamp")),("timestamp",ScalarType "timestamp"),("_timestamptz",ArrayType (ScalarType "timestamptz")),("timestamptz",ScalarType "timestamptz"),("_timetz",ArrayType (ScalarType "timetz")),("timetz",ScalarType "timetz"),("_tinterval",ArrayType (ScalarType "tinterval")),("tinterval",ScalarType "tinterval"),("trigger",Pseudo Trigger),("_tsquery",ArrayType (ScalarType "tsquery")),("tsquery",ScalarType "tsquery"),("_tsvector",ArrayType (ScalarType "tsvector")),("tsvector",ScalarType "tsvector"),("_txid_snapshot",ArrayType (ScalarType "txid_snapshot")),("txid_snapshot",ScalarType "txid_snapshot"),("unknown",ScalarType "unknown"),("_uuid",ArrayType (ScalarType "uuid")),("uuid",ScalarType "uuid"),("_varbit",ArrayType (ScalarType "varbit")),("varbit",ScalarType "varbit"),("_varchar",ArrayType (ScalarType "varchar")),("varchar",ScalarType "varchar"),("void",Pseudo Void),("_xid",ArrayType (ScalarType "xid")),("xid",ScalarType "xid"),("_xml",ArrayType (ScalarType "xml")),("xml",ScalarType "xml")], scopeDomainDefs = [], scopeCasts = [(ScalarType "int8",ScalarType "int2",AssignmentCastContext),(ScalarType "int8",ScalarType "int4",AssignmentCastContext),(ScalarType "int8",ScalarType "float4",ImplicitCastContext),(ScalarType "int8",ScalarType "float8",ImplicitCastContext),(ScalarType "int8",ScalarType "numeric",ImplicitCastContext),(ScalarType "int2",ScalarType "int8",ImplicitCastContext),(ScalarType "int2",ScalarType "int4",ImplicitCastContext),(ScalarType "int2",ScalarType "float4",ImplicitCastContext),(ScalarType "int2",ScalarType "float8",ImplicitCastContext),(ScalarType "int2",ScalarType "numeric",ImplicitCastContext),(ScalarType "int4",ScalarType "int8",ImplicitCastContext),(ScalarType "int4",ScalarType "int2",AssignmentCastContext),(ScalarType "int4",ScalarType "float4",ImplicitCastContext),(ScalarType "int4",ScalarType "float8",ImplicitCastContext),(ScalarType "int4",ScalarType "numeric",ImplicitCastContext),(ScalarType "float4",ScalarType "int8",AssignmentCastContext),(ScalarType "float4",ScalarType "int2",AssignmentCastContext),(ScalarType "float4",ScalarType "int4",AssignmentCastContext),(ScalarType "float4",ScalarType "float8",ImplicitCastContext),(ScalarType "float4",ScalarType "numeric",AssignmentCastContext),(ScalarType "float8",ScalarType "int8",AssignmentCastContext),(ScalarType "float8",ScalarType "int2",AssignmentCastContext),(ScalarType "float8",ScalarType "int4",AssignmentCastContext),(ScalarType "float8",ScalarType "float4",AssignmentCastContext),(ScalarType "float8",ScalarType "numeric",AssignmentCastContext),(ScalarType "numeric",ScalarType "int8",AssignmentCastContext),(ScalarType "numeric",ScalarType "int2",AssignmentCastContext),(ScalarType "numeric",ScalarType "int4",AssignmentCastContext),(ScalarType "numeric",ScalarType "float4",ImplicitCastContext),(ScalarType "numeric",ScalarType "float8",ImplicitCastContext),(ScalarType "int4",ScalarType "bool",ExplicitCastContext),(ScalarType "bool",ScalarType "int4",ExplicitCastContext),(ScalarType "int8",ScalarType "oid",ImplicitCastContext),(ScalarType "int2",ScalarType "oid",ImplicitCastContext),(ScalarType "int4",ScalarType "oid",ImplicitCastContext),(ScalarType "oid",ScalarType "int8",AssignmentCastContext),(ScalarType "oid",ScalarType "int4",AssignmentCastContext),(ScalarType "oid",ScalarType "regproc",ImplicitCastContext),(ScalarType "regproc",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regproc",ImplicitCastContext),(ScalarType "int2",ScalarType "regproc",ImplicitCastContext),(ScalarType "int4",ScalarType "regproc",ImplicitCastContext),(ScalarType "regproc",ScalarType "int8",AssignmentCastContext),(ScalarType "regproc",ScalarType "int4",AssignmentCastContext),(ScalarType "regproc",ScalarType "regprocedure",ImplicitCastContext),(ScalarType "regprocedure",ScalarType "regproc",ImplicitCastContext),(ScalarType "oid",ScalarType "regprocedure",ImplicitCastContext),(ScalarType "regprocedure",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regprocedure",ImplicitCastContext),(ScalarType "int2",ScalarType "regprocedure",ImplicitCastContext),(ScalarType "int4",ScalarType "regprocedure",ImplicitCastContext),(ScalarType "regprocedure",ScalarType "int8",AssignmentCastContext),(ScalarType "regprocedure",ScalarType "int4",AssignmentCastContext),(ScalarType "oid",ScalarType "regoper",ImplicitCastContext),(ScalarType "regoper",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regoper",ImplicitCastContext),(ScalarType "int2",ScalarType "regoper",ImplicitCastContext),(ScalarType "int4",ScalarType "regoper",ImplicitCastContext),(ScalarType "regoper",ScalarType "int8",AssignmentCastContext),(ScalarType "regoper",ScalarType "int4",AssignmentCastContext),(ScalarType "regoper",ScalarType "regoperator",ImplicitCastContext),(ScalarType "regoperator",ScalarType "regoper",ImplicitCastContext),(ScalarType "oid",ScalarType "regoperator",ImplicitCastContext),(ScalarType "regoperator",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regoperator",ImplicitCastContext),(ScalarType "int2",ScalarType "regoperator",ImplicitCastContext),(ScalarType "int4",ScalarType "regoperator",ImplicitCastContext),(ScalarType "regoperator",ScalarType "int8",AssignmentCastContext),(ScalarType "regoperator",ScalarType "int4",AssignmentCastContext),(ScalarType "oid",ScalarType "regclass",ImplicitCastContext),(ScalarType "regclass",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regclass",ImplicitCastContext),(ScalarType "int2",ScalarType "regclass",ImplicitCastContext),(ScalarType "int4",ScalarType "regclass",ImplicitCastContext),(ScalarType "regclass",ScalarType "int8",AssignmentCastContext),(ScalarType "regclass",ScalarType "int4",AssignmentCastContext),(ScalarType "oid",ScalarType "regtype",ImplicitCastContext),(ScalarType "regtype",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regtype",ImplicitCastContext),(ScalarType "int2",ScalarType "regtype",ImplicitCastContext),(ScalarType "int4",ScalarType "regtype",ImplicitCastContext),(ScalarType "regtype",ScalarType "int8",AssignmentCastContext),(ScalarType "regtype",ScalarType "int4",AssignmentCastContext),(ScalarType "oid",ScalarType "regconfig",ImplicitCastContext),(ScalarType "regconfig",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regconfig",ImplicitCastContext),(ScalarType "int2",ScalarType "regconfig",ImplicitCastContext),(ScalarType "int4",ScalarType "regconfig",ImplicitCastContext),(ScalarType "regconfig",ScalarType "int8",AssignmentCastContext),(ScalarType "regconfig",ScalarType "int4",AssignmentCastContext),(ScalarType "oid",ScalarType "regdictionary",ImplicitCastContext),(ScalarType "regdictionary",ScalarType "oid",ImplicitCastContext),(ScalarType "int8",ScalarType "regdictionary",ImplicitCastContext),(ScalarType "int2",ScalarType "regdictionary",ImplicitCastContext),(ScalarType "int4",ScalarType "regdictionary",ImplicitCastContext),(ScalarType "regdictionary",ScalarType "int8",AssignmentCastContext),(ScalarType "regdictionary",ScalarType "int4",AssignmentCastContext),(ScalarType "text",ScalarType "regclass",ImplicitCastContext),(ScalarType "varchar",ScalarType "regclass",ImplicitCastContext),(ScalarType "text",ScalarType "bpchar",ImplicitCastContext),(ScalarType "text",ScalarType "varchar",ImplicitCastContext),(ScalarType "bpchar",ScalarType "text",ImplicitCastContext),(ScalarType "bpchar",ScalarType "varchar",ImplicitCastContext),(ScalarType "varchar",ScalarType "text",ImplicitCastContext),(ScalarType "varchar",ScalarType "bpchar",ImplicitCastContext),(ScalarType "char",ScalarType "text",ImplicitCastContext),(ScalarType "char",ScalarType "bpchar",AssignmentCastContext),(ScalarType "char",ScalarType "varchar",AssignmentCastContext),(ScalarType "name",ScalarType "text",ImplicitCastContext),(ScalarType "name",ScalarType "bpchar",AssignmentCastContext),(ScalarType "name",ScalarType "varchar",AssignmentCastContext),(ScalarType "text",ScalarType "char",AssignmentCastContext),(ScalarType "bpchar",ScalarType "char",AssignmentCastContext),(ScalarType "varchar",ScalarType "char",AssignmentCastContext),(ScalarType "text",ScalarType "name",ImplicitCastContext),(ScalarType "bpchar",ScalarType "name",ImplicitCastContext),(ScalarType "varchar",ScalarType "name",ImplicitCastContext),(ScalarType "char",ScalarType "int4",ExplicitCastContext),(ScalarType "int4",ScalarType "char",ExplicitCastContext),(ScalarType "abstime",ScalarType "date",AssignmentCastContext),(ScalarType "abstime",ScalarType "time",AssignmentCastContext),(ScalarType "abstime",ScalarType "timestamp",ImplicitCastContext),(ScalarType "abstime",ScalarType "timestamptz",ImplicitCastContext),(ScalarType "reltime",ScalarType "interval",ImplicitCastContext),(ScalarType "date",ScalarType "timestamp",ImplicitCastContext),(ScalarType "date",ScalarType "timestamptz",ImplicitCastContext),(ScalarType "time",ScalarType "interval",ImplicitCastContext),(ScalarType "time",ScalarType "timetz",ImplicitCastContext),(ScalarType "timestamp",ScalarType "abstime",AssignmentCastContext),(ScalarType "timestamp",ScalarType "date",AssignmentCastContext),(ScalarType "timestamp",ScalarType "time",AssignmentCastContext),(ScalarType "timestamp",ScalarType "timestamptz",ImplicitCastContext),(ScalarType "timestamptz",ScalarType "abstime",AssignmentCastContext),(ScalarType "timestamptz",ScalarType "date",AssignmentCastContext),(ScalarType "timestamptz",ScalarType "time",AssignmentCastContext),(ScalarType "timestamptz",ScalarType "timestamp",AssignmentCastContext),(ScalarType "timestamptz",ScalarType "timetz",AssignmentCastContext),(ScalarType "interval",ScalarType "reltime",AssignmentCastContext),(ScalarType "interval",ScalarType "time",AssignmentCastContext),(ScalarType "timetz",ScalarType "time",AssignmentCastContext),(ScalarType "int4",ScalarType "abstime",ExplicitCastContext),(ScalarType "abstime",ScalarType "int4",ExplicitCastContext),(ScalarType "int4",ScalarType "reltime",ExplicitCastContext),(ScalarType "reltime",ScalarType "int4",ExplicitCastContext),(ScalarType "lseg",ScalarType "point",ExplicitCastContext),(ScalarType "path",ScalarType "point",ExplicitCastContext),(ScalarType "path",ScalarType "polygon",AssignmentCastContext),(ScalarType "box",ScalarType "point",ExplicitCastContext),(ScalarType "box",ScalarType "lseg",ExplicitCastContext),(ScalarType "box",ScalarType "polygon",AssignmentCastContext),(ScalarType "box",ScalarType "circle",ExplicitCastContext),(ScalarType "polygon",ScalarType "point",ExplicitCastContext),(ScalarType "polygon",ScalarType "path",AssignmentCastContext),(ScalarType "polygon",ScalarType "box",ExplicitCastContext),(ScalarType "polygon",ScalarType "circle",ExplicitCastContext),(ScalarType "circle",ScalarType "point",ExplicitCastContext),(ScalarType "circle",ScalarType "box",ExplicitCastContext),(ScalarType "circle",ScalarType "polygon",ExplicitCastContext),(ScalarType "cidr",ScalarType "inet",ImplicitCastContext),(ScalarType "inet",ScalarType "cidr",AssignmentCastContext),(ScalarType "bit",ScalarType "varbit",ImplicitCastContext),(ScalarType "varbit",ScalarType "bit",ImplicitCastContext),(ScalarType "int8",ScalarType "bit",ExplicitCastContext),(ScalarType "int4",ScalarType "bit",ExplicitCastContext),(ScalarType "bit",ScalarType "int8",ExplicitCastContext),(ScalarType "bit",ScalarType "int4",ExplicitCastContext),(ScalarType "cidr",ScalarType "text",AssignmentCastContext),(ScalarType "inet",ScalarType "text",AssignmentCastContext),(ScalarType "bool",ScalarType "text",AssignmentCastContext),(ScalarType "xml",ScalarType "text",AssignmentCastContext),(ScalarType "text",ScalarType "xml",ExplicitCastContext),(ScalarType "cidr",ScalarType "varchar",AssignmentCastContext),(ScalarType "inet",ScalarType "varchar",AssignmentCastContext),(ScalarType "bool",ScalarType "varchar",AssignmentCastContext),(ScalarType "xml",ScalarType "varchar",AssignmentCastContext),(ScalarType "varchar",ScalarType "xml",ExplicitCastContext),(ScalarType "cidr",ScalarType "bpchar",AssignmentCastContext),(ScalarType "inet",ScalarType "bpchar",AssignmentCastContext),(ScalarType "bool",ScalarType "bpchar",AssignmentCastContext),(ScalarType "xml",ScalarType "bpchar",AssignmentCastContext),(ScalarType "bpchar",ScalarType "xml",ExplicitCastContext),(ScalarType "bpchar",ScalarType "bpchar",ImplicitCastContext),(ScalarType "varchar",ScalarType "varchar",ImplicitCastContext),(ScalarType "time",ScalarType "time",ImplicitCastContext),(ScalarType "timestamp",ScalarType "timestamp",ImplicitCastContext),(ScalarType "timestamptz",ScalarType "timestamptz",ImplicitCastContext),(ScalarType "interval",ScalarType "interval",ImplicitCastContext),(ScalarType "timetz",ScalarType "timetz",ImplicitCastContext),(ScalarType "bit",ScalarType "bit",ImplicitCastContext),(ScalarType "varbit",ScalarType "varbit",ImplicitCastContext),(ScalarType "numeric",ScalarType "numeric",ImplicitCastContext)], scopeTypeCategories = [(ScalarType "bool","B",True),(ScalarType "bytea","U",False),(ScalarType "char","S",False),(ScalarType "name","S",False),(ScalarType "int8","N",False),(ScalarType "int2","N",False),(ScalarType "int2vector","A",False),(ScalarType "int4","N",False),(ScalarType "regproc","N",False),(ScalarType "text","S",True),(ScalarType "oid","N",True),(ScalarType "tid","U",False),(ScalarType "xid","U",False),(ScalarType "cid","U",False),(ScalarType "oidvector","A",False),(CompositeType "pg_type","C",False),(CompositeType "pg_attribute","C",False),(CompositeType "pg_proc","C",False),(CompositeType "pg_class","C",False),(ScalarType "xml","U",False),(ArrayType (ScalarType "xml"),"A",False),(ScalarType "smgr","U",False),(ScalarType "point","G",False),(ScalarType "lseg","G",False),(ScalarType "path","G",False),(ScalarType "box","G",False),(ScalarType "polygon","G",False),(ScalarType "line","G",False),(ArrayType (ScalarType "line"),"A",False),(ScalarType "float4","N",False),(ScalarType "float8","N",True),(ScalarType "abstime","D",False),(ScalarType "reltime","T",False),(ScalarType "tinterval","T",False),(ScalarType "unknown","X",False),(ScalarType "circle","G",False),(ArrayType (ScalarType "circle"),"A",False),(ScalarType "money","N",False),(ArrayType (ScalarType "money"),"A",False),(ScalarType "macaddr","U",False),(ScalarType "inet","I",True),(ScalarType "cidr","I",False),(ArrayType (ScalarType "bool"),"A",False),(ArrayType (ScalarType "bytea"),"A",False),(ArrayType (ScalarType "char"),"A",False),(ArrayType (ScalarType "name"),"A",False),(ArrayType (ScalarType "int2"),"A",False),(ArrayType (ScalarType "int2vector"),"A",False),(ArrayType (ScalarType "int4"),"A",False),(ArrayType (ScalarType "regproc"),"A",False),(ArrayType (ScalarType "text"),"A",False),(ArrayType (ScalarType "oid"),"A",False),(ArrayType (ScalarType "tid"),"A",False),(ArrayType (ScalarType "xid"),"A",False),(ArrayType (ScalarType "cid"),"A",False),(ArrayType (ScalarType "oidvector"),"A",False),(ArrayType (ScalarType "bpchar"),"A",False),(ArrayType (ScalarType "varchar"),"A",False),(ArrayType (ScalarType "int8"),"A",False),(ArrayType (ScalarType "point"),"A",False),(ArrayType (ScalarType "lseg"),"A",False),(ArrayType (ScalarType "path"),"A",False),(ArrayType (ScalarType "box"),"A",False),(ArrayType (ScalarType "float4"),"A",False),(ArrayType (ScalarType "float8"),"A",False),(ArrayType (ScalarType "abstime"),"A",False),(ArrayType (ScalarType "reltime"),"A",False),(ArrayType (ScalarType "tinterval"),"A",False),(ArrayType (ScalarType "polygon"),"A",False),(ScalarType "aclitem","U",False),(ArrayType (ScalarType "aclitem"),"A",False),(ArrayType (ScalarType "macaddr"),"A",False),(ArrayType (ScalarType "inet"),"A",False),(ArrayType (ScalarType "cidr"),"A",False),(ArrayType (Pseudo Cstring),"A",False),(ScalarType "bpchar","S",False),(ScalarType "varchar","S",False),(ScalarType "date","D",False),(ScalarType "time","D",False),(ScalarType "timestamp","D",False),(ArrayType (ScalarType "timestamp"),"A",False),(ArrayType (ScalarType "date"),"A",False),(ArrayType (ScalarType "time"),"A",False),(ScalarType "timestamptz","D",True),(ArrayType (ScalarType "timestamptz"),"A",False),(ScalarType "interval","T",True),(ArrayType (ScalarType "interval"),"A",False),(ArrayType (ScalarType "numeric"),"A",False),(ScalarType "timetz","D",False),(ArrayType (ScalarType "timetz"),"A",False),(ScalarType "bit","V",False),(ArrayType (ScalarType "bit"),"A",False),(ScalarType "varbit","V",True),(ArrayType (ScalarType "varbit"),"A",False),(ScalarType "numeric","N",False),(ScalarType "refcursor","U",False),(ArrayType (ScalarType "refcursor"),"A",False),(ScalarType "regprocedure","N",False),(ScalarType "regoper","N",False),(ScalarType "regoperator","N",False),(ScalarType "regclass","N",False),(ScalarType "regtype","N",False),(ArrayType (ScalarType "regprocedure"),"A",False),(ArrayType (ScalarType "regoper"),"A",False),(ArrayType (ScalarType "regoperator"),"A",False),(ArrayType (ScalarType "regclass"),"A",False),(ArrayType (ScalarType "regtype"),"A",False),(ScalarType "uuid","U",False),(ArrayType (ScalarType "uuid"),"A",False),(ScalarType "tsvector","U",False),(ScalarType "gtsvector","U",False),(ScalarType "tsquery","U",False),(ScalarType "regconfig","N",False),(ScalarType "regdictionary","N",False),(ArrayType (ScalarType "tsvector"),"A",False),(ArrayType (ScalarType "gtsvector"),"A",False),(ArrayType (ScalarType "tsquery"),"A",False),(ArrayType (ScalarType "regconfig"),"A",False),(ArrayType (ScalarType "regdictionary"),"A",False),(ScalarType "txid_snapshot","U",False),(ArrayType (ScalarType "txid_snapshot"),"A",False),(Pseudo Record,"P",False),(ArrayType (Pseudo Record),"P",False),(Pseudo Cstring,"P",False),(Pseudo Any,"P",False),(Pseudo AnyArray,"P",False),(Pseudo Void,"P",False),(Pseudo Trigger,"P",False),(Pseudo LanguageHandler,"P",False),(Pseudo Internal,"P",False),(Pseudo Opaque,"P",False),(Pseudo AnyElement,"P",False),(Pseudo AnyNonArray,"P",False),(Pseudo AnyEnum,"P",False),(CompositeType "pg_attrdef","C",False),(CompositeType "pg_constraint","C",False),(CompositeType "pg_inherits","C",False),(CompositeType "pg_index","C",False),(CompositeType "pg_operator","C",False),(CompositeType "pg_opfamily","C",False),(CompositeType "pg_opclass","C",False),(CompositeType "pg_am","C",False),(CompositeType "pg_amop","C",False),(CompositeType "pg_amproc","C",False),(CompositeType "pg_language","C",False),(CompositeType "pg_largeobject","C",False),(CompositeType "pg_aggregate","C",False),(CompositeType "pg_statistic","C",False),(CompositeType "pg_rewrite","C",False),(CompositeType "pg_trigger","C",False),(CompositeType "pg_listener","C",False),(CompositeType "pg_description","C",False),(CompositeType "pg_cast","C",False),(CompositeType "pg_enum","C",False),(CompositeType "pg_namespace","C",False),(CompositeType "pg_conversion","C",False),(CompositeType "pg_depend","C",False),(CompositeType "pg_database","C",False),(CompositeType "pg_tablespace","C",False),(CompositeType "pg_pltemplate","C",False),(CompositeType "pg_authid","C",False),(CompositeType "pg_auth_members","C",False),(CompositeType "pg_shdepend","C",False),(CompositeType "pg_shdescription","C",False),(CompositeType "pg_ts_config","C",False),(CompositeType "pg_ts_config_map","C",False),(CompositeType "pg_ts_dict","C",False),(CompositeType "pg_ts_parser","C",False),(CompositeType "pg_ts_template","C",False),(CompositeType "pg_foreign_data_wrapper","C",False),(CompositeType "pg_foreign_server","C",False),(CompositeType "pg_user_mapping","C",False),(CompositeType "pg_roles","C",False),(CompositeType "pg_shadow","C",False),(CompositeType "pg_group","C",False),(CompositeType "pg_user","C",False),(CompositeType "pg_rules","C",False),(CompositeType "pg_views","C",False),(CompositeType "pg_tables","C",False),(CompositeType "pg_indexes","C",False),(CompositeType "pg_stats","C",False),(CompositeType "pg_locks","C",False),(CompositeType "pg_cursors","C",False),(CompositeType "pg_prepared_xacts","C",False),(CompositeType "pg_prepared_statements","C",False),(CompositeType "pg_settings","C",False),(CompositeType "pg_timezone_abbrevs","C",False),(CompositeType "pg_timezone_names","C",False),(CompositeType "pg_stat_all_tables","C",False),(CompositeType "pg_stat_sys_tables","C",False),(CompositeType "pg_stat_user_tables","C",False),(CompositeType "pg_statio_all_tables","C",False),(CompositeType "pg_statio_sys_tables","C",False),(CompositeType "pg_statio_user_tables","C",False),(CompositeType "pg_stat_all_indexes","C",False),(CompositeType "pg_stat_sys_indexes","C",False),(CompositeType "pg_stat_user_indexes","C",False),(CompositeType "pg_statio_all_indexes","C",False),(CompositeType "pg_statio_sys_indexes","C",False),(CompositeType "pg_statio_user_indexes","C",False),(CompositeType "pg_statio_all_sequences","C",False),(CompositeType "pg_statio_sys_sequences","C",False),(CompositeType "pg_statio_user_sequences","C",False),(CompositeType "pg_stat_activity","C",False),(CompositeType "pg_stat_database","C",False),(CompositeType "pg_stat_user_functions","C",False),(CompositeType "pg_stat_bgwriter","C",False),(CompositeType "pg_user_mappings","C",False)], scopePrefixOperators = [("~",[ScalarType "int8"],ScalarType "int8"),("~",[ScalarType "int4"],ScalarType "int4"),("~",[ScalarType "int2"],ScalarType "int2"),("~",[ScalarType "bit"],ScalarType "bit"),("~",[ScalarType "inet"],ScalarType "inet"),("||/",[ScalarType "float8"],ScalarType "float8"),("|/",[ScalarType "float8"],ScalarType "float8"),("|",[ScalarType "tinterval"],ScalarType "abstime"),("@@",[ScalarType "circle"],ScalarType "point"),("@@",[ScalarType "lseg"],ScalarType "point"),("@@",[ScalarType "path"],ScalarType "point"),("@@",[ScalarType "polygon"],ScalarType "point"),("@@",[ScalarType "box"],ScalarType "point"),("@-@",[ScalarType "path"],ScalarType "float8"),("@-@",[ScalarType "lseg"],ScalarType "float8"),("@",[ScalarType "int8"],ScalarType "int8"),("@",[ScalarType "int4"],ScalarType "int4"),("@",[ScalarType "int2"],ScalarType "int2"),("@",[ScalarType "float8"],ScalarType "float8"),("@",[ScalarType "float4"],ScalarType "float4"),("@",[ScalarType "numeric"],ScalarType "numeric"),("?|",[ScalarType "line"],ScalarType "bool"),("?|",[ScalarType "lseg"],ScalarType "bool"),("?-",[ScalarType "lseg"],ScalarType "bool"),("?-",[ScalarType "line"],ScalarType "bool"),("-",[ScalarType "interval"],ScalarType "interval"),("-",[ScalarType "numeric"],ScalarType "numeric"),("-",[ScalarType "float8"],ScalarType "float8"),("-",[ScalarType "float4"],ScalarType "float4"),("-",[ScalarType "int2"],ScalarType "int2"),("-",[ScalarType "int4"],ScalarType "int4"),("-",[ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "int2"],ScalarType "int2"),("+",[ScalarType "float8"],ScalarType "float8"),("+",[ScalarType "numeric"],ScalarType "numeric"),("+",[ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "float4"],ScalarType "float4"),("+",[ScalarType "int4"],ScalarType "int4"),("#",[ScalarType "path"],ScalarType "int4"),("#",[ScalarType "polygon"],ScalarType "int4"),("!!",[ScalarType "int8"],ScalarType "numeric"),("!!",[ScalarType "tsquery"],ScalarType "tsquery")], scopePostfixOperators = [("!",[ScalarType "int8"],ScalarType "numeric")], scopeBinaryOperators = [("~~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("~~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~~",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("~~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("~~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~>~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~>~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~>=~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~>=~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("~=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("~=",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("~=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("~=",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("~<~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~<~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~<=~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~<=~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ScalarType "bool"),("~",[ScalarType "circle",ScalarType "point"],ScalarType "bool"),("~",[ScalarType "polygon",ScalarType "point"],ScalarType "bool"),("~",[ScalarType "path",ScalarType "point"],ScalarType "bool"),("~",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("~",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("~",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("||",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("||",[ScalarType "text",ScalarType "text"],ScalarType "text"),("||",[ScalarType "varbit",ScalarType "varbit"],ScalarType "varbit"),("||",[Pseudo AnyElement,Pseudo AnyArray],Pseudo AnyArray),("||",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("||",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("||",[Pseudo AnyNonArray,ScalarType "text"],ScalarType "text"),("||",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "tsvector"),("||",[Pseudo AnyArray,Pseudo AnyElement],Pseudo AnyArray),("||",[ScalarType "text",Pseudo AnyNonArray],ScalarType "text"),("|>>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("|>>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("|>>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("|&>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("|&>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("|&>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("|",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("|",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("|",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("|",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("|",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("^",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("^",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("@@@",[ScalarType "tsquery",ScalarType "tsvector"],ScalarType "bool"),("@@@",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "bool"),("@@",[ScalarType "text",ScalarType "tsquery"],ScalarType "bool"),("@@",[ScalarType "tsquery",ScalarType "tsvector"],ScalarType "bool"),("@@",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("@@",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "bool"),("@>",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("@>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("@>",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("@>",[ScalarType "polygon",ScalarType "point"],ScalarType "bool"),("@>",[ScalarType "path",ScalarType "point"],ScalarType "bool"),("@>",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ScalarType "bool"),("@>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("@>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("@>",[ScalarType "circle",ScalarType "point"],ScalarType "bool"),("?||",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("?||",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("?|",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("?-|",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("?-|",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("?-",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("?#",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("?#",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("?#",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("?#",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("?#",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("?#",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("?#",[ScalarType "line",ScalarType "box"],ScalarType "bool"),(">^",[ScalarType "point",ScalarType "point"],ScalarType "bool"),(">^",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">>=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),(">>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">>",[ScalarType "point",ScalarType "point"],ScalarType "bool"),(">>",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),(">>",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),(">>",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),(">>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),(">>",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">>",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),(">=",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),(">=",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),(">=",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),(">=",[ScalarType "char",ScalarType "char"],ScalarType "bool"),(">=",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),(">=",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),(">=",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),(">=",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),(">=",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),(">=",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),(">=",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),(">=",[ScalarType "date",ScalarType "date"],ScalarType "bool"),(">=",[ScalarType "time",ScalarType "time"],ScalarType "bool"),(">=",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),(">=",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),(">=",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),(">=",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),(">=",[ScalarType "name",ScalarType "name"],ScalarType "bool"),(">=",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),(">=",[ScalarType "text",ScalarType "text"],ScalarType "bool"),(">=",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),(">=",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),(">=",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),(">=",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),(">=",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),(">=",[Pseudo Record,Pseudo Record],ScalarType "bool"),(">=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),(">=",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),(">=",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),(">=",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),(">=",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),(">=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">=",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),(">=",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),(">=",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),(">=",[ScalarType "path",ScalarType "path"],ScalarType "bool"),(">=",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),(">=",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),(">=",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),(">=",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),(">=",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),(">=",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),(">=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),(">=",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),(">=",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),(">=",[ScalarType "money",ScalarType "money"],ScalarType "bool"),(">=",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),(">=",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),(">=",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),(">=",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),(">=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">=",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),(">=",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),(">",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),(">",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),(">",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),(">",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),(">",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),(">",[ScalarType "char",ScalarType "char"],ScalarType "bool"),(">",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),(">",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),(">",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),(">",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),(">",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),(">",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),(">",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),(">",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),(">",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),(">",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),(">",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),(">",[ScalarType "date",ScalarType "date"],ScalarType "bool"),(">",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),(">",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),(">",[ScalarType "time",ScalarType "time"],ScalarType "bool"),(">",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),(">",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),(">",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),(">",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),(">",[ScalarType "name",ScalarType "name"],ScalarType "bool"),(">",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),(">",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),(">",[ScalarType "path",ScalarType "path"],ScalarType "bool"),(">",[Pseudo Record,Pseudo Record],ScalarType "bool"),(">",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),(">",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),(">",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),(">",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),(">",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),(">",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),(">",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),(">",[ScalarType "text",ScalarType "text"],ScalarType "bool"),(">",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),(">",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),(">",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),(">",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),(">",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),(">",[ScalarType "money",ScalarType "money"],ScalarType "bool"),(">",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),(">",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),(">",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),(">",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),(">",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),(">",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),(">",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("=",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("=",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("=",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("=",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("=",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("=",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("=",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("=",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("=",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("=",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("=",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("=",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("=",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("=",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("=",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("=",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("=",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("=",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("=",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("=",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("=",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("=",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("=",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("=",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("=",[ScalarType "aclitem",ScalarType "aclitem"],ScalarType "bool"),("=",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("=",[ScalarType "int2vector",ScalarType "int2vector"],ScalarType "bool"),("=",[Pseudo Record,Pseudo Record],ScalarType "bool"),("=",[ScalarType "cid",ScalarType "cid"],ScalarType "bool"),("=",[ScalarType "xid",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("=",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("=",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("=",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("=",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("=",[ScalarType "xid",ScalarType "xid"],ScalarType "bool"),("=",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("=",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("=",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("=",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("=",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("=",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("=",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("=",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("=",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("=",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("=",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("=",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("=",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("=",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("=",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("=",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<^",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("<^",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("<@",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<@",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "line"],ScalarType "bool"),("<@",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "circle"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "polygon"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "path"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "lseg"],ScalarType "bool"),("<?>",[ScalarType "abstime",ScalarType "tinterval"],ScalarType "bool"),("<>",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("<>",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<>",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("<>",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("<>",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("<>",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("<>",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("<>",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("<>",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("<>",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("<>",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("<>",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("<>",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("<>",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("<>",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("<>",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("<>",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("<>",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("<>",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("<>",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("<>",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("<>",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("<>",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("<>",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("<>",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("<>",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("<>",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<>",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("<>",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("<>",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("<>",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("<>",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<>",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("<>",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("<>",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("<>",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("<>",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("<>",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("<>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<>",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("<>",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("<>",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("<>",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("<>",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("<>",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("<>",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("<>",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<>",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("<>",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("<>",[Pseudo Record,Pseudo Record],ScalarType "bool"),("<>",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("<>",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("<=",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("<=",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("<=",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("<=",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("<=",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("<=",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("<=",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("<=",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("<=",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("<=",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("<=",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("<=",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("<=",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("<=",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("<=",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("<=",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("<=",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<=",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("<=",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("<=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<=",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("<=",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("<=",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("<=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<=",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("<=",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("<=",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("<=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<=",[Pseudo Record,Pseudo Record],ScalarType "bool"),("<=",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("<=",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("<=",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("<=",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("<=",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("<=",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("<=",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("<=",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("<=",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("<=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<=",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("<=",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("<=",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("<=",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("<=",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("<=",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("<=",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("<=",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("<=",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("<=",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("<=",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("<=",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("<=",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<=",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("<<|",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("<<|",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<<|",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<<=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<<",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),("<<",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<<",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<<",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<<",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<<",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("<<",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("<<",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("<<",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("<<",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("<->",[ScalarType "point",ScalarType "point"],ScalarType "float8"),("<->",[ScalarType "circle",ScalarType "polygon"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "line"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "path"],ScalarType "float8"),("<->",[ScalarType "circle",ScalarType "circle"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "circle"],ScalarType "float8"),("<->",[ScalarType "lseg",ScalarType "box"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "lseg"],ScalarType "float8"),("<->",[ScalarType "lseg",ScalarType "line"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "box"],ScalarType "float8"),("<->",[ScalarType "box",ScalarType "box"],ScalarType "float8"),("<->",[ScalarType "polygon",ScalarType "polygon"],ScalarType "float8"),("<->",[ScalarType "lseg",ScalarType "lseg"],ScalarType "float8"),("<->",[ScalarType "line",ScalarType "line"],ScalarType "float8"),("<->",[ScalarType "path",ScalarType "path"],ScalarType "float8"),("<->",[ScalarType "line",ScalarType "box"],ScalarType "float8"),("<#>",[ScalarType "abstime",ScalarType "abstime"],ScalarType "tinterval"),("<",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("<",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("<",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("<",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("<",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("<",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("<",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("<",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("<",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("<",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("<",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("<",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("<",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("<",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("<",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("<",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("<",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("<",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("<",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("<",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("<",[Pseudo Record,Pseudo Record],ScalarType "bool"),("<",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("<",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("<",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("<",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("<",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("<",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("<",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("<",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("<",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("<",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("<",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("<",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("<",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("<",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("<",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("<",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("<",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("<",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("<",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("<",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("<",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("<",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("<",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("<",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("<",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("<",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("/",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("/",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("/",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("/",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("/",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("/",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("/",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("/",[ScalarType "point",ScalarType "point"],ScalarType "point"),("/",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("/",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("/",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("/",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("/",[ScalarType "path",ScalarType "point"],ScalarType "path"),("/",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("/",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("/",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("/",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("/",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("/",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("/",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("/",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("/",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("/",[ScalarType "box",ScalarType "point"],ScalarType "box"),("-",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("-",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("-",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "interval"),("-",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("-",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("-",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("-",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("-",[ScalarType "date",ScalarType "date"],ScalarType "int4"),("-",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("-",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("-",[ScalarType "money",ScalarType "money"],ScalarType "money"),("-",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("-",[ScalarType "inet",ScalarType "inet"],ScalarType "int8"),("-",[ScalarType "box",ScalarType "point"],ScalarType "box"),("-",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("-",[ScalarType "path",ScalarType "point"],ScalarType "path"),("-",[ScalarType "point",ScalarType "point"],ScalarType "point"),("-",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("-",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("-",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("-",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("-",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("-",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("-",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("-",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("-",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("-",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("-",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("-",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("-",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("-",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("-",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("-",[ScalarType "time",ScalarType "time"],ScalarType "interval"),("-",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "interval"),("+",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("+",[ScalarType "date",ScalarType "time"],ScalarType "timestamp"),("+",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("+",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("+",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("+",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("+",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("+",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("+",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("+",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("+",[ScalarType "time",ScalarType "date"],ScalarType "timestamp"),("+",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("+",[ScalarType "date",ScalarType "timetz"],ScalarType "timestamptz"),("+",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "point",ScalarType "point"],ScalarType "point"),("+",[ScalarType "path",ScalarType "path"],ScalarType "path"),("+",[ScalarType "path",ScalarType "point"],ScalarType "path"),("+",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("+",[ScalarType "box",ScalarType "point"],ScalarType "box"),("+",[ScalarType "money",ScalarType "money"],ScalarType "money"),("+",[ScalarType "int8",ScalarType "inet"],ScalarType "inet"),("+",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("+",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("+",[ScalarType "interval",ScalarType "date"],ScalarType "timestamp"),("+",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("+",[ScalarType "timetz",ScalarType "date"],ScalarType "timestamptz"),("+",[ScalarType "interval",ScalarType "timetz"],ScalarType "timetz"),("+",[ScalarType "interval",ScalarType "timestamp"],ScalarType "timestamp"),("+",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("+",[ScalarType "interval",ScalarType "timestamptz"],ScalarType "timestamptz"),("+",[ScalarType "int4",ScalarType "date"],ScalarType "date"),("+",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("+",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("+",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("+",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("+",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("+",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("+",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("+",[ScalarType "interval",ScalarType "time"],ScalarType "time"),("*",[ScalarType "point",ScalarType "point"],ScalarType "point"),("*",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("*",[ScalarType "path",ScalarType "point"],ScalarType "path"),("*",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("*",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("*",[ScalarType "box",ScalarType "point"],ScalarType "box"),("*",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("*",[ScalarType "float4",ScalarType "money"],ScalarType "money"),("*",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("*",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("*",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("*",[ScalarType "float8",ScalarType "money"],ScalarType "money"),("*",[ScalarType "int4",ScalarType "money"],ScalarType "money"),("*",[ScalarType "int2",ScalarType "money"],ScalarType "money"),("*",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("*",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("*",[ScalarType "float8",ScalarType "interval"],ScalarType "interval"),("*",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("*",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("*",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("*",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("*",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("*",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("*",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("*",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("*",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("*",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("*",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("&>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&<|",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&<|",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&<|",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&<",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&<",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&<",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&&",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("&&",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("&&",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&&",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&&",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&&",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("&",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("&",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("&",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("&",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("&",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("%",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("%",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("%",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("%",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("#>=",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#>",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#=",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#<>",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#<=",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#<",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("##",[ScalarType "line",ScalarType "lseg"],ScalarType "point"),("##",[ScalarType "lseg",ScalarType "line"],ScalarType "point"),("##",[ScalarType "point",ScalarType "box"],ScalarType "point"),("##",[ScalarType "lseg",ScalarType "box"],ScalarType "point"),("##",[ScalarType "line",ScalarType "box"],ScalarType "point"),("##",[ScalarType "point",ScalarType "line"],ScalarType "point"),("##",[ScalarType "point",ScalarType "lseg"],ScalarType "point"),("##",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("#",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("#",[ScalarType "line",ScalarType "line"],ScalarType "point"),("#",[ScalarType "box",ScalarType "box"],ScalarType "box"),("#",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("#",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("#",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("#",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("!~~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("!~~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~~",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("!~~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("!~~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("!~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool")], scopeFunctions = [("RI_FKey_cascade_del",[],Pseudo Trigger),("RI_FKey_cascade_upd",[],Pseudo Trigger),("RI_FKey_check_ins",[],Pseudo Trigger),("RI_FKey_check_upd",[],Pseudo Trigger),("RI_FKey_noaction_del",[],Pseudo Trigger),("RI_FKey_noaction_upd",[],Pseudo Trigger),("RI_FKey_restrict_del",[],Pseudo Trigger),("RI_FKey_restrict_upd",[],Pseudo Trigger),("RI_FKey_setdefault_del",[],Pseudo Trigger),("RI_FKey_setdefault_upd",[],Pseudo Trigger),("RI_FKey_setnull_del",[],Pseudo Trigger),("RI_FKey_setnull_upd",[],Pseudo Trigger),("abbrev",[ScalarType "cidr"],ScalarType "text"),("abbrev",[ScalarType "inet"],ScalarType "text"),("abs",[ScalarType "int8"],ScalarType "int8"),("abs",[ScalarType "int2"],ScalarType "int2"),("abs",[ScalarType "int4"],ScalarType "int4"),("abs",[ScalarType "float4"],ScalarType "float4"),("abs",[ScalarType "float8"],ScalarType "float8"),("abs",[ScalarType "numeric"],ScalarType "numeric"),("abstime",[ScalarType "timestamp"],ScalarType "abstime"),("abstime",[ScalarType "timestamptz"],ScalarType "abstime"),("abstimeeq",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimege",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimegt",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimein",[Pseudo Cstring],ScalarType "abstime"),("abstimele",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimelt",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimene",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimeout",[ScalarType "abstime"],Pseudo Cstring),("abstimerecv",[Pseudo Internal],ScalarType "abstime"),("abstimesend",[ScalarType "abstime"],ScalarType "bytea"),("aclcontains",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ScalarType "bool"),("aclinsert",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("aclitemeq",[ScalarType "aclitem",ScalarType "aclitem"],ScalarType "bool"),("aclitemin",[Pseudo Cstring],ScalarType "aclitem"),("aclitemout",[ScalarType "aclitem"],Pseudo Cstring),("aclremove",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("acos",[ScalarType "float8"],ScalarType "float8"),("age",[ScalarType "xid"],ScalarType "int4"),("age",[ScalarType "timestamp"],ScalarType "interval"),("age",[ScalarType "timestamptz"],ScalarType "interval"),("age",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "interval"),("age",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "interval"),("any_in",[Pseudo Cstring],Pseudo Any),("any_out",[Pseudo Any],Pseudo Cstring),("anyarray_in",[Pseudo Cstring],Pseudo AnyArray),("anyarray_out",[Pseudo AnyArray],Pseudo Cstring),("anyarray_recv",[Pseudo Internal],Pseudo AnyArray),("anyarray_send",[Pseudo AnyArray],ScalarType "bytea"),("anyelement_in",[Pseudo Cstring],Pseudo AnyElement),("anyelement_out",[Pseudo AnyElement],Pseudo Cstring),("anyenum_in",[Pseudo Cstring],Pseudo AnyEnum),("anyenum_out",[Pseudo AnyEnum],Pseudo Cstring),("anynonarray_in",[Pseudo Cstring],Pseudo AnyNonArray),("anynonarray_out",[Pseudo AnyNonArray],Pseudo Cstring),("anytextcat",[Pseudo AnyNonArray,ScalarType "text"],ScalarType "text"),("area",[ScalarType "path"],ScalarType "float8"),("area",[ScalarType "box"],ScalarType "float8"),("area",[ScalarType "circle"],ScalarType "float8"),("areajoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("areasel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("array_agg_finalfn",[Pseudo Internal],Pseudo AnyArray),("array_agg_transfn",[Pseudo Internal,Pseudo AnyElement],Pseudo Internal),("array_append",[Pseudo AnyArray,Pseudo AnyElement],Pseudo AnyArray),("array_cat",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("array_dims",[Pseudo AnyArray],ScalarType "text"),("array_eq",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_fill",[Pseudo AnyElement,ArrayType (ScalarType "int4")],Pseudo AnyArray),("array_fill",[Pseudo AnyElement,ArrayType (ScalarType "int4"),ArrayType (ScalarType "int4")],Pseudo AnyArray),("array_ge",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_gt",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],Pseudo AnyArray),("array_larger",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("array_le",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_length",[Pseudo AnyArray,ScalarType "int4"],ScalarType "int4"),("array_lower",[Pseudo AnyArray,ScalarType "int4"],ScalarType "int4"),("array_lt",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_ndims",[Pseudo AnyArray],ScalarType "int4"),("array_ne",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_out",[Pseudo AnyArray],Pseudo Cstring),("array_prepend",[Pseudo AnyElement,Pseudo AnyArray],Pseudo AnyArray),("array_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],Pseudo AnyArray),("array_send",[Pseudo AnyArray],ScalarType "bytea"),("array_smaller",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("array_to_string",[Pseudo AnyArray,ScalarType "text"],ScalarType "text"),("array_upper",[Pseudo AnyArray,ScalarType "int4"],ScalarType "int4"),("arraycontained",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("arraycontains",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("arrayoverlap",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("ascii",[ScalarType "text"],ScalarType "int4"),("ascii_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("ascii_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("asin",[ScalarType "float8"],ScalarType "float8"),("atan",[ScalarType "float8"],ScalarType "float8"),("atan2",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("big5_to_euc_tw",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("big5_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("big5_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("bit",[ScalarType "int8",ScalarType "int4"],ScalarType "bit"),("bit",[ScalarType "int4",ScalarType "int4"],ScalarType "bit"),("bit",[ScalarType "bit",ScalarType "int4",ScalarType "bool"],ScalarType "bit"),("bit_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "bit"),("bit_length",[ScalarType "bytea"],ScalarType "int4"),("bit_length",[ScalarType "text"],ScalarType "int4"),("bit_length",[ScalarType "bit"],ScalarType "int4"),("bit_out",[ScalarType "bit"],Pseudo Cstring),("bit_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "bit"),("bit_send",[ScalarType "bit"],ScalarType "bytea"),("bitand",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("bitcat",[ScalarType "varbit",ScalarType "varbit"],ScalarType "varbit"),("bitcmp",[ScalarType "bit",ScalarType "bit"],ScalarType "int4"),("biteq",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitge",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitgt",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitle",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitlt",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitne",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitnot",[ScalarType "bit"],ScalarType "bit"),("bitor",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("bitshiftleft",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("bitshiftright",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("bittypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("bittypmodout",[ScalarType "int4"],Pseudo Cstring),("bitxor",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("bool",[ScalarType "int4"],ScalarType "bool"),("booland_statefunc",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("booleq",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolge",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolgt",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolin",[Pseudo Cstring],ScalarType "bool"),("boolle",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boollt",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolne",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolor_statefunc",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolout",[ScalarType "bool"],Pseudo Cstring),("boolrecv",[Pseudo Internal],ScalarType "bool"),("boolsend",[ScalarType "bool"],ScalarType "bytea"),("box",[ScalarType "polygon"],ScalarType "box"),("box",[ScalarType "circle"],ScalarType "box"),("box",[ScalarType "point",ScalarType "point"],ScalarType "box"),("box_above",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_above_eq",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_add",[ScalarType "box",ScalarType "point"],ScalarType "box"),("box_below",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_below_eq",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_center",[ScalarType "box"],ScalarType "point"),("box_contain",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_contained",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_distance",[ScalarType "box",ScalarType "box"],ScalarType "float8"),("box_div",[ScalarType "box",ScalarType "point"],ScalarType "box"),("box_eq",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_ge",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_gt",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_in",[Pseudo Cstring],ScalarType "box"),("box_intersect",[ScalarType "box",ScalarType "box"],ScalarType "box"),("box_le",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_left",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_lt",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_mul",[ScalarType "box",ScalarType "point"],ScalarType "box"),("box_out",[ScalarType "box"],Pseudo Cstring),("box_overabove",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overbelow",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overlap",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overleft",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overright",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_recv",[Pseudo Internal],ScalarType "box"),("box_right",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_same",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_send",[ScalarType "box"],ScalarType "bytea"),("box_sub",[ScalarType "box",ScalarType "point"],ScalarType "box"),("bpchar",[ScalarType "char"],ScalarType "bpchar"),("bpchar",[ScalarType "name"],ScalarType "bpchar"),("bpchar",[ScalarType "bpchar",ScalarType "int4",ScalarType "bool"],ScalarType "bpchar"),("bpchar_larger",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bpchar"),("bpchar_pattern_ge",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_pattern_gt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_pattern_le",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_pattern_lt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_smaller",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bpchar"),("bpcharcmp",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "int4"),("bpchareq",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharge",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchargt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchariclike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharicnlike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharicregexeq",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharicregexne",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharin",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "bpchar"),("bpcharle",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharlike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharlt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharne",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharnlike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharout",[ScalarType "bpchar"],Pseudo Cstring),("bpcharrecv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "bpchar"),("bpcharregexeq",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharregexne",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharsend",[ScalarType "bpchar"],ScalarType "bytea"),("bpchartypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("bpchartypmodout",[ScalarType "int4"],Pseudo Cstring),("broadcast",[ScalarType "inet"],ScalarType "inet"),("btabstimecmp",[ScalarType "abstime",ScalarType "abstime"],ScalarType "int4"),("btarraycmp",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "int4"),("btbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("btboolcmp",[ScalarType "bool",ScalarType "bool"],ScalarType "int4"),("btbpchar_pattern_cmp",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "int4"),("btbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("btbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("btcharcmp",[ScalarType "char",ScalarType "char"],ScalarType "int4"),("btcostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("btendscan",[Pseudo Internal],Pseudo Void),("btfloat48cmp",[ScalarType "float4",ScalarType "float8"],ScalarType "int4"),("btfloat4cmp",[ScalarType "float4",ScalarType "float4"],ScalarType "int4"),("btfloat84cmp",[ScalarType "float8",ScalarType "float4"],ScalarType "int4"),("btfloat8cmp",[ScalarType "float8",ScalarType "float8"],ScalarType "int4"),("btgetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("btgettuple",[Pseudo Internal,Pseudo Internal],ScalarType "bool"),("btinsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("btint24cmp",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("btint28cmp",[ScalarType "int2",ScalarType "int8"],ScalarType "int4"),("btint2cmp",[ScalarType "int2",ScalarType "int2"],ScalarType "int4"),("btint42cmp",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("btint48cmp",[ScalarType "int4",ScalarType "int8"],ScalarType "int4"),("btint4cmp",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("btint82cmp",[ScalarType "int8",ScalarType "int2"],ScalarType "int4"),("btint84cmp",[ScalarType "int8",ScalarType "int4"],ScalarType "int4"),("btint8cmp",[ScalarType "int8",ScalarType "int8"],ScalarType "int4"),("btmarkpos",[Pseudo Internal],Pseudo Void),("btnamecmp",[ScalarType "name",ScalarType "name"],ScalarType "int4"),("btoidcmp",[ScalarType "oid",ScalarType "oid"],ScalarType "int4"),("btoidvectorcmp",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "int4"),("btoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("btrecordcmp",[Pseudo Record,Pseudo Record],ScalarType "int4"),("btreltimecmp",[ScalarType "reltime",ScalarType "reltime"],ScalarType "int4"),("btrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("btrestrpos",[Pseudo Internal],Pseudo Void),("btrim",[ScalarType "text"],ScalarType "text"),("btrim",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("btrim",[ScalarType "text",ScalarType "text"],ScalarType "text"),("bttext_pattern_cmp",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("bttextcmp",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("bttidcmp",[ScalarType "tid",ScalarType "tid"],ScalarType "int4"),("bttintervalcmp",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "int4"),("btvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("byteacat",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("byteacmp",[ScalarType "bytea",ScalarType "bytea"],ScalarType "int4"),("byteaeq",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteage",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteagt",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteain",[Pseudo Cstring],ScalarType "bytea"),("byteale",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("bytealike",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("bytealt",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteane",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteanlike",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteaout",[ScalarType "bytea"],Pseudo Cstring),("bytearecv",[Pseudo Internal],ScalarType "bytea"),("byteasend",[ScalarType "bytea"],ScalarType "bytea"),("cash_cmp",[ScalarType "money",ScalarType "money"],ScalarType "int4"),("cash_div_flt4",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("cash_div_flt8",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("cash_div_int2",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("cash_div_int4",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("cash_eq",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_ge",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_gt",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_in",[Pseudo Cstring],ScalarType "money"),("cash_le",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_lt",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_mi",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cash_mul_flt4",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("cash_mul_flt8",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("cash_mul_int2",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("cash_mul_int4",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("cash_ne",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_out",[ScalarType "money"],Pseudo Cstring),("cash_pl",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cash_recv",[Pseudo Internal],ScalarType "money"),("cash_send",[ScalarType "money"],ScalarType "bytea"),("cash_words",[ScalarType "money"],ScalarType "text"),("cashlarger",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cashsmaller",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cbrt",[ScalarType "float8"],ScalarType "float8"),("ceil",[ScalarType "float8"],ScalarType "float8"),("ceil",[ScalarType "numeric"],ScalarType "numeric"),("ceiling",[ScalarType "float8"],ScalarType "float8"),("ceiling",[ScalarType "numeric"],ScalarType "numeric"),("center",[ScalarType "box"],ScalarType "point"),("center",[ScalarType "circle"],ScalarType "point"),("char",[ScalarType "int4"],ScalarType "char"),("char",[ScalarType "text"],ScalarType "char"),("char_length",[ScalarType "text"],ScalarType "int4"),("char_length",[ScalarType "bpchar"],ScalarType "int4"),("character_length",[ScalarType "text"],ScalarType "int4"),("character_length",[ScalarType "bpchar"],ScalarType "int4"),("chareq",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charge",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("chargt",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charin",[Pseudo Cstring],ScalarType "char"),("charle",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charlt",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charne",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charout",[ScalarType "char"],Pseudo Cstring),("charrecv",[Pseudo Internal],ScalarType "char"),("charsend",[ScalarType "char"],ScalarType "bytea"),("chr",[ScalarType "int4"],ScalarType "text"),("cideq",[ScalarType "cid",ScalarType "cid"],ScalarType "bool"),("cidin",[Pseudo Cstring],ScalarType "cid"),("cidout",[ScalarType "cid"],Pseudo Cstring),("cidr",[ScalarType "inet"],ScalarType "cidr"),("cidr_in",[Pseudo Cstring],ScalarType "cidr"),("cidr_out",[ScalarType "cidr"],Pseudo Cstring),("cidr_recv",[Pseudo Internal],ScalarType "cidr"),("cidr_send",[ScalarType "cidr"],ScalarType "bytea"),("cidrecv",[Pseudo Internal],ScalarType "cid"),("cidsend",[ScalarType "cid"],ScalarType "bytea"),("circle",[ScalarType "box"],ScalarType "circle"),("circle",[ScalarType "polygon"],ScalarType "circle"),("circle",[ScalarType "point",ScalarType "float8"],ScalarType "circle"),("circle_above",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_add_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("circle_below",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_center",[ScalarType "circle"],ScalarType "point"),("circle_contain",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_contain_pt",[ScalarType "circle",ScalarType "point"],ScalarType "bool"),("circle_contained",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_distance",[ScalarType "circle",ScalarType "circle"],ScalarType "float8"),("circle_div_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("circle_eq",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_ge",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_gt",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_in",[Pseudo Cstring],ScalarType "circle"),("circle_le",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_left",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_lt",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_mul_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("circle_ne",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_out",[ScalarType "circle"],Pseudo Cstring),("circle_overabove",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overbelow",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overlap",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overleft",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overright",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_recv",[Pseudo Internal],ScalarType "circle"),("circle_right",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_same",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_send",[ScalarType "circle"],ScalarType "bytea"),("circle_sub_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("clock_timestamp",[],ScalarType "timestamptz"),("close_lb",[ScalarType "line",ScalarType "box"],ScalarType "point"),("close_ls",[ScalarType "line",ScalarType "lseg"],ScalarType "point"),("close_lseg",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("close_pb",[ScalarType "point",ScalarType "box"],ScalarType "point"),("close_pl",[ScalarType "point",ScalarType "line"],ScalarType "point"),("close_ps",[ScalarType "point",ScalarType "lseg"],ScalarType "point"),("close_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "point"),("close_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "point"),("col_description",[ScalarType "oid",ScalarType "int4"],ScalarType "text"),("contjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("contsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("convert",[ScalarType "bytea",ScalarType "name",ScalarType "name"],ScalarType "bytea"),("convert_from",[ScalarType "bytea",ScalarType "name"],ScalarType "text"),("convert_to",[ScalarType "text",ScalarType "name"],ScalarType "bytea"),("cos",[ScalarType "float8"],ScalarType "float8"),("cot",[ScalarType "float8"],ScalarType "float8"),("cstring_in",[Pseudo Cstring],Pseudo Cstring),("cstring_out",[Pseudo Cstring],Pseudo Cstring),("cstring_recv",[Pseudo Internal],Pseudo Cstring),("cstring_send",[Pseudo Cstring],ScalarType "bytea"),("current_database",[],ScalarType "name"),("current_query",[],ScalarType "text"),("current_schema",[],ScalarType "name"),("current_schemas",[ScalarType "bool"],ArrayType (ScalarType "name")),("current_setting",[ScalarType "text"],ScalarType "text"),("current_user",[],ScalarType "name"),("currtid",[ScalarType "oid",ScalarType "tid"],ScalarType "tid"),("currtid2",[ScalarType "text",ScalarType "tid"],ScalarType "tid"),("currval",[ScalarType "regclass"],ScalarType "int8"),("cursor_to_xml",[ScalarType "refcursor",ScalarType "int4",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("cursor_to_xmlschema",[ScalarType "refcursor",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("database_to_xml",[ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("database_to_xml_and_xmlschema",[ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("database_to_xmlschema",[ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("date",[ScalarType "abstime"],ScalarType "date"),("date",[ScalarType "timestamp"],ScalarType "date"),("date",[ScalarType "timestamptz"],ScalarType "date"),("date_cmp",[ScalarType "date",ScalarType "date"],ScalarType "int4"),("date_cmp_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "int4"),("date_cmp_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "int4"),("date_eq",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_eq_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_eq_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_ge",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_ge_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_ge_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_gt",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_gt_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_gt_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_in",[Pseudo Cstring],ScalarType "date"),("date_larger",[ScalarType "date",ScalarType "date"],ScalarType "date"),("date_le",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_le_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_le_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_lt",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_lt_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_lt_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_mi",[ScalarType "date",ScalarType "date"],ScalarType "int4"),("date_mi_interval",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("date_mii",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("date_ne",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_ne_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_ne_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_out",[ScalarType "date"],Pseudo Cstring),("date_part",[ScalarType "text",ScalarType "abstime"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "reltime"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "date"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "time"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "timestamp"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "timestamptz"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "interval"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "timetz"],ScalarType "float8"),("date_pl_interval",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("date_pli",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("date_recv",[Pseudo Internal],ScalarType "date"),("date_send",[ScalarType "date"],ScalarType "bytea"),("date_smaller",[ScalarType "date",ScalarType "date"],ScalarType "date"),("date_trunc",[ScalarType "text",ScalarType "timestamp"],ScalarType "timestamp"),("date_trunc",[ScalarType "text",ScalarType "timestamptz"],ScalarType "timestamptz"),("date_trunc",[ScalarType "text",ScalarType "interval"],ScalarType "interval"),("datetime_pl",[ScalarType "date",ScalarType "time"],ScalarType "timestamp"),("datetimetz_pl",[ScalarType "date",ScalarType "timetz"],ScalarType "timestamptz"),("dcbrt",[ScalarType "float8"],ScalarType "float8"),("decode",[ScalarType "text",ScalarType "text"],ScalarType "bytea"),("degrees",[ScalarType "float8"],ScalarType "float8"),("dexp",[ScalarType "float8"],ScalarType "float8"),("diagonal",[ScalarType "box"],ScalarType "lseg"),("diameter",[ScalarType "circle"],ScalarType "float8"),("dispell_init",[Pseudo Internal],Pseudo Internal),("dispell_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dist_cpoly",[ScalarType "circle",ScalarType "polygon"],ScalarType "float8"),("dist_lb",[ScalarType "line",ScalarType "box"],ScalarType "float8"),("dist_pb",[ScalarType "point",ScalarType "box"],ScalarType "float8"),("dist_pc",[ScalarType "point",ScalarType "circle"],ScalarType "float8"),("dist_pl",[ScalarType "point",ScalarType "line"],ScalarType "float8"),("dist_ppath",[ScalarType "point",ScalarType "path"],ScalarType "float8"),("dist_ps",[ScalarType "point",ScalarType "lseg"],ScalarType "float8"),("dist_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "float8"),("dist_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "float8"),("div",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("dlog1",[ScalarType "float8"],ScalarType "float8"),("dlog10",[ScalarType "float8"],ScalarType "float8"),("domain_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],Pseudo Any),("domain_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],Pseudo Any),("dpow",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("dround",[ScalarType "float8"],ScalarType "float8"),("dsimple_init",[Pseudo Internal],Pseudo Internal),("dsimple_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dsnowball_init",[Pseudo Internal],Pseudo Internal),("dsnowball_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dsqrt",[ScalarType "float8"],ScalarType "float8"),("dsynonym_init",[Pseudo Internal],Pseudo Internal),("dsynonym_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dtrunc",[ScalarType "float8"],ScalarType "float8"),("encode",[ScalarType "bytea",ScalarType "text"],ScalarType "text"),("enum_cmp",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "int4"),("enum_eq",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_first",[Pseudo AnyEnum],Pseudo AnyEnum),("enum_ge",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_gt",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_in",[Pseudo Cstring,ScalarType "oid"],Pseudo AnyEnum),("enum_larger",[Pseudo AnyEnum,Pseudo AnyEnum],Pseudo AnyEnum),("enum_last",[Pseudo AnyEnum],Pseudo AnyEnum),("enum_le",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_lt",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_ne",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_out",[Pseudo AnyEnum],Pseudo Cstring),("enum_range",[Pseudo AnyEnum],Pseudo AnyArray),("enum_range",[Pseudo AnyEnum,Pseudo AnyEnum],Pseudo AnyArray),("enum_recv",[Pseudo Cstring,ScalarType "oid"],Pseudo AnyEnum),("enum_send",[Pseudo AnyEnum],ScalarType "bytea"),("enum_smaller",[Pseudo AnyEnum,Pseudo AnyEnum],Pseudo AnyEnum),("eqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("eqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("euc_cn_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_cn_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jis_2004_to_shift_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jis_2004_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jp_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jp_to_sjis",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jp_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_kr_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_kr_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_tw_to_big5",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_tw_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_tw_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("exp",[ScalarType "float8"],ScalarType "float8"),("exp",[ScalarType "numeric"],ScalarType "numeric"),("factorial",[ScalarType "int8"],ScalarType "numeric"),("family",[ScalarType "inet"],ScalarType "int4"),("flatfile_update_trigger",[],Pseudo Trigger),("float4",[ScalarType "int8"],ScalarType "float4"),("float4",[ScalarType "int2"],ScalarType "float4"),("float4",[ScalarType "int4"],ScalarType "float4"),("float4",[ScalarType "float8"],ScalarType "float4"),("float4",[ScalarType "numeric"],ScalarType "float4"),("float48div",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float48eq",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48ge",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48gt",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48le",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48lt",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48mi",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float48mul",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float48ne",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48pl",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float4_accum",[ArrayType (ScalarType "float8"),ScalarType "float4"],ArrayType (ScalarType "float8")),("float4abs",[ScalarType "float4"],ScalarType "float4"),("float4div",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4eq",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4ge",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4gt",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4in",[Pseudo Cstring],ScalarType "float4"),("float4larger",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4le",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4lt",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4mi",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4mul",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4ne",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4out",[ScalarType "float4"],Pseudo Cstring),("float4pl",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4recv",[Pseudo Internal],ScalarType "float4"),("float4send",[ScalarType "float4"],ScalarType "bytea"),("float4smaller",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4um",[ScalarType "float4"],ScalarType "float4"),("float4up",[ScalarType "float4"],ScalarType "float4"),("float8",[ScalarType "int8"],ScalarType "float8"),("float8",[ScalarType "int2"],ScalarType "float8"),("float8",[ScalarType "int4"],ScalarType "float8"),("float8",[ScalarType "float4"],ScalarType "float8"),("float8",[ScalarType "numeric"],ScalarType "float8"),("float84div",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float84eq",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84ge",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84gt",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84le",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84lt",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84mi",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float84mul",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float84ne",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84pl",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float8_accum",[ArrayType (ScalarType "float8"),ScalarType "float8"],ArrayType (ScalarType "float8")),("float8_avg",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_corr",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_covar_pop",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_covar_samp",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_accum",[ArrayType (ScalarType "float8"),ScalarType "float8",ScalarType "float8"],ArrayType (ScalarType "float8")),("float8_regr_avgx",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_avgy",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_intercept",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_r2",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_slope",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_sxx",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_sxy",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_syy",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_stddev_pop",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_stddev_samp",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_var_pop",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_var_samp",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8abs",[ScalarType "float8"],ScalarType "float8"),("float8div",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8eq",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8ge",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8gt",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8in",[Pseudo Cstring],ScalarType "float8"),("float8larger",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8le",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8lt",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8mi",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8mul",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8ne",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8out",[ScalarType "float8"],Pseudo Cstring),("float8pl",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8recv",[Pseudo Internal],ScalarType "float8"),("float8send",[ScalarType "float8"],ScalarType "bytea"),("float8smaller",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8um",[ScalarType "float8"],ScalarType "float8"),("float8up",[ScalarType "float8"],ScalarType "float8"),("floor",[ScalarType "float8"],ScalarType "float8"),("floor",[ScalarType "numeric"],ScalarType "numeric"),("flt4_mul_cash",[ScalarType "float4",ScalarType "money"],ScalarType "money"),("flt8_mul_cash",[ScalarType "float8",ScalarType "money"],ScalarType "money"),("fmgr_c_validator",[ScalarType "oid"],Pseudo Void),("fmgr_internal_validator",[ScalarType "oid"],Pseudo Void),("fmgr_sql_validator",[ScalarType "oid"],Pseudo Void),("format_type",[ScalarType "oid",ScalarType "int4"],ScalarType "text"),("gb18030_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("gbk_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("generate_series",[ScalarType "int8",ScalarType "int8"],SetOfType (ScalarType "int8")),("generate_series",[ScalarType "int4",ScalarType "int4"],SetOfType (ScalarType "int4")),("generate_series",[ScalarType "int8",ScalarType "int8",ScalarType "int8"],SetOfType (ScalarType "int8")),("generate_series",[ScalarType "int4",ScalarType "int4",ScalarType "int4"],SetOfType (ScalarType "int4")),("generate_series",[ScalarType "timestamp",ScalarType "timestamp",ScalarType "interval"],SetOfType (ScalarType "timestamp")),("generate_series",[ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "interval"],SetOfType (ScalarType "timestamptz")),("generate_subscripts",[Pseudo AnyArray,ScalarType "int4"],SetOfType (ScalarType "int4")),("generate_subscripts",[Pseudo AnyArray,ScalarType "int4",ScalarType "bool"],SetOfType (ScalarType "int4")),("get_bit",[ScalarType "bytea",ScalarType "int4"],ScalarType "int4"),("get_byte",[ScalarType "bytea",ScalarType "int4"],ScalarType "int4"),("get_current_ts_config",[],ScalarType "regconfig"),("getdatabaseencoding",[],ScalarType "name"),("getpgusername",[],ScalarType "name"),("gin_cmp_prefix",[ScalarType "text",ScalarType "text",ScalarType "int2",Pseudo Internal],ScalarType "int4"),("gin_cmp_tslexeme",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("gin_extract_tsquery",[ScalarType "tsquery",Pseudo Internal,ScalarType "int2",Pseudo Internal,Pseudo Internal],Pseudo Internal),("gin_extract_tsvector",[ScalarType "tsvector",Pseudo Internal],Pseudo Internal),("gin_tsquery_consistent",[Pseudo Internal,ScalarType "int2",ScalarType "tsquery",ScalarType "int4",Pseudo Internal,Pseudo Internal],ScalarType "bool"),("ginarrayconsistent",[Pseudo Internal,ScalarType "int2",Pseudo AnyArray,ScalarType "int4",Pseudo Internal,Pseudo Internal],ScalarType "bool"),("ginarrayextract",[Pseudo AnyArray,Pseudo Internal],Pseudo Internal),("ginbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("ginbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("ginbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gincostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("ginendscan",[Pseudo Internal],Pseudo Void),("gingetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("gininsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("ginmarkpos",[Pseudo Internal],Pseudo Void),("ginoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("ginqueryarrayextract",[Pseudo AnyArray,Pseudo Internal,ScalarType "int2",Pseudo Internal,Pseudo Internal],Pseudo Internal),("ginrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("ginrestrpos",[Pseudo Internal],Pseudo Void),("ginvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gist_box_compress",[Pseudo Internal],Pseudo Internal),("gist_box_consistent",[Pseudo Internal,ScalarType "box",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gist_box_decompress",[Pseudo Internal],Pseudo Internal),("gist_box_penalty",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gist_box_picksplit",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gist_box_same",[ScalarType "box",ScalarType "box",Pseudo Internal],Pseudo Internal),("gist_box_union",[Pseudo Internal,Pseudo Internal],ScalarType "box"),("gist_circle_compress",[Pseudo Internal],Pseudo Internal),("gist_circle_consistent",[Pseudo Internal,ScalarType "circle",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gist_poly_compress",[Pseudo Internal],Pseudo Internal),("gist_poly_consistent",[Pseudo Internal,ScalarType "polygon",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gistbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gistbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gistbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gistcostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("gistendscan",[Pseudo Internal],Pseudo Void),("gistgetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("gistgettuple",[Pseudo Internal,Pseudo Internal],ScalarType "bool"),("gistinsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("gistmarkpos",[Pseudo Internal],Pseudo Void),("gistoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("gistrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("gistrestrpos",[Pseudo Internal],Pseudo Void),("gistvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsquery_compress",[Pseudo Internal],Pseudo Internal),("gtsquery_consistent",[Pseudo Internal,Pseudo Internal,ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gtsquery_decompress",[Pseudo Internal],Pseudo Internal),("gtsquery_penalty",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsquery_picksplit",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsquery_same",[ScalarType "int8",ScalarType "int8",Pseudo Internal],Pseudo Internal),("gtsquery_union",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvector_compress",[Pseudo Internal],Pseudo Internal),("gtsvector_consistent",[Pseudo Internal,ScalarType "gtsvector",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gtsvector_decompress",[Pseudo Internal],Pseudo Internal),("gtsvector_penalty",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvector_picksplit",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvector_same",[ScalarType "gtsvector",ScalarType "gtsvector",Pseudo Internal],Pseudo Internal),("gtsvector_union",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvectorin",[Pseudo Cstring],ScalarType "gtsvector"),("gtsvectorout",[ScalarType "gtsvector"],Pseudo Cstring),("has_any_column_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "text",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "text",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "oid",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("hash_aclitem",[ScalarType "aclitem"],ScalarType "int4"),("hash_numeric",[ScalarType "numeric"],ScalarType "int4"),("hashbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashbpchar",[ScalarType "bpchar"],ScalarType "int4"),("hashbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashchar",[ScalarType "char"],ScalarType "int4"),("hashcostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("hashendscan",[Pseudo Internal],Pseudo Void),("hashenum",[Pseudo AnyEnum],ScalarType "int4"),("hashfloat4",[ScalarType "float4"],ScalarType "int4"),("hashfloat8",[ScalarType "float8"],ScalarType "int4"),("hashgetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("hashgettuple",[Pseudo Internal,Pseudo Internal],ScalarType "bool"),("hashinet",[ScalarType "inet"],ScalarType "int4"),("hashinsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("hashint2",[ScalarType "int2"],ScalarType "int4"),("hashint2vector",[ScalarType "int2vector"],ScalarType "int4"),("hashint4",[ScalarType "int4"],ScalarType "int4"),("hashint8",[ScalarType "int8"],ScalarType "int4"),("hashmacaddr",[ScalarType "macaddr"],ScalarType "int4"),("hashmarkpos",[Pseudo Internal],Pseudo Void),("hashname",[ScalarType "name"],ScalarType "int4"),("hashoid",[ScalarType "oid"],ScalarType "int4"),("hashoidvector",[ScalarType "oidvector"],ScalarType "int4"),("hashoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("hashrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("hashrestrpos",[Pseudo Internal],Pseudo Void),("hashtext",[ScalarType "text"],ScalarType "int4"),("hashvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashvarlena",[Pseudo Internal],ScalarType "int4"),("height",[ScalarType "box"],ScalarType "float8"),("host",[ScalarType "inet"],ScalarType "text"),("hostmask",[ScalarType "inet"],ScalarType "inet"),("iclikejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("iclikesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("icnlikejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("icnlikesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("icregexeqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("icregexeqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("icregexnejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("icregexnesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("inet_client_addr",[],ScalarType "inet"),("inet_client_port",[],ScalarType "int4"),("inet_in",[Pseudo Cstring],ScalarType "inet"),("inet_out",[ScalarType "inet"],Pseudo Cstring),("inet_recv",[Pseudo Internal],ScalarType "inet"),("inet_send",[ScalarType "inet"],ScalarType "bytea"),("inet_server_addr",[],ScalarType "inet"),("inet_server_port",[],ScalarType "int4"),("inetand",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("inetmi",[ScalarType "inet",ScalarType "inet"],ScalarType "int8"),("inetmi_int8",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("inetnot",[ScalarType "inet"],ScalarType "inet"),("inetor",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("inetpl",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("initcap",[ScalarType "text"],ScalarType "text"),("int2",[ScalarType "int8"],ScalarType "int2"),("int2",[ScalarType "int4"],ScalarType "int2"),("int2",[ScalarType "float4"],ScalarType "int2"),("int2",[ScalarType "float8"],ScalarType "int2"),("int2",[ScalarType "numeric"],ScalarType "int2"),("int24div",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int24eq",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24ge",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24gt",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24le",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24lt",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24mi",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int24mul",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int24ne",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24pl",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int28div",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int28eq",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28ge",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28gt",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28le",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28lt",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28mi",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int28mul",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int28ne",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28pl",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int2_accum",[ArrayType (ScalarType "numeric"),ScalarType "int2"],ArrayType (ScalarType "numeric")),("int2_avg_accum",[ArrayType (ScalarType "int8"),ScalarType "int2"],ArrayType (ScalarType "int8")),("int2_mul_cash",[ScalarType "int2",ScalarType "money"],ScalarType "money"),("int2_sum",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int2abs",[ScalarType "int2"],ScalarType "int2"),("int2and",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2div",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2eq",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2ge",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2gt",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2in",[Pseudo Cstring],ScalarType "int2"),("int2larger",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2le",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2lt",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2mi",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2mod",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2mul",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2ne",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2not",[ScalarType "int2"],ScalarType "int2"),("int2or",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2out",[ScalarType "int2"],Pseudo Cstring),("int2pl",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2recv",[Pseudo Internal],ScalarType "int2"),("int2send",[ScalarType "int2"],ScalarType "bytea"),("int2shl",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),("int2shr",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),("int2smaller",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2um",[ScalarType "int2"],ScalarType "int2"),("int2up",[ScalarType "int2"],ScalarType "int2"),("int2vectoreq",[ScalarType "int2vector",ScalarType "int2vector"],ScalarType "bool"),("int2vectorin",[Pseudo Cstring],ScalarType "int2vector"),("int2vectorout",[ScalarType "int2vector"],Pseudo Cstring),("int2vectorrecv",[Pseudo Internal],ScalarType "int2vector"),("int2vectorsend",[ScalarType "int2vector"],ScalarType "bytea"),("int2xor",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int4",[ScalarType "bool"],ScalarType "int4"),("int4",[ScalarType "char"],ScalarType "int4"),("int4",[ScalarType "int8"],ScalarType "int4"),("int4",[ScalarType "int2"],ScalarType "int4"),("int4",[ScalarType "float4"],ScalarType "int4"),("int4",[ScalarType "float8"],ScalarType "int4"),("int4",[ScalarType "bit"],ScalarType "int4"),("int4",[ScalarType "numeric"],ScalarType "int4"),("int42div",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int42eq",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42ge",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42gt",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42le",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42lt",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42mi",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int42mul",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int42ne",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42pl",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int48div",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int48eq",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48ge",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48gt",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48le",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48lt",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48mi",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int48mul",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int48ne",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48pl",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int4_accum",[ArrayType (ScalarType "numeric"),ScalarType "int4"],ArrayType (ScalarType "numeric")),("int4_avg_accum",[ArrayType (ScalarType "int8"),ScalarType "int4"],ArrayType (ScalarType "int8")),("int4_mul_cash",[ScalarType "int4",ScalarType "money"],ScalarType "money"),("int4_sum",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int4abs",[ScalarType "int4"],ScalarType "int4"),("int4and",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4div",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4eq",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4ge",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4gt",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4in",[Pseudo Cstring],ScalarType "int4"),("int4inc",[ScalarType "int4"],ScalarType "int4"),("int4larger",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4le",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4lt",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4mi",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4mod",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4mul",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4ne",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4not",[ScalarType "int4"],ScalarType "int4"),("int4or",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4out",[ScalarType "int4"],Pseudo Cstring),("int4pl",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4recv",[Pseudo Internal],ScalarType "int4"),("int4send",[ScalarType "int4"],ScalarType "bytea"),("int4shl",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4shr",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4smaller",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4um",[ScalarType "int4"],ScalarType "int4"),("int4up",[ScalarType "int4"],ScalarType "int4"),("int4xor",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int8",[ScalarType "int2"],ScalarType "int8"),("int8",[ScalarType "int4"],ScalarType "int8"),("int8",[ScalarType "oid"],ScalarType "int8"),("int8",[ScalarType "float4"],ScalarType "int8"),("int8",[ScalarType "float8"],ScalarType "int8"),("int8",[ScalarType "bit"],ScalarType "int8"),("int8",[ScalarType "numeric"],ScalarType "int8"),("int82div",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int82eq",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82ge",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82gt",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82le",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82lt",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82mi",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int82mul",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int82ne",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82pl",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int84div",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int84eq",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84ge",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84gt",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84le",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84lt",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84mi",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int84mul",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int84ne",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84pl",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int8_accum",[ArrayType (ScalarType "numeric"),ScalarType "int8"],ArrayType (ScalarType "numeric")),("int8_avg",[ArrayType (ScalarType "int8")],ScalarType "numeric"),("int8_avg_accum",[ArrayType (ScalarType "numeric"),ScalarType "int8"],ArrayType (ScalarType "numeric")),("int8_sum",[ScalarType "numeric",ScalarType "int8"],ScalarType "numeric"),("int8abs",[ScalarType "int8"],ScalarType "int8"),("int8and",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8div",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8eq",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8ge",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8gt",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8in",[Pseudo Cstring],ScalarType "int8"),("int8inc",[ScalarType "int8"],ScalarType "int8"),("int8inc_any",[ScalarType "int8",Pseudo Any],ScalarType "int8"),("int8inc_float8_float8",[ScalarType "int8",ScalarType "float8",ScalarType "float8"],ScalarType "int8"),("int8larger",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8le",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8lt",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8mi",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8mod",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8mul",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8ne",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8not",[ScalarType "int8"],ScalarType "int8"),("int8or",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8out",[ScalarType "int8"],Pseudo Cstring),("int8pl",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8pl_inet",[ScalarType "int8",ScalarType "inet"],ScalarType "inet"),("int8recv",[Pseudo Internal],ScalarType "int8"),("int8send",[ScalarType "int8"],ScalarType "bytea"),("int8shl",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int8shr",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int8smaller",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8um",[ScalarType "int8"],ScalarType "int8"),("int8up",[ScalarType "int8"],ScalarType "int8"),("int8xor",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("integer_pl_date",[ScalarType "int4",ScalarType "date"],ScalarType "date"),("inter_lb",[ScalarType "line",ScalarType "box"],ScalarType "bool"),("inter_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("inter_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("internal_in",[Pseudo Cstring],Pseudo Internal),("internal_out",[Pseudo Internal],Pseudo Cstring),("interval",[ScalarType "reltime"],ScalarType "interval"),("interval",[ScalarType "time"],ScalarType "interval"),("interval",[ScalarType "interval",ScalarType "int4"],ScalarType "interval"),("interval_accum",[ArrayType (ScalarType "interval"),ScalarType "interval"],ArrayType (ScalarType "interval")),("interval_avg",[ArrayType (ScalarType "interval")],ScalarType "interval"),("interval_cmp",[ScalarType "interval",ScalarType "interval"],ScalarType "int4"),("interval_div",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("interval_eq",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_ge",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_gt",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_hash",[ScalarType "interval"],ScalarType "int4"),("interval_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "interval"),("interval_larger",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_le",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_lt",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_mi",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_mul",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("interval_ne",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_out",[ScalarType "interval"],Pseudo Cstring),("interval_pl",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_pl_date",[ScalarType "interval",ScalarType "date"],ScalarType "timestamp"),("interval_pl_time",[ScalarType "interval",ScalarType "time"],ScalarType "time"),("interval_pl_timestamp",[ScalarType "interval",ScalarType "timestamp"],ScalarType "timestamp"),("interval_pl_timestamptz",[ScalarType "interval",ScalarType "timestamptz"],ScalarType "timestamptz"),("interval_pl_timetz",[ScalarType "interval",ScalarType "timetz"],ScalarType "timetz"),("interval_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "interval"),("interval_send",[ScalarType "interval"],ScalarType "bytea"),("interval_smaller",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_um",[ScalarType "interval"],ScalarType "interval"),("intervaltypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("intervaltypmodout",[ScalarType "int4"],Pseudo Cstring),("intinterval",[ScalarType "abstime",ScalarType "tinterval"],ScalarType "bool"),("isclosed",[ScalarType "path"],ScalarType "bool"),("isfinite",[ScalarType "abstime"],ScalarType "bool"),("isfinite",[ScalarType "date"],ScalarType "bool"),("isfinite",[ScalarType "timestamp"],ScalarType "bool"),("isfinite",[ScalarType "timestamptz"],ScalarType "bool"),("isfinite",[ScalarType "interval"],ScalarType "bool"),("ishorizontal",[ScalarType "lseg"],ScalarType "bool"),("ishorizontal",[ScalarType "line"],ScalarType "bool"),("ishorizontal",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("iso8859_1_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso8859_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("isopen",[ScalarType "path"],ScalarType "bool"),("isparallel",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("isparallel",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("isperp",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("isperp",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("isvertical",[ScalarType "lseg"],ScalarType "bool"),("isvertical",[ScalarType "line"],ScalarType "bool"),("isvertical",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("johab_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("justify_days",[ScalarType "interval"],ScalarType "interval"),("justify_hours",[ScalarType "interval"],ScalarType "interval"),("justify_interval",[ScalarType "interval"],ScalarType "interval"),("koi8r_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8u_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("language_handler_in",[Pseudo Cstring],Pseudo LanguageHandler),("language_handler_out",[Pseudo LanguageHandler],Pseudo Cstring),("lastval",[],ScalarType "int8"),("latin1_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin2_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin2_to_win1250",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin3_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin4_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("length",[ScalarType "bytea"],ScalarType "int4"),("length",[ScalarType "text"],ScalarType "int4"),("length",[ScalarType "lseg"],ScalarType "float8"),("length",[ScalarType "path"],ScalarType "float8"),("length",[ScalarType "bpchar"],ScalarType "int4"),("length",[ScalarType "bit"],ScalarType "int4"),("length",[ScalarType "tsvector"],ScalarType "int4"),("length",[ScalarType "bytea",ScalarType "name"],ScalarType "int4"),("like",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("like",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("like",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("like_escape",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("like_escape",[ScalarType "text",ScalarType "text"],ScalarType "text"),("likejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("likesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("line",[ScalarType "point",ScalarType "point"],ScalarType "line"),("line_distance",[ScalarType "line",ScalarType "line"],ScalarType "float8"),("line_eq",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_horizontal",[ScalarType "line"],ScalarType "bool"),("line_in",[Pseudo Cstring],ScalarType "line"),("line_interpt",[ScalarType "line",ScalarType "line"],ScalarType "point"),("line_intersect",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_out",[ScalarType "line"],Pseudo Cstring),("line_parallel",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_perp",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_recv",[Pseudo Internal],ScalarType "line"),("line_send",[ScalarType "line"],ScalarType "bytea"),("line_vertical",[ScalarType "line"],ScalarType "bool"),("ln",[ScalarType "float8"],ScalarType "float8"),("ln",[ScalarType "numeric"],ScalarType "numeric"),("lo_close",[ScalarType "int4"],ScalarType "int4"),("lo_creat",[ScalarType "int4"],ScalarType "oid"),("lo_create",[ScalarType "oid"],ScalarType "oid"),("lo_export",[ScalarType "oid",ScalarType "text"],ScalarType "int4"),("lo_import",[ScalarType "text"],ScalarType "oid"),("lo_import",[ScalarType "text",ScalarType "oid"],ScalarType "oid"),("lo_lseek",[ScalarType "int4",ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("lo_open",[ScalarType "oid",ScalarType "int4"],ScalarType "int4"),("lo_tell",[ScalarType "int4"],ScalarType "int4"),("lo_truncate",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("lo_unlink",[ScalarType "oid"],ScalarType "int4"),("log",[ScalarType "float8"],ScalarType "float8"),("log",[ScalarType "numeric"],ScalarType "numeric"),("log",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("loread",[ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("lower",[ScalarType "text"],ScalarType "text"),("lowrite",[ScalarType "int4",ScalarType "bytea"],ScalarType "int4"),("lpad",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("lpad",[ScalarType "text",ScalarType "int4",ScalarType "text"],ScalarType "text"),("lseg",[ScalarType "box"],ScalarType "lseg"),("lseg",[ScalarType "point",ScalarType "point"],ScalarType "lseg"),("lseg_center",[ScalarType "lseg"],ScalarType "point"),("lseg_distance",[ScalarType "lseg",ScalarType "lseg"],ScalarType "float8"),("lseg_eq",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_ge",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_gt",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_horizontal",[ScalarType "lseg"],ScalarType "bool"),("lseg_in",[Pseudo Cstring],ScalarType "lseg"),("lseg_interpt",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("lseg_intersect",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_le",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_length",[ScalarType "lseg"],ScalarType "float8"),("lseg_lt",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_ne",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_out",[ScalarType "lseg"],Pseudo Cstring),("lseg_parallel",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_perp",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_recv",[Pseudo Internal],ScalarType "lseg"),("lseg_send",[ScalarType "lseg"],ScalarType "bytea"),("lseg_vertical",[ScalarType "lseg"],ScalarType "bool"),("ltrim",[ScalarType "text"],ScalarType "text"),("ltrim",[ScalarType "text",ScalarType "text"],ScalarType "text"),("macaddr_cmp",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "int4"),("macaddr_eq",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_ge",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_gt",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_in",[Pseudo Cstring],ScalarType "macaddr"),("macaddr_le",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_lt",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_ne",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_out",[ScalarType "macaddr"],Pseudo Cstring),("macaddr_recv",[Pseudo Internal],ScalarType "macaddr"),("macaddr_send",[ScalarType "macaddr"],ScalarType "bytea"),("makeaclitem",[ScalarType "oid",ScalarType "oid",ScalarType "text",ScalarType "bool"],ScalarType "aclitem"),("masklen",[ScalarType "inet"],ScalarType "int4"),("md5",[ScalarType "bytea"],ScalarType "text"),("md5",[ScalarType "text"],ScalarType "text"),("mic_to_ascii",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_big5",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_cn",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_jp",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_kr",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_tw",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin1",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin2",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin3",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin4",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_sjis",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_win1250",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mktinterval",[ScalarType "abstime",ScalarType "abstime"],ScalarType "tinterval"),("mod",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("mod",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("mod",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("mod",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("mul_d_interval",[ScalarType "float8",ScalarType "interval"],ScalarType "interval"),("name",[ScalarType "text"],ScalarType "name"),("name",[ScalarType "bpchar"],ScalarType "name"),("name",[ScalarType "varchar"],ScalarType "name"),("nameeq",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namege",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namegt",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("nameiclike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameicnlike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameicregexeq",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameicregexne",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("namein",[Pseudo Cstring],ScalarType "name"),("namele",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namelike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("namelt",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namene",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namenlike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameout",[ScalarType "name"],Pseudo Cstring),("namerecv",[Pseudo Internal],ScalarType "name"),("nameregexeq",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameregexne",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("namesend",[ScalarType "name"],ScalarType "bytea"),("neqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("neqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("netmask",[ScalarType "inet"],ScalarType "inet"),("network",[ScalarType "inet"],ScalarType "cidr"),("network_cmp",[ScalarType "inet",ScalarType "inet"],ScalarType "int4"),("network_eq",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_ge",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_gt",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_le",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_lt",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_ne",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_sub",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_subeq",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_sup",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_supeq",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("nextval",[ScalarType "regclass"],ScalarType "int8"),("nlikejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("nlikesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("notlike",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("notlike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("notlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("now",[],ScalarType "timestamptz"),("npoints",[ScalarType "path"],ScalarType "int4"),("npoints",[ScalarType "polygon"],ScalarType "int4"),("numeric",[ScalarType "int8"],ScalarType "numeric"),("numeric",[ScalarType "int2"],ScalarType "numeric"),("numeric",[ScalarType "int4"],ScalarType "numeric"),("numeric",[ScalarType "float4"],ScalarType "numeric"),("numeric",[ScalarType "float8"],ScalarType "numeric"),("numeric",[ScalarType "numeric",ScalarType "int4"],ScalarType "numeric"),("numeric_abs",[ScalarType "numeric"],ScalarType "numeric"),("numeric_accum",[ArrayType (ScalarType "numeric"),ScalarType "numeric"],ArrayType (ScalarType "numeric")),("numeric_add",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_avg",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_avg_accum",[ArrayType (ScalarType "numeric"),ScalarType "numeric"],ArrayType (ScalarType "numeric")),("numeric_cmp",[ScalarType "numeric",ScalarType "numeric"],ScalarType "int4"),("numeric_div",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_div_trunc",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_eq",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_exp",[ScalarType "numeric"],ScalarType "numeric"),("numeric_fac",[ScalarType "int8"],ScalarType "numeric"),("numeric_ge",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_gt",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "numeric"),("numeric_inc",[ScalarType "numeric"],ScalarType "numeric"),("numeric_larger",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_le",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_ln",[ScalarType "numeric"],ScalarType "numeric"),("numeric_log",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_lt",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_mod",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_mul",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_ne",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_out",[ScalarType "numeric"],Pseudo Cstring),("numeric_power",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "numeric"),("numeric_send",[ScalarType "numeric"],ScalarType "bytea"),("numeric_smaller",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_sqrt",[ScalarType "numeric"],ScalarType "numeric"),("numeric_stddev_pop",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_stddev_samp",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_sub",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_uminus",[ScalarType "numeric"],ScalarType "numeric"),("numeric_uplus",[ScalarType "numeric"],ScalarType "numeric"),("numeric_var_pop",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_var_samp",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numerictypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("numerictypmodout",[ScalarType "int4"],Pseudo Cstring),("numnode",[ScalarType "tsquery"],ScalarType "int4"),("obj_description",[ScalarType "oid"],ScalarType "text"),("obj_description",[ScalarType "oid",ScalarType "name"],ScalarType "text"),("octet_length",[ScalarType "bytea"],ScalarType "int4"),("octet_length",[ScalarType "text"],ScalarType "int4"),("octet_length",[ScalarType "bpchar"],ScalarType "int4"),("octet_length",[ScalarType "bit"],ScalarType "int4"),("oid",[ScalarType "int8"],ScalarType "oid"),("oideq",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidge",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidgt",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidin",[Pseudo Cstring],ScalarType "oid"),("oidlarger",[ScalarType "oid",ScalarType "oid"],ScalarType "oid"),("oidle",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidlt",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidne",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidout",[ScalarType "oid"],Pseudo Cstring),("oidrecv",[Pseudo Internal],ScalarType "oid"),("oidsend",[ScalarType "oid"],ScalarType "bytea"),("oidsmaller",[ScalarType "oid",ScalarType "oid"],ScalarType "oid"),("oidvectoreq",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorge",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorgt",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorin",[Pseudo Cstring],ScalarType "oidvector"),("oidvectorle",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorlt",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorne",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorout",[ScalarType "oidvector"],Pseudo Cstring),("oidvectorrecv",[Pseudo Internal],ScalarType "oidvector"),("oidvectorsend",[ScalarType "oidvector"],ScalarType "bytea"),("oidvectortypes",[ScalarType "oidvector"],ScalarType "text"),("on_pb",[ScalarType "point",ScalarType "box"],ScalarType "bool"),("on_pl",[ScalarType "point",ScalarType "line"],ScalarType "bool"),("on_ppath",[ScalarType "point",ScalarType "path"],ScalarType "bool"),("on_ps",[ScalarType "point",ScalarType "lseg"],ScalarType "bool"),("on_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("on_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("opaque_in",[Pseudo Cstring],Pseudo Opaque),("opaque_out",[Pseudo Opaque],Pseudo Cstring),("overlaps",[ScalarType "time",ScalarType "time",ScalarType "time",ScalarType "time"],ScalarType "bool"),("overlaps",[ScalarType "time",ScalarType "time",ScalarType "time",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "time",ScalarType "interval",ScalarType "time",ScalarType "time"],ScalarType "bool"),("overlaps",[ScalarType "time",ScalarType "interval",ScalarType "time",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "interval",ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "interval",ScalarType "timestamp",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "interval",ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "interval",ScalarType "timestamptz",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timetz",ScalarType "timetz",ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("overlay",[ScalarType "text",ScalarType "text",ScalarType "int4"],ScalarType "text"),("overlay",[ScalarType "text",ScalarType "text",ScalarType "int4",ScalarType "int4"],ScalarType "text"),("path",[ScalarType "polygon"],ScalarType "path"),("path_add",[ScalarType "path",ScalarType "path"],ScalarType "path"),("path_add_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("path_center",[ScalarType "path"],ScalarType "point"),("path_contain_pt",[ScalarType "path",ScalarType "point"],ScalarType "bool"),("path_distance",[ScalarType "path",ScalarType "path"],ScalarType "float8"),("path_div_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("path_in",[Pseudo Cstring],ScalarType "path"),("path_inter",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_length",[ScalarType "path"],ScalarType "float8"),("path_mul_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("path_n_eq",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_ge",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_gt",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_le",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_lt",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_npoints",[ScalarType "path"],ScalarType "int4"),("path_out",[ScalarType "path"],Pseudo Cstring),("path_recv",[Pseudo Internal],ScalarType "path"),("path_send",[ScalarType "path"],ScalarType "bytea"),("path_sub_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("pclose",[ScalarType "path"],ScalarType "path"),("pg_advisory_lock",[ScalarType "int8"],Pseudo Void),("pg_advisory_lock",[ScalarType "int4",ScalarType "int4"],Pseudo Void),("pg_advisory_lock_shared",[ScalarType "int8"],Pseudo Void),("pg_advisory_lock_shared",[ScalarType "int4",ScalarType "int4"],Pseudo Void),("pg_advisory_unlock",[ScalarType "int8"],ScalarType "bool"),("pg_advisory_unlock",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_advisory_unlock_all",[],Pseudo Void),("pg_advisory_unlock_shared",[ScalarType "int8"],ScalarType "bool"),("pg_advisory_unlock_shared",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_backend_pid",[],ScalarType "int4"),("pg_cancel_backend",[ScalarType "int4"],ScalarType "bool"),("pg_char_to_encoding",[ScalarType "name"],ScalarType "int4"),("pg_client_encoding",[],ScalarType "name"),("pg_column_size",[Pseudo Any],ScalarType "int4"),("pg_conf_load_time",[],ScalarType "timestamptz"),("pg_conversion_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_current_xlog_insert_location",[],ScalarType "text"),("pg_current_xlog_location",[],ScalarType "text"),("pg_cursor",[],SetOfType (Pseudo Record)),("pg_database_size",[ScalarType "name"],ScalarType "int8"),("pg_database_size",[ScalarType "oid"],ScalarType "int8"),("pg_encoding_to_char",[ScalarType "int4"],ScalarType "name"),("pg_function_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_get_constraintdef",[ScalarType "oid"],ScalarType "text"),("pg_get_constraintdef",[ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_get_expr",[ScalarType "text",ScalarType "oid"],ScalarType "text"),("pg_get_expr",[ScalarType "text",ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_get_function_arguments",[ScalarType "oid"],ScalarType "text"),("pg_get_function_identity_arguments",[ScalarType "oid"],ScalarType "text"),("pg_get_function_result",[ScalarType "oid"],ScalarType "text"),("pg_get_functiondef",[ScalarType "oid"],ScalarType "text"),("pg_get_indexdef",[ScalarType "oid"],ScalarType "text"),("pg_get_indexdef",[ScalarType "oid",ScalarType "int4",ScalarType "bool"],ScalarType "text"),("pg_get_keywords",[],SetOfType (Pseudo Record)),("pg_get_ruledef",[ScalarType "oid"],ScalarType "text"),("pg_get_ruledef",[ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_get_serial_sequence",[ScalarType "text",ScalarType "text"],ScalarType "text"),("pg_get_triggerdef",[ScalarType "oid"],ScalarType "text"),("pg_get_userbyid",[ScalarType "oid"],ScalarType "name"),("pg_get_viewdef",[ScalarType "text"],ScalarType "text"),("pg_get_viewdef",[ScalarType "oid"],ScalarType "text"),("pg_get_viewdef",[ScalarType "text",ScalarType "bool"],ScalarType "text"),("pg_get_viewdef",[ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_has_role",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "name",ScalarType "name",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "oid",ScalarType "name",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("pg_is_other_temp_schema",[ScalarType "oid"],ScalarType "bool"),("pg_lock_status",[],SetOfType (Pseudo Record)),("pg_ls_dir",[ScalarType "text"],SetOfType (ScalarType "text")),("pg_my_temp_schema",[],ScalarType "oid"),("pg_opclass_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_operator_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_options_to_table",[ArrayType (ScalarType "text")],SetOfType (Pseudo Record)),("pg_postmaster_start_time",[],ScalarType "timestamptz"),("pg_prepared_statement",[],SetOfType (Pseudo Record)),("pg_prepared_xact",[],SetOfType (Pseudo Record)),("pg_read_file",[ScalarType "text",ScalarType "int8",ScalarType "int8"],ScalarType "text"),("pg_relation_size",[ScalarType "regclass"],ScalarType "int8"),("pg_relation_size",[ScalarType "regclass",ScalarType "text"],ScalarType "int8"),("pg_reload_conf",[],ScalarType "bool"),("pg_rotate_logfile",[],ScalarType "bool"),("pg_show_all_settings",[],SetOfType (Pseudo Record)),("pg_size_pretty",[ScalarType "int8"],ScalarType "text"),("pg_sleep",[ScalarType "float8"],Pseudo Void),("pg_start_backup",[ScalarType "text",ScalarType "bool"],ScalarType "text"),("pg_stat_clear_snapshot",[],Pseudo Void),("pg_stat_file",[ScalarType "text"],Pseudo Record),("pg_stat_get_activity",[ScalarType "int4"],SetOfType (Pseudo Record)),("pg_stat_get_backend_activity",[ScalarType "int4"],ScalarType "text"),("pg_stat_get_backend_activity_start",[ScalarType "int4"],ScalarType "timestamptz"),("pg_stat_get_backend_client_addr",[ScalarType "int4"],ScalarType "inet"),("pg_stat_get_backend_client_port",[ScalarType "int4"],ScalarType "int4"),("pg_stat_get_backend_dbid",[ScalarType "int4"],ScalarType "oid"),("pg_stat_get_backend_idset",[],SetOfType (ScalarType "int4")),("pg_stat_get_backend_pid",[ScalarType "int4"],ScalarType "int4"),("pg_stat_get_backend_start",[ScalarType "int4"],ScalarType "timestamptz"),("pg_stat_get_backend_userid",[ScalarType "int4"],ScalarType "oid"),("pg_stat_get_backend_waiting",[ScalarType "int4"],ScalarType "bool"),("pg_stat_get_backend_xact_start",[ScalarType "int4"],ScalarType "timestamptz"),("pg_stat_get_bgwriter_buf_written_checkpoints",[],ScalarType "int8"),("pg_stat_get_bgwriter_buf_written_clean",[],ScalarType "int8"),("pg_stat_get_bgwriter_maxwritten_clean",[],ScalarType "int8"),("pg_stat_get_bgwriter_requested_checkpoints",[],ScalarType "int8"),("pg_stat_get_bgwriter_timed_checkpoints",[],ScalarType "int8"),("pg_stat_get_blocks_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_blocks_hit",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_buf_alloc",[],ScalarType "int8"),("pg_stat_get_buf_written_backend",[],ScalarType "int8"),("pg_stat_get_db_blocks_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_blocks_hit",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_numbackends",[ScalarType "oid"],ScalarType "int4"),("pg_stat_get_db_tuples_deleted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_inserted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_returned",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_updated",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_xact_commit",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_xact_rollback",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_dead_tuples",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_function_calls",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_function_self_time",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_function_time",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_last_analyze_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_last_autoanalyze_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_last_autovacuum_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_last_vacuum_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_live_tuples",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_numscans",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_deleted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_hot_updated",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_inserted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_returned",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_updated",[ScalarType "oid"],ScalarType "int8"),("pg_stat_reset",[],Pseudo Void),("pg_stop_backup",[],ScalarType "text"),("pg_switch_xlog",[],ScalarType "text"),("pg_table_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_tablespace_databases",[ScalarType "oid"],SetOfType (ScalarType "oid")),("pg_tablespace_size",[ScalarType "name"],ScalarType "int8"),("pg_tablespace_size",[ScalarType "oid"],ScalarType "int8"),("pg_terminate_backend",[ScalarType "int4"],ScalarType "bool"),("pg_timezone_abbrevs",[],SetOfType (Pseudo Record)),("pg_timezone_names",[],SetOfType (Pseudo Record)),("pg_total_relation_size",[ScalarType "regclass"],ScalarType "int8"),("pg_try_advisory_lock",[ScalarType "int8"],ScalarType "bool"),("pg_try_advisory_lock",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_try_advisory_lock_shared",[ScalarType "int8"],ScalarType "bool"),("pg_try_advisory_lock_shared",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_ts_config_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_ts_dict_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_ts_parser_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_ts_template_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_type_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_typeof",[Pseudo Any],ScalarType "regtype"),("pg_xlogfile_name",[ScalarType "text"],ScalarType "text"),("pg_xlogfile_name_offset",[ScalarType "text"],Pseudo Record),("pi",[],ScalarType "float8"),("plainto_tsquery",[ScalarType "text"],ScalarType "tsquery"),("plainto_tsquery",[ScalarType "regconfig",ScalarType "text"],ScalarType "tsquery"),("point",[ScalarType "lseg"],ScalarType "point"),("point",[ScalarType "path"],ScalarType "point"),("point",[ScalarType "box"],ScalarType "point"),("point",[ScalarType "polygon"],ScalarType "point"),("point",[ScalarType "circle"],ScalarType "point"),("point",[ScalarType "float8",ScalarType "float8"],ScalarType "point"),("point_above",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_add",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_below",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_distance",[ScalarType "point",ScalarType "point"],ScalarType "float8"),("point_div",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_eq",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_horiz",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_in",[Pseudo Cstring],ScalarType "point"),("point_left",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_mul",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_ne",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_out",[ScalarType "point"],Pseudo Cstring),("point_recv",[Pseudo Internal],ScalarType "point"),("point_right",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_send",[ScalarType "point"],ScalarType "bytea"),("point_sub",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_vert",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("poly_above",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_below",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_center",[ScalarType "polygon"],ScalarType "point"),("poly_contain",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_contain_pt",[ScalarType "polygon",ScalarType "point"],ScalarType "bool"),("poly_contained",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_distance",[ScalarType "polygon",ScalarType "polygon"],ScalarType "float8"),("poly_in",[Pseudo Cstring],ScalarType "polygon"),("poly_left",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_npoints",[ScalarType "polygon"],ScalarType "int4"),("poly_out",[ScalarType "polygon"],Pseudo Cstring),("poly_overabove",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overbelow",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overlap",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overleft",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overright",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_recv",[Pseudo Internal],ScalarType "polygon"),("poly_right",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_same",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_send",[ScalarType "polygon"],ScalarType "bytea"),("polygon",[ScalarType "path"],ScalarType "polygon"),("polygon",[ScalarType "box"],ScalarType "polygon"),("polygon",[ScalarType "circle"],ScalarType "polygon"),("polygon",[ScalarType "int4",ScalarType "circle"],ScalarType "polygon"),("popen",[ScalarType "path"],ScalarType "path"),("position",[ScalarType "bytea",ScalarType "bytea"],ScalarType "int4"),("position",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("position",[ScalarType "bit",ScalarType "bit"],ScalarType "int4"),("positionjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("positionsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("postgresql_fdw_validator",[ArrayType (ScalarType "text"),ScalarType "oid"],ScalarType "bool"),("pow",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("pow",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("power",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("power",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("prsd_end",[Pseudo Internal],Pseudo Void),("prsd_headline",[Pseudo Internal,Pseudo Internal,ScalarType "tsquery"],Pseudo Internal),("prsd_lextype",[Pseudo Internal],Pseudo Internal),("prsd_nexttoken",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("prsd_start",[Pseudo Internal,ScalarType "int4"],Pseudo Internal),("pt_contained_circle",[ScalarType "point",ScalarType "circle"],ScalarType "bool"),("pt_contained_poly",[ScalarType "point",ScalarType "polygon"],ScalarType "bool"),("query_to_xml",[ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("query_to_xml_and_xmlschema",[ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("query_to_xmlschema",[ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("querytree",[ScalarType "tsquery"],ScalarType "text"),("quote_ident",[ScalarType "text"],ScalarType "text"),("quote_literal",[ScalarType "text"],ScalarType "text"),("quote_literal",[Pseudo AnyElement],ScalarType "text"),("quote_nullable",[ScalarType "text"],ScalarType "text"),("quote_nullable",[Pseudo AnyElement],ScalarType "text"),("radians",[ScalarType "float8"],ScalarType "float8"),("radius",[ScalarType "circle"],ScalarType "float8"),("random",[],ScalarType "float8"),("record_eq",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_ge",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_gt",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],Pseudo Record),("record_le",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_lt",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_ne",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_out",[Pseudo Record],Pseudo Cstring),("record_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],Pseudo Record),("record_send",[Pseudo Record],ScalarType "bytea"),("regclass",[ScalarType "text"],ScalarType "regclass"),("regclassin",[Pseudo Cstring],ScalarType "regclass"),("regclassout",[ScalarType "regclass"],Pseudo Cstring),("regclassrecv",[Pseudo Internal],ScalarType "regclass"),("regclasssend",[ScalarType "regclass"],ScalarType "bytea"),("regconfigin",[Pseudo Cstring],ScalarType "regconfig"),("regconfigout",[ScalarType "regconfig"],Pseudo Cstring),("regconfigrecv",[Pseudo Internal],ScalarType "regconfig"),("regconfigsend",[ScalarType "regconfig"],ScalarType "bytea"),("regdictionaryin",[Pseudo Cstring],ScalarType "regdictionary"),("regdictionaryout",[ScalarType "regdictionary"],Pseudo Cstring),("regdictionaryrecv",[Pseudo Internal],ScalarType "regdictionary"),("regdictionarysend",[ScalarType "regdictionary"],ScalarType "bytea"),("regexeqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("regexeqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("regexnejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("regexnesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("regexp_matches",[ScalarType "text",ScalarType "text"],SetOfType (ArrayType (ScalarType "text"))),("regexp_matches",[ScalarType "text",ScalarType "text",ScalarType "text"],SetOfType (ArrayType (ScalarType "text"))),("regexp_replace",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("regexp_replace",[ScalarType "text",ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("regexp_split_to_array",[ScalarType "text",ScalarType "text"],ArrayType (ScalarType "text")),("regexp_split_to_array",[ScalarType "text",ScalarType "text",ScalarType "text"],ArrayType (ScalarType "text")),("regexp_split_to_table",[ScalarType "text",ScalarType "text"],SetOfType (ScalarType "text")),("regexp_split_to_table",[ScalarType "text",ScalarType "text",ScalarType "text"],SetOfType (ScalarType "text")),("regoperatorin",[Pseudo Cstring],ScalarType "regoperator"),("regoperatorout",[ScalarType "regoperator"],Pseudo Cstring),("regoperatorrecv",[Pseudo Internal],ScalarType "regoperator"),("regoperatorsend",[ScalarType "regoperator"],ScalarType "bytea"),("regoperin",[Pseudo Cstring],ScalarType "regoper"),("regoperout",[ScalarType "regoper"],Pseudo Cstring),("regoperrecv",[Pseudo Internal],ScalarType "regoper"),("regopersend",[ScalarType "regoper"],ScalarType "bytea"),("regprocedurein",[Pseudo Cstring],ScalarType "regprocedure"),("regprocedureout",[ScalarType "regprocedure"],Pseudo Cstring),("regprocedurerecv",[Pseudo Internal],ScalarType "regprocedure"),("regproceduresend",[ScalarType "regprocedure"],ScalarType "bytea"),("regprocin",[Pseudo Cstring],ScalarType "regproc"),("regprocout",[ScalarType "regproc"],Pseudo Cstring),("regprocrecv",[Pseudo Internal],ScalarType "regproc"),("regprocsend",[ScalarType "regproc"],ScalarType "bytea"),("regtypein",[Pseudo Cstring],ScalarType "regtype"),("regtypeout",[ScalarType "regtype"],Pseudo Cstring),("regtyperecv",[Pseudo Internal],ScalarType "regtype"),("regtypesend",[ScalarType "regtype"],ScalarType "bytea"),("reltime",[ScalarType "interval"],ScalarType "reltime"),("reltimeeq",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimege",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimegt",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimein",[Pseudo Cstring],ScalarType "reltime"),("reltimele",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimelt",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimene",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimeout",[ScalarType "reltime"],Pseudo Cstring),("reltimerecv",[Pseudo Internal],ScalarType "reltime"),("reltimesend",[ScalarType "reltime"],ScalarType "bytea"),("repeat",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("replace",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("round",[ScalarType "float8"],ScalarType "float8"),("round",[ScalarType "numeric"],ScalarType "numeric"),("round",[ScalarType "numeric",ScalarType "int4"],ScalarType "numeric"),("rpad",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("rpad",[ScalarType "text",ScalarType "int4",ScalarType "text"],ScalarType "text"),("rtrim",[ScalarType "text"],ScalarType "text"),("rtrim",[ScalarType "text",ScalarType "text"],ScalarType "text"),("scalargtjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("scalargtsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("scalarltjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("scalarltsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("schema_to_xml",[ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("schema_to_xml_and_xmlschema",[ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("schema_to_xmlschema",[ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("session_user",[],ScalarType "name"),("set_bit",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("set_byte",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("set_config",[ScalarType "text",ScalarType "text",ScalarType "bool"],ScalarType "text"),("set_masklen",[ScalarType "cidr",ScalarType "int4"],ScalarType "cidr"),("set_masklen",[ScalarType "inet",ScalarType "int4"],ScalarType "inet"),("setseed",[ScalarType "float8"],Pseudo Void),("setval",[ScalarType "regclass",ScalarType "int8"],ScalarType "int8"),("setval",[ScalarType "regclass",ScalarType "int8",ScalarType "bool"],ScalarType "int8"),("setweight",[ScalarType "tsvector",ScalarType "char"],ScalarType "tsvector"),("shell_in",[Pseudo Cstring],Pseudo Opaque),("shell_out",[Pseudo Opaque],Pseudo Cstring),("shift_jis_2004_to_euc_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("shift_jis_2004_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("shobj_description",[ScalarType "oid",ScalarType "name"],ScalarType "text"),("sign",[ScalarType "float8"],ScalarType "float8"),("sign",[ScalarType "numeric"],ScalarType "numeric"),("similar_escape",[ScalarType "text",ScalarType "text"],ScalarType "text"),("sin",[ScalarType "float8"],ScalarType "float8"),("sjis_to_euc_jp",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("sjis_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("sjis_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("slope",[ScalarType "point",ScalarType "point"],ScalarType "float8"),("smgreq",[ScalarType "smgr",ScalarType "smgr"],ScalarType "bool"),("smgrin",[Pseudo Cstring],ScalarType "smgr"),("smgrne",[ScalarType "smgr",ScalarType "smgr"],ScalarType "bool"),("smgrout",[ScalarType "smgr"],Pseudo Cstring),("split_part",[ScalarType "text",ScalarType "text",ScalarType "int4"],ScalarType "text"),("sqrt",[ScalarType "float8"],ScalarType "float8"),("sqrt",[ScalarType "numeric"],ScalarType "numeric"),("statement_timestamp",[],ScalarType "timestamptz"),("string_to_array",[ScalarType "text",ScalarType "text"],ArrayType (ScalarType "text")),("strip",[ScalarType "tsvector"],ScalarType "tsvector"),("strpos",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("substr",[ScalarType "bytea",ScalarType "int4"],ScalarType "bytea"),("substr",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("substr",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("substr",[ScalarType "text",ScalarType "int4",ScalarType "int4"],ScalarType "text"),("substring",[ScalarType "bytea",ScalarType "int4"],ScalarType "bytea"),("substring",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("substring",[ScalarType "text",ScalarType "text"],ScalarType "text"),("substring",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("substring",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("substring",[ScalarType "text",ScalarType "int4",ScalarType "int4"],ScalarType "text"),("substring",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("substring",[ScalarType "bit",ScalarType "int4",ScalarType "int4"],ScalarType "bit"),("suppress_redundant_updates_trigger",[],Pseudo Trigger),("table_to_xml",[ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("table_to_xml_and_xmlschema",[ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("table_to_xmlschema",[ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("tan",[ScalarType "float8"],ScalarType "float8"),("text",[ScalarType "bool"],ScalarType "text"),("text",[ScalarType "char"],ScalarType "text"),("text",[ScalarType "name"],ScalarType "text"),("text",[ScalarType "xml"],ScalarType "text"),("text",[ScalarType "inet"],ScalarType "text"),("text",[ScalarType "bpchar"],ScalarType "text"),("text_ge",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_gt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_larger",[ScalarType "text",ScalarType "text"],ScalarType "text"),("text_le",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_lt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_ge",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_gt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_le",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_lt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_smaller",[ScalarType "text",ScalarType "text"],ScalarType "text"),("textanycat",[ScalarType "text",Pseudo AnyNonArray],ScalarType "text"),("textcat",[ScalarType "text",ScalarType "text"],ScalarType "text"),("texteq",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticnlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticregexeq",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticregexne",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textin",[Pseudo Cstring],ScalarType "text"),("textlen",[ScalarType "text"],ScalarType "int4"),("textlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textne",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textnlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textout",[ScalarType "text"],Pseudo Cstring),("textrecv",[Pseudo Internal],ScalarType "text"),("textregexeq",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textregexne",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textsend",[ScalarType "text"],ScalarType "bytea"),("thesaurus_init",[Pseudo Internal],Pseudo Internal),("thesaurus_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("tideq",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidge",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidgt",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidin",[Pseudo Cstring],ScalarType "tid"),("tidlarger",[ScalarType "tid",ScalarType "tid"],ScalarType "tid"),("tidle",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidlt",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidne",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidout",[ScalarType "tid"],Pseudo Cstring),("tidrecv",[Pseudo Internal],ScalarType "tid"),("tidsend",[ScalarType "tid"],ScalarType "bytea"),("tidsmaller",[ScalarType "tid",ScalarType "tid"],ScalarType "tid"),("time",[ScalarType "abstime"],ScalarType "time"),("time",[ScalarType "timestamp"],ScalarType "time"),("time",[ScalarType "timestamptz"],ScalarType "time"),("time",[ScalarType "interval"],ScalarType "time"),("time",[ScalarType "timetz"],ScalarType "time"),("time",[ScalarType "time",ScalarType "int4"],ScalarType "time"),("time_cmp",[ScalarType "time",ScalarType "time"],ScalarType "int4"),("time_eq",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_ge",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_gt",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_hash",[ScalarType "time"],ScalarType "int4"),("time_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "time"),("time_larger",[ScalarType "time",ScalarType "time"],ScalarType "time"),("time_le",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_lt",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_mi_interval",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("time_mi_time",[ScalarType "time",ScalarType "time"],ScalarType "interval"),("time_ne",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_out",[ScalarType "time"],Pseudo Cstring),("time_pl_interval",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("time_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "time"),("time_send",[ScalarType "time"],ScalarType "bytea"),("time_smaller",[ScalarType "time",ScalarType "time"],ScalarType "time"),("timedate_pl",[ScalarType "time",ScalarType "date"],ScalarType "timestamp"),("timemi",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("timenow",[],ScalarType "abstime"),("timeofday",[],ScalarType "text"),("timepl",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("timestamp",[ScalarType "abstime"],ScalarType "timestamp"),("timestamp",[ScalarType "date"],ScalarType "timestamp"),("timestamp",[ScalarType "timestamptz"],ScalarType "timestamp"),("timestamp",[ScalarType "date",ScalarType "time"],ScalarType "timestamp"),("timestamp",[ScalarType "timestamp",ScalarType "int4"],ScalarType "timestamp"),("timestamp_cmp",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "int4"),("timestamp_cmp_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "int4"),("timestamp_cmp_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "int4"),("timestamp_eq",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_eq_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_eq_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_ge",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_ge_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_ge_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_gt",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_gt_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_gt_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_hash",[ScalarType "timestamp"],ScalarType "int4"),("timestamp_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "timestamp"),("timestamp_larger",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "timestamp"),("timestamp_le",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_le_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_le_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_lt",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_lt_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_lt_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_mi",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "interval"),("timestamp_mi_interval",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("timestamp_ne",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_ne_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_ne_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_out",[ScalarType "timestamp"],Pseudo Cstring),("timestamp_pl_interval",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("timestamp_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "timestamp"),("timestamp_send",[ScalarType "timestamp"],ScalarType "bytea"),("timestamp_smaller",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "timestamp"),("timestamptypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timestamptypmodout",[ScalarType "int4"],Pseudo Cstring),("timestamptz",[ScalarType "abstime"],ScalarType "timestamptz"),("timestamptz",[ScalarType "date"],ScalarType "timestamptz"),("timestamptz",[ScalarType "timestamp"],ScalarType "timestamptz"),("timestamptz",[ScalarType "date",ScalarType "time"],ScalarType "timestamptz"),("timestamptz",[ScalarType "date",ScalarType "timetz"],ScalarType "timestamptz"),("timestamptz",[ScalarType "timestamptz",ScalarType "int4"],ScalarType "timestamptz"),("timestamptz_cmp",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "int4"),("timestamptz_cmp_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "int4"),("timestamptz_cmp_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "int4"),("timestamptz_eq",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_eq_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_eq_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_ge",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_ge_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_ge_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_gt",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_gt_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_gt_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "timestamptz"),("timestamptz_larger",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "timestamptz"),("timestamptz_le",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_le_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_le_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_lt",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_lt_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_lt_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_mi",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "interval"),("timestamptz_mi_interval",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("timestamptz_ne",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_ne_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_ne_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_out",[ScalarType "timestamptz"],Pseudo Cstring),("timestamptz_pl_interval",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("timestamptz_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "timestamptz"),("timestamptz_send",[ScalarType "timestamptz"],ScalarType "bytea"),("timestamptz_smaller",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "timestamptz"),("timestamptztypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timestamptztypmodout",[ScalarType "int4"],Pseudo Cstring),("timetypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timetypmodout",[ScalarType "int4"],Pseudo Cstring),("timetz",[ScalarType "time"],ScalarType "timetz"),("timetz",[ScalarType "timestamptz"],ScalarType "timetz"),("timetz",[ScalarType "timetz",ScalarType "int4"],ScalarType "timetz"),("timetz_cmp",[ScalarType "timetz",ScalarType "timetz"],ScalarType "int4"),("timetz_eq",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_ge",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_gt",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_hash",[ScalarType "timetz"],ScalarType "int4"),("timetz_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "timetz"),("timetz_larger",[ScalarType "timetz",ScalarType "timetz"],ScalarType "timetz"),("timetz_le",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_lt",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_mi_interval",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("timetz_ne",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_out",[ScalarType "timetz"],Pseudo Cstring),("timetz_pl_interval",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("timetz_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "timetz"),("timetz_send",[ScalarType "timetz"],ScalarType "bytea"),("timetz_smaller",[ScalarType "timetz",ScalarType "timetz"],ScalarType "timetz"),("timetzdate_pl",[ScalarType "timetz",ScalarType "date"],ScalarType "timestamptz"),("timetztypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timetztypmodout",[ScalarType "int4"],Pseudo Cstring),("timezone",[ScalarType "text",ScalarType "timestamp"],ScalarType "timestamptz"),("timezone",[ScalarType "text",ScalarType "timestamptz"],ScalarType "timestamp"),("timezone",[ScalarType "text",ScalarType "timetz"],ScalarType "timetz"),("timezone",[ScalarType "interval",ScalarType "timestamp"],ScalarType "timestamptz"),("timezone",[ScalarType "interval",ScalarType "timestamptz"],ScalarType "timestamp"),("timezone",[ScalarType "interval",ScalarType "timetz"],ScalarType "timetz"),("tinterval",[ScalarType "abstime",ScalarType "abstime"],ScalarType "tinterval"),("tintervalct",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalend",[ScalarType "tinterval"],ScalarType "abstime"),("tintervaleq",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalge",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalgt",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalin",[Pseudo Cstring],ScalarType "tinterval"),("tintervalle",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalleneq",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenge",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallengt",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenle",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenlt",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenne",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallt",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalne",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalout",[ScalarType "tinterval"],Pseudo Cstring),("tintervalov",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalrecv",[Pseudo Internal],ScalarType "tinterval"),("tintervalrel",[ScalarType "tinterval"],ScalarType "reltime"),("tintervalsame",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalsend",[ScalarType "tinterval"],ScalarType "bytea"),("tintervalstart",[ScalarType "tinterval"],ScalarType "abstime"),("to_ascii",[ScalarType "text"],ScalarType "text"),("to_ascii",[ScalarType "text",ScalarType "name"],ScalarType "text"),("to_ascii",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("to_char",[ScalarType "int8",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "int4",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "float4",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "float8",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "timestamp",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "timestamptz",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "interval",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "numeric",ScalarType "text"],ScalarType "text"),("to_date",[ScalarType "text",ScalarType "text"],ScalarType "date"),("to_hex",[ScalarType "int8"],ScalarType "text"),("to_hex",[ScalarType "int4"],ScalarType "text"),("to_number",[ScalarType "text",ScalarType "text"],ScalarType "numeric"),("to_timestamp",[ScalarType "float8"],ScalarType "timestamptz"),("to_timestamp",[ScalarType "text",ScalarType "text"],ScalarType "timestamptz"),("to_tsquery",[ScalarType "text"],ScalarType "tsquery"),("to_tsquery",[ScalarType "regconfig",ScalarType "text"],ScalarType "tsquery"),("to_tsvector",[ScalarType "text"],ScalarType "tsvector"),("to_tsvector",[ScalarType "regconfig",ScalarType "text"],ScalarType "tsvector"),("transaction_timestamp",[],ScalarType "timestamptz"),("translate",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("trigger_in",[Pseudo Cstring],Pseudo Trigger),("trigger_out",[Pseudo Trigger],Pseudo Cstring),("trunc",[ScalarType "float8"],ScalarType "float8"),("trunc",[ScalarType "macaddr"],ScalarType "macaddr"),("trunc",[ScalarType "numeric"],ScalarType "numeric"),("trunc",[ScalarType "numeric",ScalarType "int4"],ScalarType "numeric"),("ts_debug",[ScalarType "text"],SetOfType (Pseudo Record)),("ts_debug",[ScalarType "regconfig",ScalarType "text"],SetOfType (Pseudo Record)),("ts_headline",[ScalarType "text",ScalarType "tsquery"],ScalarType "text"),("ts_headline",[ScalarType "text",ScalarType "tsquery",ScalarType "text"],ScalarType "text"),("ts_headline",[ScalarType "regconfig",ScalarType "text",ScalarType "tsquery"],ScalarType "text"),("ts_headline",[ScalarType "regconfig",ScalarType "text",ScalarType "tsquery",ScalarType "text"],ScalarType "text"),("ts_lexize",[ScalarType "regdictionary",ScalarType "text"],ArrayType (ScalarType "text")),("ts_match_qv",[ScalarType "tsquery",ScalarType "tsvector"],ScalarType "bool"),("ts_match_tq",[ScalarType "text",ScalarType "tsquery"],ScalarType "bool"),("ts_match_tt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("ts_match_vq",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "bool"),("ts_parse",[ScalarType "text",ScalarType "text"],SetOfType (Pseudo Record)),("ts_parse",[ScalarType "oid",ScalarType "text"],SetOfType (Pseudo Record)),("ts_rank",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank",[ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rank",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rank_cd",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank_cd",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank_cd",[ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rank_cd",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rewrite",[ScalarType "tsquery",ScalarType "text"],ScalarType "tsquery"),("ts_rewrite",[ScalarType "tsquery",ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("ts_stat",[ScalarType "text"],SetOfType (Pseudo Record)),("ts_stat",[ScalarType "text",ScalarType "text"],SetOfType (Pseudo Record)),("ts_token_type",[ScalarType "text"],SetOfType (Pseudo Record)),("ts_token_type",[ScalarType "oid"],SetOfType (Pseudo Record)),("ts_typanalyze",[Pseudo Internal],ScalarType "bool"),("tsmatchjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("tsmatchsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("tsq_mcontained",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsq_mcontains",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_and",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("tsquery_cmp",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "int4"),("tsquery_eq",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_ge",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_gt",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_le",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_lt",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_ne",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_not",[ScalarType "tsquery"],ScalarType "tsquery"),("tsquery_or",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("tsqueryin",[Pseudo Cstring],ScalarType "tsquery"),("tsqueryout",[ScalarType "tsquery"],Pseudo Cstring),("tsqueryrecv",[Pseudo Internal],ScalarType "tsquery"),("tsquerysend",[ScalarType "tsquery"],ScalarType "bytea"),("tsvector_cmp",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "int4"),("tsvector_concat",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "tsvector"),("tsvector_eq",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_ge",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_gt",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_le",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_lt",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_ne",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_update_trigger",[],Pseudo Trigger),("tsvector_update_trigger_column",[],Pseudo Trigger),("tsvectorin",[Pseudo Cstring],ScalarType "tsvector"),("tsvectorout",[ScalarType "tsvector"],Pseudo Cstring),("tsvectorrecv",[Pseudo Internal],ScalarType "tsvector"),("tsvectorsend",[ScalarType "tsvector"],ScalarType "bytea"),("txid_current",[],ScalarType "int8"),("txid_current_snapshot",[],ScalarType "txid_snapshot"),("txid_snapshot_in",[Pseudo Cstring],ScalarType "txid_snapshot"),("txid_snapshot_out",[ScalarType "txid_snapshot"],Pseudo Cstring),("txid_snapshot_recv",[Pseudo Internal],ScalarType "txid_snapshot"),("txid_snapshot_send",[ScalarType "txid_snapshot"],ScalarType "bytea"),("txid_snapshot_xip",[ScalarType "txid_snapshot"],SetOfType (ScalarType "int8")),("txid_snapshot_xmax",[ScalarType "txid_snapshot"],ScalarType "int8"),("txid_snapshot_xmin",[ScalarType "txid_snapshot"],ScalarType "int8"),("txid_visible_in_snapshot",[ScalarType "int8",ScalarType "txid_snapshot"],ScalarType "bool"),("uhc_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("unknownin",[Pseudo Cstring],ScalarType "unknown"),("unknownout",[ScalarType "unknown"],Pseudo Cstring),("unknownrecv",[Pseudo Internal],ScalarType "unknown"),("unknownsend",[ScalarType "unknown"],ScalarType "bytea"),("unnest",[Pseudo AnyArray],SetOfType (Pseudo AnyElement)),("upper",[ScalarType "text"],ScalarType "text"),("utf8_to_ascii",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_big5",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_cn",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_jp",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_kr",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_tw",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_gb18030",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_gbk",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_iso8859",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_iso8859_1",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_johab",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_koi8u",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_shift_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_sjis",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_uhc",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_win",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("uuid_cmp",[ScalarType "uuid",ScalarType "uuid"],ScalarType "int4"),("uuid_eq",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_ge",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_gt",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_hash",[ScalarType "uuid"],ScalarType "int4"),("uuid_in",[Pseudo Cstring],ScalarType "uuid"),("uuid_le",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_lt",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_ne",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_out",[ScalarType "uuid"],Pseudo Cstring),("uuid_recv",[Pseudo Internal],ScalarType "uuid"),("uuid_send",[ScalarType "uuid"],ScalarType "bytea"),("varbit",[ScalarType "varbit",ScalarType "int4",ScalarType "bool"],ScalarType "varbit"),("varbit_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "varbit"),("varbit_out",[ScalarType "varbit"],Pseudo Cstring),("varbit_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "varbit"),("varbit_send",[ScalarType "varbit"],ScalarType "bytea"),("varbitcmp",[ScalarType "varbit",ScalarType "varbit"],ScalarType "int4"),("varbiteq",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitge",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitgt",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitle",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitlt",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitne",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbittypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("varbittypmodout",[ScalarType "int4"],Pseudo Cstring),("varchar",[ScalarType "name"],ScalarType "varchar"),("varchar",[ScalarType "varchar",ScalarType "int4",ScalarType "bool"],ScalarType "varchar"),("varcharin",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "varchar"),("varcharout",[ScalarType "varchar"],Pseudo Cstring),("varcharrecv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "varchar"),("varcharsend",[ScalarType "varchar"],ScalarType "bytea"),("varchartypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("varchartypmodout",[ScalarType "int4"],Pseudo Cstring),("version",[],ScalarType "text"),("void_in",[Pseudo Cstring],Pseudo Void),("void_out",[Pseudo Void],Pseudo Cstring),("width",[ScalarType "box"],ScalarType "float8"),("width_bucket",[ScalarType "float8",ScalarType "float8",ScalarType "float8",ScalarType "int4"],ScalarType "int4"),("width_bucket",[ScalarType "numeric",ScalarType "numeric",ScalarType "numeric",ScalarType "int4"],ScalarType "int4"),("win1250_to_latin2",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1250_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("xideq",[ScalarType "xid",ScalarType "xid"],ScalarType "bool"),("xideqint4",[ScalarType "xid",ScalarType "int4"],ScalarType "bool"),("xidin",[Pseudo Cstring],ScalarType "xid"),("xidout",[ScalarType "xid"],Pseudo Cstring),("xidrecv",[Pseudo Internal],ScalarType "xid"),("xidsend",[ScalarType "xid"],ScalarType "bytea"),("xml",[ScalarType "text"],ScalarType "xml"),("xml_in",[Pseudo Cstring],ScalarType "xml"),("xml_out",[ScalarType "xml"],Pseudo Cstring),("xml_recv",[Pseudo Internal],ScalarType "xml"),("xml_send",[ScalarType "xml"],ScalarType "bytea"),("xmlcomment",[ScalarType "text"],ScalarType "xml"),("xmlconcat2",[ScalarType "xml",ScalarType "xml"],ScalarType "xml"),("xmlvalidate",[ScalarType "xml",ScalarType "text"],ScalarType "bool"),("xpath",[ScalarType "text",ScalarType "xml"],ArrayType (ScalarType "xml")),("xpath",[ScalarType "text",ScalarType "xml",ArrayType (ScalarType "text")],ArrayType (ScalarType "xml"))], scopeAggregates = [("array_agg",[Pseudo AnyElement],Pseudo AnyArray),("avg",[ScalarType "int8"],ScalarType "numeric"),("avg",[ScalarType "int2"],ScalarType "numeric"),("avg",[ScalarType "int4"],ScalarType "numeric"),("avg",[ScalarType "float4"],ScalarType "float8"),("avg",[ScalarType "float8"],ScalarType "float8"),("avg",[ScalarType "interval"],ScalarType "interval"),("avg",[ScalarType "numeric"],ScalarType "numeric"),("bit_and",[ScalarType "int8"],ScalarType "int8"),("bit_and",[ScalarType "int2"],ScalarType "int2"),("bit_and",[ScalarType "int4"],ScalarType "int4"),("bit_and",[ScalarType "bit"],ScalarType "bit"),("bit_or",[ScalarType "int8"],ScalarType "int8"),("bit_or",[ScalarType "int2"],ScalarType "int2"),("bit_or",[ScalarType "int4"],ScalarType "int4"),("bit_or",[ScalarType "bit"],ScalarType "bit"),("bool_and",[ScalarType "bool"],ScalarType "bool"),("bool_or",[ScalarType "bool"],ScalarType "bool"),("corr",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("count",[],ScalarType "int8"),("count",[Pseudo Any],ScalarType "int8"),("covar_pop",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("covar_samp",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("every",[ScalarType "bool"],ScalarType "bool"),("max",[ScalarType "int8"],ScalarType "int8"),("max",[ScalarType "int2"],ScalarType "int2"),("max",[ScalarType "int4"],ScalarType "int4"),("max",[ScalarType "text"],ScalarType "text"),("max",[ScalarType "oid"],ScalarType "oid"),("max",[ScalarType "tid"],ScalarType "tid"),("max",[ScalarType "float4"],ScalarType "float4"),("max",[ScalarType "float8"],ScalarType "float8"),("max",[ScalarType "abstime"],ScalarType "abstime"),("max",[ScalarType "money"],ScalarType "money"),("max",[ScalarType "bpchar"],ScalarType "bpchar"),("max",[ScalarType "date"],ScalarType "date"),("max",[ScalarType "time"],ScalarType "time"),("max",[ScalarType "timestamp"],ScalarType "timestamp"),("max",[ScalarType "timestamptz"],ScalarType "timestamptz"),("max",[ScalarType "interval"],ScalarType "interval"),("max",[ScalarType "timetz"],ScalarType "timetz"),("max",[ScalarType "numeric"],ScalarType "numeric"),("max",[Pseudo AnyArray],Pseudo AnyArray),("max",[Pseudo AnyEnum],Pseudo AnyEnum),("min",[ScalarType "int8"],ScalarType "int8"),("min",[ScalarType "int2"],ScalarType "int2"),("min",[ScalarType "int4"],ScalarType "int4"),("min",[ScalarType "text"],ScalarType "text"),("min",[ScalarType "oid"],ScalarType "oid"),("min",[ScalarType "tid"],ScalarType "tid"),("min",[ScalarType "float4"],ScalarType "float4"),("min",[ScalarType "float8"],ScalarType "float8"),("min",[ScalarType "abstime"],ScalarType "abstime"),("min",[ScalarType "money"],ScalarType "money"),("min",[ScalarType "bpchar"],ScalarType "bpchar"),("min",[ScalarType "date"],ScalarType "date"),("min",[ScalarType "time"],ScalarType "time"),("min",[ScalarType "timestamp"],ScalarType "timestamp"),("min",[ScalarType "timestamptz"],ScalarType "timestamptz"),("min",[ScalarType "interval"],ScalarType "interval"),("min",[ScalarType "timetz"],ScalarType "timetz"),("min",[ScalarType "numeric"],ScalarType "numeric"),("min",[Pseudo AnyArray],Pseudo AnyArray),("min",[Pseudo AnyEnum],Pseudo AnyEnum),("regr_avgx",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_avgy",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_count",[ScalarType "float8",ScalarType "float8"],ScalarType "int8"),("regr_intercept",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_r2",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_slope",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_sxx",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_sxy",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_syy",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("stddev",[ScalarType "int8"],ScalarType "numeric"),("stddev",[ScalarType "int2"],ScalarType "numeric"),("stddev",[ScalarType "int4"],ScalarType "numeric"),("stddev",[ScalarType "float4"],ScalarType "float8"),("stddev",[ScalarType "float8"],ScalarType "float8"),("stddev",[ScalarType "numeric"],ScalarType "numeric"),("stddev_pop",[ScalarType "int8"],ScalarType "numeric"),("stddev_pop",[ScalarType "int2"],ScalarType "numeric"),("stddev_pop",[ScalarType "int4"],ScalarType "numeric"),("stddev_pop",[ScalarType "float4"],ScalarType "float8"),("stddev_pop",[ScalarType "float8"],ScalarType "float8"),("stddev_pop",[ScalarType "numeric"],ScalarType "numeric"),("stddev_samp",[ScalarType "int8"],ScalarType "numeric"),("stddev_samp",[ScalarType "int2"],ScalarType "numeric"),("stddev_samp",[ScalarType "int4"],ScalarType "numeric"),("stddev_samp",[ScalarType "float4"],ScalarType "float8"),("stddev_samp",[ScalarType "float8"],ScalarType "float8"),("stddev_samp",[ScalarType "numeric"],ScalarType "numeric"),("sum",[ScalarType "int8"],ScalarType "numeric"),("sum",[ScalarType "int2"],ScalarType "int8"),("sum",[ScalarType "int4"],ScalarType "int8"),("sum",[ScalarType "float4"],ScalarType "float4"),("sum",[ScalarType "float8"],ScalarType "float8"),("sum",[ScalarType "money"],ScalarType "money"),("sum",[ScalarType "interval"],ScalarType "interval"),("sum",[ScalarType "numeric"],ScalarType "numeric"),("var_pop",[ScalarType "int8"],ScalarType "numeric"),("var_pop",[ScalarType "int2"],ScalarType "numeric"),("var_pop",[ScalarType "int4"],ScalarType "numeric"),("var_pop",[ScalarType "float4"],ScalarType "float8"),("var_pop",[ScalarType "float8"],ScalarType "float8"),("var_pop",[ScalarType "numeric"],ScalarType "numeric"),("var_samp",[ScalarType "int8"],ScalarType "numeric"),("var_samp",[ScalarType "int2"],ScalarType "numeric"),("var_samp",[ScalarType "int4"],ScalarType "numeric"),("var_samp",[ScalarType "float4"],ScalarType "float8"),("var_samp",[ScalarType "float8"],ScalarType "float8"),("var_samp",[ScalarType "numeric"],ScalarType "numeric"),("variance",[ScalarType "int8"],ScalarType "numeric"),("variance",[ScalarType "int2"],ScalarType "numeric"),("variance",[ScalarType "int4"],ScalarType "numeric"),("variance",[ScalarType "float4"],ScalarType "float8"),("variance",[ScalarType "float8"],ScalarType "float8"),("variance",[ScalarType "numeric"],ScalarType "numeric"),("xmlagg",[ScalarType "xml"],ScalarType "xml")], scopeAllFns = [("~",[ScalarType "int8"],ScalarType "int8"),("~",[ScalarType "int4"],ScalarType "int4"),("~",[ScalarType "int2"],ScalarType "int2"),("~",[ScalarType "bit"],ScalarType "bit"),("~",[ScalarType "inet"],ScalarType "inet"),("||/",[ScalarType "float8"],ScalarType "float8"),("|/",[ScalarType "float8"],ScalarType "float8"),("|",[ScalarType "tinterval"],ScalarType "abstime"),("@@",[ScalarType "circle"],ScalarType "point"),("@@",[ScalarType "lseg"],ScalarType "point"),("@@",[ScalarType "path"],ScalarType "point"),("@@",[ScalarType "polygon"],ScalarType "point"),("@@",[ScalarType "box"],ScalarType "point"),("@-@",[ScalarType "path"],ScalarType "float8"),("@-@",[ScalarType "lseg"],ScalarType "float8"),("@",[ScalarType "int8"],ScalarType "int8"),("@",[ScalarType "int4"],ScalarType "int4"),("@",[ScalarType "int2"],ScalarType "int2"),("@",[ScalarType "float8"],ScalarType "float8"),("@",[ScalarType "float4"],ScalarType "float4"),("@",[ScalarType "numeric"],ScalarType "numeric"),("?|",[ScalarType "line"],ScalarType "bool"),("?|",[ScalarType "lseg"],ScalarType "bool"),("?-",[ScalarType "lseg"],ScalarType "bool"),("?-",[ScalarType "line"],ScalarType "bool"),("-",[ScalarType "interval"],ScalarType "interval"),("-",[ScalarType "numeric"],ScalarType "numeric"),("-",[ScalarType "float8"],ScalarType "float8"),("-",[ScalarType "float4"],ScalarType "float4"),("-",[ScalarType "int2"],ScalarType "int2"),("-",[ScalarType "int4"],ScalarType "int4"),("-",[ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "int2"],ScalarType "int2"),("+",[ScalarType "float8"],ScalarType "float8"),("+",[ScalarType "numeric"],ScalarType "numeric"),("+",[ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "float4"],ScalarType "float4"),("+",[ScalarType "int4"],ScalarType "int4"),("#",[ScalarType "path"],ScalarType "int4"),("#",[ScalarType "polygon"],ScalarType "int4"),("!!",[ScalarType "int8"],ScalarType "numeric"),("!!",[ScalarType "tsquery"],ScalarType "tsquery"),("!",[ScalarType "int8"],ScalarType "numeric"),("~~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("~~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~~",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("~~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("~~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~>~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~>~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~>=~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~>=~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("~=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("~=",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("~=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("~=",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("~<~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~<~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~<=~",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("~<=~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("~",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ScalarType "bool"),("~",[ScalarType "circle",ScalarType "point"],ScalarType "bool"),("~",[ScalarType "polygon",ScalarType "point"],ScalarType "bool"),("~",[ScalarType "path",ScalarType "point"],ScalarType "bool"),("~",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("~",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("~",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("||",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("||",[ScalarType "text",ScalarType "text"],ScalarType "text"),("||",[ScalarType "varbit",ScalarType "varbit"],ScalarType "varbit"),("||",[Pseudo AnyElement,Pseudo AnyArray],Pseudo AnyArray),("||",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("||",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("||",[Pseudo AnyNonArray,ScalarType "text"],ScalarType "text"),("||",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "tsvector"),("||",[Pseudo AnyArray,Pseudo AnyElement],Pseudo AnyArray),("||",[ScalarType "text",Pseudo AnyNonArray],ScalarType "text"),("|>>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("|>>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("|>>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("|&>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("|&>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("|&>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("|",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("|",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("|",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("|",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("|",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("^",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("^",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("@@@",[ScalarType "tsquery",ScalarType "tsvector"],ScalarType "bool"),("@@@",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "bool"),("@@",[ScalarType "text",ScalarType "tsquery"],ScalarType "bool"),("@@",[ScalarType "tsquery",ScalarType "tsvector"],ScalarType "bool"),("@@",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("@@",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "bool"),("@>",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("@>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("@>",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("@>",[ScalarType "polygon",ScalarType "point"],ScalarType "bool"),("@>",[ScalarType "path",ScalarType "point"],ScalarType "bool"),("@>",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ScalarType "bool"),("@>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("@>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("@>",[ScalarType "circle",ScalarType "point"],ScalarType "bool"),("?||",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("?||",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("?|",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("?-|",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("?-|",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("?-",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("?#",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("?#",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("?#",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("?#",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("?#",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("?#",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("?#",[ScalarType "line",ScalarType "box"],ScalarType "bool"),(">^",[ScalarType "point",ScalarType "point"],ScalarType "bool"),(">^",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">>=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),(">>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">>",[ScalarType "point",ScalarType "point"],ScalarType "bool"),(">>",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),(">>",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),(">>",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),(">>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),(">>",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">>",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),(">=",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),(">=",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),(">=",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),(">=",[ScalarType "char",ScalarType "char"],ScalarType "bool"),(">=",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),(">=",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),(">=",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),(">=",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),(">=",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),(">=",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),(">=",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),(">=",[ScalarType "date",ScalarType "date"],ScalarType "bool"),(">=",[ScalarType "time",ScalarType "time"],ScalarType "bool"),(">=",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),(">=",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),(">=",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),(">=",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),(">=",[ScalarType "name",ScalarType "name"],ScalarType "bool"),(">=",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),(">=",[ScalarType "text",ScalarType "text"],ScalarType "bool"),(">=",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),(">=",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),(">=",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),(">=",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),(">=",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),(">=",[Pseudo Record,Pseudo Record],ScalarType "bool"),(">=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),(">=",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),(">=",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),(">=",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),(">=",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),(">=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">=",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),(">=",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),(">=",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),(">=",[ScalarType "path",ScalarType "path"],ScalarType "bool"),(">=",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),(">=",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),(">=",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),(">=",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),(">=",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),(">=",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),(">=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),(">=",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),(">=",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),(">=",[ScalarType "money",ScalarType "money"],ScalarType "bool"),(">=",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),(">=",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),(">=",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),(">=",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),(">=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">=",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),(">=",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),(">",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),(">",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),(">",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),(">",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),(">",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),(">",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),(">",[ScalarType "char",ScalarType "char"],ScalarType "bool"),(">",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),(">",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),(">",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),(">",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),(">",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),(">",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),(">",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),(">",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),(">",[ScalarType "box",ScalarType "box"],ScalarType "bool"),(">",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),(">",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),(">",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),(">",[ScalarType "date",ScalarType "date"],ScalarType "bool"),(">",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),(">",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),(">",[ScalarType "time",ScalarType "time"],ScalarType "bool"),(">",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),(">",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),(">",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),(">",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),(">",[ScalarType "name",ScalarType "name"],ScalarType "bool"),(">",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),(">",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),(">",[ScalarType "path",ScalarType "path"],ScalarType "bool"),(">",[Pseudo Record,Pseudo Record],ScalarType "bool"),(">",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),(">",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),(">",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),(">",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),(">",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),(">",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),(">",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),(">",[ScalarType "text",ScalarType "text"],ScalarType "bool"),(">",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),(">",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),(">",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),(">",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),(">",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),(">",[ScalarType "money",ScalarType "money"],ScalarType "bool"),(">",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),(">",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),(">",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),(">",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),(">",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),(">",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),(">",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("=",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("=",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("=",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("=",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("=",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("=",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("=",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("=",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("=",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("=",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("=",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("=",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("=",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("=",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("=",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("=",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("=",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("=",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("=",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("=",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("=",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("=",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("=",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("=",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("=",[ScalarType "aclitem",ScalarType "aclitem"],ScalarType "bool"),("=",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("=",[ScalarType "int2vector",ScalarType "int2vector"],ScalarType "bool"),("=",[Pseudo Record,Pseudo Record],ScalarType "bool"),("=",[ScalarType "cid",ScalarType "cid"],ScalarType "bool"),("=",[ScalarType "xid",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("=",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("=",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("=",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("=",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("=",[ScalarType "xid",ScalarType "xid"],ScalarType "bool"),("=",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("=",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("=",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("=",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("=",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("=",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("=",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("=",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("=",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("=",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("=",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("=",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("=",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("=",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("=",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("=",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("=",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<^",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("<^",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("<@",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<@",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "line"],ScalarType "bool"),("<@",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "circle"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "polygon"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "path"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<@",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("<@",[ScalarType "point",ScalarType "lseg"],ScalarType "bool"),("<?>",[ScalarType "abstime",ScalarType "tinterval"],ScalarType "bool"),("<>",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("<>",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<>",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("<>",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("<>",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("<>",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("<>",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("<>",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("<>",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("<>",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("<>",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("<>",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("<>",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("<>",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("<>",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("<>",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("<>",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("<>",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("<>",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("<>",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("<>",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("<>",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("<>",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("<>",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("<>",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("<>",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("<>",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<>",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("<>",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("<>",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("<>",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("<>",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<>",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("<>",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("<>",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("<>",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("<>",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("<>",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("<>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<>",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("<>",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("<>",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("<>",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("<>",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("<>",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("<>",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("<>",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<>",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("<>",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("<>",[Pseudo Record,Pseudo Record],ScalarType "bool"),("<>",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("<>",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("<=",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("<=",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("<=",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("<=",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("<=",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("<=",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("<=",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("<=",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("<=",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("<=",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("<=",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("<=",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("<=",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("<=",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("<=",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("<=",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("<=",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<=",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("<=",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("<=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<=",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("<=",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("<=",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("<=",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<=",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("<=",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("<=",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("<=",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<=",[Pseudo Record,Pseudo Record],ScalarType "bool"),("<=",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("<=",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("<=",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("<=",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("<=",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("<=",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("<=",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("<=",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("<=",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("<=",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<=",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("<=",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("<=",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("<=",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("<=",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("<=",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("<=",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("<=",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("<=",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("<=",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("<=",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("<=",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("<=",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<=",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("<<|",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("<<|",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<<|",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<<=",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<<",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),("<<",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<<",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<<",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<<",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<<",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("<<",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("<<",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("<<",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("<<",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("<->",[ScalarType "point",ScalarType "point"],ScalarType "float8"),("<->",[ScalarType "circle",ScalarType "polygon"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "line"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "path"],ScalarType "float8"),("<->",[ScalarType "circle",ScalarType "circle"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "circle"],ScalarType "float8"),("<->",[ScalarType "lseg",ScalarType "box"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "lseg"],ScalarType "float8"),("<->",[ScalarType "lseg",ScalarType "line"],ScalarType "float8"),("<->",[ScalarType "point",ScalarType "box"],ScalarType "float8"),("<->",[ScalarType "box",ScalarType "box"],ScalarType "float8"),("<->",[ScalarType "polygon",ScalarType "polygon"],ScalarType "float8"),("<->",[ScalarType "lseg",ScalarType "lseg"],ScalarType "float8"),("<->",[ScalarType "line",ScalarType "line"],ScalarType "float8"),("<->",[ScalarType "path",ScalarType "path"],ScalarType "float8"),("<->",[ScalarType "line",ScalarType "box"],ScalarType "float8"),("<#>",[ScalarType "abstime",ScalarType "abstime"],ScalarType "tinterval"),("<",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("<",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("<",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("<",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("<",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("<",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("<",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("<",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("<",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("<",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("<",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("<",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("<",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("<",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("<",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("<",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("<",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("<",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("<",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("<",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("<",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("<",[Pseudo Record,Pseudo Record],ScalarType "bool"),("<",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("<",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("<",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("<",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("<",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("<",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("<",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("<",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("<",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("<",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("<",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("<",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("<",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("<",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("<",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("<",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("<",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("<",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("<",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("<",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("<",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("<",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("<",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("<",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("<",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("<",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("<",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("<",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("<",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("<",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("<",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("/",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("/",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("/",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("/",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("/",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("/",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("/",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("/",[ScalarType "point",ScalarType "point"],ScalarType "point"),("/",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("/",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("/",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("/",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("/",[ScalarType "path",ScalarType "point"],ScalarType "path"),("/",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("/",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("/",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("/",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("/",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("/",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("/",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("/",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("/",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("/",[ScalarType "box",ScalarType "point"],ScalarType "box"),("-",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("-",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("-",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "interval"),("-",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("-",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("-",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("-",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("-",[ScalarType "date",ScalarType "date"],ScalarType "int4"),("-",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("-",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("-",[ScalarType "money",ScalarType "money"],ScalarType "money"),("-",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("-",[ScalarType "inet",ScalarType "inet"],ScalarType "int8"),("-",[ScalarType "box",ScalarType "point"],ScalarType "box"),("-",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("-",[ScalarType "path",ScalarType "point"],ScalarType "path"),("-",[ScalarType "point",ScalarType "point"],ScalarType "point"),("-",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("-",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("-",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("-",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("-",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("-",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("-",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("-",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("-",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("-",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("-",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("-",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("-",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("-",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("-",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("-",[ScalarType "time",ScalarType "time"],ScalarType "interval"),("-",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "interval"),("+",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("+",[ScalarType "date",ScalarType "time"],ScalarType "timestamp"),("+",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("+",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("+",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("+",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("+",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("+",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("+",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("+",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("+",[ScalarType "time",ScalarType "date"],ScalarType "timestamp"),("+",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("+",[ScalarType "date",ScalarType "timetz"],ScalarType "timestamptz"),("+",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("+",[ScalarType "point",ScalarType "point"],ScalarType "point"),("+",[ScalarType "path",ScalarType "path"],ScalarType "path"),("+",[ScalarType "path",ScalarType "point"],ScalarType "path"),("+",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("+",[ScalarType "box",ScalarType "point"],ScalarType "box"),("+",[ScalarType "money",ScalarType "money"],ScalarType "money"),("+",[ScalarType "int8",ScalarType "inet"],ScalarType "inet"),("+",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("+",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("+",[ScalarType "interval",ScalarType "date"],ScalarType "timestamp"),("+",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("+",[ScalarType "timetz",ScalarType "date"],ScalarType "timestamptz"),("+",[ScalarType "interval",ScalarType "timetz"],ScalarType "timetz"),("+",[ScalarType "interval",ScalarType "timestamp"],ScalarType "timestamp"),("+",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("+",[ScalarType "interval",ScalarType "timestamptz"],ScalarType "timestamptz"),("+",[ScalarType "int4",ScalarType "date"],ScalarType "date"),("+",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("+",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("+",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("+",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("+",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("+",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("+",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("+",[ScalarType "interval",ScalarType "time"],ScalarType "time"),("*",[ScalarType "point",ScalarType "point"],ScalarType "point"),("*",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("*",[ScalarType "path",ScalarType "point"],ScalarType "path"),("*",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("*",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("*",[ScalarType "box",ScalarType "point"],ScalarType "box"),("*",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("*",[ScalarType "float4",ScalarType "money"],ScalarType "money"),("*",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("*",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("*",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("*",[ScalarType "float8",ScalarType "money"],ScalarType "money"),("*",[ScalarType "int4",ScalarType "money"],ScalarType "money"),("*",[ScalarType "int2",ScalarType "money"],ScalarType "money"),("*",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("*",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("*",[ScalarType "float8",ScalarType "interval"],ScalarType "interval"),("*",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("*",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("*",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("*",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("*",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("*",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("*",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("*",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("*",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("*",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("*",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("&>",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&>",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&>",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&<|",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&<|",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&<|",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&<",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&<",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&<",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&&",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("&&",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("&&",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("&&",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("&&",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("&&",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("&",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("&",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("&",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("&",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("&",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("%",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("%",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("%",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("%",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("#>=",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#>",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#=",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#<>",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#<=",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("#<",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("##",[ScalarType "line",ScalarType "lseg"],ScalarType "point"),("##",[ScalarType "lseg",ScalarType "line"],ScalarType "point"),("##",[ScalarType "point",ScalarType "box"],ScalarType "point"),("##",[ScalarType "lseg",ScalarType "box"],ScalarType "point"),("##",[ScalarType "line",ScalarType "box"],ScalarType "point"),("##",[ScalarType "point",ScalarType "line"],ScalarType "point"),("##",[ScalarType "point",ScalarType "lseg"],ScalarType "point"),("##",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("#",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("#",[ScalarType "line",ScalarType "line"],ScalarType "point"),("#",[ScalarType "box",ScalarType "box"],ScalarType "box"),("#",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("#",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("#",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("#",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("!~~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("!~~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~~",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("!~~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("!~~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~*",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("!~*",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~*",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("!~",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("!~",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("RI_FKey_cascade_del",[],Pseudo Trigger),("RI_FKey_cascade_upd",[],Pseudo Trigger),("RI_FKey_check_ins",[],Pseudo Trigger),("RI_FKey_check_upd",[],Pseudo Trigger),("RI_FKey_noaction_del",[],Pseudo Trigger),("RI_FKey_noaction_upd",[],Pseudo Trigger),("RI_FKey_restrict_del",[],Pseudo Trigger),("RI_FKey_restrict_upd",[],Pseudo Trigger),("RI_FKey_setdefault_del",[],Pseudo Trigger),("RI_FKey_setdefault_upd",[],Pseudo Trigger),("RI_FKey_setnull_del",[],Pseudo Trigger),("RI_FKey_setnull_upd",[],Pseudo Trigger),("abbrev",[ScalarType "cidr"],ScalarType "text"),("abbrev",[ScalarType "inet"],ScalarType "text"),("abs",[ScalarType "int8"],ScalarType "int8"),("abs",[ScalarType "int2"],ScalarType "int2"),("abs",[ScalarType "int4"],ScalarType "int4"),("abs",[ScalarType "float4"],ScalarType "float4"),("abs",[ScalarType "float8"],ScalarType "float8"),("abs",[ScalarType "numeric"],ScalarType "numeric"),("abstime",[ScalarType "timestamp"],ScalarType "abstime"),("abstime",[ScalarType "timestamptz"],ScalarType "abstime"),("abstimeeq",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimege",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimegt",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimein",[Pseudo Cstring],ScalarType "abstime"),("abstimele",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimelt",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimene",[ScalarType "abstime",ScalarType "abstime"],ScalarType "bool"),("abstimeout",[ScalarType "abstime"],Pseudo Cstring),("abstimerecv",[Pseudo Internal],ScalarType "abstime"),("abstimesend",[ScalarType "abstime"],ScalarType "bytea"),("aclcontains",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ScalarType "bool"),("aclinsert",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("aclitemeq",[ScalarType "aclitem",ScalarType "aclitem"],ScalarType "bool"),("aclitemin",[Pseudo Cstring],ScalarType "aclitem"),("aclitemout",[ScalarType "aclitem"],Pseudo Cstring),("aclremove",[ArrayType (ScalarType "aclitem"),ScalarType "aclitem"],ArrayType (ScalarType "aclitem")),("acos",[ScalarType "float8"],ScalarType "float8"),("age",[ScalarType "xid"],ScalarType "int4"),("age",[ScalarType "timestamp"],ScalarType "interval"),("age",[ScalarType "timestamptz"],ScalarType "interval"),("age",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "interval"),("age",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "interval"),("any_in",[Pseudo Cstring],Pseudo Any),("any_out",[Pseudo Any],Pseudo Cstring),("anyarray_in",[Pseudo Cstring],Pseudo AnyArray),("anyarray_out",[Pseudo AnyArray],Pseudo Cstring),("anyarray_recv",[Pseudo Internal],Pseudo AnyArray),("anyarray_send",[Pseudo AnyArray],ScalarType "bytea"),("anyelement_in",[Pseudo Cstring],Pseudo AnyElement),("anyelement_out",[Pseudo AnyElement],Pseudo Cstring),("anyenum_in",[Pseudo Cstring],Pseudo AnyEnum),("anyenum_out",[Pseudo AnyEnum],Pseudo Cstring),("anynonarray_in",[Pseudo Cstring],Pseudo AnyNonArray),("anynonarray_out",[Pseudo AnyNonArray],Pseudo Cstring),("anytextcat",[Pseudo AnyNonArray,ScalarType "text"],ScalarType "text"),("area",[ScalarType "path"],ScalarType "float8"),("area",[ScalarType "box"],ScalarType "float8"),("area",[ScalarType "circle"],ScalarType "float8"),("areajoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("areasel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("array_agg_finalfn",[Pseudo Internal],Pseudo AnyArray),("array_agg_transfn",[Pseudo Internal,Pseudo AnyElement],Pseudo Internal),("array_append",[Pseudo AnyArray,Pseudo AnyElement],Pseudo AnyArray),("array_cat",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("array_dims",[Pseudo AnyArray],ScalarType "text"),("array_eq",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_fill",[Pseudo AnyElement,ArrayType (ScalarType "int4")],Pseudo AnyArray),("array_fill",[Pseudo AnyElement,ArrayType (ScalarType "int4"),ArrayType (ScalarType "int4")],Pseudo AnyArray),("array_ge",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_gt",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],Pseudo AnyArray),("array_larger",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("array_le",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_length",[Pseudo AnyArray,ScalarType "int4"],ScalarType "int4"),("array_lower",[Pseudo AnyArray,ScalarType "int4"],ScalarType "int4"),("array_lt",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_ndims",[Pseudo AnyArray],ScalarType "int4"),("array_ne",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("array_out",[Pseudo AnyArray],Pseudo Cstring),("array_prepend",[Pseudo AnyElement,Pseudo AnyArray],Pseudo AnyArray),("array_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],Pseudo AnyArray),("array_send",[Pseudo AnyArray],ScalarType "bytea"),("array_smaller",[Pseudo AnyArray,Pseudo AnyArray],Pseudo AnyArray),("array_to_string",[Pseudo AnyArray,ScalarType "text"],ScalarType "text"),("array_upper",[Pseudo AnyArray,ScalarType "int4"],ScalarType "int4"),("arraycontained",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("arraycontains",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("arrayoverlap",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "bool"),("ascii",[ScalarType "text"],ScalarType "int4"),("ascii_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("ascii_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("asin",[ScalarType "float8"],ScalarType "float8"),("atan",[ScalarType "float8"],ScalarType "float8"),("atan2",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("big5_to_euc_tw",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("big5_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("big5_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("bit",[ScalarType "int8",ScalarType "int4"],ScalarType "bit"),("bit",[ScalarType "int4",ScalarType "int4"],ScalarType "bit"),("bit",[ScalarType "bit",ScalarType "int4",ScalarType "bool"],ScalarType "bit"),("bit_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "bit"),("bit_length",[ScalarType "bytea"],ScalarType "int4"),("bit_length",[ScalarType "text"],ScalarType "int4"),("bit_length",[ScalarType "bit"],ScalarType "int4"),("bit_out",[ScalarType "bit"],Pseudo Cstring),("bit_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "bit"),("bit_send",[ScalarType "bit"],ScalarType "bytea"),("bitand",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("bitcat",[ScalarType "varbit",ScalarType "varbit"],ScalarType "varbit"),("bitcmp",[ScalarType "bit",ScalarType "bit"],ScalarType "int4"),("biteq",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitge",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitgt",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitle",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitlt",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitne",[ScalarType "bit",ScalarType "bit"],ScalarType "bool"),("bitnot",[ScalarType "bit"],ScalarType "bit"),("bitor",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("bitshiftleft",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("bitshiftright",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("bittypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("bittypmodout",[ScalarType "int4"],Pseudo Cstring),("bitxor",[ScalarType "bit",ScalarType "bit"],ScalarType "bit"),("bool",[ScalarType "int4"],ScalarType "bool"),("booland_statefunc",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("booleq",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolge",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolgt",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolin",[Pseudo Cstring],ScalarType "bool"),("boolle",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boollt",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolne",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolor_statefunc",[ScalarType "bool",ScalarType "bool"],ScalarType "bool"),("boolout",[ScalarType "bool"],Pseudo Cstring),("boolrecv",[Pseudo Internal],ScalarType "bool"),("boolsend",[ScalarType "bool"],ScalarType "bytea"),("box",[ScalarType "polygon"],ScalarType "box"),("box",[ScalarType "circle"],ScalarType "box"),("box",[ScalarType "point",ScalarType "point"],ScalarType "box"),("box_above",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_above_eq",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_add",[ScalarType "box",ScalarType "point"],ScalarType "box"),("box_below",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_below_eq",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_center",[ScalarType "box"],ScalarType "point"),("box_contain",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_contained",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_distance",[ScalarType "box",ScalarType "box"],ScalarType "float8"),("box_div",[ScalarType "box",ScalarType "point"],ScalarType "box"),("box_eq",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_ge",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_gt",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_in",[Pseudo Cstring],ScalarType "box"),("box_intersect",[ScalarType "box",ScalarType "box"],ScalarType "box"),("box_le",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_left",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_lt",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_mul",[ScalarType "box",ScalarType "point"],ScalarType "box"),("box_out",[ScalarType "box"],Pseudo Cstring),("box_overabove",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overbelow",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overlap",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overleft",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_overright",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_recv",[Pseudo Internal],ScalarType "box"),("box_right",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_same",[ScalarType "box",ScalarType "box"],ScalarType "bool"),("box_send",[ScalarType "box"],ScalarType "bytea"),("box_sub",[ScalarType "box",ScalarType "point"],ScalarType "box"),("bpchar",[ScalarType "char"],ScalarType "bpchar"),("bpchar",[ScalarType "name"],ScalarType "bpchar"),("bpchar",[ScalarType "bpchar",ScalarType "int4",ScalarType "bool"],ScalarType "bpchar"),("bpchar_larger",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bpchar"),("bpchar_pattern_ge",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_pattern_gt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_pattern_le",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_pattern_lt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchar_smaller",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bpchar"),("bpcharcmp",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "int4"),("bpchareq",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharge",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchargt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpchariclike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharicnlike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharicregexeq",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharicregexne",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharin",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "bpchar"),("bpcharle",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharlike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharlt",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharne",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "bool"),("bpcharnlike",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharout",[ScalarType "bpchar"],Pseudo Cstring),("bpcharrecv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "bpchar"),("bpcharregexeq",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharregexne",[ScalarType "bpchar",ScalarType "text"],ScalarType "bool"),("bpcharsend",[ScalarType "bpchar"],ScalarType "bytea"),("bpchartypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("bpchartypmodout",[ScalarType "int4"],Pseudo Cstring),("broadcast",[ScalarType "inet"],ScalarType "inet"),("btabstimecmp",[ScalarType "abstime",ScalarType "abstime"],ScalarType "int4"),("btarraycmp",[Pseudo AnyArray,Pseudo AnyArray],ScalarType "int4"),("btbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("btboolcmp",[ScalarType "bool",ScalarType "bool"],ScalarType "int4"),("btbpchar_pattern_cmp",[ScalarType "bpchar",ScalarType "bpchar"],ScalarType "int4"),("btbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("btbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("btcharcmp",[ScalarType "char",ScalarType "char"],ScalarType "int4"),("btcostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("btendscan",[Pseudo Internal],Pseudo Void),("btfloat48cmp",[ScalarType "float4",ScalarType "float8"],ScalarType "int4"),("btfloat4cmp",[ScalarType "float4",ScalarType "float4"],ScalarType "int4"),("btfloat84cmp",[ScalarType "float8",ScalarType "float4"],ScalarType "int4"),("btfloat8cmp",[ScalarType "float8",ScalarType "float8"],ScalarType "int4"),("btgetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("btgettuple",[Pseudo Internal,Pseudo Internal],ScalarType "bool"),("btinsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("btint24cmp",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("btint28cmp",[ScalarType "int2",ScalarType "int8"],ScalarType "int4"),("btint2cmp",[ScalarType "int2",ScalarType "int2"],ScalarType "int4"),("btint42cmp",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("btint48cmp",[ScalarType "int4",ScalarType "int8"],ScalarType "int4"),("btint4cmp",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("btint82cmp",[ScalarType "int8",ScalarType "int2"],ScalarType "int4"),("btint84cmp",[ScalarType "int8",ScalarType "int4"],ScalarType "int4"),("btint8cmp",[ScalarType "int8",ScalarType "int8"],ScalarType "int4"),("btmarkpos",[Pseudo Internal],Pseudo Void),("btnamecmp",[ScalarType "name",ScalarType "name"],ScalarType "int4"),("btoidcmp",[ScalarType "oid",ScalarType "oid"],ScalarType "int4"),("btoidvectorcmp",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "int4"),("btoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("btrecordcmp",[Pseudo Record,Pseudo Record],ScalarType "int4"),("btreltimecmp",[ScalarType "reltime",ScalarType "reltime"],ScalarType "int4"),("btrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("btrestrpos",[Pseudo Internal],Pseudo Void),("btrim",[ScalarType "text"],ScalarType "text"),("btrim",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("btrim",[ScalarType "text",ScalarType "text"],ScalarType "text"),("bttext_pattern_cmp",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("bttextcmp",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("bttidcmp",[ScalarType "tid",ScalarType "tid"],ScalarType "int4"),("bttintervalcmp",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "int4"),("btvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("byteacat",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("byteacmp",[ScalarType "bytea",ScalarType "bytea"],ScalarType "int4"),("byteaeq",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteage",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteagt",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteain",[Pseudo Cstring],ScalarType "bytea"),("byteale",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("bytealike",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("bytealt",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteane",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteanlike",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("byteaout",[ScalarType "bytea"],Pseudo Cstring),("bytearecv",[Pseudo Internal],ScalarType "bytea"),("byteasend",[ScalarType "bytea"],ScalarType "bytea"),("cash_cmp",[ScalarType "money",ScalarType "money"],ScalarType "int4"),("cash_div_flt4",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("cash_div_flt8",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("cash_div_int2",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("cash_div_int4",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("cash_eq",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_ge",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_gt",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_in",[Pseudo Cstring],ScalarType "money"),("cash_le",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_lt",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_mi",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cash_mul_flt4",[ScalarType "money",ScalarType "float4"],ScalarType "money"),("cash_mul_flt8",[ScalarType "money",ScalarType "float8"],ScalarType "money"),("cash_mul_int2",[ScalarType "money",ScalarType "int2"],ScalarType "money"),("cash_mul_int4",[ScalarType "money",ScalarType "int4"],ScalarType "money"),("cash_ne",[ScalarType "money",ScalarType "money"],ScalarType "bool"),("cash_out",[ScalarType "money"],Pseudo Cstring),("cash_pl",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cash_recv",[Pseudo Internal],ScalarType "money"),("cash_send",[ScalarType "money"],ScalarType "bytea"),("cash_words",[ScalarType "money"],ScalarType "text"),("cashlarger",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cashsmaller",[ScalarType "money",ScalarType "money"],ScalarType "money"),("cbrt",[ScalarType "float8"],ScalarType "float8"),("ceil",[ScalarType "float8"],ScalarType "float8"),("ceil",[ScalarType "numeric"],ScalarType "numeric"),("ceiling",[ScalarType "float8"],ScalarType "float8"),("ceiling",[ScalarType "numeric"],ScalarType "numeric"),("center",[ScalarType "box"],ScalarType "point"),("center",[ScalarType "circle"],ScalarType "point"),("char",[ScalarType "int4"],ScalarType "char"),("char",[ScalarType "text"],ScalarType "char"),("char_length",[ScalarType "text"],ScalarType "int4"),("char_length",[ScalarType "bpchar"],ScalarType "int4"),("character_length",[ScalarType "text"],ScalarType "int4"),("character_length",[ScalarType "bpchar"],ScalarType "int4"),("chareq",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charge",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("chargt",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charin",[Pseudo Cstring],ScalarType "char"),("charle",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charlt",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charne",[ScalarType "char",ScalarType "char"],ScalarType "bool"),("charout",[ScalarType "char"],Pseudo Cstring),("charrecv",[Pseudo Internal],ScalarType "char"),("charsend",[ScalarType "char"],ScalarType "bytea"),("chr",[ScalarType "int4"],ScalarType "text"),("cideq",[ScalarType "cid",ScalarType "cid"],ScalarType "bool"),("cidin",[Pseudo Cstring],ScalarType "cid"),("cidout",[ScalarType "cid"],Pseudo Cstring),("cidr",[ScalarType "inet"],ScalarType "cidr"),("cidr_in",[Pseudo Cstring],ScalarType "cidr"),("cidr_out",[ScalarType "cidr"],Pseudo Cstring),("cidr_recv",[Pseudo Internal],ScalarType "cidr"),("cidr_send",[ScalarType "cidr"],ScalarType "bytea"),("cidrecv",[Pseudo Internal],ScalarType "cid"),("cidsend",[ScalarType "cid"],ScalarType "bytea"),("circle",[ScalarType "box"],ScalarType "circle"),("circle",[ScalarType "polygon"],ScalarType "circle"),("circle",[ScalarType "point",ScalarType "float8"],ScalarType "circle"),("circle_above",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_add_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("circle_below",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_center",[ScalarType "circle"],ScalarType "point"),("circle_contain",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_contain_pt",[ScalarType "circle",ScalarType "point"],ScalarType "bool"),("circle_contained",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_distance",[ScalarType "circle",ScalarType "circle"],ScalarType "float8"),("circle_div_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("circle_eq",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_ge",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_gt",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_in",[Pseudo Cstring],ScalarType "circle"),("circle_le",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_left",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_lt",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_mul_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("circle_ne",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_out",[ScalarType "circle"],Pseudo Cstring),("circle_overabove",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overbelow",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overlap",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overleft",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_overright",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_recv",[Pseudo Internal],ScalarType "circle"),("circle_right",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_same",[ScalarType "circle",ScalarType "circle"],ScalarType "bool"),("circle_send",[ScalarType "circle"],ScalarType "bytea"),("circle_sub_pt",[ScalarType "circle",ScalarType "point"],ScalarType "circle"),("clock_timestamp",[],ScalarType "timestamptz"),("close_lb",[ScalarType "line",ScalarType "box"],ScalarType "point"),("close_ls",[ScalarType "line",ScalarType "lseg"],ScalarType "point"),("close_lseg",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("close_pb",[ScalarType "point",ScalarType "box"],ScalarType "point"),("close_pl",[ScalarType "point",ScalarType "line"],ScalarType "point"),("close_ps",[ScalarType "point",ScalarType "lseg"],ScalarType "point"),("close_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "point"),("close_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "point"),("col_description",[ScalarType "oid",ScalarType "int4"],ScalarType "text"),("contjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("contsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("convert",[ScalarType "bytea",ScalarType "name",ScalarType "name"],ScalarType "bytea"),("convert_from",[ScalarType "bytea",ScalarType "name"],ScalarType "text"),("convert_to",[ScalarType "text",ScalarType "name"],ScalarType "bytea"),("cos",[ScalarType "float8"],ScalarType "float8"),("cot",[ScalarType "float8"],ScalarType "float8"),("cstring_in",[Pseudo Cstring],Pseudo Cstring),("cstring_out",[Pseudo Cstring],Pseudo Cstring),("cstring_recv",[Pseudo Internal],Pseudo Cstring),("cstring_send",[Pseudo Cstring],ScalarType "bytea"),("current_database",[],ScalarType "name"),("current_query",[],ScalarType "text"),("current_schema",[],ScalarType "name"),("current_schemas",[ScalarType "bool"],ArrayType (ScalarType "name")),("current_setting",[ScalarType "text"],ScalarType "text"),("current_user",[],ScalarType "name"),("currtid",[ScalarType "oid",ScalarType "tid"],ScalarType "tid"),("currtid2",[ScalarType "text",ScalarType "tid"],ScalarType "tid"),("currval",[ScalarType "regclass"],ScalarType "int8"),("cursor_to_xml",[ScalarType "refcursor",ScalarType "int4",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("cursor_to_xmlschema",[ScalarType "refcursor",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("database_to_xml",[ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("database_to_xml_and_xmlschema",[ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("database_to_xmlschema",[ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("date",[ScalarType "abstime"],ScalarType "date"),("date",[ScalarType "timestamp"],ScalarType "date"),("date",[ScalarType "timestamptz"],ScalarType "date"),("date_cmp",[ScalarType "date",ScalarType "date"],ScalarType "int4"),("date_cmp_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "int4"),("date_cmp_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "int4"),("date_eq",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_eq_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_eq_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_ge",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_ge_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_ge_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_gt",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_gt_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_gt_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_in",[Pseudo Cstring],ScalarType "date"),("date_larger",[ScalarType "date",ScalarType "date"],ScalarType "date"),("date_le",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_le_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_le_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_lt",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_lt_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_lt_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_mi",[ScalarType "date",ScalarType "date"],ScalarType "int4"),("date_mi_interval",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("date_mii",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("date_ne",[ScalarType "date",ScalarType "date"],ScalarType "bool"),("date_ne_timestamp",[ScalarType "date",ScalarType "timestamp"],ScalarType "bool"),("date_ne_timestamptz",[ScalarType "date",ScalarType "timestamptz"],ScalarType "bool"),("date_out",[ScalarType "date"],Pseudo Cstring),("date_part",[ScalarType "text",ScalarType "abstime"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "reltime"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "date"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "time"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "timestamp"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "timestamptz"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "interval"],ScalarType "float8"),("date_part",[ScalarType "text",ScalarType "timetz"],ScalarType "float8"),("date_pl_interval",[ScalarType "date",ScalarType "interval"],ScalarType "timestamp"),("date_pli",[ScalarType "date",ScalarType "int4"],ScalarType "date"),("date_recv",[Pseudo Internal],ScalarType "date"),("date_send",[ScalarType "date"],ScalarType "bytea"),("date_smaller",[ScalarType "date",ScalarType "date"],ScalarType "date"),("date_trunc",[ScalarType "text",ScalarType "timestamp"],ScalarType "timestamp"),("date_trunc",[ScalarType "text",ScalarType "timestamptz"],ScalarType "timestamptz"),("date_trunc",[ScalarType "text",ScalarType "interval"],ScalarType "interval"),("datetime_pl",[ScalarType "date",ScalarType "time"],ScalarType "timestamp"),("datetimetz_pl",[ScalarType "date",ScalarType "timetz"],ScalarType "timestamptz"),("dcbrt",[ScalarType "float8"],ScalarType "float8"),("decode",[ScalarType "text",ScalarType "text"],ScalarType "bytea"),("degrees",[ScalarType "float8"],ScalarType "float8"),("dexp",[ScalarType "float8"],ScalarType "float8"),("diagonal",[ScalarType "box"],ScalarType "lseg"),("diameter",[ScalarType "circle"],ScalarType "float8"),("dispell_init",[Pseudo Internal],Pseudo Internal),("dispell_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dist_cpoly",[ScalarType "circle",ScalarType "polygon"],ScalarType "float8"),("dist_lb",[ScalarType "line",ScalarType "box"],ScalarType "float8"),("dist_pb",[ScalarType "point",ScalarType "box"],ScalarType "float8"),("dist_pc",[ScalarType "point",ScalarType "circle"],ScalarType "float8"),("dist_pl",[ScalarType "point",ScalarType "line"],ScalarType "float8"),("dist_ppath",[ScalarType "point",ScalarType "path"],ScalarType "float8"),("dist_ps",[ScalarType "point",ScalarType "lseg"],ScalarType "float8"),("dist_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "float8"),("dist_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "float8"),("div",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("dlog1",[ScalarType "float8"],ScalarType "float8"),("dlog10",[ScalarType "float8"],ScalarType "float8"),("domain_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],Pseudo Any),("domain_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],Pseudo Any),("dpow",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("dround",[ScalarType "float8"],ScalarType "float8"),("dsimple_init",[Pseudo Internal],Pseudo Internal),("dsimple_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dsnowball_init",[Pseudo Internal],Pseudo Internal),("dsnowball_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dsqrt",[ScalarType "float8"],ScalarType "float8"),("dsynonym_init",[Pseudo Internal],Pseudo Internal),("dsynonym_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("dtrunc",[ScalarType "float8"],ScalarType "float8"),("encode",[ScalarType "bytea",ScalarType "text"],ScalarType "text"),("enum_cmp",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "int4"),("enum_eq",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_first",[Pseudo AnyEnum],Pseudo AnyEnum),("enum_ge",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_gt",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_in",[Pseudo Cstring,ScalarType "oid"],Pseudo AnyEnum),("enum_larger",[Pseudo AnyEnum,Pseudo AnyEnum],Pseudo AnyEnum),("enum_last",[Pseudo AnyEnum],Pseudo AnyEnum),("enum_le",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_lt",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_ne",[Pseudo AnyEnum,Pseudo AnyEnum],ScalarType "bool"),("enum_out",[Pseudo AnyEnum],Pseudo Cstring),("enum_range",[Pseudo AnyEnum],Pseudo AnyArray),("enum_range",[Pseudo AnyEnum,Pseudo AnyEnum],Pseudo AnyArray),("enum_recv",[Pseudo Cstring,ScalarType "oid"],Pseudo AnyEnum),("enum_send",[Pseudo AnyEnum],ScalarType "bytea"),("enum_smaller",[Pseudo AnyEnum,Pseudo AnyEnum],Pseudo AnyEnum),("eqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("eqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("euc_cn_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_cn_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jis_2004_to_shift_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jis_2004_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jp_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jp_to_sjis",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_jp_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_kr_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_kr_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_tw_to_big5",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_tw_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("euc_tw_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("exp",[ScalarType "float8"],ScalarType "float8"),("exp",[ScalarType "numeric"],ScalarType "numeric"),("factorial",[ScalarType "int8"],ScalarType "numeric"),("family",[ScalarType "inet"],ScalarType "int4"),("flatfile_update_trigger",[],Pseudo Trigger),("float4",[ScalarType "int8"],ScalarType "float4"),("float4",[ScalarType "int2"],ScalarType "float4"),("float4",[ScalarType "int4"],ScalarType "float4"),("float4",[ScalarType "float8"],ScalarType "float4"),("float4",[ScalarType "numeric"],ScalarType "float4"),("float48div",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float48eq",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48ge",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48gt",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48le",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48lt",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48mi",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float48mul",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float48ne",[ScalarType "float4",ScalarType "float8"],ScalarType "bool"),("float48pl",[ScalarType "float4",ScalarType "float8"],ScalarType "float8"),("float4_accum",[ArrayType (ScalarType "float8"),ScalarType "float4"],ArrayType (ScalarType "float8")),("float4abs",[ScalarType "float4"],ScalarType "float4"),("float4div",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4eq",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4ge",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4gt",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4in",[Pseudo Cstring],ScalarType "float4"),("float4larger",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4le",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4lt",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4mi",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4mul",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4ne",[ScalarType "float4",ScalarType "float4"],ScalarType "bool"),("float4out",[ScalarType "float4"],Pseudo Cstring),("float4pl",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4recv",[Pseudo Internal],ScalarType "float4"),("float4send",[ScalarType "float4"],ScalarType "bytea"),("float4smaller",[ScalarType "float4",ScalarType "float4"],ScalarType "float4"),("float4um",[ScalarType "float4"],ScalarType "float4"),("float4up",[ScalarType "float4"],ScalarType "float4"),("float8",[ScalarType "int8"],ScalarType "float8"),("float8",[ScalarType "int2"],ScalarType "float8"),("float8",[ScalarType "int4"],ScalarType "float8"),("float8",[ScalarType "float4"],ScalarType "float8"),("float8",[ScalarType "numeric"],ScalarType "float8"),("float84div",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float84eq",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84ge",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84gt",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84le",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84lt",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84mi",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float84mul",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float84ne",[ScalarType "float8",ScalarType "float4"],ScalarType "bool"),("float84pl",[ScalarType "float8",ScalarType "float4"],ScalarType "float8"),("float8_accum",[ArrayType (ScalarType "float8"),ScalarType "float8"],ArrayType (ScalarType "float8")),("float8_avg",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_corr",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_covar_pop",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_covar_samp",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_accum",[ArrayType (ScalarType "float8"),ScalarType "float8",ScalarType "float8"],ArrayType (ScalarType "float8")),("float8_regr_avgx",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_avgy",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_intercept",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_r2",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_slope",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_sxx",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_sxy",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_regr_syy",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_stddev_pop",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_stddev_samp",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_var_pop",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8_var_samp",[ArrayType (ScalarType "float8")],ScalarType "float8"),("float8abs",[ScalarType "float8"],ScalarType "float8"),("float8div",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8eq",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8ge",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8gt",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8in",[Pseudo Cstring],ScalarType "float8"),("float8larger",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8le",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8lt",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8mi",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8mul",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8ne",[ScalarType "float8",ScalarType "float8"],ScalarType "bool"),("float8out",[ScalarType "float8"],Pseudo Cstring),("float8pl",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8recv",[Pseudo Internal],ScalarType "float8"),("float8send",[ScalarType "float8"],ScalarType "bytea"),("float8smaller",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("float8um",[ScalarType "float8"],ScalarType "float8"),("float8up",[ScalarType "float8"],ScalarType "float8"),("floor",[ScalarType "float8"],ScalarType "float8"),("floor",[ScalarType "numeric"],ScalarType "numeric"),("flt4_mul_cash",[ScalarType "float4",ScalarType "money"],ScalarType "money"),("flt8_mul_cash",[ScalarType "float8",ScalarType "money"],ScalarType "money"),("fmgr_c_validator",[ScalarType "oid"],Pseudo Void),("fmgr_internal_validator",[ScalarType "oid"],Pseudo Void),("fmgr_sql_validator",[ScalarType "oid"],Pseudo Void),("format_type",[ScalarType "oid",ScalarType "int4"],ScalarType "text"),("gb18030_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("gbk_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("generate_series",[ScalarType "int8",ScalarType "int8"],SetOfType (ScalarType "int8")),("generate_series",[ScalarType "int4",ScalarType "int4"],SetOfType (ScalarType "int4")),("generate_series",[ScalarType "int8",ScalarType "int8",ScalarType "int8"],SetOfType (ScalarType "int8")),("generate_series",[ScalarType "int4",ScalarType "int4",ScalarType "int4"],SetOfType (ScalarType "int4")),("generate_series",[ScalarType "timestamp",ScalarType "timestamp",ScalarType "interval"],SetOfType (ScalarType "timestamp")),("generate_series",[ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "interval"],SetOfType (ScalarType "timestamptz")),("generate_subscripts",[Pseudo AnyArray,ScalarType "int4"],SetOfType (ScalarType "int4")),("generate_subscripts",[Pseudo AnyArray,ScalarType "int4",ScalarType "bool"],SetOfType (ScalarType "int4")),("get_bit",[ScalarType "bytea",ScalarType "int4"],ScalarType "int4"),("get_byte",[ScalarType "bytea",ScalarType "int4"],ScalarType "int4"),("get_current_ts_config",[],ScalarType "regconfig"),("getdatabaseencoding",[],ScalarType "name"),("getpgusername",[],ScalarType "name"),("gin_cmp_prefix",[ScalarType "text",ScalarType "text",ScalarType "int2",Pseudo Internal],ScalarType "int4"),("gin_cmp_tslexeme",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("gin_extract_tsquery",[ScalarType "tsquery",Pseudo Internal,ScalarType "int2",Pseudo Internal,Pseudo Internal],Pseudo Internal),("gin_extract_tsvector",[ScalarType "tsvector",Pseudo Internal],Pseudo Internal),("gin_tsquery_consistent",[Pseudo Internal,ScalarType "int2",ScalarType "tsquery",ScalarType "int4",Pseudo Internal,Pseudo Internal],ScalarType "bool"),("ginarrayconsistent",[Pseudo Internal,ScalarType "int2",Pseudo AnyArray,ScalarType "int4",Pseudo Internal,Pseudo Internal],ScalarType "bool"),("ginarrayextract",[Pseudo AnyArray,Pseudo Internal],Pseudo Internal),("ginbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("ginbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("ginbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gincostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("ginendscan",[Pseudo Internal],Pseudo Void),("gingetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("gininsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("ginmarkpos",[Pseudo Internal],Pseudo Void),("ginoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("ginqueryarrayextract",[Pseudo AnyArray,Pseudo Internal,ScalarType "int2",Pseudo Internal,Pseudo Internal],Pseudo Internal),("ginrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("ginrestrpos",[Pseudo Internal],Pseudo Void),("ginvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gist_box_compress",[Pseudo Internal],Pseudo Internal),("gist_box_consistent",[Pseudo Internal,ScalarType "box",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gist_box_decompress",[Pseudo Internal],Pseudo Internal),("gist_box_penalty",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gist_box_picksplit",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gist_box_same",[ScalarType "box",ScalarType "box",Pseudo Internal],Pseudo Internal),("gist_box_union",[Pseudo Internal,Pseudo Internal],ScalarType "box"),("gist_circle_compress",[Pseudo Internal],Pseudo Internal),("gist_circle_consistent",[Pseudo Internal,ScalarType "circle",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gist_poly_compress",[Pseudo Internal],Pseudo Internal),("gist_poly_consistent",[Pseudo Internal,ScalarType "polygon",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gistbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gistbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gistbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gistcostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("gistendscan",[Pseudo Internal],Pseudo Void),("gistgetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("gistgettuple",[Pseudo Internal,Pseudo Internal],ScalarType "bool"),("gistinsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("gistmarkpos",[Pseudo Internal],Pseudo Void),("gistoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("gistrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("gistrestrpos",[Pseudo Internal],Pseudo Void),("gistvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsquery_compress",[Pseudo Internal],Pseudo Internal),("gtsquery_consistent",[Pseudo Internal,Pseudo Internal,ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gtsquery_decompress",[Pseudo Internal],Pseudo Internal),("gtsquery_penalty",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsquery_picksplit",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsquery_same",[ScalarType "int8",ScalarType "int8",Pseudo Internal],Pseudo Internal),("gtsquery_union",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvector_compress",[Pseudo Internal],Pseudo Internal),("gtsvector_consistent",[Pseudo Internal,ScalarType "gtsvector",ScalarType "int4",ScalarType "oid",Pseudo Internal],ScalarType "bool"),("gtsvector_decompress",[Pseudo Internal],Pseudo Internal),("gtsvector_penalty",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvector_picksplit",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvector_same",[ScalarType "gtsvector",ScalarType "gtsvector",Pseudo Internal],Pseudo Internal),("gtsvector_union",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("gtsvectorin",[Pseudo Cstring],ScalarType "gtsvector"),("gtsvectorout",[ScalarType "gtsvector"],Pseudo Cstring),("has_any_column_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_any_column_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "text",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "text",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "oid",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "int2",ScalarType "text"],ScalarType "bool"),("has_column_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_database_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_foreign_data_wrapper_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_function_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_language_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_schema_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_server_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_table_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "name",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "oid",ScalarType "text",ScalarType "text"],ScalarType "bool"),("has_tablespace_privilege",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("hash_aclitem",[ScalarType "aclitem"],ScalarType "int4"),("hash_numeric",[ScalarType "numeric"],ScalarType "int4"),("hashbeginscan",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashbpchar",[ScalarType "bpchar"],ScalarType "int4"),("hashbuild",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashbulkdelete",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashchar",[ScalarType "char"],ScalarType "int4"),("hashcostestimate",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Void),("hashendscan",[Pseudo Internal],Pseudo Void),("hashenum",[Pseudo AnyEnum],ScalarType "int4"),("hashfloat4",[ScalarType "float4"],ScalarType "int4"),("hashfloat8",[ScalarType "float8"],ScalarType "int4"),("hashgetbitmap",[Pseudo Internal,Pseudo Internal],ScalarType "int8"),("hashgettuple",[Pseudo Internal,Pseudo Internal],ScalarType "bool"),("hashinet",[ScalarType "inet"],ScalarType "int4"),("hashinsert",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],ScalarType "bool"),("hashint2",[ScalarType "int2"],ScalarType "int4"),("hashint2vector",[ScalarType "int2vector"],ScalarType "int4"),("hashint4",[ScalarType "int4"],ScalarType "int4"),("hashint8",[ScalarType "int8"],ScalarType "int4"),("hashmacaddr",[ScalarType "macaddr"],ScalarType "int4"),("hashmarkpos",[Pseudo Internal],Pseudo Void),("hashname",[ScalarType "name"],ScalarType "int4"),("hashoid",[ScalarType "oid"],ScalarType "int4"),("hashoidvector",[ScalarType "oidvector"],ScalarType "int4"),("hashoptions",[ArrayType (ScalarType "text"),ScalarType "bool"],ScalarType "bytea"),("hashrescan",[Pseudo Internal,Pseudo Internal],Pseudo Void),("hashrestrpos",[Pseudo Internal],Pseudo Void),("hashtext",[ScalarType "text"],ScalarType "int4"),("hashvacuumcleanup",[Pseudo Internal,Pseudo Internal],Pseudo Internal),("hashvarlena",[Pseudo Internal],ScalarType "int4"),("height",[ScalarType "box"],ScalarType "float8"),("host",[ScalarType "inet"],ScalarType "text"),("hostmask",[ScalarType "inet"],ScalarType "inet"),("iclikejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("iclikesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("icnlikejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("icnlikesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("icregexeqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("icregexeqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("icregexnejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("icregexnesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("inet_client_addr",[],ScalarType "inet"),("inet_client_port",[],ScalarType "int4"),("inet_in",[Pseudo Cstring],ScalarType "inet"),("inet_out",[ScalarType "inet"],Pseudo Cstring),("inet_recv",[Pseudo Internal],ScalarType "inet"),("inet_send",[ScalarType "inet"],ScalarType "bytea"),("inet_server_addr",[],ScalarType "inet"),("inet_server_port",[],ScalarType "int4"),("inetand",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("inetmi",[ScalarType "inet",ScalarType "inet"],ScalarType "int8"),("inetmi_int8",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("inetnot",[ScalarType "inet"],ScalarType "inet"),("inetor",[ScalarType "inet",ScalarType "inet"],ScalarType "inet"),("inetpl",[ScalarType "inet",ScalarType "int8"],ScalarType "inet"),("initcap",[ScalarType "text"],ScalarType "text"),("int2",[ScalarType "int8"],ScalarType "int2"),("int2",[ScalarType "int4"],ScalarType "int2"),("int2",[ScalarType "float4"],ScalarType "int2"),("int2",[ScalarType "float8"],ScalarType "int2"),("int2",[ScalarType "numeric"],ScalarType "int2"),("int24div",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int24eq",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24ge",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24gt",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24le",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24lt",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24mi",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int24mul",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int24ne",[ScalarType "int2",ScalarType "int4"],ScalarType "bool"),("int24pl",[ScalarType "int2",ScalarType "int4"],ScalarType "int4"),("int28div",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int28eq",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28ge",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28gt",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28le",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28lt",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28mi",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int28mul",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int28ne",[ScalarType "int2",ScalarType "int8"],ScalarType "bool"),("int28pl",[ScalarType "int2",ScalarType "int8"],ScalarType "int8"),("int2_accum",[ArrayType (ScalarType "numeric"),ScalarType "int2"],ArrayType (ScalarType "numeric")),("int2_avg_accum",[ArrayType (ScalarType "int8"),ScalarType "int2"],ArrayType (ScalarType "int8")),("int2_mul_cash",[ScalarType "int2",ScalarType "money"],ScalarType "money"),("int2_sum",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int2abs",[ScalarType "int2"],ScalarType "int2"),("int2and",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2div",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2eq",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2ge",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2gt",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2in",[Pseudo Cstring],ScalarType "int2"),("int2larger",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2le",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2lt",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2mi",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2mod",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2mul",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2ne",[ScalarType "int2",ScalarType "int2"],ScalarType "bool"),("int2not",[ScalarType "int2"],ScalarType "int2"),("int2or",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2out",[ScalarType "int2"],Pseudo Cstring),("int2pl",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2recv",[Pseudo Internal],ScalarType "int2"),("int2send",[ScalarType "int2"],ScalarType "bytea"),("int2shl",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),("int2shr",[ScalarType "int2",ScalarType "int4"],ScalarType "int2"),("int2smaller",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int2um",[ScalarType "int2"],ScalarType "int2"),("int2up",[ScalarType "int2"],ScalarType "int2"),("int2vectoreq",[ScalarType "int2vector",ScalarType "int2vector"],ScalarType "bool"),("int2vectorin",[Pseudo Cstring],ScalarType "int2vector"),("int2vectorout",[ScalarType "int2vector"],Pseudo Cstring),("int2vectorrecv",[Pseudo Internal],ScalarType "int2vector"),("int2vectorsend",[ScalarType "int2vector"],ScalarType "bytea"),("int2xor",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("int4",[ScalarType "bool"],ScalarType "int4"),("int4",[ScalarType "char"],ScalarType "int4"),("int4",[ScalarType "int8"],ScalarType "int4"),("int4",[ScalarType "int2"],ScalarType "int4"),("int4",[ScalarType "float4"],ScalarType "int4"),("int4",[ScalarType "float8"],ScalarType "int4"),("int4",[ScalarType "bit"],ScalarType "int4"),("int4",[ScalarType "numeric"],ScalarType "int4"),("int42div",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int42eq",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42ge",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42gt",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42le",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42lt",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42mi",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int42mul",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int42ne",[ScalarType "int4",ScalarType "int2"],ScalarType "bool"),("int42pl",[ScalarType "int4",ScalarType "int2"],ScalarType "int4"),("int48div",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int48eq",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48ge",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48gt",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48le",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48lt",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48mi",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int48mul",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int48ne",[ScalarType "int4",ScalarType "int8"],ScalarType "bool"),("int48pl",[ScalarType "int4",ScalarType "int8"],ScalarType "int8"),("int4_accum",[ArrayType (ScalarType "numeric"),ScalarType "int4"],ArrayType (ScalarType "numeric")),("int4_avg_accum",[ArrayType (ScalarType "int8"),ScalarType "int4"],ArrayType (ScalarType "int8")),("int4_mul_cash",[ScalarType "int4",ScalarType "money"],ScalarType "money"),("int4_sum",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int4abs",[ScalarType "int4"],ScalarType "int4"),("int4and",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4div",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4eq",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4ge",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4gt",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4in",[Pseudo Cstring],ScalarType "int4"),("int4inc",[ScalarType "int4"],ScalarType "int4"),("int4larger",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4le",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4lt",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4mi",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4mod",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4mul",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4ne",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("int4not",[ScalarType "int4"],ScalarType "int4"),("int4or",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4out",[ScalarType "int4"],Pseudo Cstring),("int4pl",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4recv",[Pseudo Internal],ScalarType "int4"),("int4send",[ScalarType "int4"],ScalarType "bytea"),("int4shl",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4shr",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4smaller",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int4um",[ScalarType "int4"],ScalarType "int4"),("int4up",[ScalarType "int4"],ScalarType "int4"),("int4xor",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("int8",[ScalarType "int2"],ScalarType "int8"),("int8",[ScalarType "int4"],ScalarType "int8"),("int8",[ScalarType "oid"],ScalarType "int8"),("int8",[ScalarType "float4"],ScalarType "int8"),("int8",[ScalarType "float8"],ScalarType "int8"),("int8",[ScalarType "bit"],ScalarType "int8"),("int8",[ScalarType "numeric"],ScalarType "int8"),("int82div",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int82eq",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82ge",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82gt",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82le",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82lt",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82mi",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int82mul",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int82ne",[ScalarType "int8",ScalarType "int2"],ScalarType "bool"),("int82pl",[ScalarType "int8",ScalarType "int2"],ScalarType "int8"),("int84div",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int84eq",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84ge",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84gt",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84le",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84lt",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84mi",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int84mul",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int84ne",[ScalarType "int8",ScalarType "int4"],ScalarType "bool"),("int84pl",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int8_accum",[ArrayType (ScalarType "numeric"),ScalarType "int8"],ArrayType (ScalarType "numeric")),("int8_avg",[ArrayType (ScalarType "int8")],ScalarType "numeric"),("int8_avg_accum",[ArrayType (ScalarType "numeric"),ScalarType "int8"],ArrayType (ScalarType "numeric")),("int8_sum",[ScalarType "numeric",ScalarType "int8"],ScalarType "numeric"),("int8abs",[ScalarType "int8"],ScalarType "int8"),("int8and",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8div",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8eq",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8ge",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8gt",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8in",[Pseudo Cstring],ScalarType "int8"),("int8inc",[ScalarType "int8"],ScalarType "int8"),("int8inc_any",[ScalarType "int8",Pseudo Any],ScalarType "int8"),("int8inc_float8_float8",[ScalarType "int8",ScalarType "float8",ScalarType "float8"],ScalarType "int8"),("int8larger",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8le",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8lt",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8mi",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8mod",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8mul",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8ne",[ScalarType "int8",ScalarType "int8"],ScalarType "bool"),("int8not",[ScalarType "int8"],ScalarType "int8"),("int8or",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8out",[ScalarType "int8"],Pseudo Cstring),("int8pl",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8pl_inet",[ScalarType "int8",ScalarType "inet"],ScalarType "inet"),("int8recv",[Pseudo Internal],ScalarType "int8"),("int8send",[ScalarType "int8"],ScalarType "bytea"),("int8shl",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int8shr",[ScalarType "int8",ScalarType "int4"],ScalarType "int8"),("int8smaller",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("int8um",[ScalarType "int8"],ScalarType "int8"),("int8up",[ScalarType "int8"],ScalarType "int8"),("int8xor",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("integer_pl_date",[ScalarType "int4",ScalarType "date"],ScalarType "date"),("inter_lb",[ScalarType "line",ScalarType "box"],ScalarType "bool"),("inter_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("inter_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("internal_in",[Pseudo Cstring],Pseudo Internal),("internal_out",[Pseudo Internal],Pseudo Cstring),("interval",[ScalarType "reltime"],ScalarType "interval"),("interval",[ScalarType "time"],ScalarType "interval"),("interval",[ScalarType "interval",ScalarType "int4"],ScalarType "interval"),("interval_accum",[ArrayType (ScalarType "interval"),ScalarType "interval"],ArrayType (ScalarType "interval")),("interval_avg",[ArrayType (ScalarType "interval")],ScalarType "interval"),("interval_cmp",[ScalarType "interval",ScalarType "interval"],ScalarType "int4"),("interval_div",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("interval_eq",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_ge",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_gt",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_hash",[ScalarType "interval"],ScalarType "int4"),("interval_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "interval"),("interval_larger",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_le",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_lt",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_mi",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_mul",[ScalarType "interval",ScalarType "float8"],ScalarType "interval"),("interval_ne",[ScalarType "interval",ScalarType "interval"],ScalarType "bool"),("interval_out",[ScalarType "interval"],Pseudo Cstring),("interval_pl",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_pl_date",[ScalarType "interval",ScalarType "date"],ScalarType "timestamp"),("interval_pl_time",[ScalarType "interval",ScalarType "time"],ScalarType "time"),("interval_pl_timestamp",[ScalarType "interval",ScalarType "timestamp"],ScalarType "timestamp"),("interval_pl_timestamptz",[ScalarType "interval",ScalarType "timestamptz"],ScalarType "timestamptz"),("interval_pl_timetz",[ScalarType "interval",ScalarType "timetz"],ScalarType "timetz"),("interval_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "interval"),("interval_send",[ScalarType "interval"],ScalarType "bytea"),("interval_smaller",[ScalarType "interval",ScalarType "interval"],ScalarType "interval"),("interval_um",[ScalarType "interval"],ScalarType "interval"),("intervaltypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("intervaltypmodout",[ScalarType "int4"],Pseudo Cstring),("intinterval",[ScalarType "abstime",ScalarType "tinterval"],ScalarType "bool"),("isclosed",[ScalarType "path"],ScalarType "bool"),("isfinite",[ScalarType "abstime"],ScalarType "bool"),("isfinite",[ScalarType "date"],ScalarType "bool"),("isfinite",[ScalarType "timestamp"],ScalarType "bool"),("isfinite",[ScalarType "timestamptz"],ScalarType "bool"),("isfinite",[ScalarType "interval"],ScalarType "bool"),("ishorizontal",[ScalarType "lseg"],ScalarType "bool"),("ishorizontal",[ScalarType "line"],ScalarType "bool"),("ishorizontal",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("iso8859_1_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso8859_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("iso_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("isopen",[ScalarType "path"],ScalarType "bool"),("isparallel",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("isparallel",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("isperp",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("isperp",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("isvertical",[ScalarType "lseg"],ScalarType "bool"),("isvertical",[ScalarType "line"],ScalarType "bool"),("isvertical",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("johab_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("justify_days",[ScalarType "interval"],ScalarType "interval"),("justify_hours",[ScalarType "interval"],ScalarType "interval"),("justify_interval",[ScalarType "interval"],ScalarType "interval"),("koi8r_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8r_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("koi8u_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("language_handler_in",[Pseudo Cstring],Pseudo LanguageHandler),("language_handler_out",[Pseudo LanguageHandler],Pseudo Cstring),("lastval",[],ScalarType "int8"),("latin1_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin2_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin2_to_win1250",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin3_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("latin4_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("length",[ScalarType "bytea"],ScalarType "int4"),("length",[ScalarType "text"],ScalarType "int4"),("length",[ScalarType "lseg"],ScalarType "float8"),("length",[ScalarType "path"],ScalarType "float8"),("length",[ScalarType "bpchar"],ScalarType "int4"),("length",[ScalarType "bit"],ScalarType "int4"),("length",[ScalarType "tsvector"],ScalarType "int4"),("length",[ScalarType "bytea",ScalarType "name"],ScalarType "int4"),("like",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("like",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("like",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("like_escape",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bytea"),("like_escape",[ScalarType "text",ScalarType "text"],ScalarType "text"),("likejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("likesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("line",[ScalarType "point",ScalarType "point"],ScalarType "line"),("line_distance",[ScalarType "line",ScalarType "line"],ScalarType "float8"),("line_eq",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_horizontal",[ScalarType "line"],ScalarType "bool"),("line_in",[Pseudo Cstring],ScalarType "line"),("line_interpt",[ScalarType "line",ScalarType "line"],ScalarType "point"),("line_intersect",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_out",[ScalarType "line"],Pseudo Cstring),("line_parallel",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_perp",[ScalarType "line",ScalarType "line"],ScalarType "bool"),("line_recv",[Pseudo Internal],ScalarType "line"),("line_send",[ScalarType "line"],ScalarType "bytea"),("line_vertical",[ScalarType "line"],ScalarType "bool"),("ln",[ScalarType "float8"],ScalarType "float8"),("ln",[ScalarType "numeric"],ScalarType "numeric"),("lo_close",[ScalarType "int4"],ScalarType "int4"),("lo_creat",[ScalarType "int4"],ScalarType "oid"),("lo_create",[ScalarType "oid"],ScalarType "oid"),("lo_export",[ScalarType "oid",ScalarType "text"],ScalarType "int4"),("lo_import",[ScalarType "text"],ScalarType "oid"),("lo_import",[ScalarType "text",ScalarType "oid"],ScalarType "oid"),("lo_lseek",[ScalarType "int4",ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("lo_open",[ScalarType "oid",ScalarType "int4"],ScalarType "int4"),("lo_tell",[ScalarType "int4"],ScalarType "int4"),("lo_truncate",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("lo_unlink",[ScalarType "oid"],ScalarType "int4"),("log",[ScalarType "float8"],ScalarType "float8"),("log",[ScalarType "numeric"],ScalarType "numeric"),("log",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("loread",[ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("lower",[ScalarType "text"],ScalarType "text"),("lowrite",[ScalarType "int4",ScalarType "bytea"],ScalarType "int4"),("lpad",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("lpad",[ScalarType "text",ScalarType "int4",ScalarType "text"],ScalarType "text"),("lseg",[ScalarType "box"],ScalarType "lseg"),("lseg",[ScalarType "point",ScalarType "point"],ScalarType "lseg"),("lseg_center",[ScalarType "lseg"],ScalarType "point"),("lseg_distance",[ScalarType "lseg",ScalarType "lseg"],ScalarType "float8"),("lseg_eq",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_ge",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_gt",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_horizontal",[ScalarType "lseg"],ScalarType "bool"),("lseg_in",[Pseudo Cstring],ScalarType "lseg"),("lseg_interpt",[ScalarType "lseg",ScalarType "lseg"],ScalarType "point"),("lseg_intersect",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_le",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_length",[ScalarType "lseg"],ScalarType "float8"),("lseg_lt",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_ne",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_out",[ScalarType "lseg"],Pseudo Cstring),("lseg_parallel",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_perp",[ScalarType "lseg",ScalarType "lseg"],ScalarType "bool"),("lseg_recv",[Pseudo Internal],ScalarType "lseg"),("lseg_send",[ScalarType "lseg"],ScalarType "bytea"),("lseg_vertical",[ScalarType "lseg"],ScalarType "bool"),("ltrim",[ScalarType "text"],ScalarType "text"),("ltrim",[ScalarType "text",ScalarType "text"],ScalarType "text"),("macaddr_cmp",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "int4"),("macaddr_eq",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_ge",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_gt",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_in",[Pseudo Cstring],ScalarType "macaddr"),("macaddr_le",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_lt",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_ne",[ScalarType "macaddr",ScalarType "macaddr"],ScalarType "bool"),("macaddr_out",[ScalarType "macaddr"],Pseudo Cstring),("macaddr_recv",[Pseudo Internal],ScalarType "macaddr"),("macaddr_send",[ScalarType "macaddr"],ScalarType "bytea"),("makeaclitem",[ScalarType "oid",ScalarType "oid",ScalarType "text",ScalarType "bool"],ScalarType "aclitem"),("masklen",[ScalarType "inet"],ScalarType "int4"),("md5",[ScalarType "bytea"],ScalarType "text"),("md5",[ScalarType "text"],ScalarType "text"),("mic_to_ascii",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_big5",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_cn",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_jp",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_kr",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_euc_tw",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin1",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin2",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin3",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_latin4",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_sjis",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_win1250",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mic_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("mktinterval",[ScalarType "abstime",ScalarType "abstime"],ScalarType "tinterval"),("mod",[ScalarType "int8",ScalarType "int8"],ScalarType "int8"),("mod",[ScalarType "int2",ScalarType "int2"],ScalarType "int2"),("mod",[ScalarType "int4",ScalarType "int4"],ScalarType "int4"),("mod",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("mul_d_interval",[ScalarType "float8",ScalarType "interval"],ScalarType "interval"),("name",[ScalarType "text"],ScalarType "name"),("name",[ScalarType "bpchar"],ScalarType "name"),("name",[ScalarType "varchar"],ScalarType "name"),("nameeq",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namege",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namegt",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("nameiclike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameicnlike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameicregexeq",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameicregexne",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("namein",[Pseudo Cstring],ScalarType "name"),("namele",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namelike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("namelt",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namene",[ScalarType "name",ScalarType "name"],ScalarType "bool"),("namenlike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameout",[ScalarType "name"],Pseudo Cstring),("namerecv",[Pseudo Internal],ScalarType "name"),("nameregexeq",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("nameregexne",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("namesend",[ScalarType "name"],ScalarType "bytea"),("neqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("neqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("netmask",[ScalarType "inet"],ScalarType "inet"),("network",[ScalarType "inet"],ScalarType "cidr"),("network_cmp",[ScalarType "inet",ScalarType "inet"],ScalarType "int4"),("network_eq",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_ge",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_gt",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_le",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_lt",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_ne",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_sub",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_subeq",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_sup",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("network_supeq",[ScalarType "inet",ScalarType "inet"],ScalarType "bool"),("nextval",[ScalarType "regclass"],ScalarType "int8"),("nlikejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("nlikesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("notlike",[ScalarType "bytea",ScalarType "bytea"],ScalarType "bool"),("notlike",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("notlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("now",[],ScalarType "timestamptz"),("npoints",[ScalarType "path"],ScalarType "int4"),("npoints",[ScalarType "polygon"],ScalarType "int4"),("numeric",[ScalarType "int8"],ScalarType "numeric"),("numeric",[ScalarType "int2"],ScalarType "numeric"),("numeric",[ScalarType "int4"],ScalarType "numeric"),("numeric",[ScalarType "float4"],ScalarType "numeric"),("numeric",[ScalarType "float8"],ScalarType "numeric"),("numeric",[ScalarType "numeric",ScalarType "int4"],ScalarType "numeric"),("numeric_abs",[ScalarType "numeric"],ScalarType "numeric"),("numeric_accum",[ArrayType (ScalarType "numeric"),ScalarType "numeric"],ArrayType (ScalarType "numeric")),("numeric_add",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_avg",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_avg_accum",[ArrayType (ScalarType "numeric"),ScalarType "numeric"],ArrayType (ScalarType "numeric")),("numeric_cmp",[ScalarType "numeric",ScalarType "numeric"],ScalarType "int4"),("numeric_div",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_div_trunc",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_eq",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_exp",[ScalarType "numeric"],ScalarType "numeric"),("numeric_fac",[ScalarType "int8"],ScalarType "numeric"),("numeric_ge",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_gt",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "numeric"),("numeric_inc",[ScalarType "numeric"],ScalarType "numeric"),("numeric_larger",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_le",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_ln",[ScalarType "numeric"],ScalarType "numeric"),("numeric_log",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_lt",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_mod",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_mul",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_ne",[ScalarType "numeric",ScalarType "numeric"],ScalarType "bool"),("numeric_out",[ScalarType "numeric"],Pseudo Cstring),("numeric_power",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "numeric"),("numeric_send",[ScalarType "numeric"],ScalarType "bytea"),("numeric_smaller",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_sqrt",[ScalarType "numeric"],ScalarType "numeric"),("numeric_stddev_pop",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_stddev_samp",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_sub",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("numeric_uminus",[ScalarType "numeric"],ScalarType "numeric"),("numeric_uplus",[ScalarType "numeric"],ScalarType "numeric"),("numeric_var_pop",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numeric_var_samp",[ArrayType (ScalarType "numeric")],ScalarType "numeric"),("numerictypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("numerictypmodout",[ScalarType "int4"],Pseudo Cstring),("numnode",[ScalarType "tsquery"],ScalarType "int4"),("obj_description",[ScalarType "oid"],ScalarType "text"),("obj_description",[ScalarType "oid",ScalarType "name"],ScalarType "text"),("octet_length",[ScalarType "bytea"],ScalarType "int4"),("octet_length",[ScalarType "text"],ScalarType "int4"),("octet_length",[ScalarType "bpchar"],ScalarType "int4"),("octet_length",[ScalarType "bit"],ScalarType "int4"),("oid",[ScalarType "int8"],ScalarType "oid"),("oideq",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidge",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidgt",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidin",[Pseudo Cstring],ScalarType "oid"),("oidlarger",[ScalarType "oid",ScalarType "oid"],ScalarType "oid"),("oidle",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidlt",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidne",[ScalarType "oid",ScalarType "oid"],ScalarType "bool"),("oidout",[ScalarType "oid"],Pseudo Cstring),("oidrecv",[Pseudo Internal],ScalarType "oid"),("oidsend",[ScalarType "oid"],ScalarType "bytea"),("oidsmaller",[ScalarType "oid",ScalarType "oid"],ScalarType "oid"),("oidvectoreq",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorge",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorgt",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorin",[Pseudo Cstring],ScalarType "oidvector"),("oidvectorle",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorlt",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorne",[ScalarType "oidvector",ScalarType "oidvector"],ScalarType "bool"),("oidvectorout",[ScalarType "oidvector"],Pseudo Cstring),("oidvectorrecv",[Pseudo Internal],ScalarType "oidvector"),("oidvectorsend",[ScalarType "oidvector"],ScalarType "bytea"),("oidvectortypes",[ScalarType "oidvector"],ScalarType "text"),("on_pb",[ScalarType "point",ScalarType "box"],ScalarType "bool"),("on_pl",[ScalarType "point",ScalarType "line"],ScalarType "bool"),("on_ppath",[ScalarType "point",ScalarType "path"],ScalarType "bool"),("on_ps",[ScalarType "point",ScalarType "lseg"],ScalarType "bool"),("on_sb",[ScalarType "lseg",ScalarType "box"],ScalarType "bool"),("on_sl",[ScalarType "lseg",ScalarType "line"],ScalarType "bool"),("opaque_in",[Pseudo Cstring],Pseudo Opaque),("opaque_out",[Pseudo Opaque],Pseudo Cstring),("overlaps",[ScalarType "time",ScalarType "time",ScalarType "time",ScalarType "time"],ScalarType "bool"),("overlaps",[ScalarType "time",ScalarType "time",ScalarType "time",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "time",ScalarType "interval",ScalarType "time",ScalarType "time"],ScalarType "bool"),("overlaps",[ScalarType "time",ScalarType "interval",ScalarType "time",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "timestamp",ScalarType "timestamp",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "interval",ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("overlaps",[ScalarType "timestamp",ScalarType "interval",ScalarType "timestamp",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "timestamptz",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "interval",ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("overlaps",[ScalarType "timestamptz",ScalarType "interval",ScalarType "timestamptz",ScalarType "interval"],ScalarType "bool"),("overlaps",[ScalarType "timetz",ScalarType "timetz",ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("overlay",[ScalarType "text",ScalarType "text",ScalarType "int4"],ScalarType "text"),("overlay",[ScalarType "text",ScalarType "text",ScalarType "int4",ScalarType "int4"],ScalarType "text"),("path",[ScalarType "polygon"],ScalarType "path"),("path_add",[ScalarType "path",ScalarType "path"],ScalarType "path"),("path_add_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("path_center",[ScalarType "path"],ScalarType "point"),("path_contain_pt",[ScalarType "path",ScalarType "point"],ScalarType "bool"),("path_distance",[ScalarType "path",ScalarType "path"],ScalarType "float8"),("path_div_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("path_in",[Pseudo Cstring],ScalarType "path"),("path_inter",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_length",[ScalarType "path"],ScalarType "float8"),("path_mul_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("path_n_eq",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_ge",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_gt",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_le",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_n_lt",[ScalarType "path",ScalarType "path"],ScalarType "bool"),("path_npoints",[ScalarType "path"],ScalarType "int4"),("path_out",[ScalarType "path"],Pseudo Cstring),("path_recv",[Pseudo Internal],ScalarType "path"),("path_send",[ScalarType "path"],ScalarType "bytea"),("path_sub_pt",[ScalarType "path",ScalarType "point"],ScalarType "path"),("pclose",[ScalarType "path"],ScalarType "path"),("pg_advisory_lock",[ScalarType "int8"],Pseudo Void),("pg_advisory_lock",[ScalarType "int4",ScalarType "int4"],Pseudo Void),("pg_advisory_lock_shared",[ScalarType "int8"],Pseudo Void),("pg_advisory_lock_shared",[ScalarType "int4",ScalarType "int4"],Pseudo Void),("pg_advisory_unlock",[ScalarType "int8"],ScalarType "bool"),("pg_advisory_unlock",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_advisory_unlock_all",[],Pseudo Void),("pg_advisory_unlock_shared",[ScalarType "int8"],ScalarType "bool"),("pg_advisory_unlock_shared",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_backend_pid",[],ScalarType "int4"),("pg_cancel_backend",[ScalarType "int4"],ScalarType "bool"),("pg_char_to_encoding",[ScalarType "name"],ScalarType "int4"),("pg_client_encoding",[],ScalarType "name"),("pg_column_size",[Pseudo Any],ScalarType "int4"),("pg_conf_load_time",[],ScalarType "timestamptz"),("pg_conversion_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_current_xlog_insert_location",[],ScalarType "text"),("pg_current_xlog_location",[],ScalarType "text"),("pg_cursor",[],SetOfType (Pseudo Record)),("pg_database_size",[ScalarType "name"],ScalarType "int8"),("pg_database_size",[ScalarType "oid"],ScalarType "int8"),("pg_encoding_to_char",[ScalarType "int4"],ScalarType "name"),("pg_function_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_get_constraintdef",[ScalarType "oid"],ScalarType "text"),("pg_get_constraintdef",[ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_get_expr",[ScalarType "text",ScalarType "oid"],ScalarType "text"),("pg_get_expr",[ScalarType "text",ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_get_function_arguments",[ScalarType "oid"],ScalarType "text"),("pg_get_function_identity_arguments",[ScalarType "oid"],ScalarType "text"),("pg_get_function_result",[ScalarType "oid"],ScalarType "text"),("pg_get_functiondef",[ScalarType "oid"],ScalarType "text"),("pg_get_indexdef",[ScalarType "oid"],ScalarType "text"),("pg_get_indexdef",[ScalarType "oid",ScalarType "int4",ScalarType "bool"],ScalarType "text"),("pg_get_keywords",[],SetOfType (Pseudo Record)),("pg_get_ruledef",[ScalarType "oid"],ScalarType "text"),("pg_get_ruledef",[ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_get_serial_sequence",[ScalarType "text",ScalarType "text"],ScalarType "text"),("pg_get_triggerdef",[ScalarType "oid"],ScalarType "text"),("pg_get_userbyid",[ScalarType "oid"],ScalarType "name"),("pg_get_viewdef",[ScalarType "text"],ScalarType "text"),("pg_get_viewdef",[ScalarType "oid"],ScalarType "text"),("pg_get_viewdef",[ScalarType "text",ScalarType "bool"],ScalarType "text"),("pg_get_viewdef",[ScalarType "oid",ScalarType "bool"],ScalarType "text"),("pg_has_role",[ScalarType "name",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "oid",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "name",ScalarType "name",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "name",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "oid",ScalarType "name",ScalarType "text"],ScalarType "bool"),("pg_has_role",[ScalarType "oid",ScalarType "oid",ScalarType "text"],ScalarType "bool"),("pg_is_other_temp_schema",[ScalarType "oid"],ScalarType "bool"),("pg_lock_status",[],SetOfType (Pseudo Record)),("pg_ls_dir",[ScalarType "text"],SetOfType (ScalarType "text")),("pg_my_temp_schema",[],ScalarType "oid"),("pg_opclass_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_operator_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_options_to_table",[ArrayType (ScalarType "text")],SetOfType (Pseudo Record)),("pg_postmaster_start_time",[],ScalarType "timestamptz"),("pg_prepared_statement",[],SetOfType (Pseudo Record)),("pg_prepared_xact",[],SetOfType (Pseudo Record)),("pg_read_file",[ScalarType "text",ScalarType "int8",ScalarType "int8"],ScalarType "text"),("pg_relation_size",[ScalarType "regclass"],ScalarType "int8"),("pg_relation_size",[ScalarType "regclass",ScalarType "text"],ScalarType "int8"),("pg_reload_conf",[],ScalarType "bool"),("pg_rotate_logfile",[],ScalarType "bool"),("pg_show_all_settings",[],SetOfType (Pseudo Record)),("pg_size_pretty",[ScalarType "int8"],ScalarType "text"),("pg_sleep",[ScalarType "float8"],Pseudo Void),("pg_start_backup",[ScalarType "text",ScalarType "bool"],ScalarType "text"),("pg_stat_clear_snapshot",[],Pseudo Void),("pg_stat_file",[ScalarType "text"],Pseudo Record),("pg_stat_get_activity",[ScalarType "int4"],SetOfType (Pseudo Record)),("pg_stat_get_backend_activity",[ScalarType "int4"],ScalarType "text"),("pg_stat_get_backend_activity_start",[ScalarType "int4"],ScalarType "timestamptz"),("pg_stat_get_backend_client_addr",[ScalarType "int4"],ScalarType "inet"),("pg_stat_get_backend_client_port",[ScalarType "int4"],ScalarType "int4"),("pg_stat_get_backend_dbid",[ScalarType "int4"],ScalarType "oid"),("pg_stat_get_backend_idset",[],SetOfType (ScalarType "int4")),("pg_stat_get_backend_pid",[ScalarType "int4"],ScalarType "int4"),("pg_stat_get_backend_start",[ScalarType "int4"],ScalarType "timestamptz"),("pg_stat_get_backend_userid",[ScalarType "int4"],ScalarType "oid"),("pg_stat_get_backend_waiting",[ScalarType "int4"],ScalarType "bool"),("pg_stat_get_backend_xact_start",[ScalarType "int4"],ScalarType "timestamptz"),("pg_stat_get_bgwriter_buf_written_checkpoints",[],ScalarType "int8"),("pg_stat_get_bgwriter_buf_written_clean",[],ScalarType "int8"),("pg_stat_get_bgwriter_maxwritten_clean",[],ScalarType "int8"),("pg_stat_get_bgwriter_requested_checkpoints",[],ScalarType "int8"),("pg_stat_get_bgwriter_timed_checkpoints",[],ScalarType "int8"),("pg_stat_get_blocks_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_blocks_hit",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_buf_alloc",[],ScalarType "int8"),("pg_stat_get_buf_written_backend",[],ScalarType "int8"),("pg_stat_get_db_blocks_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_blocks_hit",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_numbackends",[ScalarType "oid"],ScalarType "int4"),("pg_stat_get_db_tuples_deleted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_inserted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_returned",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_tuples_updated",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_xact_commit",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_db_xact_rollback",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_dead_tuples",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_function_calls",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_function_self_time",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_function_time",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_last_analyze_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_last_autoanalyze_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_last_autovacuum_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_last_vacuum_time",[ScalarType "oid"],ScalarType "timestamptz"),("pg_stat_get_live_tuples",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_numscans",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_deleted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_fetched",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_hot_updated",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_inserted",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_returned",[ScalarType "oid"],ScalarType "int8"),("pg_stat_get_tuples_updated",[ScalarType "oid"],ScalarType "int8"),("pg_stat_reset",[],Pseudo Void),("pg_stop_backup",[],ScalarType "text"),("pg_switch_xlog",[],ScalarType "text"),("pg_table_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_tablespace_databases",[ScalarType "oid"],SetOfType (ScalarType "oid")),("pg_tablespace_size",[ScalarType "name"],ScalarType "int8"),("pg_tablespace_size",[ScalarType "oid"],ScalarType "int8"),("pg_terminate_backend",[ScalarType "int4"],ScalarType "bool"),("pg_timezone_abbrevs",[],SetOfType (Pseudo Record)),("pg_timezone_names",[],SetOfType (Pseudo Record)),("pg_total_relation_size",[ScalarType "regclass"],ScalarType "int8"),("pg_try_advisory_lock",[ScalarType "int8"],ScalarType "bool"),("pg_try_advisory_lock",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_try_advisory_lock_shared",[ScalarType "int8"],ScalarType "bool"),("pg_try_advisory_lock_shared",[ScalarType "int4",ScalarType "int4"],ScalarType "bool"),("pg_ts_config_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_ts_dict_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_ts_parser_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_ts_template_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_type_is_visible",[ScalarType "oid"],ScalarType "bool"),("pg_typeof",[Pseudo Any],ScalarType "regtype"),("pg_xlogfile_name",[ScalarType "text"],ScalarType "text"),("pg_xlogfile_name_offset",[ScalarType "text"],Pseudo Record),("pi",[],ScalarType "float8"),("plainto_tsquery",[ScalarType "text"],ScalarType "tsquery"),("plainto_tsquery",[ScalarType "regconfig",ScalarType "text"],ScalarType "tsquery"),("point",[ScalarType "lseg"],ScalarType "point"),("point",[ScalarType "path"],ScalarType "point"),("point",[ScalarType "box"],ScalarType "point"),("point",[ScalarType "polygon"],ScalarType "point"),("point",[ScalarType "circle"],ScalarType "point"),("point",[ScalarType "float8",ScalarType "float8"],ScalarType "point"),("point_above",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_add",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_below",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_distance",[ScalarType "point",ScalarType "point"],ScalarType "float8"),("point_div",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_eq",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_horiz",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_in",[Pseudo Cstring],ScalarType "point"),("point_left",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_mul",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_ne",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_out",[ScalarType "point"],Pseudo Cstring),("point_recv",[Pseudo Internal],ScalarType "point"),("point_right",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("point_send",[ScalarType "point"],ScalarType "bytea"),("point_sub",[ScalarType "point",ScalarType "point"],ScalarType "point"),("point_vert",[ScalarType "point",ScalarType "point"],ScalarType "bool"),("poly_above",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_below",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_center",[ScalarType "polygon"],ScalarType "point"),("poly_contain",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_contain_pt",[ScalarType "polygon",ScalarType "point"],ScalarType "bool"),("poly_contained",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_distance",[ScalarType "polygon",ScalarType "polygon"],ScalarType "float8"),("poly_in",[Pseudo Cstring],ScalarType "polygon"),("poly_left",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_npoints",[ScalarType "polygon"],ScalarType "int4"),("poly_out",[ScalarType "polygon"],Pseudo Cstring),("poly_overabove",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overbelow",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overlap",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overleft",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_overright",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_recv",[Pseudo Internal],ScalarType "polygon"),("poly_right",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_same",[ScalarType "polygon",ScalarType "polygon"],ScalarType "bool"),("poly_send",[ScalarType "polygon"],ScalarType "bytea"),("polygon",[ScalarType "path"],ScalarType "polygon"),("polygon",[ScalarType "box"],ScalarType "polygon"),("polygon",[ScalarType "circle"],ScalarType "polygon"),("polygon",[ScalarType "int4",ScalarType "circle"],ScalarType "polygon"),("popen",[ScalarType "path"],ScalarType "path"),("position",[ScalarType "bytea",ScalarType "bytea"],ScalarType "int4"),("position",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("position",[ScalarType "bit",ScalarType "bit"],ScalarType "int4"),("positionjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("positionsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("postgresql_fdw_validator",[ArrayType (ScalarType "text"),ScalarType "oid"],ScalarType "bool"),("pow",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("pow",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("power",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("power",[ScalarType "numeric",ScalarType "numeric"],ScalarType "numeric"),("prsd_end",[Pseudo Internal],Pseudo Void),("prsd_headline",[Pseudo Internal,Pseudo Internal,ScalarType "tsquery"],Pseudo Internal),("prsd_lextype",[Pseudo Internal],Pseudo Internal),("prsd_nexttoken",[Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("prsd_start",[Pseudo Internal,ScalarType "int4"],Pseudo Internal),("pt_contained_circle",[ScalarType "point",ScalarType "circle"],ScalarType "bool"),("pt_contained_poly",[ScalarType "point",ScalarType "polygon"],ScalarType "bool"),("query_to_xml",[ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("query_to_xml_and_xmlschema",[ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("query_to_xmlschema",[ScalarType "text",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("querytree",[ScalarType "tsquery"],ScalarType "text"),("quote_ident",[ScalarType "text"],ScalarType "text"),("quote_literal",[ScalarType "text"],ScalarType "text"),("quote_literal",[Pseudo AnyElement],ScalarType "text"),("quote_nullable",[ScalarType "text"],ScalarType "text"),("quote_nullable",[Pseudo AnyElement],ScalarType "text"),("radians",[ScalarType "float8"],ScalarType "float8"),("radius",[ScalarType "circle"],ScalarType "float8"),("random",[],ScalarType "float8"),("record_eq",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_ge",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_gt",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],Pseudo Record),("record_le",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_lt",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_ne",[Pseudo Record,Pseudo Record],ScalarType "bool"),("record_out",[Pseudo Record],Pseudo Cstring),("record_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],Pseudo Record),("record_send",[Pseudo Record],ScalarType "bytea"),("regclass",[ScalarType "text"],ScalarType "regclass"),("regclassin",[Pseudo Cstring],ScalarType "regclass"),("regclassout",[ScalarType "regclass"],Pseudo Cstring),("regclassrecv",[Pseudo Internal],ScalarType "regclass"),("regclasssend",[ScalarType "regclass"],ScalarType "bytea"),("regconfigin",[Pseudo Cstring],ScalarType "regconfig"),("regconfigout",[ScalarType "regconfig"],Pseudo Cstring),("regconfigrecv",[Pseudo Internal],ScalarType "regconfig"),("regconfigsend",[ScalarType "regconfig"],ScalarType "bytea"),("regdictionaryin",[Pseudo Cstring],ScalarType "regdictionary"),("regdictionaryout",[ScalarType "regdictionary"],Pseudo Cstring),("regdictionaryrecv",[Pseudo Internal],ScalarType "regdictionary"),("regdictionarysend",[ScalarType "regdictionary"],ScalarType "bytea"),("regexeqjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("regexeqsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("regexnejoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("regexnesel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("regexp_matches",[ScalarType "text",ScalarType "text"],SetOfType (ArrayType (ScalarType "text"))),("regexp_matches",[ScalarType "text",ScalarType "text",ScalarType "text"],SetOfType (ArrayType (ScalarType "text"))),("regexp_replace",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("regexp_replace",[ScalarType "text",ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("regexp_split_to_array",[ScalarType "text",ScalarType "text"],ArrayType (ScalarType "text")),("regexp_split_to_array",[ScalarType "text",ScalarType "text",ScalarType "text"],ArrayType (ScalarType "text")),("regexp_split_to_table",[ScalarType "text",ScalarType "text"],SetOfType (ScalarType "text")),("regexp_split_to_table",[ScalarType "text",ScalarType "text",ScalarType "text"],SetOfType (ScalarType "text")),("regoperatorin",[Pseudo Cstring],ScalarType "regoperator"),("regoperatorout",[ScalarType "regoperator"],Pseudo Cstring),("regoperatorrecv",[Pseudo Internal],ScalarType "regoperator"),("regoperatorsend",[ScalarType "regoperator"],ScalarType "bytea"),("regoperin",[Pseudo Cstring],ScalarType "regoper"),("regoperout",[ScalarType "regoper"],Pseudo Cstring),("regoperrecv",[Pseudo Internal],ScalarType "regoper"),("regopersend",[ScalarType "regoper"],ScalarType "bytea"),("regprocedurein",[Pseudo Cstring],ScalarType "regprocedure"),("regprocedureout",[ScalarType "regprocedure"],Pseudo Cstring),("regprocedurerecv",[Pseudo Internal],ScalarType "regprocedure"),("regproceduresend",[ScalarType "regprocedure"],ScalarType "bytea"),("regprocin",[Pseudo Cstring],ScalarType "regproc"),("regprocout",[ScalarType "regproc"],Pseudo Cstring),("regprocrecv",[Pseudo Internal],ScalarType "regproc"),("regprocsend",[ScalarType "regproc"],ScalarType "bytea"),("regtypein",[Pseudo Cstring],ScalarType "regtype"),("regtypeout",[ScalarType "regtype"],Pseudo Cstring),("regtyperecv",[Pseudo Internal],ScalarType "regtype"),("regtypesend",[ScalarType "regtype"],ScalarType "bytea"),("reltime",[ScalarType "interval"],ScalarType "reltime"),("reltimeeq",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimege",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimegt",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimein",[Pseudo Cstring],ScalarType "reltime"),("reltimele",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimelt",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimene",[ScalarType "reltime",ScalarType "reltime"],ScalarType "bool"),("reltimeout",[ScalarType "reltime"],Pseudo Cstring),("reltimerecv",[Pseudo Internal],ScalarType "reltime"),("reltimesend",[ScalarType "reltime"],ScalarType "bytea"),("repeat",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("replace",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("round",[ScalarType "float8"],ScalarType "float8"),("round",[ScalarType "numeric"],ScalarType "numeric"),("round",[ScalarType "numeric",ScalarType "int4"],ScalarType "numeric"),("rpad",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("rpad",[ScalarType "text",ScalarType "int4",ScalarType "text"],ScalarType "text"),("rtrim",[ScalarType "text"],ScalarType "text"),("rtrim",[ScalarType "text",ScalarType "text"],ScalarType "text"),("scalargtjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("scalargtsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("scalarltjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("scalarltsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("schema_to_xml",[ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("schema_to_xml_and_xmlschema",[ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("schema_to_xmlschema",[ScalarType "name",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("session_user",[],ScalarType "name"),("set_bit",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("set_byte",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("set_config",[ScalarType "text",ScalarType "text",ScalarType "bool"],ScalarType "text"),("set_masklen",[ScalarType "cidr",ScalarType "int4"],ScalarType "cidr"),("set_masklen",[ScalarType "inet",ScalarType "int4"],ScalarType "inet"),("setseed",[ScalarType "float8"],Pseudo Void),("setval",[ScalarType "regclass",ScalarType "int8"],ScalarType "int8"),("setval",[ScalarType "regclass",ScalarType "int8",ScalarType "bool"],ScalarType "int8"),("setweight",[ScalarType "tsvector",ScalarType "char"],ScalarType "tsvector"),("shell_in",[Pseudo Cstring],Pseudo Opaque),("shell_out",[Pseudo Opaque],Pseudo Cstring),("shift_jis_2004_to_euc_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("shift_jis_2004_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("shobj_description",[ScalarType "oid",ScalarType "name"],ScalarType "text"),("sign",[ScalarType "float8"],ScalarType "float8"),("sign",[ScalarType "numeric"],ScalarType "numeric"),("similar_escape",[ScalarType "text",ScalarType "text"],ScalarType "text"),("sin",[ScalarType "float8"],ScalarType "float8"),("sjis_to_euc_jp",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("sjis_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("sjis_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("slope",[ScalarType "point",ScalarType "point"],ScalarType "float8"),("smgreq",[ScalarType "smgr",ScalarType "smgr"],ScalarType "bool"),("smgrin",[Pseudo Cstring],ScalarType "smgr"),("smgrne",[ScalarType "smgr",ScalarType "smgr"],ScalarType "bool"),("smgrout",[ScalarType "smgr"],Pseudo Cstring),("split_part",[ScalarType "text",ScalarType "text",ScalarType "int4"],ScalarType "text"),("sqrt",[ScalarType "float8"],ScalarType "float8"),("sqrt",[ScalarType "numeric"],ScalarType "numeric"),("statement_timestamp",[],ScalarType "timestamptz"),("string_to_array",[ScalarType "text",ScalarType "text"],ArrayType (ScalarType "text")),("strip",[ScalarType "tsvector"],ScalarType "tsvector"),("strpos",[ScalarType "text",ScalarType "text"],ScalarType "int4"),("substr",[ScalarType "bytea",ScalarType "int4"],ScalarType "bytea"),("substr",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("substr",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("substr",[ScalarType "text",ScalarType "int4",ScalarType "int4"],ScalarType "text"),("substring",[ScalarType "bytea",ScalarType "int4"],ScalarType "bytea"),("substring",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("substring",[ScalarType "text",ScalarType "text"],ScalarType "text"),("substring",[ScalarType "bit",ScalarType "int4"],ScalarType "bit"),("substring",[ScalarType "bytea",ScalarType "int4",ScalarType "int4"],ScalarType "bytea"),("substring",[ScalarType "text",ScalarType "int4",ScalarType "int4"],ScalarType "text"),("substring",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("substring",[ScalarType "bit",ScalarType "int4",ScalarType "int4"],ScalarType "bit"),("suppress_redundant_updates_trigger",[],Pseudo Trigger),("table_to_xml",[ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("table_to_xml_and_xmlschema",[ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("table_to_xmlschema",[ScalarType "regclass",ScalarType "bool",ScalarType "bool",ScalarType "text"],ScalarType "xml"),("tan",[ScalarType "float8"],ScalarType "float8"),("text",[ScalarType "bool"],ScalarType "text"),("text",[ScalarType "char"],ScalarType "text"),("text",[ScalarType "name"],ScalarType "text"),("text",[ScalarType "xml"],ScalarType "text"),("text",[ScalarType "inet"],ScalarType "text"),("text",[ScalarType "bpchar"],ScalarType "text"),("text_ge",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_gt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_larger",[ScalarType "text",ScalarType "text"],ScalarType "text"),("text_le",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_lt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_ge",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_gt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_le",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_pattern_lt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("text_smaller",[ScalarType "text",ScalarType "text"],ScalarType "text"),("textanycat",[ScalarType "text",Pseudo AnyNonArray],ScalarType "text"),("textcat",[ScalarType "text",ScalarType "text"],ScalarType "text"),("texteq",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticnlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticregexeq",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("texticregexne",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textin",[Pseudo Cstring],ScalarType "text"),("textlen",[ScalarType "text"],ScalarType "int4"),("textlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textne",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textnlike",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textout",[ScalarType "text"],Pseudo Cstring),("textrecv",[Pseudo Internal],ScalarType "text"),("textregexeq",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textregexne",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("textsend",[ScalarType "text"],ScalarType "bytea"),("thesaurus_init",[Pseudo Internal],Pseudo Internal),("thesaurus_lexize",[Pseudo Internal,Pseudo Internal,Pseudo Internal,Pseudo Internal],Pseudo Internal),("tideq",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidge",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidgt",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidin",[Pseudo Cstring],ScalarType "tid"),("tidlarger",[ScalarType "tid",ScalarType "tid"],ScalarType "tid"),("tidle",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidlt",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidne",[ScalarType "tid",ScalarType "tid"],ScalarType "bool"),("tidout",[ScalarType "tid"],Pseudo Cstring),("tidrecv",[Pseudo Internal],ScalarType "tid"),("tidsend",[ScalarType "tid"],ScalarType "bytea"),("tidsmaller",[ScalarType "tid",ScalarType "tid"],ScalarType "tid"),("time",[ScalarType "abstime"],ScalarType "time"),("time",[ScalarType "timestamp"],ScalarType "time"),("time",[ScalarType "timestamptz"],ScalarType "time"),("time",[ScalarType "interval"],ScalarType "time"),("time",[ScalarType "timetz"],ScalarType "time"),("time",[ScalarType "time",ScalarType "int4"],ScalarType "time"),("time_cmp",[ScalarType "time",ScalarType "time"],ScalarType "int4"),("time_eq",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_ge",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_gt",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_hash",[ScalarType "time"],ScalarType "int4"),("time_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "time"),("time_larger",[ScalarType "time",ScalarType "time"],ScalarType "time"),("time_le",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_lt",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_mi_interval",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("time_mi_time",[ScalarType "time",ScalarType "time"],ScalarType "interval"),("time_ne",[ScalarType "time",ScalarType "time"],ScalarType "bool"),("time_out",[ScalarType "time"],Pseudo Cstring),("time_pl_interval",[ScalarType "time",ScalarType "interval"],ScalarType "time"),("time_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "time"),("time_send",[ScalarType "time"],ScalarType "bytea"),("time_smaller",[ScalarType "time",ScalarType "time"],ScalarType "time"),("timedate_pl",[ScalarType "time",ScalarType "date"],ScalarType "timestamp"),("timemi",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("timenow",[],ScalarType "abstime"),("timeofday",[],ScalarType "text"),("timepl",[ScalarType "abstime",ScalarType "reltime"],ScalarType "abstime"),("timestamp",[ScalarType "abstime"],ScalarType "timestamp"),("timestamp",[ScalarType "date"],ScalarType "timestamp"),("timestamp",[ScalarType "timestamptz"],ScalarType "timestamp"),("timestamp",[ScalarType "date",ScalarType "time"],ScalarType "timestamp"),("timestamp",[ScalarType "timestamp",ScalarType "int4"],ScalarType "timestamp"),("timestamp_cmp",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "int4"),("timestamp_cmp_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "int4"),("timestamp_cmp_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "int4"),("timestamp_eq",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_eq_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_eq_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_ge",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_ge_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_ge_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_gt",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_gt_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_gt_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_hash",[ScalarType "timestamp"],ScalarType "int4"),("timestamp_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "timestamp"),("timestamp_larger",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "timestamp"),("timestamp_le",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_le_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_le_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_lt",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_lt_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_lt_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_mi",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "interval"),("timestamp_mi_interval",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("timestamp_ne",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "bool"),("timestamp_ne_date",[ScalarType "timestamp",ScalarType "date"],ScalarType "bool"),("timestamp_ne_timestamptz",[ScalarType "timestamp",ScalarType "timestamptz"],ScalarType "bool"),("timestamp_out",[ScalarType "timestamp"],Pseudo Cstring),("timestamp_pl_interval",[ScalarType "timestamp",ScalarType "interval"],ScalarType "timestamp"),("timestamp_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "timestamp"),("timestamp_send",[ScalarType "timestamp"],ScalarType "bytea"),("timestamp_smaller",[ScalarType "timestamp",ScalarType "timestamp"],ScalarType "timestamp"),("timestamptypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timestamptypmodout",[ScalarType "int4"],Pseudo Cstring),("timestamptz",[ScalarType "abstime"],ScalarType "timestamptz"),("timestamptz",[ScalarType "date"],ScalarType "timestamptz"),("timestamptz",[ScalarType "timestamp"],ScalarType "timestamptz"),("timestamptz",[ScalarType "date",ScalarType "time"],ScalarType "timestamptz"),("timestamptz",[ScalarType "date",ScalarType "timetz"],ScalarType "timestamptz"),("timestamptz",[ScalarType "timestamptz",ScalarType "int4"],ScalarType "timestamptz"),("timestamptz_cmp",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "int4"),("timestamptz_cmp_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "int4"),("timestamptz_cmp_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "int4"),("timestamptz_eq",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_eq_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_eq_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_ge",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_ge_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_ge_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_gt",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_gt_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_gt_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "timestamptz"),("timestamptz_larger",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "timestamptz"),("timestamptz_le",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_le_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_le_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_lt",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_lt_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_lt_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_mi",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "interval"),("timestamptz_mi_interval",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("timestamptz_ne",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "bool"),("timestamptz_ne_date",[ScalarType "timestamptz",ScalarType "date"],ScalarType "bool"),("timestamptz_ne_timestamp",[ScalarType "timestamptz",ScalarType "timestamp"],ScalarType "bool"),("timestamptz_out",[ScalarType "timestamptz"],Pseudo Cstring),("timestamptz_pl_interval",[ScalarType "timestamptz",ScalarType "interval"],ScalarType "timestamptz"),("timestamptz_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "timestamptz"),("timestamptz_send",[ScalarType "timestamptz"],ScalarType "bytea"),("timestamptz_smaller",[ScalarType "timestamptz",ScalarType "timestamptz"],ScalarType "timestamptz"),("timestamptztypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timestamptztypmodout",[ScalarType "int4"],Pseudo Cstring),("timetypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timetypmodout",[ScalarType "int4"],Pseudo Cstring),("timetz",[ScalarType "time"],ScalarType "timetz"),("timetz",[ScalarType "timestamptz"],ScalarType "timetz"),("timetz",[ScalarType "timetz",ScalarType "int4"],ScalarType "timetz"),("timetz_cmp",[ScalarType "timetz",ScalarType "timetz"],ScalarType "int4"),("timetz_eq",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_ge",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_gt",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_hash",[ScalarType "timetz"],ScalarType "int4"),("timetz_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "timetz"),("timetz_larger",[ScalarType "timetz",ScalarType "timetz"],ScalarType "timetz"),("timetz_le",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_lt",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_mi_interval",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("timetz_ne",[ScalarType "timetz",ScalarType "timetz"],ScalarType "bool"),("timetz_out",[ScalarType "timetz"],Pseudo Cstring),("timetz_pl_interval",[ScalarType "timetz",ScalarType "interval"],ScalarType "timetz"),("timetz_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "timetz"),("timetz_send",[ScalarType "timetz"],ScalarType "bytea"),("timetz_smaller",[ScalarType "timetz",ScalarType "timetz"],ScalarType "timetz"),("timetzdate_pl",[ScalarType "timetz",ScalarType "date"],ScalarType "timestamptz"),("timetztypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("timetztypmodout",[ScalarType "int4"],Pseudo Cstring),("timezone",[ScalarType "text",ScalarType "timestamp"],ScalarType "timestamptz"),("timezone",[ScalarType "text",ScalarType "timestamptz"],ScalarType "timestamp"),("timezone",[ScalarType "text",ScalarType "timetz"],ScalarType "timetz"),("timezone",[ScalarType "interval",ScalarType "timestamp"],ScalarType "timestamptz"),("timezone",[ScalarType "interval",ScalarType "timestamptz"],ScalarType "timestamp"),("timezone",[ScalarType "interval",ScalarType "timetz"],ScalarType "timetz"),("tinterval",[ScalarType "abstime",ScalarType "abstime"],ScalarType "tinterval"),("tintervalct",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalend",[ScalarType "tinterval"],ScalarType "abstime"),("tintervaleq",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalge",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalgt",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalin",[Pseudo Cstring],ScalarType "tinterval"),("tintervalle",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalleneq",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenge",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallengt",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenle",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenlt",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallenne",[ScalarType "tinterval",ScalarType "reltime"],ScalarType "bool"),("tintervallt",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalne",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalout",[ScalarType "tinterval"],Pseudo Cstring),("tintervalov",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalrecv",[Pseudo Internal],ScalarType "tinterval"),("tintervalrel",[ScalarType "tinterval"],ScalarType "reltime"),("tintervalsame",[ScalarType "tinterval",ScalarType "tinterval"],ScalarType "bool"),("tintervalsend",[ScalarType "tinterval"],ScalarType "bytea"),("tintervalstart",[ScalarType "tinterval"],ScalarType "abstime"),("to_ascii",[ScalarType "text"],ScalarType "text"),("to_ascii",[ScalarType "text",ScalarType "name"],ScalarType "text"),("to_ascii",[ScalarType "text",ScalarType "int4"],ScalarType "text"),("to_char",[ScalarType "int8",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "int4",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "float4",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "float8",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "timestamp",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "timestamptz",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "interval",ScalarType "text"],ScalarType "text"),("to_char",[ScalarType "numeric",ScalarType "text"],ScalarType "text"),("to_date",[ScalarType "text",ScalarType "text"],ScalarType "date"),("to_hex",[ScalarType "int8"],ScalarType "text"),("to_hex",[ScalarType "int4"],ScalarType "text"),("to_number",[ScalarType "text",ScalarType "text"],ScalarType "numeric"),("to_timestamp",[ScalarType "float8"],ScalarType "timestamptz"),("to_timestamp",[ScalarType "text",ScalarType "text"],ScalarType "timestamptz"),("to_tsquery",[ScalarType "text"],ScalarType "tsquery"),("to_tsquery",[ScalarType "regconfig",ScalarType "text"],ScalarType "tsquery"),("to_tsvector",[ScalarType "text"],ScalarType "tsvector"),("to_tsvector",[ScalarType "regconfig",ScalarType "text"],ScalarType "tsvector"),("transaction_timestamp",[],ScalarType "timestamptz"),("translate",[ScalarType "text",ScalarType "text",ScalarType "text"],ScalarType "text"),("trigger_in",[Pseudo Cstring],Pseudo Trigger),("trigger_out",[Pseudo Trigger],Pseudo Cstring),("trunc",[ScalarType "float8"],ScalarType "float8"),("trunc",[ScalarType "macaddr"],ScalarType "macaddr"),("trunc",[ScalarType "numeric"],ScalarType "numeric"),("trunc",[ScalarType "numeric",ScalarType "int4"],ScalarType "numeric"),("ts_debug",[ScalarType "text"],SetOfType (Pseudo Record)),("ts_debug",[ScalarType "regconfig",ScalarType "text"],SetOfType (Pseudo Record)),("ts_headline",[ScalarType "text",ScalarType "tsquery"],ScalarType "text"),("ts_headline",[ScalarType "text",ScalarType "tsquery",ScalarType "text"],ScalarType "text"),("ts_headline",[ScalarType "regconfig",ScalarType "text",ScalarType "tsquery"],ScalarType "text"),("ts_headline",[ScalarType "regconfig",ScalarType "text",ScalarType "tsquery",ScalarType "text"],ScalarType "text"),("ts_lexize",[ScalarType "regdictionary",ScalarType "text"],ArrayType (ScalarType "text")),("ts_match_qv",[ScalarType "tsquery",ScalarType "tsvector"],ScalarType "bool"),("ts_match_tq",[ScalarType "text",ScalarType "tsquery"],ScalarType "bool"),("ts_match_tt",[ScalarType "text",ScalarType "text"],ScalarType "bool"),("ts_match_vq",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "bool"),("ts_parse",[ScalarType "text",ScalarType "text"],SetOfType (Pseudo Record)),("ts_parse",[ScalarType "oid",ScalarType "text"],SetOfType (Pseudo Record)),("ts_rank",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank",[ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rank",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rank_cd",[ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank_cd",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery"],ScalarType "float4"),("ts_rank_cd",[ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rank_cd",[ArrayType (ScalarType "float4"),ScalarType "tsvector",ScalarType "tsquery",ScalarType "int4"],ScalarType "float4"),("ts_rewrite",[ScalarType "tsquery",ScalarType "text"],ScalarType "tsquery"),("ts_rewrite",[ScalarType "tsquery",ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("ts_stat",[ScalarType "text"],SetOfType (Pseudo Record)),("ts_stat",[ScalarType "text",ScalarType "text"],SetOfType (Pseudo Record)),("ts_token_type",[ScalarType "text"],SetOfType (Pseudo Record)),("ts_token_type",[ScalarType "oid"],SetOfType (Pseudo Record)),("ts_typanalyze",[Pseudo Internal],ScalarType "bool"),("tsmatchjoinsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int2",Pseudo Internal],ScalarType "float8"),("tsmatchsel",[Pseudo Internal,ScalarType "oid",Pseudo Internal,ScalarType "int4"],ScalarType "float8"),("tsq_mcontained",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsq_mcontains",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_and",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("tsquery_cmp",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "int4"),("tsquery_eq",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_ge",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_gt",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_le",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_lt",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_ne",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "bool"),("tsquery_not",[ScalarType "tsquery"],ScalarType "tsquery"),("tsquery_or",[ScalarType "tsquery",ScalarType "tsquery"],ScalarType "tsquery"),("tsqueryin",[Pseudo Cstring],ScalarType "tsquery"),("tsqueryout",[ScalarType "tsquery"],Pseudo Cstring),("tsqueryrecv",[Pseudo Internal],ScalarType "tsquery"),("tsquerysend",[ScalarType "tsquery"],ScalarType "bytea"),("tsvector_cmp",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "int4"),("tsvector_concat",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "tsvector"),("tsvector_eq",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_ge",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_gt",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_le",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_lt",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_ne",[ScalarType "tsvector",ScalarType "tsvector"],ScalarType "bool"),("tsvector_update_trigger",[],Pseudo Trigger),("tsvector_update_trigger_column",[],Pseudo Trigger),("tsvectorin",[Pseudo Cstring],ScalarType "tsvector"),("tsvectorout",[ScalarType "tsvector"],Pseudo Cstring),("tsvectorrecv",[Pseudo Internal],ScalarType "tsvector"),("tsvectorsend",[ScalarType "tsvector"],ScalarType "bytea"),("txid_current",[],ScalarType "int8"),("txid_current_snapshot",[],ScalarType "txid_snapshot"),("txid_snapshot_in",[Pseudo Cstring],ScalarType "txid_snapshot"),("txid_snapshot_out",[ScalarType "txid_snapshot"],Pseudo Cstring),("txid_snapshot_recv",[Pseudo Internal],ScalarType "txid_snapshot"),("txid_snapshot_send",[ScalarType "txid_snapshot"],ScalarType "bytea"),("txid_snapshot_xip",[ScalarType "txid_snapshot"],SetOfType (ScalarType "int8")),("txid_snapshot_xmax",[ScalarType "txid_snapshot"],ScalarType "int8"),("txid_snapshot_xmin",[ScalarType "txid_snapshot"],ScalarType "int8"),("txid_visible_in_snapshot",[ScalarType "int8",ScalarType "txid_snapshot"],ScalarType "bool"),("uhc_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("unknownin",[Pseudo Cstring],ScalarType "unknown"),("unknownout",[ScalarType "unknown"],Pseudo Cstring),("unknownrecv",[Pseudo Internal],ScalarType "unknown"),("unknownsend",[ScalarType "unknown"],ScalarType "bytea"),("unnest",[Pseudo AnyArray],SetOfType (Pseudo AnyElement)),("upper",[ScalarType "text"],ScalarType "text"),("utf8_to_ascii",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_big5",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_cn",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_jp",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_kr",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_euc_tw",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_gb18030",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_gbk",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_iso8859",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_iso8859_1",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_johab",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_koi8u",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_shift_jis_2004",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_sjis",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_uhc",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("utf8_to_win",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("uuid_cmp",[ScalarType "uuid",ScalarType "uuid"],ScalarType "int4"),("uuid_eq",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_ge",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_gt",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_hash",[ScalarType "uuid"],ScalarType "int4"),("uuid_in",[Pseudo Cstring],ScalarType "uuid"),("uuid_le",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_lt",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_ne",[ScalarType "uuid",ScalarType "uuid"],ScalarType "bool"),("uuid_out",[ScalarType "uuid"],Pseudo Cstring),("uuid_recv",[Pseudo Internal],ScalarType "uuid"),("uuid_send",[ScalarType "uuid"],ScalarType "bytea"),("varbit",[ScalarType "varbit",ScalarType "int4",ScalarType "bool"],ScalarType "varbit"),("varbit_in",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "varbit"),("varbit_out",[ScalarType "varbit"],Pseudo Cstring),("varbit_recv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "varbit"),("varbit_send",[ScalarType "varbit"],ScalarType "bytea"),("varbitcmp",[ScalarType "varbit",ScalarType "varbit"],ScalarType "int4"),("varbiteq",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitge",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitgt",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitle",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitlt",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbitne",[ScalarType "varbit",ScalarType "varbit"],ScalarType "bool"),("varbittypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("varbittypmodout",[ScalarType "int4"],Pseudo Cstring),("varchar",[ScalarType "name"],ScalarType "varchar"),("varchar",[ScalarType "varchar",ScalarType "int4",ScalarType "bool"],ScalarType "varchar"),("varcharin",[Pseudo Cstring,ScalarType "oid",ScalarType "int4"],ScalarType "varchar"),("varcharout",[ScalarType "varchar"],Pseudo Cstring),("varcharrecv",[Pseudo Internal,ScalarType "oid",ScalarType "int4"],ScalarType "varchar"),("varcharsend",[ScalarType "varchar"],ScalarType "bytea"),("varchartypmodin",[ArrayType (Pseudo Cstring)],ScalarType "int4"),("varchartypmodout",[ScalarType "int4"],Pseudo Cstring),("version",[],ScalarType "text"),("void_in",[Pseudo Cstring],Pseudo Void),("void_out",[Pseudo Void],Pseudo Cstring),("width",[ScalarType "box"],ScalarType "float8"),("width_bucket",[ScalarType "float8",ScalarType "float8",ScalarType "float8",ScalarType "int4"],ScalarType "int4"),("width_bucket",[ScalarType "numeric",ScalarType "numeric",ScalarType "numeric",ScalarType "int4"],ScalarType "int4"),("win1250_to_latin2",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1250_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win1251_to_win866",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_iso",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_koi8r",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_mic",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win866_to_win1251",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("win_to_utf8",[ScalarType "int4",ScalarType "int4",Pseudo Cstring,Pseudo Internal,ScalarType "int4"],Pseudo Void),("xideq",[ScalarType "xid",ScalarType "xid"],ScalarType "bool"),("xideqint4",[ScalarType "xid",ScalarType "int4"],ScalarType "bool"),("xidin",[Pseudo Cstring],ScalarType "xid"),("xidout",[ScalarType "xid"],Pseudo Cstring),("xidrecv",[Pseudo Internal],ScalarType "xid"),("xidsend",[ScalarType "xid"],ScalarType "bytea"),("xml",[ScalarType "text"],ScalarType "xml"),("xml_in",[Pseudo Cstring],ScalarType "xml"),("xml_out",[ScalarType "xml"],Pseudo Cstring),("xml_recv",[Pseudo Internal],ScalarType "xml"),("xml_send",[ScalarType "xml"],ScalarType "bytea"),("xmlcomment",[ScalarType "text"],ScalarType "xml"),("xmlconcat2",[ScalarType "xml",ScalarType "xml"],ScalarType "xml"),("xmlvalidate",[ScalarType "xml",ScalarType "text"],ScalarType "bool"),("xpath",[ScalarType "text",ScalarType "xml"],ArrayType (ScalarType "xml")),("xpath",[ScalarType "text",ScalarType "xml",ArrayType (ScalarType "text")],ArrayType (ScalarType "xml")),("array_agg",[Pseudo AnyElement],Pseudo AnyArray),("avg",[ScalarType "int8"],ScalarType "numeric"),("avg",[ScalarType "int2"],ScalarType "numeric"),("avg",[ScalarType "int4"],ScalarType "numeric"),("avg",[ScalarType "float4"],ScalarType "float8"),("avg",[ScalarType "float8"],ScalarType "float8"),("avg",[ScalarType "interval"],ScalarType "interval"),("avg",[ScalarType "numeric"],ScalarType "numeric"),("bit_and",[ScalarType "int8"],ScalarType "int8"),("bit_and",[ScalarType "int2"],ScalarType "int2"),("bit_and",[ScalarType "int4"],ScalarType "int4"),("bit_and",[ScalarType "bit"],ScalarType "bit"),("bit_or",[ScalarType "int8"],ScalarType "int8"),("bit_or",[ScalarType "int2"],ScalarType "int2"),("bit_or",[ScalarType "int4"],ScalarType "int4"),("bit_or",[ScalarType "bit"],ScalarType "bit"),("bool_and",[ScalarType "bool"],ScalarType "bool"),("bool_or",[ScalarType "bool"],ScalarType "bool"),("corr",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("count",[],ScalarType "int8"),("count",[Pseudo Any],ScalarType "int8"),("covar_pop",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("covar_samp",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("every",[ScalarType "bool"],ScalarType "bool"),("max",[ScalarType "int8"],ScalarType "int8"),("max",[ScalarType "int2"],ScalarType "int2"),("max",[ScalarType "int4"],ScalarType "int4"),("max",[ScalarType "text"],ScalarType "text"),("max",[ScalarType "oid"],ScalarType "oid"),("max",[ScalarType "tid"],ScalarType "tid"),("max",[ScalarType "float4"],ScalarType "float4"),("max",[ScalarType "float8"],ScalarType "float8"),("max",[ScalarType "abstime"],ScalarType "abstime"),("max",[ScalarType "money"],ScalarType "money"),("max",[ScalarType "bpchar"],ScalarType "bpchar"),("max",[ScalarType "date"],ScalarType "date"),("max",[ScalarType "time"],ScalarType "time"),("max",[ScalarType "timestamp"],ScalarType "timestamp"),("max",[ScalarType "timestamptz"],ScalarType "timestamptz"),("max",[ScalarType "interval"],ScalarType "interval"),("max",[ScalarType "timetz"],ScalarType "timetz"),("max",[ScalarType "numeric"],ScalarType "numeric"),("max",[Pseudo AnyArray],Pseudo AnyArray),("max",[Pseudo AnyEnum],Pseudo AnyEnum),("min",[ScalarType "int8"],ScalarType "int8"),("min",[ScalarType "int2"],ScalarType "int2"),("min",[ScalarType "int4"],ScalarType "int4"),("min",[ScalarType "text"],ScalarType "text"),("min",[ScalarType "oid"],ScalarType "oid"),("min",[ScalarType "tid"],ScalarType "tid"),("min",[ScalarType "float4"],ScalarType "float4"),("min",[ScalarType "float8"],ScalarType "float8"),("min",[ScalarType "abstime"],ScalarType "abstime"),("min",[ScalarType "money"],ScalarType "money"),("min",[ScalarType "bpchar"],ScalarType "bpchar"),("min",[ScalarType "date"],ScalarType "date"),("min",[ScalarType "time"],ScalarType "time"),("min",[ScalarType "timestamp"],ScalarType "timestamp"),("min",[ScalarType "timestamptz"],ScalarType "timestamptz"),("min",[ScalarType "interval"],ScalarType "interval"),("min",[ScalarType "timetz"],ScalarType "timetz"),("min",[ScalarType "numeric"],ScalarType "numeric"),("min",[Pseudo AnyArray],Pseudo AnyArray),("min",[Pseudo AnyEnum],Pseudo AnyEnum),("regr_avgx",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_avgy",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_count",[ScalarType "float8",ScalarType "float8"],ScalarType "int8"),("regr_intercept",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_r2",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_slope",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_sxx",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_sxy",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("regr_syy",[ScalarType "float8",ScalarType "float8"],ScalarType "float8"),("stddev",[ScalarType "int8"],ScalarType "numeric"),("stddev",[ScalarType "int2"],ScalarType "numeric"),("stddev",[ScalarType "int4"],ScalarType "numeric"),("stddev",[ScalarType "float4"],ScalarType "float8"),("stddev",[ScalarType "float8"],ScalarType "float8"),("stddev",[ScalarType "numeric"],ScalarType "numeric"),("stddev_pop",[ScalarType "int8"],ScalarType "numeric"),("stddev_pop",[ScalarType "int2"],ScalarType "numeric"),("stddev_pop",[ScalarType "int4"],ScalarType "numeric"),("stddev_pop",[ScalarType "float4"],ScalarType "float8"),("stddev_pop",[ScalarType "float8"],ScalarType "float8"),("stddev_pop",[ScalarType "numeric"],ScalarType "numeric"),("stddev_samp",[ScalarType "int8"],ScalarType "numeric"),("stddev_samp",[ScalarType "int2"],ScalarType "numeric"),("stddev_samp",[ScalarType "int4"],ScalarType "numeric"),("stddev_samp",[ScalarType "float4"],ScalarType "float8"),("stddev_samp",[ScalarType "float8"],ScalarType "float8"),("stddev_samp",[ScalarType "numeric"],ScalarType "numeric"),("sum",[ScalarType "int8"],ScalarType "numeric"),("sum",[ScalarType "int2"],ScalarType "int8"),("sum",[ScalarType "int4"],ScalarType "int8"),("sum",[ScalarType "float4"],ScalarType "float4"),("sum",[ScalarType "float8"],ScalarType "float8"),("sum",[ScalarType "money"],ScalarType "money"),("sum",[ScalarType "interval"],ScalarType "interval"),("sum",[ScalarType "numeric"],ScalarType "numeric"),("var_pop",[ScalarType "int8"],ScalarType "numeric"),("var_pop",[ScalarType "int2"],ScalarType "numeric"),("var_pop",[ScalarType "int4"],ScalarType "numeric"),("var_pop",[ScalarType "float4"],ScalarType "float8"),("var_pop",[ScalarType "float8"],ScalarType "float8"),("var_pop",[ScalarType "numeric"],ScalarType "numeric"),("var_samp",[ScalarType "int8"],ScalarType "numeric"),("var_samp",[ScalarType "int2"],ScalarType "numeric"),("var_samp",[ScalarType "int4"],ScalarType "numeric"),("var_samp",[ScalarType "float4"],ScalarType "float8"),("var_samp",[ScalarType "float8"],ScalarType "float8"),("var_samp",[ScalarType "numeric"],ScalarType "numeric"),("variance",[ScalarType "int8"],ScalarType "numeric"),("variance",[ScalarType "int2"],ScalarType "numeric"),("variance",[ScalarType "int4"],ScalarType "numeric"),("variance",[ScalarType "float4"],ScalarType "float8"),("variance",[ScalarType "float8"],ScalarType "float8"),("variance",[ScalarType "numeric"],ScalarType "numeric"),("xmlagg",[ScalarType "xml"],ScalarType "xml")], scopeAttrDefs = [("pg_aggregate",TableComposite,UnnamedCompositeType [("aggfnoid",ScalarType "regproc"),("aggtransfn",ScalarType "regproc"),("aggfinalfn",ScalarType "regproc"),("aggsortop",ScalarType "oid"),("aggtranstype",ScalarType "oid"),("agginitval",ScalarType "text")]),("pg_am",TableComposite,UnnamedCompositeType [("amname",ScalarType "name"),("amstrategies",ScalarType "int2"),("amsupport",ScalarType "int2"),("amcanorder",ScalarType "bool"),("amcanbackward",ScalarType "bool"),("amcanunique",ScalarType "bool"),("amcanmulticol",ScalarType "bool"),("amoptionalkey",ScalarType "bool"),("amindexnulls",ScalarType "bool"),("amsearchnulls",ScalarType "bool"),("amstorage",ScalarType "bool"),("amclusterable",ScalarType "bool"),("amkeytype",ScalarType "oid"),("aminsert",ScalarType "regproc"),("ambeginscan",ScalarType "regproc"),("amgettuple",ScalarType "regproc"),("amgetbitmap",ScalarType "regproc"),("amrescan",ScalarType "regproc"),("amendscan",ScalarType "regproc"),("ammarkpos",ScalarType "regproc"),("amrestrpos",ScalarType "regproc"),("ambuild",ScalarType "regproc"),("ambulkdelete",ScalarType "regproc"),("amvacuumcleanup",ScalarType "regproc"),("amcostestimate",ScalarType "regproc"),("amoptions",ScalarType "regproc")]),("pg_amop",TableComposite,UnnamedCompositeType [("amopfamily",ScalarType "oid"),("amoplefttype",ScalarType "oid"),("amoprighttype",ScalarType "oid"),("amopstrategy",ScalarType "int2"),("amopopr",ScalarType "oid"),("amopmethod",ScalarType "oid")]),("pg_amproc",TableComposite,UnnamedCompositeType [("amprocfamily",ScalarType "oid"),("amproclefttype",ScalarType "oid"),("amprocrighttype",ScalarType "oid"),("amprocnum",ScalarType "int2"),("amproc",ScalarType "regproc")]),("pg_attrdef",TableComposite,UnnamedCompositeType [("adrelid",ScalarType "oid"),("adnum",ScalarType "int2"),("adbin",ScalarType "text"),("adsrc",ScalarType "text")]),("pg_attribute",TableComposite,UnnamedCompositeType [("attrelid",ScalarType "oid"),("attname",ScalarType "name"),("atttypid",ScalarType "oid"),("attstattarget",ScalarType "int4"),("attlen",ScalarType "int2"),("attnum",ScalarType "int2"),("attndims",ScalarType "int4"),("attcacheoff",ScalarType "int4"),("atttypmod",ScalarType "int4"),("attbyval",ScalarType "bool"),("attstorage",ScalarType "char"),("attalign",ScalarType "char"),("attnotnull",ScalarType "bool"),("atthasdef",ScalarType "bool"),("attisdropped",ScalarType "bool"),("attislocal",ScalarType "bool"),("attinhcount",ScalarType "int4"),("attacl",ArrayType (ScalarType "aclitem"))]),("pg_auth_members",TableComposite,UnnamedCompositeType [("roleid",ScalarType "oid"),("member",ScalarType "oid"),("grantor",ScalarType "oid"),("admin_option",ScalarType "bool")]),("pg_authid",TableComposite,UnnamedCompositeType [("rolname",ScalarType "name"),("rolsuper",ScalarType "bool"),("rolinherit",ScalarType "bool"),("rolcreaterole",ScalarType "bool"),("rolcreatedb",ScalarType "bool"),("rolcatupdate",ScalarType "bool"),("rolcanlogin",ScalarType "bool"),("rolconnlimit",ScalarType "int4"),("rolpassword",ScalarType "text"),("rolvaliduntil",ScalarType "timestamptz"),("rolconfig",ArrayType (ScalarType "text"))]),("pg_cast",TableComposite,UnnamedCompositeType [("castsource",ScalarType "oid"),("casttarget",ScalarType "oid"),("castfunc",ScalarType "oid"),("castcontext",ScalarType "char"),("castmethod",ScalarType "char")]),("pg_class",TableComposite,UnnamedCompositeType [("relname",ScalarType "name"),("relnamespace",ScalarType "oid"),("reltype",ScalarType "oid"),("relowner",ScalarType "oid"),("relam",ScalarType "oid"),("relfilenode",ScalarType "oid"),("reltablespace",ScalarType "oid"),("relpages",ScalarType "int4"),("reltuples",ScalarType "float4"),("reltoastrelid",ScalarType "oid"),("reltoastidxid",ScalarType "oid"),("relhasindex",ScalarType "bool"),("relisshared",ScalarType "bool"),("relistemp",ScalarType "bool"),("relkind",ScalarType "char"),("relnatts",ScalarType "int2"),("relchecks",ScalarType "int2"),("relhasoids",ScalarType "bool"),("relhaspkey",ScalarType "bool"),("relhasrules",ScalarType "bool"),("relhastriggers",ScalarType "bool"),("relhassubclass",ScalarType "bool"),("relfrozenxid",ScalarType "xid"),("relacl",ArrayType (ScalarType "aclitem")),("reloptions",ArrayType (ScalarType "text"))]),("pg_constraint",TableComposite,UnnamedCompositeType [("conname",ScalarType "name"),("connamespace",ScalarType "oid"),("contype",ScalarType "char"),("condeferrable",ScalarType "bool"),("condeferred",ScalarType "bool"),("conrelid",ScalarType "oid"),("contypid",ScalarType "oid"),("confrelid",ScalarType "oid"),("confupdtype",ScalarType "char"),("confdeltype",ScalarType "char"),("confmatchtype",ScalarType "char"),("conislocal",ScalarType "bool"),("coninhcount",ScalarType "int4"),("conkey",ArrayType (ScalarType "int2")),("confkey",ArrayType (ScalarType "int2")),("conpfeqop",ArrayType (ScalarType "oid")),("conppeqop",ArrayType (ScalarType "oid")),("conffeqop",ArrayType (ScalarType "oid")),("conbin",ScalarType "text"),("consrc",ScalarType "text")]),("pg_conversion",TableComposite,UnnamedCompositeType [("conname",ScalarType "name"),("connamespace",ScalarType "oid"),("conowner",ScalarType "oid"),("conforencoding",ScalarType "int4"),("contoencoding",ScalarType "int4"),("conproc",ScalarType "regproc"),("condefault",ScalarType "bool")]),("pg_database",TableComposite,UnnamedCompositeType [("datname",ScalarType "name"),("datdba",ScalarType "oid"),("encoding",ScalarType "int4"),("datcollate",ScalarType "name"),("datctype",ScalarType "name"),("datistemplate",ScalarType "bool"),("datallowconn",ScalarType "bool"),("datconnlimit",ScalarType "int4"),("datlastsysoid",ScalarType "oid"),("datfrozenxid",ScalarType "xid"),("dattablespace",ScalarType "oid"),("datconfig",ArrayType (ScalarType "text")),("datacl",ArrayType (ScalarType "aclitem"))]),("pg_depend",TableComposite,UnnamedCompositeType [("classid",ScalarType "oid"),("objid",ScalarType "oid"),("objsubid",ScalarType "int4"),("refclassid",ScalarType "oid"),("refobjid",ScalarType "oid"),("refobjsubid",ScalarType "int4"),("deptype",ScalarType "char")]),("pg_description",TableComposite,UnnamedCompositeType [("objoid",ScalarType "oid"),("classoid",ScalarType "oid"),("objsubid",ScalarType "int4"),("description",ScalarType "text")]),("pg_enum",TableComposite,UnnamedCompositeType [("enumtypid",ScalarType "oid"),("enumlabel",ScalarType "name")]),("pg_foreign_data_wrapper",TableComposite,UnnamedCompositeType [("fdwname",ScalarType "name"),("fdwowner",ScalarType "oid"),("fdwvalidator",ScalarType "oid"),("fdwacl",ArrayType (ScalarType "aclitem")),("fdwoptions",ArrayType (ScalarType "text"))]),("pg_foreign_server",TableComposite,UnnamedCompositeType [("srvname",ScalarType "name"),("srvowner",ScalarType "oid"),("srvfdw",ScalarType "oid"),("srvtype",ScalarType "text"),("srvversion",ScalarType "text"),("srvacl",ArrayType (ScalarType "aclitem")),("srvoptions",ArrayType (ScalarType "text"))]),("pg_index",TableComposite,UnnamedCompositeType [("indexrelid",ScalarType "oid"),("indrelid",ScalarType "oid"),("indnatts",ScalarType "int2"),("indisunique",ScalarType "bool"),("indisprimary",ScalarType "bool"),("indisclustered",ScalarType "bool"),("indisvalid",ScalarType "bool"),("indcheckxmin",ScalarType "bool"),("indisready",ScalarType "bool"),("indkey",ScalarType "int2vector"),("indclass",ScalarType "oidvector"),("indoption",ScalarType "int2vector"),("indexprs",ScalarType "text"),("indpred",ScalarType "text")]),("pg_inherits",TableComposite,UnnamedCompositeType [("inhrelid",ScalarType "oid"),("inhparent",ScalarType "oid"),("inhseqno",ScalarType "int4")]),("pg_language",TableComposite,UnnamedCompositeType [("lanname",ScalarType "name"),("lanowner",ScalarType "oid"),("lanispl",ScalarType "bool"),("lanpltrusted",ScalarType "bool"),("lanplcallfoid",ScalarType "oid"),("lanvalidator",ScalarType "oid"),("lanacl",ArrayType (ScalarType "aclitem"))]),("pg_largeobject",TableComposite,UnnamedCompositeType [("loid",ScalarType "oid"),("pageno",ScalarType "int4"),("data",ScalarType "bytea")]),("pg_listener",TableComposite,UnnamedCompositeType [("relname",ScalarType "name"),("listenerpid",ScalarType "int4"),("notification",ScalarType "int4")]),("pg_namespace",TableComposite,UnnamedCompositeType [("nspname",ScalarType "name"),("nspowner",ScalarType "oid"),("nspacl",ArrayType (ScalarType "aclitem"))]),("pg_opclass",TableComposite,UnnamedCompositeType [("opcmethod",ScalarType "oid"),("opcname",ScalarType "name"),("opcnamespace",ScalarType "oid"),("opcowner",ScalarType "oid"),("opcfamily",ScalarType "oid"),("opcintype",ScalarType "oid"),("opcdefault",ScalarType "bool"),("opckeytype",ScalarType "oid")]),("pg_operator",TableComposite,UnnamedCompositeType [("oprname",ScalarType "name"),("oprnamespace",ScalarType "oid"),("oprowner",ScalarType "oid"),("oprkind",ScalarType "char"),("oprcanmerge",ScalarType "bool"),("oprcanhash",ScalarType "bool"),("oprleft",ScalarType "oid"),("oprright",ScalarType "oid"),("oprresult",ScalarType "oid"),("oprcom",ScalarType "oid"),("oprnegate",ScalarType "oid"),("oprcode",ScalarType "regproc"),("oprrest",ScalarType "regproc"),("oprjoin",ScalarType "regproc")]),("pg_opfamily",TableComposite,UnnamedCompositeType [("opfmethod",ScalarType "oid"),("opfname",ScalarType "name"),("opfnamespace",ScalarType "oid"),("opfowner",ScalarType "oid")]),("pg_pltemplate",TableComposite,UnnamedCompositeType [("tmplname",ScalarType "name"),("tmpltrusted",ScalarType "bool"),("tmpldbacreate",ScalarType "bool"),("tmplhandler",ScalarType "text"),("tmplvalidator",ScalarType "text"),("tmpllibrary",ScalarType "text"),("tmplacl",ArrayType (ScalarType "aclitem"))]),("pg_proc",TableComposite,UnnamedCompositeType [("proname",ScalarType "name"),("pronamespace",ScalarType "oid"),("proowner",ScalarType "oid"),("prolang",ScalarType "oid"),("procost",ScalarType "float4"),("prorows",ScalarType "float4"),("provariadic",ScalarType "oid"),("proisagg",ScalarType "bool"),("proiswindow",ScalarType "bool"),("prosecdef",ScalarType "bool"),("proisstrict",ScalarType "bool"),("proretset",ScalarType "bool"),("provolatile",ScalarType "char"),("pronargs",ScalarType "int2"),("pronargdefaults",ScalarType "int2"),("prorettype",ScalarType "oid"),("proargtypes",ScalarType "oidvector"),("proallargtypes",ArrayType (ScalarType "oid")),("proargmodes",ArrayType (ScalarType "char")),("proargnames",ArrayType (ScalarType "text")),("proargdefaults",ScalarType "text"),("prosrc",ScalarType "text"),("probin",ScalarType "bytea"),("proconfig",ArrayType (ScalarType "text")),("proacl",ArrayType (ScalarType "aclitem"))]),("pg_rewrite",TableComposite,UnnamedCompositeType [("rulename",ScalarType "name"),("ev_class",ScalarType "oid"),("ev_attr",ScalarType "int2"),("ev_type",ScalarType "char"),("ev_enabled",ScalarType "char"),("is_instead",ScalarType "bool"),("ev_qual",ScalarType "text"),("ev_action",ScalarType "text")]),("pg_shdepend",TableComposite,UnnamedCompositeType [("dbid",ScalarType "oid"),("classid",ScalarType "oid"),("objid",ScalarType "oid"),("objsubid",ScalarType "int4"),("refclassid",ScalarType "oid"),("refobjid",ScalarType "oid"),("deptype",ScalarType "char")]),("pg_shdescription",TableComposite,UnnamedCompositeType [("objoid",ScalarType "oid"),("classoid",ScalarType "oid"),("description",ScalarType "text")]),("pg_statistic",TableComposite,UnnamedCompositeType [("starelid",ScalarType "oid"),("staattnum",ScalarType "int2"),("stanullfrac",ScalarType "float4"),("stawidth",ScalarType "int4"),("stadistinct",ScalarType "float4"),("stakind1",ScalarType "int2"),("stakind2",ScalarType "int2"),("stakind3",ScalarType "int2"),("stakind4",ScalarType "int2"),("staop1",ScalarType "oid"),("staop2",ScalarType "oid"),("staop3",ScalarType "oid"),("staop4",ScalarType "oid"),("stanumbers1",ArrayType (ScalarType "float4")),("stanumbers2",ArrayType (ScalarType "float4")),("stanumbers3",ArrayType (ScalarType "float4")),("stanumbers4",ArrayType (ScalarType "float4")),("stavalues1",Pseudo AnyArray),("stavalues2",Pseudo AnyArray),("stavalues3",Pseudo AnyArray),("stavalues4",Pseudo AnyArray)]),("pg_tablespace",TableComposite,UnnamedCompositeType [("spcname",ScalarType "name"),("spcowner",ScalarType "oid"),("spclocation",ScalarType "text"),("spcacl",ArrayType (ScalarType "aclitem"))]),("pg_trigger",TableComposite,UnnamedCompositeType [("tgrelid",ScalarType "oid"),("tgname",ScalarType "name"),("tgfoid",ScalarType "oid"),("tgtype",ScalarType "int2"),("tgenabled",ScalarType "char"),("tgisconstraint",ScalarType "bool"),("tgconstrname",ScalarType "name"),("tgconstrrelid",ScalarType "oid"),("tgconstraint",ScalarType "oid"),("tgdeferrable",ScalarType "bool"),("tginitdeferred",ScalarType "bool"),("tgnargs",ScalarType "int2"),("tgattr",ScalarType "int2vector"),("tgargs",ScalarType "bytea")]),("pg_ts_config",TableComposite,UnnamedCompositeType [("cfgname",ScalarType "name"),("cfgnamespace",ScalarType "oid"),("cfgowner",ScalarType "oid"),("cfgparser",ScalarType "oid")]),("pg_ts_config_map",TableComposite,UnnamedCompositeType [("mapcfg",ScalarType "oid"),("maptokentype",ScalarType "int4"),("mapseqno",ScalarType "int4"),("mapdict",ScalarType "oid")]),("pg_ts_dict",TableComposite,UnnamedCompositeType [("dictname",ScalarType "name"),("dictnamespace",ScalarType "oid"),("dictowner",ScalarType "oid"),("dicttemplate",ScalarType "oid"),("dictinitoption",ScalarType "text")]),("pg_ts_parser",TableComposite,UnnamedCompositeType [("prsname",ScalarType "name"),("prsnamespace",ScalarType "oid"),("prsstart",ScalarType "regproc"),("prstoken",ScalarType "regproc"),("prsend",ScalarType "regproc"),("prsheadline",ScalarType "regproc"),("prslextype",ScalarType "regproc")]),("pg_ts_template",TableComposite,UnnamedCompositeType [("tmplname",ScalarType "name"),("tmplnamespace",ScalarType "oid"),("tmplinit",ScalarType "regproc"),("tmpllexize",ScalarType "regproc")]),("pg_type",TableComposite,UnnamedCompositeType [("typname",ScalarType "name"),("typnamespace",ScalarType "oid"),("typowner",ScalarType "oid"),("typlen",ScalarType "int2"),("typbyval",ScalarType "bool"),("typtype",ScalarType "char"),("typcategory",ScalarType "char"),("typispreferred",ScalarType "bool"),("typisdefined",ScalarType "bool"),("typdelim",ScalarType "char"),("typrelid",ScalarType "oid"),("typelem",ScalarType "oid"),("typarray",ScalarType "oid"),("typinput",ScalarType "regproc"),("typoutput",ScalarType "regproc"),("typreceive",ScalarType "regproc"),("typsend",ScalarType "regproc"),("typmodin",ScalarType "regproc"),("typmodout",ScalarType "regproc"),("typanalyze",ScalarType "regproc"),("typalign",ScalarType "char"),("typstorage",ScalarType "char"),("typnotnull",ScalarType "bool"),("typbasetype",ScalarType "oid"),("typtypmod",ScalarType "int4"),("typndims",ScalarType "int4"),("typdefaultbin",ScalarType "text"),("typdefault",ScalarType "text")]),("pg_user_mapping",TableComposite,UnnamedCompositeType [("umuser",ScalarType "oid"),("umserver",ScalarType "oid"),("umoptions",ArrayType (ScalarType "text"))]),("pg_cursors",ViewComposite,UnnamedCompositeType [("name",ScalarType "text"),("statement",ScalarType "text"),("is_holdable",ScalarType "bool"),("is_binary",ScalarType "bool"),("is_scrollable",ScalarType "bool"),("creation_time",ScalarType "timestamptz")]),("pg_group",ViewComposite,UnnamedCompositeType [("groname",ScalarType "name"),("grosysid",ScalarType "oid"),("grolist",ArrayType (ScalarType "oid"))]),("pg_indexes",ViewComposite,UnnamedCompositeType [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("indexname",ScalarType "name"),("tablespace",ScalarType "name"),("indexdef",ScalarType "text")]),("pg_locks",ViewComposite,UnnamedCompositeType [("locktype",ScalarType "text"),("database",ScalarType "oid"),("relation",ScalarType "oid"),("page",ScalarType "int4"),("tuple",ScalarType "int2"),("virtualxid",ScalarType "text"),("transactionid",ScalarType "xid"),("classid",ScalarType "oid"),("objid",ScalarType "oid"),("objsubid",ScalarType "int2"),("virtualtransaction",ScalarType "text"),("pid",ScalarType "int4"),("mode",ScalarType "text"),("granted",ScalarType "bool")]),("pg_prepared_statements",ViewComposite,UnnamedCompositeType [("name",ScalarType "text"),("statement",ScalarType "text"),("prepare_time",ScalarType "timestamptz"),("parameter_types",ArrayType (ScalarType "regtype")),("from_sql",ScalarType "bool")]),("pg_prepared_xacts",ViewComposite,UnnamedCompositeType [("transaction",ScalarType "xid"),("gid",ScalarType "text"),("prepared",ScalarType "timestamptz"),("owner",ScalarType "name"),("database",ScalarType "name")]),("pg_roles",ViewComposite,UnnamedCompositeType [("rolname",ScalarType "name"),("rolsuper",ScalarType "bool"),("rolinherit",ScalarType "bool"),("rolcreaterole",ScalarType "bool"),("rolcreatedb",ScalarType "bool"),("rolcatupdate",ScalarType "bool"),("rolcanlogin",ScalarType "bool"),("rolconnlimit",ScalarType "int4"),("rolpassword",ScalarType "text"),("rolvaliduntil",ScalarType "timestamptz"),("rolconfig",ArrayType (ScalarType "text")),("oid",ScalarType "oid")]),("pg_rules",ViewComposite,UnnamedCompositeType [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("rulename",ScalarType "name"),("definition",ScalarType "text")]),("pg_settings",ViewComposite,UnnamedCompositeType [("name",ScalarType "text"),("setting",ScalarType "text"),("unit",ScalarType "text"),("category",ScalarType "text"),("short_desc",ScalarType "text"),("extra_desc",ScalarType "text"),("context",ScalarType "text"),("vartype",ScalarType "text"),("source",ScalarType "text"),("min_val",ScalarType "text"),("max_val",ScalarType "text"),("enumvals",ArrayType (ScalarType "text")),("boot_val",ScalarType "text"),("reset_val",ScalarType "text"),("sourcefile",ScalarType "text"),("sourceline",ScalarType "int4")]),("pg_shadow",ViewComposite,UnnamedCompositeType [("usename",ScalarType "name"),("usesysid",ScalarType "oid"),("usecreatedb",ScalarType "bool"),("usesuper",ScalarType "bool"),("usecatupd",ScalarType "bool"),("passwd",ScalarType "text"),("valuntil",ScalarType "abstime"),("useconfig",ArrayType (ScalarType "text"))]),("pg_stat_activity",ViewComposite,UnnamedCompositeType [("datid",ScalarType "oid"),("datname",ScalarType "name"),("procpid",ScalarType "int4"),("usesysid",ScalarType "oid"),("usename",ScalarType "name"),("current_query",ScalarType "text"),("waiting",ScalarType "bool"),("xact_start",ScalarType "timestamptz"),("query_start",ScalarType "timestamptz"),("backend_start",ScalarType "timestamptz"),("client_addr",ScalarType "inet"),("client_port",ScalarType "int4")]),("pg_stat_all_indexes",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_scan",ScalarType "int8"),("idx_tup_read",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8")]),("pg_stat_all_tables",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("seq_scan",ScalarType "int8"),("seq_tup_read",ScalarType "int8"),("idx_scan",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8"),("n_tup_ins",ScalarType "int8"),("n_tup_upd",ScalarType "int8"),("n_tup_del",ScalarType "int8"),("n_tup_hot_upd",ScalarType "int8"),("n_live_tup",ScalarType "int8"),("n_dead_tup",ScalarType "int8"),("last_vacuum",ScalarType "timestamptz"),("last_autovacuum",ScalarType "timestamptz"),("last_analyze",ScalarType "timestamptz"),("last_autoanalyze",ScalarType "timestamptz")]),("pg_stat_bgwriter",ViewComposite,UnnamedCompositeType [("checkpoints_timed",ScalarType "int8"),("checkpoints_req",ScalarType "int8"),("buffers_checkpoint",ScalarType "int8"),("buffers_clean",ScalarType "int8"),("maxwritten_clean",ScalarType "int8"),("buffers_backend",ScalarType "int8"),("buffers_alloc",ScalarType "int8")]),("pg_stat_database",ViewComposite,UnnamedCompositeType [("datid",ScalarType "oid"),("datname",ScalarType "name"),("numbackends",ScalarType "int4"),("xact_commit",ScalarType "int8"),("xact_rollback",ScalarType "int8"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8"),("tup_returned",ScalarType "int8"),("tup_fetched",ScalarType "int8"),("tup_inserted",ScalarType "int8"),("tup_updated",ScalarType "int8"),("tup_deleted",ScalarType "int8")]),("pg_stat_sys_indexes",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_scan",ScalarType "int8"),("idx_tup_read",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8")]),("pg_stat_sys_tables",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("seq_scan",ScalarType "int8"),("seq_tup_read",ScalarType "int8"),("idx_scan",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8"),("n_tup_ins",ScalarType "int8"),("n_tup_upd",ScalarType "int8"),("n_tup_del",ScalarType "int8"),("n_tup_hot_upd",ScalarType "int8"),("n_live_tup",ScalarType "int8"),("n_dead_tup",ScalarType "int8"),("last_vacuum",ScalarType "timestamptz"),("last_autovacuum",ScalarType "timestamptz"),("last_analyze",ScalarType "timestamptz"),("last_autoanalyze",ScalarType "timestamptz")]),("pg_stat_user_functions",ViewComposite,UnnamedCompositeType [("funcid",ScalarType "oid"),("schemaname",ScalarType "name"),("funcname",ScalarType "name"),("calls",ScalarType "int8"),("total_time",ScalarType "int8"),("self_time",ScalarType "int8")]),("pg_stat_user_indexes",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_scan",ScalarType "int8"),("idx_tup_read",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8")]),("pg_stat_user_tables",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("seq_scan",ScalarType "int8"),("seq_tup_read",ScalarType "int8"),("idx_scan",ScalarType "int8"),("idx_tup_fetch",ScalarType "int8"),("n_tup_ins",ScalarType "int8"),("n_tup_upd",ScalarType "int8"),("n_tup_del",ScalarType "int8"),("n_tup_hot_upd",ScalarType "int8"),("n_live_tup",ScalarType "int8"),("n_dead_tup",ScalarType "int8"),("last_vacuum",ScalarType "timestamptz"),("last_autovacuum",ScalarType "timestamptz"),("last_analyze",ScalarType "timestamptz"),("last_autoanalyze",ScalarType "timestamptz")]),("pg_statio_all_indexes",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8")]),("pg_statio_all_sequences",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8")]),("pg_statio_all_tables",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("heap_blks_read",ScalarType "int8"),("heap_blks_hit",ScalarType "int8"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8"),("toast_blks_read",ScalarType "int8"),("toast_blks_hit",ScalarType "int8"),("tidx_blks_read",ScalarType "int8"),("tidx_blks_hit",ScalarType "int8")]),("pg_statio_sys_indexes",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8")]),("pg_statio_sys_sequences",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8")]),("pg_statio_sys_tables",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("heap_blks_read",ScalarType "int8"),("heap_blks_hit",ScalarType "int8"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8"),("toast_blks_read",ScalarType "int8"),("toast_blks_hit",ScalarType "int8"),("tidx_blks_read",ScalarType "int8"),("tidx_blks_hit",ScalarType "int8")]),("pg_statio_user_indexes",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("indexrelid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("indexrelname",ScalarType "name"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8")]),("pg_statio_user_sequences",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("blks_read",ScalarType "int8"),("blks_hit",ScalarType "int8")]),("pg_statio_user_tables",ViewComposite,UnnamedCompositeType [("relid",ScalarType "oid"),("schemaname",ScalarType "name"),("relname",ScalarType "name"),("heap_blks_read",ScalarType "int8"),("heap_blks_hit",ScalarType "int8"),("idx_blks_read",ScalarType "int8"),("idx_blks_hit",ScalarType "int8"),("toast_blks_read",ScalarType "int8"),("toast_blks_hit",ScalarType "int8"),("tidx_blks_read",ScalarType "int8"),("tidx_blks_hit",ScalarType "int8")]),("pg_stats",ViewComposite,UnnamedCompositeType [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("attname",ScalarType "name"),("null_frac",ScalarType "float4"),("avg_width",ScalarType "int4"),("n_distinct",ScalarType "float4"),("most_common_vals",Pseudo AnyArray),("most_common_freqs",ArrayType (ScalarType "float4")),("histogram_bounds",Pseudo AnyArray),("correlation",ScalarType "float4")]),("pg_tables",ViewComposite,UnnamedCompositeType [("schemaname",ScalarType "name"),("tablename",ScalarType "name"),("tableowner",ScalarType "name"),("tablespace",ScalarType "name"),("hasindexes",ScalarType "bool"),("hasrules",ScalarType "bool"),("hastriggers",ScalarType "bool")]),("pg_timezone_abbrevs",ViewComposite,UnnamedCompositeType [("abbrev",ScalarType "text"),("utc_offset",ScalarType "interval"),("is_dst",ScalarType "bool")]),("pg_timezone_names",ViewComposite,UnnamedCompositeType [("name",ScalarType "text"),("abbrev",ScalarType "text"),("utc_offset",ScalarType "interval"),("is_dst",ScalarType "bool")]),("pg_user",ViewComposite,UnnamedCompositeType [("usename",ScalarType "name"),("usesysid",ScalarType "oid"),("usecreatedb",ScalarType "bool"),("usesuper",ScalarType "bool"),("usecatupd",ScalarType "bool"),("passwd",ScalarType "text"),("valuntil",ScalarType "abstime"),("useconfig",ArrayType (ScalarType "text"))]),("pg_user_mappings",ViewComposite,UnnamedCompositeType [("umid",ScalarType "oid"),("srvid",ScalarType "oid"),("srvname",ScalarType "name"),("umuser",ScalarType "oid"),("usename",ScalarType "name"),("umoptions",ArrayType (ScalarType "text"))]),("pg_views",ViewComposite,UnnamedCompositeType [("schemaname",ScalarType "name"),("viewname",ScalarType "name"),("viewowner",ScalarType "name"),("definition",ScalarType "text")])], scopeAttrSystemColumns = [("pg_aggregate",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_am",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_amop",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_amproc",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_attrdef",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_attribute",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_auth_members",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_authid",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_cast",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_class",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_constraint",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_conversion",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_database",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_depend",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_description",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_enum",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_foreign_data_wrapper",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_foreign_server",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_index",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_inherits",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_language",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_largeobject",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_listener",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_namespace",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_opclass",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_operator",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_opfamily",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_pltemplate",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_proc",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_rewrite",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_shdepend",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_shdescription",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_statistic",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_tablespace",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_trigger",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_ts_config",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_ts_config_map",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("ctid",ScalarType "tid")]),("pg_ts_dict",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_ts_parser",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_ts_template",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_type",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")]),("pg_user_mapping",TableComposite,UnnamedCompositeType [("tableoid",ScalarType "oid"),("cmax",ScalarType "cid"),("xmax",ScalarType "xid"),("cmin",ScalarType "cid"),("xmin",ScalarType "xid"),("oid",ScalarType "oid"),("ctid",ScalarType "tid")])], scopeIdentifierTypes = [], scopeJoinIdentifiers = []}
− Database/HsSqlPpp/TypeChecking/DefaultScopeEmpty.hs
@@ -1,23 +0,0 @@-{-# OPTIONS_HADDOCK hide #-}-{--Copyright 2009 Jake Wheat--If you change the scope datatype, the DefaultScope.hs file will be-invalid, and you can't use HsSqlSystem to generate a new one since it-depends on DefaultScope. The solution is to copy this file over-DefaultScope. You can then use HsSqlSystem to generate a new default-scope file.--TODO: don't use show to save and load the default scope, use-data.binary to serialize and unserialize it.---}--module Database.HsSqlPpp.TypeChecking.DefaultScope where--import Database.HsSqlPpp.TypeChecking.TypeType-import Database.HsSqlPpp.TypeChecking.ScopeData---defaultScope :: Scope-defaultScope = emptyScope
− Database/HsSqlPpp/TypeChecking/Scope.lhs
@@ -1,37 +0,0 @@-Copyright 2009 Jake Wheat--This module just forwards the public components of ScopeData,-ScopeReader and DefaultScope. Some of the exported functions in-ScopeData are only used by the type checker and are not fowarded.-Don't really know if using the word scope for this is correct English?--> {- | This module contains the scope data type and a few helper functions,->  not really ready for public consumption yet. It serves the following purposes:->->  * contains all the catalog information needed to type check against an existing database->->  * a copy of the catalog information from a default template1->     database is included - 'defaultScope', at some point this will allow typechecking->     sql code against this catalog without having an available->    postgresql install .->->  * it is also used internally in the type checker to hold identifiers->     valid and their types in a given context, and to build the->     additional catalog information so that e.g. a sql file containing->     a create table followed by a select from that table will type->     check ok. (This isn't quite working yet but it's almost there.)-> -}-> module Database.HsSqlPpp.TypeChecking.Scope->     (->     --fowarded scopedata->      Scope(..)->      ,QualifiedScope->      ,emptyScope->      ,combineScopes->      ,readScope->      ,defaultScope-> ) where--> import Database.HsSqlPpp.TypeChecking.ScopeData-> import Database.HsSqlPpp.TypeChecking.ScopeReader-> import Database.HsSqlPpp.TypeChecking.DefaultScope
− Database/HsSqlPpp/TypeChecking/ScopeData.lhs
@@ -1,148 +0,0 @@-Copyright 2009 Jake Wheat--Represents the types, identifiers, etc available. Used internally for-static and changing scopes in the type checker, as well as the input-to the type checking routines if you want to supply different/extra-definitions before type checking something, and you're not getting the-extra definitions from an accessible database.--> {-# OPTIONS_HADDOCK hide #-}--> module Database.HsSqlPpp.TypeChecking.ScopeData->     (->      Scope(..)->      ,QualifiedScope->      ,emptyScope->      ,scopeReplaceIds->      ,scopeLookupID->      ,scopeExpandStar->      ,combineScopes->     ) where--> import Data.List-> import Debug.Trace--> import Database.HsSqlPpp.TypeChecking.TypeType--> data Scope = Scope {scopeTypes :: [Type]->                    ,scopeTypeNames :: [(String, Type)]->                    ,scopeDomainDefs :: [DomainDefinition]->                    ,scopeCasts :: [(Type,Type,CastContext)]->                    ,scopeTypeCategories :: [(Type,String,Bool)]->                    ,scopePrefixOperators :: [FunctionPrototype]->                    ,scopePostfixOperators :: [FunctionPrototype]->                    ,scopeBinaryOperators :: [FunctionPrototype]->                    ,scopeFunctions :: [FunctionPrototype]->                    ,scopeAggregates :: [FunctionPrototype]->                     --this should be done better:->                    ,scopeAllFns :: [FunctionPrototype]->                    ,scopeAttrDefs :: [CompositeDef]->                    ,scopeAttrSystemColumns :: [CompositeDef]->                    ,scopeIdentifierTypes :: [QualifiedScope]->                    ,scopeJoinIdentifiers :: [String]}->            deriving (Eq,Show)--= Attribute identifier scoping--The way this scoping works is we have a list of prefixes/namespaces,-which is generally the table/view name, or the alias given to it, and-then a list of identifiers (with no dots) and their types. When we-look up the type of an identifier, if it has an correlation name we-try to match that against a table name or alias in that list, if it is-not present or not unique then throw an error. Similarly with no-correlation name, we look at all the lists, if the id is not present-or not unique then throw an error.--scopeIdentifierTypes is for expanding *. If we want to access the-common attributes from one of the tables in a using or natural join,-this attribute can be qualified with either of the table names/-aliases. But when we expand the *, we only output these common fields-once, so keep a separate list of these fields used just for expanding-the star. The other twist is that these common fields appear first in-the resultant field list.--System columns: pg also has these - they have names and types like-other attributes, but are not included when expanding stars, so you-only get them when you explicitly ask for them. The main use is using-the oid system column which is heavily used as a target for foreign-key references in the pg catalog.--> type QualifiedScope = (String, ([(String,Type)], [(String,Type)]))--> -- | scope containing nothing-> emptyScope :: Scope-> emptyScope = Scope [] [] [] [] [] [] [] [] [] [] [] [] [] [] []--> scopeReplaceIds :: Scope -> [QualifiedScope] -> [String] -> Scope-> scopeReplaceIds scope ids commonJoinFields =->     scope { scopeIdentifierTypes = ids->           ,scopeJoinIdentifiers = commonJoinFields }--> catPair :: ([a],[a]) -> [a]-> catPair = uncurry (++)--> scopeLookupID :: Scope -> String -> String -> Either [TypeError] Type-> scopeLookupID scope correlationName iden =->   if correlationName == ""->     then let types = concatMap (filter (\ (s, _) -> s == iden))->                        (map (catPair.snd) $ scopeIdentifierTypes scope)->          in case length types of->                 0 -> Left [UnrecognisedIdentifier iden]->                 1 -> Right $ (snd . head) types->                 _ -> --see if this identifier is in the join list->                      if iden `elem` scopeJoinIdentifiers scope->                        then Right $ (snd . head) types->                        else Left [AmbiguousIdentifier iden]->     else case lookup correlationName (scopeIdentifierTypes scope) of->            Nothing -> Left [UnrecognisedCorrelationName correlationName]->            Just s -> case lookup iden (catPair s) of->                        Nothing -> Left [UnrecognisedIdentifier $ correlationName ++ "." ++ iden]->                        Just t -> Right t--> scopeExpandStar :: Scope -> String -> Either [TypeError] [(String,Type)]-> scopeExpandStar scope correlationName =->     if correlationName == ""->       then let allFields = concatMap (fst.snd) $ scopeIdentifierTypes scope->                (commonFields,uncommonFields) =->                   partition (\(a,_) -> a `elem` scopeJoinIdentifiers scope) allFields->            in Right $ nub commonFields ++ uncommonFields->       else->           case lookup correlationName $ scopeIdentifierTypes scope of->             Nothing -> Left [UnrecognisedCorrelationName correlationName]->             Just s -> Right $ fst s---> -- | combine two scopes, e.g. this can be used to take the default scope and-> -- add a few definitions to it before type checking an ast-> combineScopes :: Scope -- ^ base scope->               -> Scope -- ^ additional scope - this adds to and overrides items in the base scope->               -> Scope-> --base, overrides-> combineScopes (Scope bt btn bdod bc btc bpre bpost bbin bf bagg baf bcd basc _ _)->               (Scope ot otn odod oc otc opre opost obin off oagg oaf ocd oasc oi oji) =->   Scope (funion ot bt)->         (funion otn btn)->         (funion odod bdod)->         (funion oc bc)->         (funion otc btc)->         (funion opre bpre)->         (funion opost bpost)->         (funion obin bbin)->         (funion off bf)->         (funion oagg bagg)->         (funion oaf baf)->         (funion ocd bcd)->         (funion oasc basc)->         oi -- overwrites old scopes, might need to be looked at again->         oji->   where->     --without this it runs very slowly - guessing because it creates->     --a lot of garbage->     funion a b = case () of->                    _ | a == [] -> b->                      | b == [] -> a->                      | otherwise -> union a b--combine scopes still seems to run slowly, so change it so that it-chains scope lookups along a list of scopes instead of unioning the-individual lists.
− Database/HsSqlPpp/TypeChecking/ScopeReader.lhs
@@ -1,233 +0,0 @@-Copyright 2009 Jake Wheat--This file contains the code to read all the scope data from a-postgresql database catalog. This is used to generate the default-scope, and to type check against a database schema in a live database.--It basically runs through each field in the Scope data type and reads-the values for that field out of the database, and turns it into the-appropriate data types.--Maps are use to hold oids during this process to e.g. hook up the-types of table columns (which are read as oids which refer to the-pg_type table) to the haskell values represent those types. These maps-are discarded after the Scope value is created.--> {-# OPTIONS_HADDOCK hide #-}--> module Database.HsSqlPpp.TypeChecking.ScopeReader (readScope) where--> import qualified Data.Map as M-> import Data.Maybe--> import Debug.Trace--> import Database.HsSqlPpp.Dbms.DBAccess-> import Database.HsSqlPpp.TypeChecking.ScopeData-> import Database.HsSqlPpp.TypeChecking.TypeType--> -- | creates a scope value from the database given-> readScope :: String -- ^ name of the database to read->           -> IO Scope-> readScope dbName = withConn ("dbname=" ++ dbName) $ \conn -> do->    typeInfo <- selectRelation conn->                  "select t.oid as oid,\n\->                  \       t.typtype,\n\->                  \       t.typname,\n\->                  \       t.typarray,\n\->                  \       coalesce(e.typtype,'0') as atyptype,\n\->                  \       e.oid as aoid,\n\->                  \       e.typname as atypname\n\->                  \  from pg_catalog.pg_type t\n\->                  \  left outer join pg_type e\n\->                  \    on t.typarray = e.oid\n\->                  \  where pg_catalog.pg_type_is_visible(t.oid)\n\->                  \   and not exists(select 1 from pg_catalog.pg_type el\n\->                  \                       where el.typarray = t.oid)\n\->                  \  order by t.typname;" []->    let typeStuff = concatMap convTypeInfoRow typeInfo->        typeAssoc = map (\(a,b,_) -> (a,b)) typeStuff->        typeMap = M.fromList typeAssoc->        types = map snd typeAssoc->        typeNames = map (\(_,a,b) -> (b,a)) typeStuff-->    domainDefInfo <- selectRelation conn->                       "select oid, typbasetype\n\->                       \from pg_type where typtype = 'd'\n\->                       \     and  pg_catalog.pg_type_is_visible(oid);" []->    let jlt k = fromJust $ M.lookup k typeMap->    let domainDefs = map (\l -> (jlt (l!!0),  jlt (l!!1))) domainDefInfo->    let domainCasts = map (\(t,b) ->(t,b,ImplicitCastContext)) domainDefs->    castInfo <- selectRelation conn->                  "select castsource,casttarget,castcontext from pg_cast;" []->    let casts = domainCasts ++ flip map castInfo->                  (\l -> (jlt (l!!0), jlt (l!!1),->                          case (l!!2) of->                                      "a" -> AssignmentCastContext->                                      "i" -> ImplicitCastContext->                                      "e" -> ExplicitCastContext->                                      _ -> error $ "internal error: unknown cast context " ++ (l!!2)))->    typeCatInfo <- selectRelation conn->                        "select pg_type.oid, typcategory, typispreferred from pg_type\n\->                        \where pg_catalog.pg_type_is_visible(pg_type.oid);" []->    let typeCats = flip map typeCatInfo->                     (\l -> (jlt (l!!0), l!!1, read (l!!2)::Bool))->    operatorInfo <- selectRelation conn->                        "select oprname,\n\->                        \       oprleft,\n\->                        \       oprright,\n\->                        \       oprresult\n\->                        \from pg_operator\n\->                        \      where not (oprleft <> 0 and oprright <> 0\n\->                        \         and oprname = '@') --hack for now\n\->                        \      order by oprname;" []->    let getOps a b c [] = (a,b,c)->        getOps pref post bin (l:ls) =->          let bit = (\a -> (l!!0, a, jlt(l!!3)))->          in case () of->                   _ | l!!1 == "0" -> getOps (bit [jlt (l!!2)]:pref) post bin ls->                     | l!!2 == "0" -> getOps pref (bit [jlt (l!!1)]:post) bin ls->                     | otherwise -> getOps pref post (bit [jlt (l!!1), jlt (l!!2)]:bin) ls->    let (prefixOps, postfixOps, binaryOps) = getOps [] [] [] operatorInfo->    functionInfo <- selectRelation conn->                       "select proname,\n\->                       \       array_to_string(proargtypes,','),\n\->                       \       proretset,\n\->                       \       prorettype\n\->                       \from pg_proc\n\->                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\->                       \      and provariadic = 0\n\->                       \      and not proisagg\n\->                       \      and not proiswindow\n\->                       \order by proname,proargtypes;" []->    let fnProts = map (convFnRow jlt) functionInfo-->    aggregateInfo <- selectRelation conn->                       "select proname,\n\->                       \       array_to_string(proargtypes,','),\n\->                       \       proretset,\n\->                       \       prorettype\n\->                       \from pg_proc\n\->                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\->                       \      and provariadic = 0\n\->                       \      and proisagg\n\->                       \order by proname,proargtypes;" []->    let aggProts = map (convFnRow jlt) aggregateInfo--->    attrInfo <- selectRelation conn->                   "select distinct\n\->                   \   cls.relkind,\n\->                   \   cls.relname,\n\->                   \     array_to_string(\n\->                   \       array_agg(attname || ';' || atttypid)\n\->                   \          over (partition by relname order by attnum\n\->                   \               range between unbounded preceding\n\->                   \               and unbounded following)\n\->                   \      ,',')\n\->                   \ from pg_attribute att\n\->                   \ inner join pg_class cls\n\->                   \   on cls.oid = attrelid\n\->                   \ where\n\->                   \   pg_catalog.pg_table_is_visible(cls.oid)\n\->                   \   and cls.relkind in ('r','v','c')\n\->                   \   and not attisdropped\n\->                   \   and attnum > 0\n\->                   \ order by relkind, relname;" []->    let attrs = map (convAttrRow jlt) attrInfo-->    systemAttrInfo <- selectRelation conn->                   "select distinct\n\->                   \   cls.relkind,\n\->                   \   cls.relname,\n\->                   \     array_to_string(\n\->                   \       array_agg(attname || ';' || atttypid)\n\->                   \          over (partition by relname order by attnum\n\->                   \               range between unbounded preceding\n\->                   \               and unbounded following)\n\->                   \      ,',')\n\->                   \ from pg_attribute att\n\->                   \ inner join pg_class cls\n\->                   \   on cls.oid = attrelid\n\->                   \ where\n\->                   \   pg_catalog.pg_table_is_visible(cls.oid)\n\->                   \   and cls.relkind in ('r','v','c')\n\->                   \   and not attisdropped\n\->                   \   and attnum < 0\n\->                   \ order by relkind, relname;" []->    let systemAttrs = map (convAttrRow jlt) systemAttrInfo-->    return   Scope {scopeTypes = types->                   ,scopeTypeNames = typeNames->                   ,scopeDomainDefs = domainDefs->                   ,scopeCasts = casts->                   ,scopeTypeCategories = typeCats->                   ,scopePrefixOperators = prefixOps->                   ,scopePostfixOperators = postfixOps->                   ,scopeBinaryOperators =  binaryOps->                   ,scopeFunctions = fnProts->                   ,scopeAggregates =  aggProts->                   ,scopeAllFns = (prefixOps ++ postfixOps ++->                                   binaryOps ++ fnProts ++ aggProts)->                   ,scopeAttrDefs = attrs->                   ,scopeAttrSystemColumns = systemAttrs->                   ,scopeIdentifierTypes = []->                   ,scopeJoinIdentifiers = []}-->    where->      convAttrRow jlt l =->         (l!!1, ty, atts)->          where->            ty = case l!!0 of->                   "r" -> TableComposite->                   "v" -> ViewComposite->                   "c" -> Composite->                   x -> error $ "internal error: unknown composite type: " ++ x->            atts = let ps = split ',' (l!!2)->                       ps1 = map (split ';') ps->                   in UnnamedCompositeType $ map (\pl -> (head pl, jlt (pl!!1))) ps1->      convFnRow jlt l =->         (head l,fnArgs,fnRet)->         where->           fnRet = let rt1 = jlt (l!!3)->                   in if read (l!!2)::Bool->                        then SetOfType rt1->                        else rt1->           fnArgs = if (l!!1) == ""->                      then []->                      else let a = split ',' (l!!1)->                           in map jlt a->      convTypeInfoRow l =->        let name = (l!!2)->            ctor = case (l!!1) of->                     "b" -> ScalarType->                     "c" -> CompositeType->                     "d" -> DomainType->                     "e" -> EnumType->                     "p" -> (\t -> Pseudo (case t of->                                                  "any" -> Any->                                                  "anyarray" -> AnyArray->                                                  "anyelement" -> AnyElement->                                                  "anyenum" -> AnyEnum->                                                  "anynonarray" -> AnyNonArray->                                                  "cstring" -> Cstring->                                                  "internal" -> Internal->                                                  "language_handler" -> LanguageHandler->                                                  "opaque" -> Opaque->                                                  "record" -> Record->                                                  "trigger" -> Trigger->                                                  "void" -> Void->                                                  _ -> error $ "internal error: unknown pseudo " ++ t))->                     _ -> error $ "internal error: unknown type type: " ++ (l !! 1)->            scType = (head l, ctor name, name)->        in if (l!!4) /= "0"->           then [(l!!5,ArrayType $ ctor name, '_':name), scType]->           else [scType]---> split :: Char -> String -> [String]-> split _ ""                =  []-> split c s                 =  let (l, s') = break (== c) s->                            in  l : case s' of->                                            [] -> []->                                            (_:s'') -> split c s''
− Database/HsSqlPpp/TypeChecking/TypeChecker.lhs
@@ -1,61 +0,0 @@-Copyright 2009 Jake Wheat--This is the public module for the type checking functionality.--> {- | Contains the data types and functions for annotating->  an ast and working with annotated trees, including the->  representations of SQL data types.->-> Annotations:->-> * are attached to some of the ast node data types, but not all of them (yet?);->-> * types annotations are attached to most nodes;->-> * type errors are attached to the lowest down node that the type error is detected at;->-> * nodes who fail the type check or whose type depends on a node with a type error are->   given the type 'TypeCheckFailed';->-> * each statement has an additional 'StatementInfo' annotation attached to it;->-> * the parser fills in the source position nodes, but doesn't do a great job yet.->-> -}-> module Database.HsSqlPpp.TypeChecking.TypeChecker->     (->      -- * Annotation type->      Annotation->     ,AnnotationElement(..)->      -- * SQL types->     ,Type (..)->     ,PseudoType (..)->      -- * Type errors->     ,TypeError (..)->      -- * Statement info->      -- | This is the main annotation attached to each statement. Early days at the moment->      -- but will be expanded to provide any type errors lurking inside a statement, any useful->      -- types, e.g. the types of each select and subselect/sub query in a statement,->      -- any changes to the catalog the statement makes, and possibly much more information.->     ,StatementInfo(..)->      -- * Additional types->      -- | Used in Scope and type checking.->     ,DomainDefinition->     ,FunctionPrototype->     ,CastContext->     ,CompositeDef->     ,CompositeFlavour->      -- * Annotation functions->     ,annotateAst->     ,annotateAstScope->     ,annotateExpression->      -- * Annotated tree utils->     ,getTopLevelTypes->     ,getTopLevelInfos->     ,getTypeErrors->     ,stripAnnotations->     ) where--> import Database.HsSqlPpp.TypeChecking.AstInternal-> import Database.HsSqlPpp.TypeChecking.TypeType-> import Database.HsSqlPpp.TypeChecking.AstAnnotation
− Database/HsSqlPpp/TypeChecking/TypeChecking.ag
@@ -1,1086 +0,0 @@-{--Copyright 2009 Jake Wheat--This file contains the attr and sem definitions, which do the type-checking, etc..--A lot of the haskell code has been moved into other files:-TypeCheckingH, AstUtils.lhs, it is intended that only small amounts of-code appear (i.e. one-liners) inline in this file, and larger bits go-in AstUtils.lhs. These are only divided because the attribute grammar-system uses a custom syntax with a custom preprocessor. These-guidelines aren't followed very well.--The current type checking approach doesn't quite match how SQL-works. The main problem is that you can e.g. exec create table-statements inside a function. This is something that the type checker-will probably not be able to deal for a while if ever. (Will need-hooks into postgresql to do this properly, which might not be-impossible...).--The main current limitation is that the ddl statements aren't passed-on in the scope so e.g. it doesn't type check a create table followed-by a select from that table. The support for this is nearly complete-and it should be working very soon.--Once most of the type checking is working, all the code and-documentation will be overhauled quite a lot. Alternatively put, this-code is in need of better documentation and organisation, and serious-refactoring.--An unholy mixture of Maybe, Either, Either Monad and TypeCheckFailed-is used to do error handling.--TODO: document pattern of typecheckfailed propagation, loc.tpe usage.--================================================================================--= main attributes used--Here are the main attributes used in the type checking:--scope is used to chain the scopes up and down the tree, to allow-access to the catalog information, and to store the in scope-identifier names and types e.g. inside a select expression.--annotatedTree is used to create a copy of the ast with the type,-etc. annotations.---}-ATTR AllNodes Root ExpressionRoot-  [ scope : Scope-  |-  | annotatedTree : SELF-  ]--{--================================================================================--= expressions---}--{-annTypesAndErrors :: Annotated a => a -> Type -> [TypeError]-                  -> Maybe AnnotationElement -> a-annTypesAndErrors item nt errs add =-    changeAnn item $-     (([TypeAnnotation nt] ++ maybeToList add ++-       map TypeErrorA errs) ++)-}-SEM Expression-    | IntegerLit StringLit FloatLit BooleanLit NullLit FunCall Identifier-      Exists Case CaseSimple Cast InPredicate ScalarSubQuery-      --PositionalArg WindowFn-        lhs.annotatedTree = annTypesAndErrors @loc.backTree-                              (errorToTypeFail @loc.tpe)-                              (getErrors @loc.tpe)-                              Nothing--{--== literals--}--SEM Expression-    | IntegerLit-        loc.backTree = IntegerLit @ann @i-    | StringLit-        loc.backTree = StringLit @ann @quote @value-    | FloatLit-        loc.backTree = FloatLit @ann @d-    | BooleanLit-        loc.backTree = BooleanLit @ann @b-    | NullLit-        loc.backTree = NullLit @ann--SEM Expression-     | IntegerLit loc.tpe = Right typeInt-     | StringLit loc.tpe = Right UnknownStringLit-     | FloatLit loc.tpe = Right typeNumeric-     | BooleanLit loc.tpe = Right typeBool-     -- I think a null types like an unknown string lit-     | NullLit loc.tpe = Right UnknownStringLit---{---== cast expression---}--SEM Expression-    | Cast loc.tpe = @tn.namedType-           loc.backTree = Cast @ann @expr.annotatedTree @tn.annotatedTree--{---== type names--Types with type modifiers (called PrecTypeName here, to be changed),-are not supported at the moment.---}--ATTR TypeName-     [-     |-     | namedType : {Either [TypeError] Type}-     ]--SEM TypeName-     | SimpleTypeName-        lhs.namedType = lookupTypeByName @lhs.scope $ canonicalizeTypeName @tn-        lhs.annotatedTree = SimpleTypeName @tn-     | ArrayTypeName-        lhs.namedType = ArrayType <$> @typ.namedType-        lhs.annotatedTree = ArrayTypeName @typ.annotatedTree-     | SetOfTypeName-        lhs.namedType = SetOfType <$> @typ.namedType-        lhs.annotatedTree = SetOfTypeName @typ.annotatedTree-     | PrecTypeName-        lhs.namedType = Right TypeCheckFailed-        lhs.annotatedTree = PrecTypeName @tn @prec--{--== operators and functions--}-SEM Expression-    | FunCall-        loc.tpe = checkTypes @args.typeList $-                    typeCheckFunCall-                      @lhs.scope-                      @funName-                      @args.typeList-        loc.backTree = FunCall @ann @funName @args.annotatedTree--{--== case expression--for non simple cases, we need all the when expressions to be bool, and-then to collect the types of the then parts to see if we can resolve a-common type--for simple cases, we need to check all the when parts have the same type-as the value to check against, then we collect the then parts as above.---}--SEM Expression-    | Case CaseSimple-        loc.whenTypes = map getTypeAnnotation $ concatMap fst $-                        @cases.annotatedTree-        loc.thenTypes = map getTypeAnnotation $-                            (map snd $ @cases.annotatedTree) ++-                              maybeToList @els.annotatedTree--SEM Expression-    | Case-        loc.tpe =-            checkTypes @loc.whenTypes $ do-               when (any (/= typeBool) @loc.whenTypes) $-                 Left [WrongTypes typeBool @loc.whenTypes]-               checkTypes @loc.thenTypes $-                        resolveResultSetType-                          @lhs.scope-                          @loc.thenTypes-        loc.backTree = Case @ann @cases.annotatedTree @els.annotatedTree---SEM Expression-    | CaseSimple-        loc.tpe =-          checkTypes @loc.whenTypes $ do-          checkWhenTypes <- resolveResultSetType-                                 @lhs.scope-                                 (getTypeAnnotation @value.annotatedTree: @loc.whenTypes)-          checkTypes @loc.thenTypes $-                     resolveResultSetType-                              @lhs.scope-                              @loc.thenTypes-        loc.backTree = CaseSimple @ann @value.annotatedTree @cases.annotatedTree @els.annotatedTree--{--== identifiers-pull id types out of scope for identifiers---}--SEM Expression-    | Identifier-        loc.tpe = let (correlationName,iden) = splitIdentifier @i-                  in scopeLookupID @lhs.scope correlationName iden-        loc.backTree = Identifier @ann @i--SEM Expression-    | Exists-        loc.tpe = Right typeBool-        loc.backTree = Exists @ann @sel.annotatedTree---{--== scalar subquery-1 col -> type of that col-2 + cols -> row type--}--SEM Expression-    | ScalarSubQuery-        loc.tpe = let selType = getTypeAnnotation @sel.annotatedTree-                  in checkTypes [selType]-                       $ let f = map snd $ unwrapComposite $ unwrapSetOf selType-                         in case length f of-                              0 -> error "internal error: no columns in scalar subquery?"-                              1 -> Right $ head f-                              _ -> Right $ RowCtor f--        loc.backTree = ScalarSubQuery @ann @sel.annotatedTree-{--== inlist--}--SEM Expression-    | InPredicate-        loc.tpe = do-                    lt <- @list.listType-                    ty <- resolveResultSetType-                            @lhs.scope-                            [getTypeAnnotation @expr.annotatedTree, lt]-                    return typeBool-        loc.backTree = InPredicate @ann @expr.annotatedTree @i @list.annotatedTree---ATTR InList-   [-   |-   | listType : {Either [TypeError] Type}-   ]--SEM InList-    | InList-        lhs.listType = resolveResultSetType-                         @lhs.scope-                         @exprs.typeList-    | InSelect-        lhs.listType =-           let attrs = map snd $ unwrapComposite $ unwrapSetOf $ getTypeAnnotation @sel.annotatedTree-               typ =  case length attrs of-                        0 -> error "internal error - got subquery with no columns? in inselect"-                        1 -> head attrs-                        _ -> RowCtor attrs-           in checkTypes attrs $ Right typ----ATTR ExpressionList-     [-     |-     | typeList : {[Type]}-     ]--SEM ExpressionList-    | Cons lhs.typeList = getTypeAnnotation @hd.annotatedTree : @tl.typeList-    | Nil lhs.typeList = []---ATTR ExpressionListList-     [-     |-     | typeListList : {[[Type]]}-     ]--SEM ExpressionListList-    | Cons lhs.typeListList = @hd.typeList : @tl.typeListList-    | Nil lhs.typeListList = []---{--================================================================================--= statements---}--SEM Statement-    | SelectStatement Insert Update Delete CreateView CreateDomain-      CreateFunction CreateType CreateTable-        lhs.annotatedTree = annTypesAndErrors @loc.backTree-                              (errorToTypeFail @loc.tpe)-                              (getErrors @loc.tpe)-                              $ Just $ StatementInfoA @loc.statementInfo-{---================================================================================--= basic select statements--== nodeTypes---}--SEM Statement-    | SelectStatement-        loc.tpe = checkTypes [getTypeAnnotation @ex.annotatedTree] $ Right $ Pseudo Void-        loc.statementInfo = SelectInfo $ getTypeAnnotation @ex.annotatedTree-        loc.backTree = SelectStatement @ann @ex.annotatedTree---SEM SelectExpression-    | Values Select CombineSelect-        lhs.annotatedTree = annTypesAndErrors @loc.backTree-                              (errorToTypeFail @loc.tpe)-                              (getErrors @loc.tpe)-                              Nothing--{-checkExpressionBool :: Maybe Expression -> Either [TypeError] Type-checkExpressionBool whr = do-  let ty = fromMaybe typeBool $ fmap getTypeAnnotation whr-  when (ty `notElem` [typeBool, TypeCheckFailed]) $-       Left [ExpressionMustBeBool]-  return ty-}--SEM SelectExpression-    | Values-        loc.tpe = typeCheckValuesExpr-                              @lhs.scope-                              @vll.typeListList-        loc.backTree = Values @ann @vll.annotatedTree-    | Select-        loc.tpe =-           do-           whereType <- checkExpressionBool @selWhere.annotatedTree-           let trefType = fromMaybe typeBool $ fmap getTypeAnnotation-                                                    @selTref.annotatedTree-               slType = @selSelectList.listType-           chainTypeCheckFailed [trefType, whereType, slType] $-             Right $ case slType of-                       UnnamedCompositeType [(_,Pseudo Void)] -> Pseudo Void-                       _ -> SetOfType slType-        loc.backTree = Select @ann-                              @selDistinct.annotatedTree-                              @selSelectList.annotatedTree-                              @selTref.annotatedTree-                              @selWhere.annotatedTree-                              @selGroupBy.annotatedTree-                              @selHaving.annotatedTree-                              @selOrderBy.annotatedTree-                              @selDir.annotatedTree-                              @selLimit.annotatedTree-                              @selOffset.annotatedTree-    | CombineSelect-        loc.tpe =-          let sel1t = getTypeAnnotation @sel1.annotatedTree-              sel2t = getTypeAnnotation @sel2.annotatedTree-          in checkTypes [sel1t, sel2t] $-                typeCheckCombineSelect @lhs.scope sel1t sel2t-        loc.backTree = CombineSelect @ann @ctype.annotatedTree-                                     @sel1.annotatedTree-                                     @sel2.annotatedTree--{-getTbCols = unwrapComposite . unwrapSetOf . getTypeAnnotation-}--ATTR TableRef MTableRef-         [-         |-         | idens : {[QualifiedScope]}-           joinIdens : {[String]}-         ]--SEM TableRef-    | SubTref TrefAlias Tref TrefFun TrefFunAlias JoinedTref-        lhs.annotatedTree = annTypesAndErrors @loc.backTree-                              (errorToTypeFail @loc.tpe)-                              (getErrors @loc.tpe)-                              Nothing--SEM TableRef-    | SubTref loc.tpe = checkTypes [getTypeAnnotation @sel.annotatedTree] $-                        Right $ unwrapSetOfComposite $ getTypeAnnotation @sel.annotatedTree-              loc.backTree = SubTref @ann @sel.annotatedTree @alias-              lhs.idens = [(@alias, (getTbCols @sel.annotatedTree, []))]-              lhs.joinIdens = []-    | TrefAlias Tref-        loc.tpe = either Left (Right . fst) @loc.relType-        lhs.joinIdens = []-        loc.relType = getRelationType @lhs.scope @tbl-        loc.unwrappedRelType = either (const ([], [])) (both unwrapComposite) @loc.relType-    | Tref-        lhs.idens = [(@tbl, @loc.unwrappedRelType)]-        loc.backTree = Tref @ann @tbl-    | TrefAlias-        lhs.idens = [(@alias, @loc.unwrappedRelType)]-        loc.backTree = TrefAlias @ann @tbl @alias-    | TrefFun TrefFunAlias-        loc.tpe = getFnType @lhs.scope @alias @fn.annotatedTree-        lhs.joinIdens = []-        lhs.idens = case getFunIdens-                              @lhs.scope @loc.alias-                              @fn.annotatedTree of-                      Left e -> []-                      Right x -> [second (\l -> (unwrapComposite l, [])) x]-    | TrefFun-        loc.alias = ""-        loc.backTree = TrefFun @ann @fn.annotatedTree-    | TrefFunAlias-        loc.alias = @alias-        loc.backTree = TrefFunAlias @ann @fn.annotatedTree @alias-    | JoinedTref-        loc.tpe =-            checkTypes [tblt-                      ,tbl1t] $-               case (@nat.annotatedTree, @onExpr.annotatedTree) of-                      (Natural, _) -> unionJoinList $-                                      commonFieldNames tblt tbl1t-                      (_,Just (JoinUsing s)) -> unionJoinList s-                      _ -> unionJoinList []-            where-              tblt = getTypeAnnotation @tbl.annotatedTree-              tbl1t = getTypeAnnotation @tbl1.annotatedTree-              unionJoinList s =-                  combineTableTypesWithUsingList @lhs.scope s tblt tbl1t-        lhs.idens = @tbl.idens ++ @tbl1.idens-        lhs.joinIdens = commonFieldNames (getTypeAnnotation @tbl.annotatedTree)-                                         (getTypeAnnotation @tbl1.annotatedTree)-        loc.backTree = JoinedTref @ann-                                  @tbl.annotatedTree-                                  @nat.annotatedTree-                                  @joinType.annotatedTree-                                  @tbl1.annotatedTree-                                  @onExpr.annotatedTree--{--getFnType :: Scope -> String -> Expression -> Either [TypeError] Type-getFnType scope alias =-    either Left (Right . snd) . getFunIdens scope alias--getFunIdens :: Scope -> String -> Expression -> Either [TypeError] (String,Type)-getFunIdens scope alias fnVal =-   case fnVal of-       FunCall _ f _ ->-           let correlationName = if alias /= ""-                                   then alias-                                   else f-           in Right (correlationName, case getTypeAnnotation fnVal of-                SetOfType (CompositeType t) -> getCompositeType t-                SetOfType x -> UnnamedCompositeType [(correlationName,x)]-                y -> UnnamedCompositeType [(correlationName,y)])-       x -> Left [ContextError "FunCall"]-   where-     getCompositeType t =-                    case getAttrs scope [Composite-                                              ,TableComposite-                                              ,ViewComposite] t of-                      Just ((_,_,a@(UnnamedCompositeType _)), _) -> a-                      _ -> UnnamedCompositeType []-}--SEM MTableRef-    | Nothing-        lhs.idens = []-        lhs.joinIdens = []--ATTR SelectItemList SelectList-  [-  |-  | listType : Type-  ]--SEM SelectItemList-    | Cons lhs.listType = doSelectItemListTpe @lhs.scope @hd.columnName @hd.itemType @tl.listType-    | Nil lhs.listType = UnnamedCompositeType []--ATTR SelectItem-     [-     |-     | itemType : Type-     ]--SEM SelectItem-    | SelExp SelectItem-        lhs.itemType = getTypeAnnotation @ex.annotatedTree---- hack to fix up for errors for ok *-SEM SelectItem-    | SelExp-        loc.annotatedTree = SelExp $ fixStar @ex.annotatedTree-    | SelectItem-        loc.backTree = SelectItem (fixStar @ex.annotatedTree) @name--{-fixStar ex =-  changeAnnRecurse fs ex-  where-    fs a = if TypeAnnotation TypeCheckFailed `elem` a-              && any (\an ->-                       case an of-                         TypeErrorA (UnrecognisedIdentifier x) |-                           let (_,iden) = splitIdentifier x-                           in iden == "*" -> True-                         _ -> False) a-             then filter (\an -> case an of-                                   TypeAnnotation TypeCheckFailed -> False-                                   TypeErrorA (UnrecognisedIdentifier _) -> False-                                   _ -> True) a-             else a-}----[TypeAnnotation TypeCheckFailed,TypeErrorA (UnrecognisedIdentifier "*")]--SEM SelectList-    | SelectList-        lhs.listType = @items.listType---{---== scope passing--scope flow:-current simple version:-from tref -> select list-          -> where--(so we take the identifiers and types from the tref part, and send-them into the selectlist and where parts)--   1. from-   2. where-   3. group by-   4. having-   5. select---}--SEM SelectExpression-    | Select-         selSelectList.scope = scopeReplaceIds @lhs.scope @selTref.idens @selTref.joinIdens-         selWhere.scope = scopeReplaceIds @lhs.scope @selTref.idens @selTref.joinIdens--{---== attributes--columnName is used to collect the column names that the select list-produces, it is combined into an unnamedcompositetype in-selectitemlist, which is also where star expansion happens.---}--ATTR SelectItem-  [-  |-  | columnName : String-  ]--{--if the select item is just an identifier, then that column is named-after the identifier-e.g. select a, b as c, b + c from d, gives three columns one named-a, one named c, and one unnamed, even though only one has an alias-if the select item is a function or aggregate call at the top level,-then it is named after that function or aggregate--if it is a cast, the column is named after the target data type name-iff it is a simple type name---}----default value for non identifier nodes--ATTR Expression-  [-  |-  | liftedColumnName USE {`(fixedValue "")`} {""}: String-  ]--{-fixedValue :: a -> a -> a -> a-fixedValue a _ _ = a-}--{--override for identifier nodes, this only makes it out to the selectitem-node if the identifier is not wrapped in parens, function calls, etc.--}--SEM Expression-  | Identifier lhs.liftedColumnName = @i-  | FunCall lhs.liftedColumnName =-      if isOperator @funName-         then ""-         else @funName-  | Cast lhs.liftedColumnName = case @tn.annotatedTree of-                                  SimpleTypeName tn -> tn-                                  _ -> ""---- collect the aliases and column names for use by the selectitemlist nodes-SEM SelectItem-    | SelExp lhs.columnName = case @ex.liftedColumnName of-                                "" -> "?column?"-                                s -> s-    | SelectItem lhs.columnName = @name---{--================================================================================--= insert---}--SEM Statement-    | Insert-        loc.columnStuff =-            checkColumnConsistency @lhs.scope-                                   @table-                                   @targetCols.strings-                                   (unwrapComposite $ unwrapSetOf $-                                                    getTypeAnnotation @insData.annotatedTree)-        loc.tpe =-            checkTypes [getTypeAnnotation @insData.annotatedTree] $ do-              @loc.columnStuff-              Right $ Pseudo Void-        loc.statementInfo =-            InsertInfo @table $ errorToTypeFailF UnnamedCompositeType @loc.columnStuff-        loc.backTree = Insert @ann @table @targetCols.annotatedTree-                              @insData.annotatedTree @returning---ATTR StringList-     [-     |-     | strings : {[String]}-     ]--SEM StringList-  | Cons lhs.strings = @hd : @tl.strings-  | Nil lhs.strings = []--{--================================================================================--= update---}--{--}--SEM Statement-    | Update-        loc.tpe =-            do-            let re = checkRelationExists @lhs.scope @table-            when (isJust re) $-                 Left [fromJust $ re]-            whereType <- checkExpressionBool @whr.annotatedTree-            chainTypeCheckFailed (whereType:map snd @assigns.pairs) $ do-              @loc.columnsConsistent-              checkErrorList @assigns.rowSetErrors $ Pseudo Void-        loc.columnsConsistent =-            checkColumnConsistency @lhs.scope @table (map fst @assigns.pairs) @assigns.pairs-        loc.statementInfo =-            UpdateInfo @table $ flip errorToTypeFailF @loc.columnsConsistent $-                                     \c -> let colNames = map fst @assigns.pairs-                                           in UnnamedCompositeType $ map (\t -> (t,getType c t)) colNames--            where-              getType cols t = fromJust $ lookup t cols-        loc.backTree = Update @ann @table @assigns.annotatedTree @whr.annotatedTree @returning--ATTR SetClauseList-     [-     |-     | pairs : {[(String,Type)]}-       rowSetErrors : {[TypeError]}-     ]--SEM SetClauseList-  | Cons lhs.pairs = @hd.pairs ++ @tl.pairs-         lhs.rowSetErrors = maybeToList @hd.rowSetError ++ @tl.rowSetErrors-  | Nil lhs.pairs = []-        lhs.rowSetErrors = []--ATTR SetClause-     [-     |-     | pairs : {[(String,Type)]}-       rowSetError : {Maybe TypeError}-     ]---SEM SetClause-    | SetClause-        lhs.pairs = [(@att, getTypeAnnotation @val.annotatedTree)]-        lhs.rowSetError = Nothing-    | RowSetClause-        loc.rowSetError =-          let atts = @atts.strings-              types = getRowTypes @vals.typeList-          in if length atts /= length types-               then Just WrongNumberOfColumns-               else Nothing-        lhs.pairs = zip @atts.strings $ getRowTypes @vals.typeList--{-getRowTypes :: [Type] -> [Type]-getRowTypes [RowCtor ts] = ts-getRowTypes ts = ts-}--{--================================================================================--= delete--}--SEM Statement-    | Delete-        loc.tpe =-            case checkRelationExists @lhs.scope @table of-              Just e -> Left [e]-              Nothing -> do-                whereType <- checkExpressionBool @whr.annotatedTree-                return $ Pseudo Void-        loc.statementInfo = DeleteInfo @table-        loc.backTree = Delete @ann @table @whr.annotatedTree @returning--{--================================================================================--= create table--scope needs to be modified:-types, typenames, typecats, attrdefs, systemcolumns--produces a compositedef: (name, tablecomposite, unnamedcomp [(attrname, type)])---}-ATTR AttributeDef-  [-  |-  | attrName : String-    namedType : {Either [TypeError] Type}-  ]--SEM AttributeDef-    | AttributeDef-      lhs.attrName = @name-      lhs.namedType = @typ.namedType--ATTR AttributeDefList-  [-  |-  | attrs : {[(String, Either [TypeError] Type)]}-  ]--SEM AttributeDefList-    | Cons lhs.attrs = (@hd.attrName, @hd.namedType) : @tl.attrs-    | Nil lhs.attrs = []--SEM Statement-    | CreateTable-        loc.attrTypes = map snd @atts.attrs-        loc.tpe = checkErrorList (concat $ lefts @loc.attrTypes) $ Pseudo Void-        loc.compositeType =-            errorToTypeFailF (const $ UnnamedCompositeType doneAtts) @loc.tpe-            where-              doneAtts = map (second errorToTypeFail) @atts.attrs-        loc.backTree = CreateTable @ann @name @atts.annotatedTree @cons.annotatedTree-        loc.statementInfo = RelvarInfo (@name, TableComposite, @loc.compositeType)--SEM Statement-    | CreateTableAs-        loc.selType = getTypeAnnotation @expr.annotatedTree-        loc.tpe = Right @loc.selType-        loc.backTree = CreateTableAs @ann @name @expr.annotatedTree-        loc.statementInfo = RelvarInfo (@name, TableComposite, @loc.selType)-{--================================================================================--= create view---}--SEM Statement-    | CreateView-        loc.tpe = checkTypes [getTypeAnnotation @expr.annotatedTree] $ Right $ Pseudo Void-        loc.backTree = CreateView @ann @name @expr.annotatedTree-        loc.statementInfo = RelvarInfo (@name, ViewComposite, getTypeAnnotation @expr.annotatedTree)---{--================================================================================--= create type---}-ATTR TypeAttributeDef-   [-   |-   | attrName : String-     namedType : {Either [TypeError] Type}-   ]---SEM TypeAttributeDef-    | TypeAttDef-        lhs.attrName = @name-        lhs.namedType = @typ.namedType--ATTR TypeAttributeDefList-     [-     |-     | attrs : {[(String, Either [TypeError] Type)]}-     ]--SEM TypeAttributeDefList-    | Cons lhs.attrs = (@hd.attrName, @hd.namedType) : @tl.attrs-    | Nil lhs.attrs = []--SEM Statement-    | CreateType-        loc.attrTypes = map snd @atts.attrs-        loc.tpe =-            checkErrorList (concat $ lefts @loc.attrTypes) $ Pseudo Void-        loc.compositeType =-            errorToTypeFailF (const $ UnnamedCompositeType doneAtts) @loc.tpe-            where-              doneAtts = map (second errorToTypeFail) @atts.attrs-        loc.backTree = CreateType @ann @name @atts.annotatedTree-        loc.statementInfo = RelvarInfo (@name, Composite, @loc.compositeType)-{---================================================================================--= create domain---}--SEM Statement-    | CreateDomain-        loc.namedTypeType = case @typ.namedType of-                              Left _ -> TypeCheckFailed-                              Right x -> x-        loc.tpe = checkTypes [@loc.namedTypeType] $ Right $ Pseudo Void-        loc.backTree = CreateDomain @ann @name @typ.annotatedTree @check-        loc.statementInfo = CreateDomainInfo @name @loc.namedTypeType-{--================================================================================--= create function--ignore body for now, just get the signature--}--ATTR ParamDef-     [-     |-     | paramName : String-     ]--ATTR ParamDefList-     [-     |-     | params : {[(String,Either [TypeError] Type)]}-     ]--ATTR ParamDef-     [-     |-     | namedType : {Either [TypeError] Type}-     ]--SEM ParamDef-    | ParamDef ParamDefTp-        lhs.namedType = @typ.namedType-    | ParamDef-        lhs.paramName = @name-    | ParamDefTp-        lhs.paramName = ""--SEM ParamDefList-     | Nil lhs.params = []-     | Cons lhs.params = ((@hd.paramName, @hd.namedType) : @tl.params)--SEM Statement-    | CreateFunction-        loc.retTypeType = errorToTypeFail @rettype.namedType-        loc.paramTypes =-            let tpes = map snd @params.params-            in if null $ concat $ lefts tpes-               then rights tpes-               else [TypeCheckFailed]-        loc.tpe =-            do-              @rettype.namedType-              let tpes = map snd @params.params-              checkErrorList (concat $ lefts tpes) $ Pseudo Void-        loc.backTree = CreateFunction @ann-                                      @lang.annotatedTree-                                      @name-                                      @params.annotatedTree-                                      @rettype.annotatedTree-                                      @bodyQuote-                                      @body.annotatedTree-                                      @vol.annotatedTree-        loc.statementInfo = CreateFunctionInfo (@name,@loc.paramTypes,@loc.retTypeType)--{--================================================================================--= static tests--Try to use a list of message data types to hold all sorts of-information which works its way out to the top level where the client-code gets it. Want to have the lists concatenated together-automatically from subnodes to parent node, and then to be able to add-extra messages to this list at each node also.--Problem 1: can't have two sem statements for the same node type which-both add messages, and then the messages get combined to provide the-final message list attribute value for that node. You want this so-that e.g. that different sorts of checks appear in different-sections. Workaround is instead of having each check in it's own-section, to combine them all into one SEM.--Problem 2: no shorthand to combine what the default rule for messages-would be and then add a bit extra - so if you want all the children-messages, plus possibly an extra message or two, have to write out the-default rule in full explicitly. Can get round this by writing out-loads of code.--Both the workarounds to these seem a bit tedious and error prone, and-will make the code much less readable. Maybe need a preprocessor to-produce the ag file? Alternatively, just attach the messages to each-node (so this appears in the data types and isn't an attribute, then-have a tree walker collect them all). Since an annotation field in-each node is going to be added anyway, so each node can be labelled-with a type, will probably do this at some point.--================================================================================--= inloop testing--inloop - use to check continue, exit, and other commands that can only-appear inside loops (for, while, loop)--the only nodes that really need this attribute are the ones which can-contain statements--The inloop test is the only thing which uses the messages atm. It-shouldn't, at some point inloop testing will become part of the type-checking.--This is just some example code, will probably do something a lot more-heavy weight like symbolic interpretation - want to do all sorts of-loop, return, nullability, etc. analysis.---}-{--ATTR AllNodes Root ExpressionRoot-  [-  |-  | messages USE {++} {[]} : {[Message]}-  ]--ATTR AllNodes-  [ inLoop: Bool-  |-  |-  ]--SEM Root-  | Root statements.inLoop = False--SEM ExpressionRoot-  | ExpressionRoot expr.inLoop = False---- set the inloop stuff which nests, it's reset inside a create--- function statement, in case you have a create function inside a--- loop, seems unlikely you'd do this though--SEM Statement-     | ForSelectStatement ForIntegerStatement WhileStatement sts.inLoop = True-     | CreateFunction body.inLoop = False---- now we can check when we hit a continue statement if it is in the--- right context-SEM Statement-    | ContinueStatement  lhs.messages = if not @lhs.inLoop-                                          then [Error ContinueNotInLoop]-                                          else []--}--{--================================================================================--= notes and todo---containment guide for select expressions:-combineselect 2 selects-insert ?select-createtableas 1 select-createview 1 select-return query 1 select-forselect 1 select-select->subselect select-expression->exists select-            scalarsubquery select-            inselect select--containment guide for statements:-forselect [statement]-forinteger [statement]-while [statement]-casestatement [[statement]]-if [[statement]]-createfunction->fnbody [Statement]--TODO--some non type-check checks:-check plpgsql only in plpgsql function-orderby in top level select only-copy followed immediately by copydata iff stdin, copydata only follows-  copy from stdin-count args to raise, etc., check same number as placeholders in string-no natural with onexpr in joins-typename -> setof (& fix parsing), what else like this?-expressions: positionalarg in function, window function only in select- list top level--review all ast checks, and see if we can also catch them during-parsing (e.g. typeName parses setof, but this should only be allowed-for a function return, and we can make this a parse error when parsing-from source code rather than checking a generated ast. This needs-judgement to say whether a parse error is better than a check error, I-think for setof it is, but e.g. for a continue not in a loop (which-could be caught during parsing) works better as a check error, looking-at the error message the user will get. This might be wrong, haven't-thought too carefully about it yet).---TODO: canonicalize ast process, as part of type checking produces a-canonicalized ast which:-all implicit casts appear explicitly in the ast (maybe distinguished-from explicit casts?)-all names fully qualified-all types use canonical names-literal values and selectors in one form (use row style?)-nodes are tagged with types-what else?--Canonical form only defined for type consistent asts.--This canonical form should pretty print and parse back to the same-form, and type check correctly.----}
− Database/HsSqlPpp/TypeChecking/TypeCheckingH.lhs
@@ -1,231 +0,0 @@-Copyright 2009 Jake Wheat--This file contains some utility functions for working with types and-type checking.--> {-# OPTIONS_HADDOCK hide #-}-> {-# LANGUAGE FlexibleInstances #-}--> module Database.HsSqlPpp.TypeChecking.TypeCheckingH where--> import Data.Maybe-> import Data.List-> import Debug.Trace-> import Data.Either-> import Control.Monad.Error-> import Control.Applicative--> import Database.HsSqlPpp.TypeChecking.TypeType-> import Database.HsSqlPpp.TypeChecking.AstUtils-> import Database.HsSqlPpp.TypeChecking.TypeConversion-> import Database.HsSqlPpp.TypeChecking.ScopeData--================================================================================--= type check code--idea is to move these here from TypeChecking.ag if they get a bit big,-not very consistently applied at the moment.--> typeCheckFunCall :: Scope -> String -> [Type] -> Either [TypeError] Type-> typeCheckFunCall scope fnName argsType = do->     chainTypeCheckFailed argsType $->       case fnName of->               -- do the special cases first, some of these will use->               -- the variadic support when it is done and no longer->               -- be special cases.->               "!arrayCtor" ->->                     ArrayType <$> resolveResultSetType scope argsType->               "!between" -> do->                     f1 <- lookupFn ">=" [argsType !! 0, argsType !! 1]->                     f2 <- lookupFn "<=" [argsType !! 0, argsType !! 2]->                     lookupFn "!and" [f1,f2]->               "coalesce" -> resolveResultSetType scope argsType->               "greatest" -> do->                     t <- resolveResultSetType scope argsType->                     lookupFn ">=" [t,t]->                     return t->               "least" -> do->                     t <- resolveResultSetType scope argsType->                     lookupFn "<=" [t,t]->                     return t->               "!rowCtor" -> return $ RowCtor argsType->                     -- special case the row comparison ops->               _ | let isRowCtor t = case t of->                                       RowCtor _ -> True->                                       _ -> False->                   in fnName `elem` ["=", "<>", "<=", ">=", "<", ">"]->                          && length argsType == 2->                          && all isRowCtor argsType ->->                     checkRowTypesMatch (head argsType) (head $ tail argsType)->               s -> lookupFn s argsType->     where->       lookupFn :: String -> [Type] -> Either [TypeError] Type->       lookupFn s1 args = do->         (_,_,r) <- findCallMatch scope->                              (if s1 == "u-" then "-" else s1) args->         return r->       checkRowTypesMatch (RowCtor t1s) (RowCtor t2s) = do->         when (length t1s /= length t2s) $ Left [ValuesListsMustBeSameLength]->         mapM_ (resolveResultSetType scope . (\(a,b) -> [a,b])) $ zip t1s t2s->         return typeBool->       checkRowTypesMatch x y  =->         error $ "internal error: checkRowTypesMatch called with " ++ show x ++ "," ++ show y---> typeCheckValuesExpr :: Scope -> [[Type]] -> Either [TypeError] Type-> typeCheckValuesExpr scope rowsTs =->         let colNames = zipWith (++)->                            (repeat "column")->                            (map show [1..length $ head rowsTs])->         in unionRelTypes scope rowsTs colNames--> typeCheckCombineSelect :: Scope -> Type -> Type -> Either [TypeError] Type-> typeCheckCombineSelect scope v1 v2 =->     let colNames = map fst $ unwrapComposite $ unwrapSetOf v1->     in unionRelTypes scope->                   (map (map snd . unwrapComposite . unwrapSetOf) [v1,v2])->                   colNames--> unionRelTypes :: Scope -> [[Type]] -> [String] -> Either [TypeError] Type-> unionRelTypes scope rowsTs colNames =->   let lengths = map length rowsTs->   in case () of->              _ | null rowsTs ->->                    Left [NoRowsGivenForValues]->                | not (all (==head lengths) lengths) ->->                    Left [ValuesListsMustBeSameLength]->                | otherwise -> do->                    mapM (resolveResultSetType scope) (transpose rowsTs) >>=->                      (return . SetOfType . UnnamedCompositeType . zip colNames)--================================================================================--= utils--lookup a composite type name, restricting it to only certain kinds of-composite type, returns the composite definition which you can get the-attributes out of which is a pair with the normal columns first, then-the system columns second--> getAttrs :: Scope -> [CompositeFlavour] -> String -> Maybe (CompositeDef, CompositeDef)-> getAttrs scope f n =->   let a = find (\(nm,fl,_) -> fl `elem` f && nm == n)->             (scopeAttrDefs scope)->       b = find (\(nm,_,_) -> nm == n)->             (scopeAttrSystemColumns scope)->   in case (a,b) of->      (Nothing,_) -> Nothing->      (Just x,Nothing) -> Just (x, (n,TableComposite,UnnamedCompositeType []))->      (Just x,Just y) -> Just (x,y)--combine two relvar types when being joined, pass in a using list and-it checks the types in the using list are compatible, and eliminates-duplicate columns of the attrs in the using list, returns the relvar-type of the joined tables.--> combineTableTypesWithUsingList :: Scope -> [String] -> Type -> Type -> Either [TypeError] Type-> combineTableTypesWithUsingList scope l t1c t2c = do->     --check t1 and t2 have l->     let t1 = unwrapComposite t1c->         t2 = unwrapComposite t2c->         names1 = getNames t1->         names2 = getNames t2->     when (not (contained l names1) ||->               not (contained l names2)) $->          Left [MissingJoinAttribute]->     --check the types->     joinColumnTypes <- mapM (getColumnType t1 t2) l->     let nonJoinColumns =->             let notJoin = (\(s,_) -> s `notElem` l)->             in filter notJoin t1 ++ filter notJoin t2->     return $ UnnamedCompositeType $ zip l joinColumnTypes ++ nonJoinColumns->     where->       getNames :: [(String,Type)] -> [String]->       getNames = map fst->       contained l1 l2 = all (`elem` l2) l1->       getColumnType :: [(String,Type)] -> [(String,Type)] -> String -> Either [TypeError] Type->       getColumnType t1 t2 f =->           let ct1 = getFieldType t1 f->               ct2 = getFieldType t2 f->           in resolveResultSetType scope [ct1,ct2]->       getFieldType t f = snd $ fromJust $ find (\(s,_) -> s == f) t--> doSelectItemListTpe :: Scope->                     -> String->                     -> Type->                     -> Type->                     -> Type-> doSelectItemListTpe scope colName colType types =->     if types == TypeCheckFailed->        then types->        else->          let (correlationName,iden) = splitIdentifier colName->              newCols = if iden == "*"->                          then scopeExpandStar scope correlationName->                          else return [(iden, colType)]->          in errorToTypeFailF  (foldr consComposite types) newCols--I think this should be alright, an identifier referenced in an-expression can only have zero or one dot in it.--> splitIdentifier :: String -> (String,String)-> splitIdentifier s = let (a,b) = span (/= '.') s->                     in if b == ""->                          then ("", a)->                          else (a,tail b)---returns the type of the relation, and the system columns also--> getRelationType :: Scope -> String -> Either [TypeError] (Type,Type)-> getRelationType scope tbl =->           case getAttrs scope [TableComposite, ViewComposite] tbl of->             Just ((_,_,a@(UnnamedCompositeType _))->                  ,(_,_,s@(UnnamedCompositeType _))) -> Right (a,s)->             _ -> Left [UnrecognisedRelation tbl]--> commonFieldNames :: Type -> Type -> [String]-> commonFieldNames t1 t2 =->     intersect (fn t1) (fn t2)->     where->       fn (UnnamedCompositeType s) = map fst s->       fn _ = []--> instance Error ([TypeError]) where->   noMsg = [MiscError "Unknown error"]->   strMsg str = [MiscError str]--> checkColumnConsistency :: Scope ->  String -> [String] -> [(String,Type)]->                        -> Either [TypeError] [(String,Type)]-> checkColumnConsistency scope tbl cols' insNameTypePairs = do->   rt <- getRelationType scope tbl->   let ttcols :: [(String,Type)]->       ttcols = unwrapComposite $ fst rt->       cols :: [String]->       cols = if null cols'->                then map fst ttcols->                else cols'->   when (length insNameTypePairs /= length cols) $->        Left [WrongNumberOfColumns]->   let nonMatchingColumns = cols \\ map fst ttcols->   when (not $ null nonMatchingColumns) $->        Left $ map UnrecognisedIdentifier nonMatchingColumns->   let targetNameTypePairs =->         map (\l -> (l,fromJust $ lookup l ttcols)) cols->         --check the types of the insdata match the column targets->         --name datatype columntype->       typeTriples = map (\((a,b),c) -> (a,b,c)) $ zip targetNameTypePairs $ map snd insNameTypePairs->       errs :: [TypeError]->       errs = concat $ lefts $ map (\(_,b,c) -> checkAssignmentValid scope c b) typeTriples->   unless (null errs) $ Left errs->   return ttcols--> checkRelationExists :: Scope -> String -> Maybe TypeError-> checkRelationExists scope tbl =->           case getAttrs scope [TableComposite, ViewComposite] tbl of->             Just _ -> Nothing->             _ -> Just $ UnrecognisedRelation tbl--> both :: (a->b) -> (a,a) -> (b,b)-> both fn (x,y) = (fn x, fn y)
− Database/HsSqlPpp/TypeChecking/TypeConversion.lhs
@@ -1,513 +0,0 @@-Copyright 2009 Jake Wheat--This file contains the functions for resolving types and-function/operator resolution. See the pg manual chapter 10:--http://www.postgresql.org/docs/8.4/interactive/typeconv.html--This code is really spaghettified.--findCallMatch - pass in a name and a list of arguments, and it returns-the matching function. (pg manual 10.2,10.3)--resolveResultSetType - pass in a set of types, and it tries to find-the common type they can all be cast to. (pg manual 10.5)--checkAssignmentValid - pass in source type and target type, returns-                typelist[] if ok, otherwise error, pg manual 10.4-                Value Storage--> {-# OPTIONS_HADDOCK hide #-}--> module Database.HsSqlPpp.TypeChecking.TypeConversion (->                        findCallMatch->                       ,resolveResultSetType->                       ,checkAssignmentValid->                       ) where--> import Data.Maybe-> import Data.List--> import Database.HsSqlPpp.TypeChecking.TypeType-> import Database.HsSqlPpp.TypeChecking.Scope-> import Database.HsSqlPpp.TypeChecking.AstUtils---= findCallMatch--findCallMatch - partially implements the type conversion rules for-finding an operator or function match given a name and list of-arguments with partial or fully specified types--TODO:, qualifiers-namespaces-function style casts not in catalog-variadic args-default args-domains -> base type-what about aggregates and window functions?--Algo:--cands = all fns with matching names-        and same number of args--if exact match on types in this list, use it-  (if binary operator being matched, and one arg is typed and one is-  unknown, also match an operator by assuming the unknown is the same-  as the typed arg)--best match part:--filter cands with args which don't exactly match input args, and input-args cannot be converted by an implicit cast. unknowns count as-matching anything-if one left: use it--filter for preferred types:--for each cand, count each arg at each position which needs conversion,-and the cand type is a preferred type at that position.-if there are cands with count>0, keep only cands with the max count,-if one return it-if there are no cands with count>0, keep them all--check unknowns:-if any input args are unknown, and any cand accepts string at that-position, fix that arg's category as string, otherwise if all cands-accept same category at that position, fix that input args as that-category.-if we still have unknowns, then fail--discard cands which don't match the new input arg/category list--for each categorised input arg, if any cand accepts preferred type at-that position, get rid of cands which don't accept preferred type at-that position--if one left: use-else fail--polymorphic matching:-want to create a set of matches to insert into the cast pairs list-so:--find all matches on name, num args and have polymorphic parameters--for each one, check the polymorphic categories - eliminate fns that-have params in wrong category - array, non array, enum.-work out the base types for the polymorphic args at each spot based on-the args passed - so each arg is unchanged except arrays which have-the array part stripped off--now we have a list of types to match against the polymorphic params,-use resolveResultSetType to see if we can produce a match, if so,-create a new prototype which is the same as the polymorphic function-but with this matching arg swapped in, work out the casts and add it-into cand cast pairs, after exact match has been run.---findCallMatch is a bit of a mess--> type ProtArgCast = (FunctionPrototype, [ArgCastFlavour])--> findCallMatch :: Scope -> String -> [Type] ->  Either [TypeError] FunctionPrototype-> findCallMatch scope f inArgs =->     returnIfOnne [->        exactMatch->       ,binOp1UnknownMatch->       ,polymorpicExactMatches->       ,reachable->       ,mostExactMatches->       ,filteredForPreferred->       ,unknownMatchesByCat]->       [NoMatchingOperator f inArgs]->     where->       -- basic lists which roughly mirror algo->       -- get the possibly matching candidates->       initialCandList :: [FunctionPrototype]->       initialCandList = filter (\(candf,candArgs,_) ->->                                   (candf,length candArgs) == (f,length inArgs))->                           allFns->->       -- record what casts are needed for each candidate->       castPairs :: [[ArgCastFlavour]]->       castPairs = map (listCastPairs . getFnArgs) initialCandList->->       candCastPairs :: [ProtArgCast]->       candCastPairs = zip initialCandList castPairs->->       -- see if we have an exact match->       exactMatch :: [ProtArgCast]->       exactMatch = filterCandCastPairs (all (==ExactMatch)) candCastPairs->->       -- implement the one known, one unknown resolution for binary operators->       binOp1UnknownMatch :: [ProtArgCast]->       binOp1UnknownMatch = getBinOp1UnknownMatch candCastPairs->->       --collect possible polymorphic matches->       polymorphicMatches :: [ProtArgCast]->       polymorphicMatches = filterPolymorphics candCastPairs->->       polymorpicExactMatches :: [ProtArgCast]->       polymorpicExactMatches = filterCandCastPairs (all (==ExactMatch)) polymorphicMatches->->       -- eliminate candidates for which the inargs cannot be casted to->       reachable :: [ProtArgCast]->       reachable = mergePolys (filterCandCastPairs (none (==CannotCast)) candCastPairs)->                     polymorphicMatches->->       mostExactMatches :: [ProtArgCast]->       mostExactMatches =->         let inArgsBase = map (replaceWithBase scope) inArgs->             exactCounts :: [Int]->             exactCounts =->               map ((length->                       . filter (\(a1,a2) -> a1==replaceWithBase scope a2)->                       . zip inArgsBase)->                 . (\((_,a,_),_) -> a)) reachable->             pairs = zip reachable exactCounts->             maxm = maximum exactCounts->         in case () of->              _ | null reachable -> []->                | maxm > 0 -> map fst $ filter (\(_,b) -> b == maxm) pairs->                | otherwise -> []->->       -- keep the cands with the most casts to preferred types->       preferredTypesCounts = countPreferredTypeCasts reachable->       keepCounts = maximum preferredTypesCounts->       itemCountPairs :: [(ProtArgCast,Int)]->       itemCountPairs = zip reachable preferredTypesCounts->       filteredForPreferred :: [ProtArgCast]->       filteredForPreferred = map fst $ filter (\(_,i) -> i == keepCounts) itemCountPairs->->       -- collect the inArg type categories to do unknown inArg resolution->       argCats :: [Either () String]->       argCats = getCastCategoriesForUnknowns filteredForPreferred->       unknownMatchesByCat :: [ProtArgCast]->       unknownMatchesByCat = getCandCatMatches filteredForPreferred argCats->->       -------------->->       listCastPairs :: [Type] -> [ArgCastFlavour]->       listCastPairs l = listCastPairs' inArgs l->                         where->                           listCastPairs' :: [Type] -> [Type] -> [ArgCastFlavour]->                           listCastPairs' (ia:ias) (ca:cas) =->                               (case () of->                                  _ | ia == ca -> ExactMatch->                                    | implicitlyCastableFromTo scope ia ca ->->                                        if isPreferredType scope ca->                                          then ImplicitToPreferred->                                          else ImplicitToNonPreferred->                                    | otherwise -> CannotCast->                               ) : listCastPairs' ias cas->                           listCastPairs' [] [] = []->                           listCastPairs' _ _ = error "internal error: mismatched num args in implicit cast algorithm"->->->       getBinOp1UnknownMatch :: [ProtArgCast] -> [ProtArgCast]->       getBinOp1UnknownMatch cands =->           if not (isOperator f &&->                   length inArgs == 2 &&->                   count (==UnknownStringLit) inArgs == 1)->             then []->             else let newInArgs =->                          replicate 2 (if head inArgs == UnknownStringLit->                                         then inArgs !! 1->                                         else head inArgs)->                  in filter (\((_,a,_),_) -> a == newInArgs) cands->->       filterPolymorphics :: [ProtArgCast] -> [ProtArgCast]->       filterPolymorphics cl =->           let ms :: [ProtArgCast]->               ms = filter canMatch polys->               polyTypes :: [Maybe Type]->               polyTypes = map resolvePolyType ms->               polyTypePairs :: [(Maybe Type, ProtArgCast)]->               polyTypePairs = zip polyTypes ms->               keepPolyTypePairs :: [(Type, ProtArgCast)]->               keepPolyTypePairs =->                 mapMaybe (\(t,p) -> case t of->                                            Nothing -> Nothing->                                            Just t' -> Just (t',p))->                               polyTypePairs->               finalRows = map (\(t,p) -> instantiatePolyType p t)->                               keepPolyTypePairs->               --create the new cast lists->               cps :: [[ArgCastFlavour]]->               cps = map (listCastPairs . getFnArgs . fst) finalRows->           in zip (map fst finalRows) cps->           where->             polys :: [ProtArgCast]->             polys = filter (\((_,a,_),_) -> any (`elem`->                                              [Pseudo Any->                                              ,Pseudo AnyArray->                                              ,Pseudo AnyElement->                                              ,Pseudo AnyEnum->                                              ,Pseudo AnyNonArray]) a) cl->             canMatch :: ProtArgCast -> Bool->             canMatch pac =->                let ((_,fnArgs,_),_) = pac->                in canMatch' inArgs fnArgs->                where->                  canMatch' [] [] = True->                  canMatch' (ia:ias) (pa:pas) =->                    case pa of->                      Pseudo Any -> nextMatch->                      Pseudo AnyArray -> isArrayType ia && nextMatch->                      Pseudo AnyElement -> nextMatch->                      Pseudo AnyEnum -> False->                      Pseudo AnyNonArray -> if isArrayType ia->                                              then False->                                              else nextMatch->                      _ -> True->                    where->                      nextMatch = canMatch' ias pas->                  canMatch' _ _ = error "internal error: mismatched lists in canMatch'"->             resolvePolyType :: ProtArgCast -> Maybe Type->             resolvePolyType ((_,fnArgs,_),_) =->                 {-trace ("\nresolving " ++ show fnArgs ++ " against " ++ show inArgs ++ "\n") $-}->                 let argPairs = zip inArgs fnArgs->                     typeList = catMaybes $ flip map argPairs->                                  (\(ia,fa) -> case fa of->                                                   Pseudo Any -> if isArrayType ia->                                                                          then Just $ unwrapArray ia->                                                                          else Just ia->                                                   Pseudo AnyArray -> Just $ unwrapArray ia->                                                   Pseudo AnyElement -> if isArrayType ia->                                                                          then Just $ unwrapArray ia->                                                                          else Just ia->                                                   Pseudo AnyEnum -> Nothing->                                                   Pseudo AnyNonArray -> Just ia->                                                   _ -> Nothing)->                 in {-trace ("\nresolve types: " ++ show typeList ++ "\n") $-}->                    case resolveResultSetType scope typeList of->                      Left _ -> Nothing->                      Right t -> Just t->             instantiatePolyType :: ProtArgCast -> Type -> ProtArgCast->             instantiatePolyType pac t =->               let ((fn,a,r),_) = pac->                   instArgs = swapPolys t a->                   p1 = (fn, instArgs, swapPoly t r)->               in let x = (p1,listCastPairs instArgs)->                  in {-trace ("\nfixed:" ++ show x ++ "\n")-} x->               where->                 swapPolys :: Type -> [Type] -> [Type]->                 swapPolys = map . swapPoly->                 swapPoly :: Type -> Type -> Type->                 swapPoly pit at =->                   case at of->                     Pseudo Any -> if isArrayType at->                                     then ArrayType pit->                                     else pit->                     Pseudo AnyArray -> ArrayType pit->                     Pseudo AnyElement -> if isArrayType at->                                            then ArrayType pit->                                            else pit->                     Pseudo AnyEnum -> pit->                     Pseudo AnyNonArray -> pit->                     _ -> at->       --merge in the instantiated poly functions, with a twist:->       -- if we already have the exact same set of args in the non poly list->       -- as a poly, then don't include that poly->       mergePolys :: [ProtArgCast] -> [ProtArgCast] -> [ProtArgCast]->       mergePolys orig polys =->           let origArgs = map (\((_,a,_),_) -> a) orig->               filteredPolys = filter (\((_,a,_),_) -> a `notElem` origArgs) polys->           in orig ++ filteredPolys->->       countPreferredTypeCasts :: [ProtArgCast] -> [Int]->       countPreferredTypeCasts =->           map (\(_,cp) -> count (==ImplicitToPreferred) cp)->->       -- Left () is used for inArgs which aren't unknown,->       --                      and for unknowns which we don't have a->       --                      unique category->       -- Right s -> s is the single letter category at->       --                           that position->       getCastCategoriesForUnknowns :: [ProtArgCast] -> [Either () String]->       getCastCategoriesForUnknowns cands =->           filterArgN 0->           where->             candArgLists :: [[Type]]->             candArgLists = map (\((_,a,_), _) -> a) cands->             filterArgN :: Int -> [Either () String]->             filterArgN n =->                 if n == length inArgs->                   then []->                   else let targType = inArgs !! n->                        in ((if targType /= UnknownStringLit->                               then Left ()->                               else getCandsCatAt n) : filterArgN (n+1))->                 where->                   getCandsCatAt :: Int -> Either () String->                   getCandsCatAt n' =->                       let typesAtN = map (!!n') candArgLists->                           catsAtN = map (getTypeCategory scope) typesAtN->                       in case () of->                            --if any are string choose string->                            _ | any (== "S") catsAtN -> Right "S"->                              -- if all are same cat choose that->                              | all (== head catsAtN) catsAtN -> Right $ head catsAtN->                              -- otherwise no match, this will be->                              -- picked up as complete failure to match->                              -- later on->                              | otherwise -> Left ()->->       getCandCatMatches :: [ProtArgCast] -> [Either () String] -> [ProtArgCast]->       getCandCatMatches candsA cats = getMatches candsA 0->          where->            getMatches :: [ProtArgCast] -> Int -> [ProtArgCast]->            getMatches cands n =->                case () of->                  _ | n == length inArgs -> cands->                    | (inArgs !! n) /= UnknownStringLit -> getMatches cands (n + 1)->                    | otherwise ->->                        let catMatches :: [ProtArgCast]->                            catMatches = filter (\c -> Right (getCatForArgN n c) ==->                                                      (cats !! n)) cands->                            prefMatches :: [ProtArgCast]->                            prefMatches = filter (isPreferredType scope .->                                                    getTypeForArgN n) catMatches->                            keepMatches :: [ProtArgCast]->                            keepMatches = if length prefMatches > 0->                                            then prefMatches->                                            else catMatches->                        in getMatches keepMatches (n + 1)->            getTypeForArgN :: Int -> ProtArgCast -> Type->            getTypeForArgN n ((_,a,_),_) = a !! n->            getCatForArgN :: Int -> ProtArgCast -> String->            getCatForArgN n = getTypeCategory scope . getTypeForArgN n->->       -- utils->       -- filter a candidate/cast flavours pair by a predicate on each->       -- individual cast flavour->       filterCandCastPairs :: ([ArgCastFlavour] -> Bool)->                           -> [ProtArgCast]->                           -> [ProtArgCast]->       filterCandCastPairs predi = filter (\(_,cp) -> predi cp)->->       getFnArgs :: FunctionPrototype -> [Type]->       getFnArgs (_,a,_) = a->       returnIfOnne [] e = Left e->       returnIfOnne (l:ls) e = if length l == 1->                               then Right $ getHeadFn l->                               else returnIfOnne ls e->->       getHeadFn :: [ProtArgCast] -> FunctionPrototype->       getHeadFn l =  let ((hdFn, _):_) = l->                      in hdFn->       allFns = keywordOperatorTypes ++ specialFunctionTypes ++ scopeAllFns scope-->       none p = not . any p->       count p = length . filter p->-> data ArgCastFlavour = ExactMatch->                     | CannotCast->                     | ImplicitToPreferred->                     | ImplicitToNonPreferred->                       deriving (Eq,Show)->-> isPreferredType :: Scope -> Type -> Bool-> isPreferredType scope t = case find (\(t1,_,_)-> t1==t) (scopeTypeCategories scope) of->                       Nothing -> error $ "internal error: couldn't find type category information: " ++ show t->                       Just (_,_,p) -> p->-> getTypeCategory :: Scope -> Type -> String-> getTypeCategory scope t = case find (\(t1,_,_)-> t1==t) (scopeTypeCategories scope) of->                       Nothing -> error $ "internal error: couldn't find type category information: " ++ show t->                       Just (_,c,_) -> c->->-> implicitlyCastableFromTo :: Scope -> Type -> Type -> Bool-> implicitlyCastableFromTo scope from to = from == UnknownStringLit ||->                                      any (==(from,to,ImplicitCastContext)) (scopeCasts scope)->---resolveResultSetType --partially implement the typing of results sets where the types aren't-all the same and not unknown-used in union,except,intersect columns, case, array ctor, values, greatest and least--algo:-if all inputs are same and not unknown -> that type-replace domains with base types-if all inputs are unknown then text-if the non unknown types aren't all in same category then fail-choose first input type that is a preferred type if there is one-choose last non unknown type that has implicit casts from all preceding inputs-check all can convert to selected type else fail--code is not as much of a mess as findCallMatch--> resolveResultSetType :: Scope -> [Type] -> Either [TypeError] Type-> resolveResultSetType scope inArgs =->   chainTypeCheckFailed inArgs $ do->       case () of->               _ | null inArgs -> Left [TypelessEmptyArray]->                 | allSameType -> Right $ head inArgs->                 | allSameBaseType -> Right $ head inArgsBase->                 --todo: do domains->                 | allUnknown -> Right $ ScalarType "text"->                 | not allSameCat ->->                     Left [IncompatibleTypeSet inArgs]->                 | isJust targetType &&->                   allConvertibleToFrom (fromJust targetType) inArgs ->->                       Right $ fromJust targetType->                 | otherwise -> Left [IncompatibleTypeSet inArgs]->   where->      allSameType = all (== head inArgs) inArgs &&->                      head inArgs /= UnknownStringLit->      allSameBaseType = all (== head inArgsBase) inArgsBase &&->                      head inArgsBase /= UnknownStringLit->      inArgsBase = map (replaceWithBase scope) inArgs->      allUnknown = all (==UnknownStringLit) inArgsBase->      allSameCat = let firstCat = getTypeCategory scope (head knownTypes)->                   in all (\t -> getTypeCategory scope t == firstCat)->                          knownTypes->      targetType = case catMaybes [firstPreferred, lastAllConvertibleTo] of->                     [] -> Nothing->                     (x:_) -> Just x->      firstPreferred = find (isPreferredType scope) knownTypes->      lastAllConvertibleTo = firstAllConvertibleTo (reverse knownTypes)->      firstAllConvertibleTo (x:xs) = if allConvertibleToFrom x xs->                                       then Just x->                                       else firstAllConvertibleTo xs->      firstAllConvertibleTo [] = Nothing->      matchOrImplicitToFrom t t1 = t == t1 ||->                                   implicitlyCastableFromTo scope t1 t->      knownTypes = filter (/=UnknownStringLit) inArgsBase->      allConvertibleToFrom = all . matchOrImplicitToFrom--> replaceWithBase :: Scope -> Type -> Type-> replaceWithBase scope t@(DomainType _) =->   case lookup t (scopeDomainDefs scope) of->     Nothing -> error $ "internal error - couldn't find base type for " ++ show t->     Just u -> replaceWithBase scope u-> replaceWithBase _ t = t--todo:-row ctor implicitly and explicitly cast to a composite type-cast empty array, where else can an empty array work?--================================================================================--= checkAssignmentValue--assignment is ok if:-types are equal-there is a cast from src to target--> checkAssignmentValid :: Scope -> Type -> Type -> Either [TypeError] ()-> checkAssignmentValid scope src tgt =->     case () of->       _ | src == tgt -> Right()->         | assignCastableFromTo scope src tgt -> Right ()->         | otherwise -> Left [IncompatibleTypes tgt src]--> assignCastableFromTo :: Scope -> Type -> Type -> Bool-> assignCastableFromTo scope from to = from == UnknownStringLit ||->                                any (`elem` [(from,to,ImplicitCastContext)->                                            ,(from,to,AssignmentCastContext)]) (scopeCasts scope)
− Database/HsSqlPpp/TypeChecking/TypeType.lhs
@@ -1,136 +0,0 @@-Copyright 2009 Jake Wheat--This file contains the data type Type. It is kept separate so we can-compile the types and function information from the database-separately to AstInternal.ag.--Types overview:--Regular types: scalarType, arrayType, composite type, domaintype-we can use these anywhere.--semi first class types: row, unknownstringlit (called unknown in pg) --these can be used in some places, but not others, in particular an-expression can have this type or select can have a row with these-type, but a view can't have a column with this type (so a select can-be valid on it's own but not as a view. Not sure if Row types can be-variables, unknownstringlit definitely can't. (Update, seems a view-can have a column with type unknown.)--pseudo types - mirror pg pseudo types-Internal, LanguageHandler, Opaque probably won't ever be properly supported-Not sure exactly what Any is, can't use it in functions like the other any types?- - update: seems that Any is like AnyElement, but multiple Anys don't-   have to have the same type.-AnyElement, AnyArray, AnyEnum, AnyNonArray - used to implement polymorphic functions,-  can only be used in these functions as params, return type (and local vars?).-Cstring - treated as variant of text?-record -dynamically typed, depends where it is used, i think is used-for type inference in function return types (so you don't have to-write the correct type, the compiler fills it in), and as a dynamically-typed variable in functions, where it can take any composite typed-value.-void is used for functions which return nothing-trigger is a tag to say a function is used in triggers, used as a-return type only-typecheckfailed is used to represent the type of anything which the code-is currently unable to type check, this should disappear at some-point--The Type type identifies the type of a node, but doesn't necessarily-describe the type.-Arraytype, setoftype and row are treated as type generators, and are-unnamed so have structural equality. Other types sometimes effectively-have structural equality depending on the context...--Typing relational valued expressions:-use SetOfType combined with composite type for now, see if it works-out. If not, will have to add another type.--> {-# OPTIONS_HADDOCK hide #-}--> module Database.HsSqlPpp.TypeChecking.TypeType where--> data Type = ScalarType String->           | ArrayType Type->           | SetOfType Type->           | CompositeType String->           | UnnamedCompositeType [(String,Type)]->           | DomainType String->           | EnumType String->           | RowCtor [Type]->           | Pseudo PseudoType->           | TypeCheckFailed -- represents something which the type checker->                             -- doesn't know how to type check->                             -- or it cannot work the type out because of errors->           | UnknownStringLit -- represents a string literal->                              -- token whose type isn't yet->                              -- determined->             deriving (Eq,Show)--> data PseudoType = Any->                 | AnyArray->                 | AnyElement->                 | AnyEnum->                 | AnyNonArray->                 | Cstring->                 | Record->                 | Trigger->                 | Void->                 | Internal->                 | LanguageHandler->                 | Opaque->                   deriving (Eq,Show)--this list will need reviewing, probably refactor to a completely-different set of infos, also will want to add more information to-these, and to provide a way of converting into a user friendly-string. It is intended for this code to produce highly useful errors-later on down the line.-->                    -- mostly expected,got-> data TypeError = WrongTypes Type [Type]->                | UnknownTypeError Type->                | UnknownTypeName String->                | NoMatchingOperator String [Type]->                | TypelessEmptyArray->                | IncompatibleTypeSet [Type]->                | IncompatibleTypes Type Type->                | ValuesListsMustBeSameLength->                | NoRowsGivenForValues->                | UnrecognisedIdentifier String->                | UnrecognisedRelation String->                | UnrecognisedCorrelationName String->                | AmbiguousIdentifier String->                | ContextError String->                | MissingJoinAttribute->                | ExpressionMustBeBool->                | WrongNumberOfColumns->                 --shoved in to humour the Either Monad->                | MiscError String->                  deriving (Eq,Show)--some random stuff needed here because of compilation orders--cast context - used in the casts catalog--> data CastContext = ImplicitCastContext->                  | AssignmentCastContext->                  | ExplicitCastContext->                    deriving (Eq,Show)--used in the attribute catalog which holds the attribute names and-types of tables, views and other composite types.--> data CompositeFlavour = Composite | TableComposite | ViewComposite->                         deriving (Eq,Show)--type is always an UnnamedCompositeType:--> type CompositeDef = (String, CompositeFlavour, Type)--> isOperator :: String -> Bool-> isOperator = any (`elem` "+-*/<>=~!@#%^&|`?")--> type FunctionPrototype = (String, [Type], Type)-> type DomainDefinition = (Type,Type)
+ Database/HsSqlPpp/Utils.lhs view
@@ -0,0 +1,53 @@+Copyright 2009 Jake Wheat++This file contains some generic utility stuff++> {-# OPTIONS_HADDOCK hide #-}++> module Database.HsSqlPpp.Utils where++> import Data.Maybe+> import Data.List+> import Data.Either+> import Control.Arrow+> import Control.Monad.Error+> import Control.Applicative++> errorWhen :: (Error a) =>+>            Bool -> a -> Either a ()+> errorWhen cond = when cond . Left++> liftME :: a -> Maybe b -> Either a b+> liftME d m = case m of+>                Nothing -> Left d+>                Just b -> Right b++> both :: (a->b) -> (a,a) -> (b,b)+> both fn = fn *** fn++> (<:>) :: (Applicative f) =>+>          f a -> f [a] -> f [a]+> (<:>) a b = (:) <$> a <*> b++> eitherToMaybe :: Either a b -> Maybe b+> eitherToMaybe (Left _) = Nothing+> eitherToMaybe (Right b) = Just b++> fromRight :: b -> Either a b -> b+> fromRight b (Left _) = b+> fromRight _ (Right r) = r++> replace :: (Eq a) => [a] -> [a] -> [a] -> [a]+> replace _ _ [] = []+> replace old new xs@(y:ys) =+>   case stripPrefix old xs of+>     Nothing -> y : replace old new ys+>     Just ys' -> new ++ replace old new ys'+++> split :: Char -> String -> [String]+> split _ ""                =  []+> split c s                 =  let (l, s') = break (== c) s+>                            in  l : case s' of+>                                            [] -> []+>                                            (_:s'') -> split c s''
HsSqlSystem.lhs view
@@ -19,15 +19,20 @@ > import Control.Monad > import System.Directory > import Data.List+> import Data.Either  > import Database.HsSqlPpp.Parsing.Parser-> import Database.HsSqlPpp.Dbms.DatabaseLoader > import Database.HsSqlPpp.Parsing.Lexer-> --import Database.HsSqlPpp.TypeChecking.Ast-> import Database.HsSqlPpp.TypeChecking.TypeChecker++> import Database.HsSqlPpp.Ast.Annotator+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.Environment+ > import Database.HsSqlPpp.PrettyPrinter.PrettyPrinter+> import Database.HsSqlPpp.PrettyPrinter.AnnotateSource+ > import Database.HsSqlPpp.Dbms.DBAccess-> import Database.HsSqlPpp.TypeChecking.Scope+> import Database.HsSqlPpp.Dbms.DatabaseLoader  ================================================================================ @@ -35,10 +40,6 @@  > main :: IO () > main = do->   -- do this to avoid having to put flushes everywhere when we->   -- provide "..." progress thingys, etc.. should be fixed so only->   -- used in commands that need it->   hSetBuffering stdout NoBuffering >   args <- getArgs >   case () of >        _ | null args -> putStrLn "no command given" >> help []@@ -54,9 +55,9 @@ >            ,lexFileCommand >            ,parseFileCommand >            ,roundTripCommand->            ,getScopeCommand->            ,showInfoCommand->            ,showInfoDBCommand]+>            ,readEnvCommand+>            ,annotateSourceCommand+>            ,checkSourceCommand]  > lookupCaller :: [CallEntry] -> String -> Maybe CallEntry > lookupCaller ce name = find (\(CallEntry nm _ _) -> name == nm) ce@@ -104,9 +105,12 @@ >                  (Multiple loadSql)  > loadSql :: [String] -> IO ()-> loadSql args =+> loadSql args = do+>   -- do this to avoid having to put flushes everywhere when we+>   -- provide "..." progress thingys, etc..+>   hSetBuffering stdout NoBuffering >   let (db:fns) = args->   in forM_ fns $ \fn -> do+>   forM_ fns $ \fn -> do >   res <- parseSqlFile fn >   case res of >     Left er -> error $ show er@@ -198,53 +202,50 @@  ================================================================================ -> showInfoCommand :: CallEntry-> showInfoCommand = CallEntry->                    "showinfo"->                    "reads each file, parses, type checks, then outputs info on each statement \->                    \interspersed with the pretty printed statements"->                    (Multiple showInfo)+> annotateSourceCommand :: CallEntry+> annotateSourceCommand = CallEntry+>                    "annotateSource"+>                    "reads a file, parses, type checks, then outputs info on each statement \+>                    \interspersed with the original source code"+>                    (Single annotateSourceF) -> showInfo :: [FilePath] -> IO ()-> showInfo = mapM_ pt->   where->     pt f = do->       x <- parseSqlFile f->       case x of->            Left er -> print er->            Right sts -> do->                let aast = annotateAst sts->                mapM_ (putStrLn . printSqlAnn show . (:[])) aast+> annotateSourceF :: FilePath -> IO ()+> annotateSourceF f = do+>   aste <- parseSqlFile f+>   case aste of+>     Left er -> error $ show er+>     Right ast -> do+>                  src <- readFile f+>                  let aast = annotateAst ast+>                      srcnew = annotateSource False src aast+>                  putStr srcnew  ================================================================================ -> showInfoDBCommand :: CallEntry-> showInfoDBCommand = CallEntry->                    "showinfodb"->                    "pass the name of a database first, then \->                    \filenames, reads each file, parses, type checks, \->                    \then outputs info on each statement interspersed with the \->                    \pretty printed statements, will type check \->                    \against the given database schema"->                    (Multiple showInfoDB)-+> checkSourceCommand :: CallEntry+> checkSourceCommand = CallEntry+>                    "checksource"+>                    "reads each file, parses, type checks, then outputs any type errors"+>                    (Multiple checkSource) -> showInfoDB :: [FilePath] -> IO ()-> showInfoDB args = do->   let dbName = head args->   scope <- readScope dbName->   mapM_ (pt scope) $ tail args+> checkSource :: [FilePath] -> IO ()+> checkSource fns = mapM_ cs fns >   where->     pt scope f = do->       x <- parseSqlFile f->       case x of->            Left er -> print er->            Right sts -> do->                let aast = annotateAstScope scope sts->                mapM_ (putStrLn . printSqlAnn annotToS . (:[])) aast->     annotToS :: Annotation -> String->     annotToS = concat . intersperse "\n" . map show+>     cs f = do+>            aste <- parseSqlFile f+>            case aste of+>                      Left er -> error $ show er+>                      Right ast ->+>                        do+>                        let aast = annotateAst ast+>                            tes = getTypeErrors aast+>                        mapM_ (putStrLn.showSpTe) tes+>     showSpTe (Just (SourcePos fn l c), e) =+>         fn ++ ":" ++ show l ++ ":" ++ show c ++ ":\n" ++ show e+>     showSpTe (_,e) = "unknown:0:0:\n" ++ show e ++ ================================================================================  > roundTripCommand :: CallEntry@@ -271,26 +272,36 @@  ================================================================================ -This writes out the default scope using show, which you can then-compile. The output is all on one big line (something like 400,000-characters!) and compiles very slowly for the catalog of a standard-template1 database...+This reads an environment from a database and writes it out using show. -> getScopeCommand :: CallEntry-> getScopeCommand = CallEntry->                   "getscope"->                   "read the catalogs for the given db and dump a scope variable source text to stdout"->                   (Single getScope)-> getScope :: String -> IO ()-> getScope dbName = do->   s <- readScope dbName->   putStrLn "{-# OPTIONS_HADDOCK hide #-}"->   putStrLn "module Database.HsSqlPpp.TypeChecking.DefaultScope where"->   putStrLn "import Database.HsSqlPpp.TypeChecking.TypeType"->   putStrLn "import Database.HsSqlPpp.TypeChecking.ScopeData"->   putStrLn "-- | Scope value representing the catalog from a default template1 database"->   putStrLn "defaultScope :: Scope"->   putStr "defaultScope = "+> readEnvCommand :: CallEntry+> readEnvCommand = CallEntry+>                   "readenv"+>                   "read the catalogs for the given db and dump a Environment value source text to stdout"+>                   (Single readEnv)+> readEnv :: String -> IO ()+> readEnv dbName = do+>   s <- readEnvironmentFromDatabase dbName+>   putStr "\n\+>          \Copyright 2009 Jake Wheat\n\+>          \\n\+>          \This file contains\n\+>          \\n\+>          \> {-# OPTIONS_HADDOCK hide  #-}\n\+>          \\n\+>          \> module Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment\n\+>          \>     (defaultTemplate1Environment\n\+>          \>      ) where\n\+>          \\n\+>          \> import Database.HsSqlPpp.AstInternals.EnvironmentInternal\n\+>          \> import Database.HsSqlPpp.AstInternals.TypeType\n\+>          \\n\+>          \> defaultTemplate1Environment :: Environment\n\+>          \> defaultTemplate1Environment = (\\l -> case l of\n\+>          \>                                       Left x -> error $ show x\n\+>          \>                                       Right e -> e)\n\+>          \>                                 $ updateEnvironment defaultEnvironment "+ >   print s  ================================================================================
README view
@@ -6,23 +6,19 @@  Status: it successfully parses and accurately pretty prints the three moderate sized SQL files from another project of mine, but there are-lots of missing bits. Coverage of SQL is reasonable, see below for-more details on what is supported and unsupported.+lots of missing bits. Coverage of SQL is reasonable - it's possible+that your SQL files will parse ok, but it's also possible that they+won't parse at all - see below for more details on what is supported+and unsupported.  It also has the beginnings of a type checker, which currently can type check a large subset of expressions and selects that the parser can-parse, but is in an early state. You can run the type checker on your-SQL, see the 'usage' file for details.--There is a command line wrapper, HsSqlSystem.lhs, which provides some-utility functions to access some of the library code.+parse, and some aspects of all of the DDL statements that parse, but+is in an early state. You can run the type checker on your SQL in+various ways from the command line, see the 'usage' file for details.  It comes with a small test suite. -There is not much documentation at the moment. See the 'usage' file-where there are instructions on how to parse files, and type check-them to see how well the code supports your SQL source.- It is Cabal-installable, run: cabal update then@@ -37,24 +33,30 @@ See the file 'development' for some notes on how to work with the source. -The main dependencies of this project are: Parsec 3, HUnit, HDBC and-UUAGC.+The main dependencies of this project are: Parsec 3, HUnit, HDBC,+UUAGC and Data.Generics. The tests run without accessing PostGreSQL,+but some of the utility functions do need it.  ================================================================================  Homepage -The project is hosted on Launchpad-http://launchpad.net/hssqlppp/+There isn't really a homepage or website yet, but you can view the+Launchpad page where the code is hosted, and the HackageDB page. -You can get the latest code using Bazaar:-bzr branch lp:~jakewheat/hssqlppp/trunk+Launchpad:+http://launchpad.net/hssqlppp/  HackageDB page: http://hackage.haskell.org/package/hssqlppp-This should hopefully have some basic Haddock documentation to view-when version 0.0.6 is uploaded.+You can also browse the limited Haddock documentation online here. +You can get the latest development code from Launchpad using Bazaar:+bzr branch lp:~jakewheat/hssqlppp/trunk++To get a snapshot release, see the downloads on the Launchpad page, or+use cabal install.+ Contact  Let me know if you're using/ interesting in using the library, if you@@ -134,26 +136,23 @@  = Other current downsides: -The AST node types aren't well designed, in particular they contain-patchy location information, and limited other annotations. This is-being worked on.+The design of the AST node types is pretty basic.  Not much work has been done on correctly rejecting invalid SQL (although it does pretty well despite this) and not much thought has been put into error messages and error reporting yet, this is slowly-improving, and at some point will become a major focus.+improving, and at some point will become a major focus - I hope this+code will provide substantial benefits when developing in PL/pgSQL in+the future. -Supporting other SQL dialects: I think it might be realistic to-support portable select, insert, update and delete with ?-placeholders. I think cross platform DDL isn't ever going to be-sensible in non toy databases, and if you wanted to use this utility-e.g. support MySQL or MS SQL Server, it might be best to start by-forking the code, I would be happy to help support this in any way I-can.+Only supports PostGreSQL SQL and PL/pgSQL. -Future plans:+Future plans (provisional):  * use this system to develop a Lint-type checker for PL/pgSQL;++* provide support to help developing SQL from an IDE (targeting Emacs+  mainly)  * support type checking simple SQL statements that you'd embed in   Haskell code, including with ? placeholders, to support generating
TODO view
@@ -1,25 +1,61 @@+new features:+pretty printer for annotations for annotatesource and checksource -= Current TODO list+tidy up syb stuff+review use of annotations/attributes in type checker+run through error handling, fix spaghetti code and bizarre stuff+add either to remaining utils, convert error to either so we get+   internal errors in the aast instead of killing the program+check code ag <-> lhs+review the typechecking modules -> can get rid of astutils? probably+   not, but can rename it to errorhandling or similar+review ast/typechecking split, move ast to separate folder?,+  make sure don't have typechecking stuff in ast, and ast doesn't+  depend on type checking stuff (problem: annotations?) -TODOs in rough order that they are intended to be done+lint stuff: ambiguous identifiers, null usage, duplicate definitions -provide type check errors with source positions-sort out source position collection in parser-investigate syb for annotation instances-use f :: Annotation -> Doc for pretty printing annotations-work on statement info-get scope updating whilst checking+error handling fixup+not just error handling, but most of the code in the type checking+files.+1. don't use error, use InternalError as part of a Either, these+   end up in the ast tree+2. add eithers to a bunch of env functions - make sure we check+   all the preconditions, e.g. check a view exists when trying+   to look up the attributes. Also add a bunch of precondition+   checks to the updateenvironment function, e.g. checking for+   duplicate types+3. make sure errors from updateenvironment aren't ignored, but+   end up in the ast tree+4. review the error handling utilities - probably could do with+   a rethink, also definitely need better names. The kind of things+   needed are: way to propagate typecheckfailed, dealing with+   conversions from lists of eithers to single eithers by+   concatenating the errors, if no errors take the last right,+   etc.+5. support variadic args to get rid of the current hacks to work+   around this not being supported+6. go through all the actual type checking code and work out some more+   consistent way of writing the code, and work on making the+   algorithms clearer, some are really obscure at the moment, mainly+   due to programmer incompetence and also many changes to the way+   various things are handled (particularly the error handling and+   typecheckfailed propagation), and just need pretty much rewriting+   from scratch.+++= Additional TODO list towards alpha release++run through chaos sql and fix all type checking problems, make sure+roundtripping through annotate source doesn't mangle the code start work on type checking inside functions - start with params,    return types, non plpgsql statements, stuff with selects (e.g. for). work on parsing and type checking pg_dump output, then do a util to    dump and type check a live database (this will lead to being able    to run the lint process on a live database rather than source)-sort out api + do haddock+work out api + do haddock provide installation instructions for non haskell programmers-chain scopes when typechecking multiple files from util, provide api-   to do this from code - parse and/or type check todo list: "identifier" 6.5e-5@@ -55,20 +91,31 @@ order by - do properly limit, offset with queries-upto datatypes ch 8 in pg manual+type modifiers+data type names with spaces in them+timestamps+schemas+alternative text for true and false+enums+geometric types weird syntax+composites: selector variants, rowctors, component get/update+do all keyword and template1 operators+any/some/all subqueries and arrays+check over rowwise comparisons+indexes: create/alter/drop +go over what more type checking could be done+ stage 2:-make this useful by working on the showinfodb function:-instead of interspersing the statementinfo with the pretty printed-   statements, insert or overwrite the statementinfo comments in the+instead of interspersing the annotation output with the pretty printed+   statements, insert or overwrite the annotation comments in the    original source so we preserve formatting and other comments.-use the type pretty printer to make the statementinfo comments more readable want to also output types of parts of statements, e.g. the select in a    for statement or insert, etc.. Other things that could be useful    include adding the resolved function prototype for each function    used which has overloads so you can see which overload is being    called, write out the canonicalized ast: so e.g. we have all the-   casts made explicit, etc.+   casts made explicit, etc. -> use the annotation system for this With this in place, the code actually has some use for real code, in    that we can use it to easily view the types of views, etc. inline    in the real sql source code@@ -86,7 +133,7 @@  ================================================================================ -rough milestones for release 0.1:+rough milestones for first alpha in addition to all the stage 3 items above,  add support for nearly all syntax for parsing and type checking,
changelog view
@@ -1,3 +1,12 @@+environment++New environment data type with abstracted implementation, can now+process ddl in a script and type check against it. Some work on+variable scoping, and annotations. New commands: annotateSource (adds+some annotations for statements into the original source code as+comments), and checksource, which outputs type errors in emacs+friendly format.+ annotated tree  The API and type checking code has had a major overhaul, now uses
development view
@@ -5,14 +5,15 @@ UUAGC is used in the type checking, there are some links at the top of AstInternal.ag for more information. +The code uses a few GHC extensions, I don't know if they are+conservative extensions or not.+ Two of the files are generated: -DefaultScope.hs -> generated using- ./HsSqlSystem.lhs getscope template1 > something && cp something ...+DefaultTemplate1Environment.hs -> generated using+ ./HsSqlSystem.lhs readenv template1 > something && cp something ...  You shouldn't need to regenerate this file unless you change the- Scope data type, in which case you'll need to use the- DefaultScopeEmpty.hs file to be able to generate a new scope. There- is some info in the DefaultScopeEmpty.hs file along these lines.+ Environment data type.  AstInternal.hs -> this is generated from AstInternal.ag and  Typechecking.ag using uuagc, see AstInternal.ag for the exact@@ -32,99 +33,94 @@  Source file overview: -(The type checking code is a bit spread out, ideally would want one-file for the ast, one file containing type checking code, and then-some clear additional little lib files, but the ast and type checking-are spread out in Ast.ag, AstUtils.lhs, TypeChecking.ag,-TypeCheckingH.lhs and TypeType.lhs. (The little libs also used in the-type checking are Scope.lhs, ScopeReader.lhs and TypeConversion.lhs.))- Executables: -HsSqlSystem.lhs: program to expose some functionality on the command-                 line, mainly utilities to help with developing the-                 source. Run './HsSqlSystem.lhs help' to list the-                 commands.--HsSqlPppTests.lhs: small file to pull together the tests from other test-                   suites, and make them into an executable.--Other source files, under Database/HsSqlppp/--AstInternal.ag: uuagc source for the ast data types and the api functions for-        type checking asts.+HsSqlSystem.lhs -Ast.hs, TypeChecker.hs: forwarder modules for the generated-                        AstInternal.hs and additional utility-                        modules. These are the public APIs for the-                        Ast, and the type checking.+program to expose some functionality on the command line, mainly+utilities to help with developing the source. Run './HsSqlSystem.lhs+help' to list the commands. -AstAnnotation.lhs: data types for the annotation, and some utilities-                   for working with annotated stuff+HsSqlPppTests.lhs -AstCheckTests.lhs: hunit tests for type checking+small file to pull together the tests from other test suites, and make+them into an executable. -AstUtils.lhs: some utilities used mainly in type checking+Main code files: -DatabaseLoader.lhs: beginnings of a program to load sql from source-                     into postgresql, pretty rough and unfinished at-                     the moment.+The main parsing code is in Database/HsSqlPpp/Parsing/Lexer.lhs and+Database/HsSqlPpp/Parsing/Parser.lhs -DatabaseLoaderTests.lhs: almost empty hunit tests, intended to be used-                         mainly for testing error source positioning-                         when using databaseloader.lhs+The main pretty printing code is in+Database/HsSqlPpp/PrettyPrinter/PrettyPrinter.lhs and there is also+some code to insert types, etc. into the original source in+Database/HsSqlPpp/PrettyPrinter/AnnotateSource.lhs -DBAccess.lhs: some simple wrappers around hdbc to run sql statements-              and do simple selects.+The main ast and typechecking code is in the following files:+attribute grammar files:+Database/HsSqlPpp/AstInternals/AstInternal.ag contains the ast nodes+Database/HsSqlPpp/AstInternals/TypeChecking.ag contains the ATTR and SEM code+for type checking+These are supplemented by a bunch of helper modules: -DefaultScopeEmpty.hs: an empty version of default scope, used to allow-                      the default scope generation to run when you've-                      hosed the DefaultScope.hs file.+Database/HsSqlPpp/AstInternals/TypeConversion.lhs - contains the code+which handles the implicit type cast resolution (these are postgresql+algorithms used to lookup function calls, work out the types of result+sets and check assignments). -DefaultScope.hs: generated file which contains the scope from a-                 standard template1 database. The intended use is to-                 support parsing and typechecking sql without having-                 online access to postgresql. Not sure if this is-                 useful. It's definitely quick enough to read this-                 information from a database at type checking time.+Database/HsSqlPpp/AstInternals/TypeCheckingH.lhs - contains some code+which has been moved out of TypeChecking.ag for ease of development -Lexer.lhs: small file to lex sql source code.+Database/HsSqlPpp/AstInternals/AstAnnotation.lhs - contains the data+types and a few helper functions for the annotation data types. -ParseErrors.lhs: small utility to add a bit of extra value to parsec errors.+Database/HsSqlPpp/AstInternals/TypeType.lhs - contains the data types+and a few helper functions for postgresql types, and also type errors. -Parser.lhs: one of the main files - takes the output of the lexer and-            produces asts.+Database/HsSqlPpp/AstInternals/AstUtils.lhs - contains some error handling utils -ParserTests.lhs: lots of hunit tests for the parser.+Database/HsSqlPpp/AstInternals/AnnotationUtils.lhs - contains some+additional annotation functions which depend on the ast nodes -PrettyPrinter.lhs: code to produce reparsable source from an ast.+the code to track environment changes during type checking+(e.g. catalog changes, variables/bindings) is in the following two files:+Database/HsSqlPpp/AstInternals/EnvironmentInternal.lhs - the main code+to create, update and use environments.+Database/HsSqlPpp/AstInternals/EnvironmentReader.lhs - code to read a+catalog from a database and produce an environment value.+Database/HsSqlPpp/AstInternals/DefaultTemplate1Environment.lhs - this+is a copy of the default template1 database environment -Scope.lhs: data type to store mainly information from the pg catalog,-           used during type checking, plus some utilities for this-           datatype.+The code under Database/HsSqlPpp/AstInternals/ is hidden behind the+public modules in Database/HsSqlPpp/Ast/:+Database/HsSqlPpp/Ast/Annotator.lhs+Database/HsSqlPpp/Ast/Ast.lhs+Database/HsSqlPpp/Ast/Environment.lhs+Database/HsSqlPpp/Ast/Annotation.lhs+These pretty much just forward exports, and add a bit of haddock+organisation. -ScopeReader.lhs: utility to read a scope data type from a-                 database. Can access this function from-                 HsSqlSystem.lhs.+The hunit tests are in:+Database/HsSqlPpp/Tests/AstCheckTests.lhs+Database/HsSqlPpp/Tests/ParserTests.lhs+and also this file which isn't really used yet:+Database/HsSqlPpp/Tests/DatabaseLoaderTests.lhs -TypeChecking.ag: the uuagc ATTR and SEM constructs used in type-                 checking, plus the smaller bits of type checking code-                 inline.+There are a few utilities to access databases in+Database/HsSqlPpp/Dbms/, this code is very sketchy. -TypeCheckingH.lhs: larger bits of typechecking code and support types,-                   functions, moved from TypeChecking.ag to mitigate-                   some of the pain of developing using a-                   preprocessor.+These files all have (hopefully) useful comments, although many of+these haven't been kept up to date. -TypeConversion.lhs: code to support the type conversion algorithms-                    used in postgresql, which are quite complicated.-                    In particular, the code used to match an exact-                    function given a name and a bunch of args.+The error handling in the type+checking code is in flux so quite a lot of the code there is a bit of+a mess unfortunately (I'm still not sure what the best way to do this is.). + Also, some of the annotation functions use SYB which I'm a bit crap+with so that code is also a bit of a mess. -TypeType.lhs: Some types used by the type checker, should live with-              the ast nodes but are here to support splitting the code-              out of the ag files for the same reason that-              TypeCheckingH.lhs exists.+The test coverage isn't really great, but it's not bad (this will be+fixed at some point). -These files all have (hopefully) useful comments.+The bits which I hope aren't too bad are the ast node data types, the+parser code, and the environment code.
hssqlppp.cabal view
@@ -1,41 +1,50 @@ Name:                hssqlppp-Version:             0.0.6+Version:             0.0.7 Synopsis:            Sql parser and type checker-Description:         Sql parser, pretty printer and type checker, targets PostGreSQL SQL-                     and PL/pgSQL, uses Parsec and UUAGC.--                     Overview:--                     see the module 'Database.HsSqlPpp.TypeChecking.Ast' for the ast types;--                     'Parser' for converting text to asts;--                     'PrettyPrinter' for converting asts to text;--                     'TypeChecker' for annotating asts (this does the-                     type checking), and working with annotated trees;--                     'Scope' to read a catalog from a database to type check against, or-                     to generate catalog information;--                     'DatabaseLoader' for the beginnings of a routine-                       to load SQL into a database (e.g. to generate-                       an ast then load it into a database without-                       loading it via psql). The loader just about-                       does the job but error handling is a bit crap-                       at the moment.--                     Comes with a HUnit test suite which you can run using the HsSqlPppTests-                     executable, and command line access to some functions via a exe called-                     HsSqlSystem. See the project page <https://launchpad.net/hssqlppp>-                     for more information and documentation links.+Description:+    Sql parser, pretty printer and type checker, targets PostGreSQL SQL+    and PL/pgSQL, uses Parsec and UUAGC.+    .+    Overview:+    .+    see the module 'Ast' for the ast types;+    .+    'Parser' for converting text to asts;+    .+    'PrettyPrinter' for converting asts to text;+    .+    'AnnotateSource' for pretty printing annotations inline with original source;+    .+    'Annotator' for annotating asts (this does the type checking);+    and working with annotated trees;+    .+    'SqlTypes' for the data types which represent SQL types, the data+    type for type errors, and some support functions;+    .+    'Annotation' for the annotation data types and utilities, this+    also contains the data types for SQL types;+    .+    'Environment' to read a catalog from a database to type check against,+    or to generate catalog information;+    .+    'DatabaseLoader' for the beginnings of a routine to load SQL into+    a database (e.g. to generate an ast then load it into a database+    without loading it via psql). The loader just about does the job+    but error handling is a bit crap at the moment.+    .+    Comes with a HUnit test suite which you can run using the+    HsSqlPppTests executable, and command line access to some+    functions via a exe called HsSqlSystem, run this file with no+    arguments to get some help. See the project page+    <https://launchpad.net/hssqlppp> for more information and+    documentation links.  License:             BSD3 License-file:        LICENSE Author:              Jake Wheat Maintainer:          jakewheatmail@gmail.com Build-Type:          Simple-Cabal-Version:       >=1.2+Cabal-Version:       >=1.2.3 copyright:           Copyright 2009 Jake Wheat stability:           pre-alpha homepage:            https://launchpad.net/hssqlppp@@ -49,9 +58,8 @@                      usage,                      LICENSE,                      changelog,-                     Database/HsSqlPpp/TypeChecking/AstInternal.ag-                     Database/HsSqlPpp/TypeChecking/TypeChecking.ag-                     Database/HsSqlPpp/TypeChecking/DefaultScopeEmpty.hs+                     Database/HsSqlPpp/AstInternals/AstInternal.ag+                     Database/HsSqlPpp/AstInternals/TypeChecking.ag                      sqltestfiles/system.sql                      sqltestfiles/server.sql                      sqltestfiles/client.sql@@ -66,12 +74,16 @@                      HDBC,                      HDBC-postgresql,                      directory-  Exposed-modules:   Database.HsSqlPpp.TypeChecking.Ast,+  Exposed-modules:   Database.HsSqlPpp.Ast.Ast,                      Database.HsSqlPpp.Parsing.Parser,                      Database.HsSqlPpp.PrettyPrinter.PrettyPrinter,-                     Database.HsSqlPpp.TypeChecking.TypeChecker,-                     Database.HsSqlPpp.TypeChecking.Scope,+                     Database.HsSqlPpp.PrettyPrinter.AnnotateSource,+                     Database.HsSqlPpp.Ast.Annotator,+                     Database.HsSqlPpp.Ast.Environment,+                     Database.HsSqlPpp.Ast.Annotation,+                     Database.HsSqlPpp.Ast.SqlTypes,                      Database.HsSqlPpp.Dbms.DatabaseLoader+  extensions:        DeriveDataTypeable,RankNTypes,ScopedTypeVariables  Executable HsSqlSystem   Main-is:           HsSqlSystem.lhs@@ -81,24 +93,30 @@                      HDBC,                      HDBC-postgresql,                      directory-  Other-Modules:     Database.HsSqlPpp.TypeChecking.AstAnnotation,-                     Database.HsSqlPpp.TypeChecking.Ast,-                     Database.HsSqlPpp.TypeChecking.AstInternal,-                     Database.HsSqlPpp.TypeChecking.TypeChecker,-                     Database.HsSqlPpp.TypeChecking.AstUtils,+  Other-Modules:     Database.HsSqlPpp.AstInternals.AstAnnotation,+                     Database.HsSqlPpp.Ast.Ast,+                     Database.HsSqlPpp.Ast.Annotation,+                     Database.HsSqlPpp.Ast.SqlTypes,+                     Database.HsSqlPpp.AstInternals.AstInternal,+                     Database.HsSqlPpp.Ast.Annotator,+                     Database.HsSqlPpp.AstInternals.AstUtils,                      Database.HsSqlPpp.Dbms.DatabaseLoader,                      Database.HsSqlPpp.Dbms.DBAccess,-                     Database.HsSqlPpp.TypeChecking.DefaultScope,                      Database.HsSqlPpp.Parsing.Lexer,                      Database.HsSqlPpp.Parsing.ParseErrors,                      Database.HsSqlPpp.Parsing.Parser,                      Database.HsSqlPpp.PrettyPrinter.PrettyPrinter,-                     Database.HsSqlPpp.TypeChecking.ScopeData,-                     Database.HsSqlPpp.TypeChecking.Scope,-                     Database.HsSqlPpp.TypeChecking.ScopeReader,-                     Database.HsSqlPpp.TypeChecking.TypeCheckingH,-                     Database.HsSqlPpp.TypeChecking.TypeConversion,-                     Database.HsSqlPpp.TypeChecking.TypeType+                     Database.HsSqlPpp.PrettyPrinter.AnnotateSource,+                     Database.HsSqlPpp.AstInternals.TypeCheckingH,+                     Database.HsSqlPpp.AstInternals.TypeConversion,+                     Database.HsSqlPpp.AstInternals.TypeType,+                     Database.HsSqlPpp.Ast.Environment,+                     Database.HsSqlPpp.AstInternals.EnvironmentInternal,+                     Database.HsSqlPpp.AstInternals.EnvironmentReader,+                     Database.HsSqlPpp.Utils+                     Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment+                     Database.HsSqlPpp.AstInternals.AnnotationUtils+  extensions:        DeriveDataTypeable,RankNTypes,ScopedTypeVariables  Executable HsSqlPppTests   Main-is:           HsSqlPppTests.lhs@@ -111,24 +129,30 @@                      HDBC-postgresql,                      directory -  Other-Modules:     Database.HsSqlPpp.TypeChecking.AstAnnotation,+  Other-Modules:     Database.HsSqlPpp.AstInternals.AstAnnotation,                      Database.HsSqlPpp.Tests.AstCheckTests,-                     Database.HsSqlPpp.TypeChecking.Ast,-                     Database.HsSqlPpp.TypeChecking.AstInternal,-                     Database.HsSqlPpp.TypeChecking.TypeChecker,-                     Database.HsSqlPpp.TypeChecking.AstUtils,+                     Database.HsSqlPpp.Ast.Ast,+                     Database.HsSqlPpp.Ast.Annotation,+                     Database.HsSqlPpp.AstInternals.AstInternal,+                     Database.HsSqlPpp.Ast.Annotator,+                     Database.HsSqlPpp.AstInternals.AstUtils,                      Database.HsSqlPpp.Dbms.DatabaseLoader,                      Database.HsSqlPpp.Tests.DatabaseLoaderTests,                      Database.HsSqlPpp.Dbms.DBAccess,-                     Database.HsSqlPpp.TypeChecking.DefaultScope,                      Database.HsSqlPpp.Parsing.Lexer,                      Database.HsSqlPpp.Parsing.ParseErrors,                      Database.HsSqlPpp.Parsing.Parser,                      Database.HsSqlPpp.Tests.ParserTests,                      Database.HsSqlPpp.PrettyPrinter.PrettyPrinter,-                     Database.HsSqlPpp.TypeChecking.ScopeData,-                     Database.HsSqlPpp.TypeChecking.Scope,-                     Database.HsSqlPpp.TypeChecking.ScopeReader,-                     Database.HsSqlPpp.TypeChecking.TypeCheckingH,-                     Database.HsSqlPpp.TypeChecking.TypeConversion,-                     Database.HsSqlPpp.TypeChecking.TypeType+                     Database.HsSqlPpp.PrettyPrinter.AnnotateSource,+                     Database.HsSqlPpp.AstInternals.TypeCheckingH,+                     Database.HsSqlPpp.AstInternals.TypeConversion,+                     Database.HsSqlPpp.AstInternals.TypeType,+                     Database.HsSqlPpp.Ast.Environment,+                     Database.HsSqlPpp.Ast.SqlTypes,+                     Database.HsSqlPpp.AstInternals.EnvironmentInternal,+                     Database.HsSqlPpp.AstInternals.EnvironmentReader,+                     Database.HsSqlPpp.Utils+                     Database.HsSqlPpp.AstInternals.DefaultTemplate1Environment+                     Database.HsSqlPpp.AstInternals.AnnotationUtils+  extensions:        DeriveDataTypeable,RankNTypes,ScopedTypeVariables
questions view
@@ -42,6 +42,7 @@ = uuagc  compare with aspectag - what are the upsides/downsides?+update - looks like the syntax still needs a lot of work for aspectag  = postgresql questions 
usage view
@@ -3,9 +3,10 @@ = HsSqlSystem  Command line access to a number of functions is provided by-HsSqlSystem.lhs. You can list the commands using './HsSqlSystem.lhs-help', and you can get the descriptions of what these commands do-using './HsSqlSystem.lhs help all'.+HsSqlSystem.lhs. You can list the commands using 'HsSqlSystem help',+and you can get the descriptions of what these commands do using+'HsSqlSystem help all'. (Assuming you have cabal installed the+software and have the cabal binary folder in your path.)  The commands which access postgresql probably won't work right on your system, they are in a very early alpha state.@@ -13,8 +14,10 @@ The most interesting commands are: * parsefile * roundtripfile, loadsql-* showinfodb+* annotateSource+* checksource + == parsefile  Pass in one or more filenames for files containing sql source, and the@@ -42,39 +45,27 @@ will hopefully can give a bit more confidence that the sql has been parsed accurately. -== showinfodb--This command will take a sql file, parse it, type check it and then-pretty print the lines interspersed with comments containing-annotation information gathered during type checking (including type-errors), and other information tailored to the statement type-(e.g. create function shows function prototype, create view shows-column names and types in view).--You pass a database in as the first arg, and it type checks against-the catalog of that database. It currently doesn't type check against-definitions given in the same file though, which is a bit of a-limitation, but you can load the sql files into pg first, then type-check and see types for some views, functions, etc..--some example output of showinfodb:+== annotateSource +This command takes a filename, parses and type checks the file, and+then outputs a copy of the source with the main annotations attached+to the statements interspersed into the source in comments. This can+be used e.g. to view the attribute names and types of a view. After+some more work has been done on this command, it is intended that this+is expanded to provide lots of useful comments which are maintained in+your actual source and checked in to source control, etc.. -/*- TypeAnnotation (Pseudo Void)-StatementInfoA (RelvarInfo ("base_relvar_attributes",ViewComposite,SetOfType (UnnamedCompositeType [("attribute_name",ScalarType "name"),("type_name",ScalarType "name"),("relvar_name",ScalarType "name")])))-SourcePos "sqltestfiles/system.sql" 67 13 */- create view base_relvar_attributes as-  select attname as attribute_name,typname as type_name,relname as relvar_name-    from pg_attribute-         inner join pg_class on (attrelid = pg_class.oid)-         inner join pg_type on (atttypid = pg_type.oid)-         inner join base_relvars on (relname = base_relvars.relvar_name)-    where (attnum >= 1);+== checksource -Pretty printers for the Annotation types are planned, to make this-comment more readable.+This command takes a set of files and type checks each one in turn+(later files can depend on definitions appearing in files earlier in+the file list). It outputs all the type errors found in Emacs friendly+format. This mostly just shows you all the bits that haven't been+implemented in the type checker yet. This is the early precursor to+the lint checking process. +Pretty printers and other work for the Annotation types are planned,+to make the annotateSource comments and error messages more readable.  == reasonably up to date output of './HsSqlSystem.lhs help all' @@ -109,29 +100,27 @@ exists, it quits. Parses the source file then pretty prints it to the target filename. -getscope-read the catalogs for the given db and dump a scope variable source+readenv+read the catalogs for the given db and dump a Environment value source text to stdout -showinfo-reads each file, parses, type checks, then outputs info on each-statement interspersed with the pretty printed statements+annotateSource+reads a file, parses, type checks, then outputs info on each statement+interspersed with the original source code -showinfodb-pass the name of a database first, then filenames, reads each file,-parses, type checks, then outputs info on each statement interspersed-with the pretty printed statements, will type check against the given-database schema+checksource+reads each file, parses, type checks, then outputs any type errors  ================================================================================  = library usage -see the haddock docs to get a basic idea of using the libraries. The+See the haddock docs to get a basic idea of using the libraries. The source for HsSqlSystem.lhs might also be worth a look for some-examples. Hopefully, haddock docs will be online at+examples. You should be able to view the haddock docs online on the+hackagedb page here: http://hackage.haskell.org/package/hssqlppp-when 0.0.6 is uploaded.+  ================================================================================