Commits

Kirill Simonov committed 6a0c3d4

Added tests for table functions and for decorators.

Comments (0)

Files changed (3)

test/input/library.yaml

 ########################################################################
 
 - title: Table functions and operators
-  tests: []
+  tests:
+
+  # Joining
+  # 1 - N
+  - uri: /school.program
+  - uri: /school.department
+  # N - 1
+  - uri: /program.school
+  - uri: /department.school
+  # 1 - 1
+  - uri: /instructor.confidential
+  - uri: /confidential.instructor
+  # Cross join
+  - uri: /school.fiber(school)
+    skip: true
+  # Fiber join
+  - uri: /department.fiber(program,school)
+  - uri: /classification.fiber(classification,code,part_of)
+            {part_of, code}
+  # Context
+  - uri: /school.fiber(school){root().school.code, this().code}
+    skip: true
+  # Invalid link
+  - uri: /student.instructor
+    expect: 400
+
+  # Filtering
+  - uri: /school?code='mus'
+  - uri: /student?!is_active
+  # Coercion
+  - uri: /department?school
+
+  # Sorting
+  - uri: /department.sort(name)
+  - uri: /department.sort(name+)
+  - uri: /department.sort(name-)
+  # NULL
+  - uri: /department.sort(school+)
+  - uri: /department.sort(school-)
+  # Combined with joining
+  - uri: /school.department.sort(code+)
+  - uri: /school.sort(code+).department.sort(code+)
+  # Multiple arguments
+  - uri: /course.sort(credits-,number+)?department='stdart'
+
+  # Limiting
+  - uri: /course.limit(9)
+  - uri: /course.limit(3,6)
+  # Combined with sort
+  - uri: /course.sort(credits+).limit(9)
+  - uri: /course.limit(9).sort(credits+)
+  - uri: /course.sort(credits-).limit(9).sort(number-)
+
+  # Selecting
+  - uri: /school{name}
+  - uri: /department{school.name, name}
+  - uri: /school{*}
+  - uri: /department{school.*, *}
+
+########################################################################
 
 - title: Decorators
-  tests: []
-
-
-
-
-# FIXME: update and refurbish!
-
-
-- title: Scalar functions
-  ifndef: sqlite
-  tests:
-  - title: Boolean constants and logical operators
-    tests:
-    # Boolean constants.
-    - uri: /{true(),false()}
-    # Boolean->Boolean cast (identity).
-    - uri: /{boolean(null()),boolean(true()),boolean(false())}
-    # Untyped boolean values.
-    - uri: /{boolean('true'),boolean('false')}
-    # Invalid untyped boolean values.
-    - uri: /{boolean('')}
-      expect: 400
-    - uri: /{boolean('X')}
-      expect: 400
-    # Number->Boolean cast (null => false, otherwise => true).
-    - uri: /{boolean(integer(null())),boolean(0),boolean(1),
-             boolean(0.0),boolean(1.0),boolean(0e0),boolean(1e0)}
-    # String->Boolean cast (null, '' => false, otherwise => true).
-    - uri: /{boolean(string(null())),boolean(string('')),boolean(string('X')),
-             boolean(string('true')),boolean(string('false'))}
-           # Note: boolean(string('false')) => true
-    # The AND operator.
-    - uri: /{false()&false(),false()&true(),true()&false(),true()&true(),
-             null()&false(),null()&true(),null()&null()}
-    # Auto-cast of arguments (false,true).
-    - uri: /{string('')&string('X'),0&1}
-    # Auto-cast of NULL values (null,false,false).
-    - uri: /{null()&null(),integer(null())&null(),integer(null())&integer(null())}
-    # The OR operator.
-    - uri: /{false()|false(),false()|true(),true()|false(),true()|true(),
-             null()|false(),null()|true(),null()|null()}
-    # Auto-cast of arguments (true,true,false).
-    - uri: /{string('')|string('X'),0|1,integer(null())|string(null())}
-    # The NOT operator.
-    - uri: /{!true(),!false(),!null()}
-    # Auto-cast of arguments (true,false,false,true).
-    - uri: /{!string(''),!string('X'),!1,!integer(null())}
-
-  - title: Comparison functions and operators
-    tests:
-    # Is NULL function (null => true, otherwise => false).
-    - uri: /{is_null(null()),is_null(true()),is_null(''),is_null(0)}
-    # Null If method (`this` is equal to one of the arguments => null, otherwise => `this`).
-    - uri: /{'Y':null_if('X'),'Y':null_if('Y'),
-             (5):null_if(1,2,3),(5):null_if(1,2,3,4,5,6,7,8,9,10),
-             null():null_if(null()),null():null_if('X')}
-      skip: true
-    - uri: /{'Y':null_if('X'),'Y':null_if('Y'),
-             null():null_if(null()),null():null_if('X')}
-    # If Null method (`this` is null => the first non-null argument, otherwise => `this`).
-    - uri: /{'X':if_null('Y'),null():if_null('X'),null():if_null(null()),
-             null():if_null(null(),null(),null()),
-             null():if_null(null(),null(),0),
-             null():if_null(0,1,2,3,null())}
-      skip: true
-    - uri: /{'X':if_null('Y'),null():if_null('X'),null():if_null(null())}
-    # If function (if(`cond1`,`then1`,[`cond2`,`then2`,...],[`else`])).
-    - uri: /{if(true(),1),if(false(),1),if(null(),1),
-             if(true(),1,0),if(false(),1,0),if(null(),1,0),
-             if(true(),1,true(),2),if(true(),1,false(),2),
-             if(false(),1,true(),2),if(false(),1,false(),2),
-             if(false(),1,false(),2,0)}
-    # Switch function (switch(`token`,`case1`,`then1`,[`case2`,`then2`,...],[`else`])).
-    - uri: /{switch('Y','X',1),switch('Y','Y',1),
-             switch('Y','X',1,0),switch('Y','Y',1,0),
-             switch(null(),null(),1,0),
-             switch('Y','X',1,'Y',2,'Z',3),
-             switch('Y','A',1,'B',2,'C',3,0)}
-    # Equality/Inequality.
-    - uri: /{1=1,1=0,1=null(),null()=null(),
-             1!=1,1!=0,1!=null(),null()!=null(),
-             1==1,1==0,1==null(),null()==null(),
-             1!==1,1!==0,1!==null(),null()!==null()}
-    - uri: /{'X'='X',1=1.0,1=1e0,1.0=1e0,1='1'}
-    - uri: /{0={1,2,3},2={1,2,3},0!={1,2,3},2!={1,2,3}}
-    - uri: /{'X'!={'A','B','C'},1.0={0,1,2}}
-    - uri: /{integer('1')=string('1')}
-      expect: 400
-    # Less Than/Greater Than.
-    - uri: /{'X'<'Y','X'<='Y','X'>'Y','X'>='Y',
-             'X'<null(),'X'<=null(),'X'>null(),'X'>=null()}
-    - uri: /{1<2,1<=2,1>2,1>=2,
-             1<2.0,1<=2.0,1>2.0,1>=2.0,
-             1e0<2.0,1e0<=2.0,1e0>2.0,1e0>2.0}
-    - uri: /{integer('1')<string('1')}
-      expect: 400
-
-  - title: Numeric functions and operators
-    tests:
-    # Integer cast (from untyped, string, integer, decimal and float).
-    - uri: /{integer('1'),integer(string('1')),
-             integer(1),integer(1.0),integer(1e0)}
-    # Decimal->Integer and Float->Decimal casts.
-    - uri: /{integer(65536.0),integer(65.536),integer(655.36),
-             integer(65536e0),integer(65536e-3),integer(65535e-2)}
-    # Decimal->Integer cast overflow.
-    - uri: /{integer(100000000000000000000.0)}
-      expect: 409
-      ignore: true
-    # Float->Integer cast overflow.
-    - uri: /{integer(1e100)}
-      expect: 409
-      ignore: true
-    # Invalid Untyped->Integer cast.
-    - uri: /{integer('X')}
-      expect: 400
-    # Invalid String->Integer cast.
-    - uri: /{integer(string('X'))}
-      expect: 409
-      ignore: true
-    # Decimal cast (from untyped, string, integer, decimal and float).
-    - uri: /{decimal('1.5'),decimal(string('1.5')),
-             decimal(15),decimal(1.5),decimal(15e-1)}
-    # Float->Decimal cast.
-    - uri: /{decimal(65535e0),decimal(65535e10),decimal(65535e-10)}
-    # Float->Decimal cast with huge values.
-    - uri: /{decimal(1e300),decimal(1e-300)}
-    # Invalid Untyped->Decimal cast.
-    - uri: /{decimal('X')}
-      expect: 400
-    # Invalid String->Decimal cast.
-    - uri: /{decimal(string('X'))}
-      expect: 409
-      ignore: true
-    # Float cast (from untyped, string, integer, decimal and float).
-    - uri: /{float('1.5'),float(string('1.5')),
-             float(15),float(1.5),float(15e-1)}
-    # Decimal->Float cast with truncation.
-    - uri: /{float(123456789.123456789)}
-    # Invalid Untyped->Float cast.
-    - uri: /{float('X')}
-      expect: 400
-    # Invalid String->Float cast.
-    - uri: /{float(string('X'))}
-      expect: 409
-      ignore: true
-    # Unary plus and minus.
-    - uri: /{+2,+2.0,+2e0,-2,-2.0,-2e0,++1,+-1,-+1,--1}
-    # Addition.
-    - uri: /{2+2,2+2.0,2+2e0,2.0+2.0,2.0+2e0,2e0+2e0}
-    # Subtraction.
-    - uri: /{2-1,2-1.0,2-1e0,2.0-1.0,2.0-1e0,2e0-1e0}
-    # Multiplication.
-    - uri: /{5*5,5*5.0,5*5e0,5.0*5.0,5.0*5e0,5e0*5e0}
-    # Division.
-    - uri: /{1/2,1/2.0,1/2e0,1.0/2.0,1.0/2e0, 1e0/2e0}
-    # Division by zero.
-    - uri: /{1/0}
-      expect: 409
-      ignore: true
-    # Addition: invalid types.
-    - uri: /{1+'1'}
-      expect: 400
-    # Multiplication: overflow.
-    - uri: /{65536*65536}
-      expect: 409
-      ignore: true
-    # Round for decimal values.
-    - uri: /{round(65.536),round(65.536,0),
-             round(65.536,1),round(65.536,-1)}
-    # Round with integer values (implicitly cast to decimal).
-    - uri: /{round(65535),round(65536,-3)}
-    # Round for float values.
-    - uri: /{round(35536e-3)}
-    # Invalid Round call with float values and digits indicator.
-    - uri: /{round(35536e-3,1)}
-      expect: 400
-
-  - title: String functions and operators
-    tests:
-    # String cast (from untyped, string, integer, decimal, float).
-    - uri: /{string('X'),string(string('X')), string(1), string(1.0), string(1e0)}
-    # The Length method.
-    - uri: /{'HTSQL':length,'':length,null():length}
-    # The Contains operator.
-    - uri: /{'HTSQL'~'sql','HTSQL'~'HTTP','HTSQL'~'',
-             'HTSQL'~null(),null()~'HTSQL',null()~null()}
-
-  - title: Date functions and operators
-    tests:
-    # Date cast (from untyped, string).
-    - uri: /{date('2010-07-28'),date(string('2010-07-28'))}
-    # Date constructor.
-    - uri: /{date(2010,07,28)}
-    # Invalid untyped->date cast.
-    - uri: /{date('X')}
-      expect: 400
-    # Invalid string->date cast.
-    - uri: /{date(string('X'))}
-      expect: 409
-      ignore: true
-    # Invalid integer->date cast.
-    - uri: /{date(1)}
-      expect: 400
-      skip: true
-    # Invalid date constructor.
-    - uri: /{date(0,0,0)}
-      expect: 409
-      ignore: true
-      skip: true
-    # Date arithmetic operations.
-    - uri: /{date('2010-07-28')+1,date('2010-07-28')-1,
-             date('2010-07-28')-date('2009-07-28')}
-
-- title: Table functions
-  ifndef: sqlite
   tests:
 
-  # Sort and Limit functions.
-  - title: Sorting and paging
-    tests:
-    - uri: /school
-    - uri: /school.limit(1)
-    - uri: /school.limit(2,5)
-    - uri: /school.sort(name).limit(1)
-    - uri: /school.limit(1).sort(name)
-    - uri: /course?department='acc'
-    - uri: /course.sort(credits)?department='acc'
-    - uri: /(course.sort(credits)?department='acc').limit(1,1)
-    - uri: /course.sort(credits).limit(1,1)?department='acc'
+  # AS decorator
+  - uri: /(school :as 'List of Schools')
+  - uri: /school{name :as Name}
+  - uri: /(school :as 'List of Schools')
+            {name :as Name, count(department) :as '# of Departments'}
 
-  # The `as` operator.
-  - title: Title decorator
-    tests:
-    # Identifiers and string literals are accepted.
-    - uri: /{null() as Title, null() as 'Title with whitespaces'}
-    # The outer `as` overrides any others.
-    - uri: /{null() as 'Hidden title' as 'Visible title'}
-    # `as` in expressions is no-op.
-    - uri: /{('HT' as HT)+('SQL' as SQL)}
-    # Using `as` to decorate the segment base.
-    - uri: /(school as Schools)
-    # Also works over selectors and filters.
-    - uri: /(school as Schools){name as Title}?code='art'
-    # Expects a non-wildcard argument.
-    - uri: /school{* as Columns}
-      expect: 400
-    # Expects a string literal or an identifier.
-    - uri: /school{code as school.code}
-      expect: 400
+  # Direction decorator
+  - uri: /school{name+}
+  - uri: /course{credits-, number+, title}?department='stdart'
 
-  # The order modifiers: `+` and `-`.
-  - title: Order modifiers
-    tests:
-    # Ascending order (default for this table).
-    - uri: /school{code+,name}
-    # Descending order.
-    - uri: /school{code-,name}
-    # Combinations of several order modifiers.
-    - uri: /school{code--,name}
-    # Combined with `as`.
-    - uri: /school{name as Title+}
-    - uri: /school{name+ as Title}
-      expect: 400
-    - uri: /school{(name+) as Title}
-    # Non-unique explicit ordering is complemented with the default ordering.
-    - uri: /course{department+,title,credits-}?number<200
-    # Same using the `sort` method.
-    - uri: /course.sort(department+,credits-){department,title,credits}?number<200
-

test/output/pgsql.yaml

             bind error: incompatible arguments:
                 /{avg(student.name)}
                   ^^^^^^^^^^^^^^^^^
-      - id: scalar-functions
+      - id: table-functions-and-operators
         tests:
-        - id: boolean-constants-and-logical-operators
-          tests:
-          - uri: /{true(),false()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                  |
-              -+------------------+-
-               | true() | false() |
-              -+--------+---------+-
-               | true   | false   |
-                            (1 row)
-
-               ----
-               /{true(),false()}
-               SELECT TRUE,
-                      FALSE
-          - uri: /{boolean(null()),boolean(true()),boolean(false())}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                      |
-              -+------------------------------------------------------+-
-               | boolean(null()) | boolean(true()) | boolean(false()) |
-              -+-----------------+-----------------+------------------+-
-               |                 | true            | false            |
-                                                                (1 row)
-
-               ----
-               /{boolean(null()),boolean(true()),boolean(false())}
-               SELECT NULL,
-                      TRUE,
-                      FALSE
-          - uri: /{boolean('true'),boolean('false')}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                    |
-              -+------------------------------------+-
-               | boolean('true') | boolean('false') |
-              -+-----------------+------------------+-
-               | true            | false            |
-                                              (1 row)
-
-               ----
-               /{boolean('true'),boolean('false')}
-               SELECT TRUE,
-                      FALSE
-          - uri: /{boolean('')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              encode error: invalid Boolean literal: expected 'true' or 'false'; got '':
-                  /{boolean('')}
-                    ^^^^^^^^^^^
-          - uri: /{boolean('X')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              encode error: invalid Boolean literal: expected 'true' or 'false'; got 'X':
-                  /{boolean('X')}
-                    ^^^^^^^^^^^^
-          - uri: /{boolean(integer(null())),boolean(0),boolean(1), boolean(0.0),boolean(1.0),boolean(0e0),boolean(1e0)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                |
-              -+----------------------------------------------------------------------------------------------------------------+-
-               | boolean(integer(null())) | boolean(0) | boolean(1) | boolean(0.0) | boolean(1.0) | boolean(0e0) | boolean(1e0) |
-              -+--------------------------+------------+------------+--------------+--------------+--------------+--------------+-
-               | false                    | true       | true       | true         | true         | true         | true         |
-                                                                                                                          (1 row)
-
-               ----
-               /{boolean(integer(null())),boolean(0),boolean(1),boolean(0.0),boolean(1.0),boolean(0e0),boolean(1e0)}
-               SELECT FALSE,
-                      TRUE,
-                      TRUE,
-                      TRUE,
-                      TRUE,
-                      TRUE,
-                      TRUE
-          - uri: /{boolean(string(null())),boolean(string('')),boolean(string('X')),
-              boolean(string('true')),boolean(string('false'))}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                           |
-              -+---------------------------------------------------------------------------------------------------------------------------+-
-               | boolean(string(null())) | boolean(string('')) | boolean(string('X')) | boolean(string('true')) | boolean(string('false')) |
-              -+-------------------------+---------------------+----------------------+-------------------------+--------------------------+-
-               | false                   | false               | true                 | true                    | true                     |
-                                                                                                                                     (1 row)
-
-               ----
-               /{boolean(string(null())),boolean(string('')),boolean(string('X')),boolean(string('true')),boolean(string('false'))}
-               SELECT FALSE,
-                      FALSE,
-                      TRUE,
-                      TRUE,
-                      TRUE
-          - uri: /{false()&false(),false()&true(),true()&false(),true()&true(), null()&false(),null()&true(),null()&null()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                    |
-              -+--------------------------------------------------------------------------------------------------------------------+-
-               | false()&false() | false()&true() | true()&false() | true()&true() | null()&false() | null()&true() | null()&null() |
-              -+-----------------+----------------+----------------+---------------+----------------+---------------+---------------+-
-               | false           | false          | false          | true          | false          |               |               |
-                                                                                                                              (1 row)
-
-               ----
-               /{false()&false(),false()&true(),true()&false(),true()&true(),null()&false(),null()&true(),null()&null()}
-               SELECT FALSE,
-                      FALSE,
-                      FALSE,
-                      TRUE,
-                      FALSE,
-                      NULL,
-                      NULL
-          - uri: /{string('')&string('X'),0&1}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                               |
-              -+-------------------------------+-
-               | string('')&string('X') | 0&1  |
-              -+------------------------+------+-
-               | false                  | true |
-                                         (1 row)
-
-               ----
-               /{string('')&string('X'),0&1}
-               SELECT FALSE,
-                      TRUE
-          - uri: /{null()&null(),integer(null())&null(),integer(null())&integer(null())}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                          |
-              -+--------------------------------------------------------------------------+-
-               | null()&null() | integer(null())&null() | integer(null())&integer(null()) |
-              -+---------------+------------------------+---------------------------------+-
-               |               | false                  | false                           |
-                                                                                    (1 row)
-
-               ----
-               /{null()&null(),integer(null())&null(),integer(null())&integer(null())}
-               SELECT NULL,
-                      FALSE,
-                      FALSE
-          - uri: /{false()|false(),false()|true(),true()|false(),true()|true(), null()|false(),null()|true(),null()|null()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                    |
-              -+--------------------------------------------------------------------------------------------------------------------+-
-               | false()|false() | false()|true() | true()|false() | true()|true() | null()|false() | null()|true() | null()|null() |
-              -+-----------------+----------------+----------------+---------------+----------------+---------------+---------------+-
-               | false           | true           | true           | true          |                | true          |               |
-                                                                                                                              (1 row)
-
-               ----
-               /{false()|false(),false()|true(),true()|false(),true()|true(),null()|false(),null()|true(),null()|null()}
-               SELECT FALSE,
-                      TRUE,
-                      TRUE,
-                      TRUE,
-                      NULL,
-                      TRUE,
-                      NULL
-          - uri: /{string('')|string('X'),0|1,integer(null())|string(null())}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                |
-              -+----------------------------------------------------------------+-
-               | string('')|string('X') | 0|1  | integer(null())|string(null()) |
-              -+------------------------+------+--------------------------------+-
-               | true                   | true | false                          |
-                                                                          (1 row)
-
-               ----
-               /{string('')|string('X'),0|1,integer(null())|string(null())}
-               SELECT TRUE,
-                      TRUE,
-                      FALSE
-          - uri: /{!true(),!false(),!null()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                              |
-              -+------------------------------+-
-               | !true() | !false() | !null() |
-              -+---------+----------+---------+-
-               | false   | true     |         |
-                                        (1 row)
-
-               ----
-               /{!true(),!false(),!null()}
-               SELECT FALSE,
-                      TRUE,
-                      NULL
-          - uri: /{!string(''),!string('X'),!1,!integer(null())}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                       |
-              -+-------------------------------------------------------+-
-               | !string('') | !string('X') | !1    | !integer(null()) |
-              -+-------------+--------------+-------+------------------+-
-               | true        | false        | false | true             |
-                                                                 (1 row)
-
-               ----
-               /{!string(''),!string('X'),!1,!integer(null())}
-               SELECT TRUE,
-                      FALSE,
-                      FALSE,
-                      TRUE
-        - id: comparison-functions-and-operators
-          tests:
-          - uri: /{is_null(null()),is_null(true()),is_null(''),is_null(0)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                              |
-              -+--------------------------------------------------------------+-
-               | is_null(null()) | is_null(true()) | is_null('') | is_null(0) |
-              -+-----------------+-----------------+-------------+------------+-
-               | true            | false           | false       | false      |
-                                                                        (1 row)
-
-               ----
-               /{is_null(null()),is_null(true()),is_null(''),is_null(0)}
-               SELECT TRUE,
-                      FALSE,
-                      FALSE,
-                      FALSE
-          - uri: /{'Y':null_if('X'),'Y':null_if('Y'), null():null_if(null()),null():null_if('X')}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                    |
-              -+------------------------------------------------------------------------------------+-
-               | 'Y':null_if('X') | 'Y':null_if('Y') | null():null_if(null()) | null():null_if('X') |
-              -+------------------+------------------+------------------------+---------------------+-
-               | Y                |                  |                        |                     |
-                                                                                              (1 row)
-
-               ----
-               /{'Y':null_if('X'),'Y':null_if('Y'),null():null_if(null()),null():null_if('X')}
-               SELECT NULLIF('Y', 'X'),
-                      NULL,
-                      NULL,
-                      NULL
-          - uri: /{'X':if_null('Y'),null():if_null('X'),null():if_null(null())}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                 |
-              -+-----------------------------------------------------------------+-
-               | 'X':if_null('Y') | null():if_null('X') | null():if_null(null()) |
-              -+------------------+---------------------+------------------------+-
-               | X                | X                   |                        |
-                                                                           (1 row)
-
-               ----
-               /{'X':if_null('Y'),null():if_null('X'),null():if_null(null())}
-               SELECT 'X',
-                      'X',
-                      NULL
-          - uri: /{if(true(),1),if(false(),1),if(null(),1), if(true(),1,0),if(false(),1,0),if(null(),1,0),
-              if(true(),1,true(),2),if(true(),1,false(),2), if(false(),1,true(),2),if(false(),1,false(),2),
-              if(false(),1,false(),2,0)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                                                                                                                                 |
-              -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-
-               | if(true(),1) | if(false(),1) | if(null(),1) | if(true(),1,0) | if(false(),1,0) | if(null(),1,0) | if(true(),1,true(),2) | if(true(),1,false(),2) | if(false(),1,true(),2) | if(false(),1,false(),2) | if(false(),1,false(),2,0) |
-              -+--------------+---------------+--------------+----------------+-----------------+----------------+-----------------------+------------------------+------------------------+-------------------------+---------------------------+-
-               |            1 |               |              |              1 |               0 |              0 |                     1 |                      1 |                      2 |                         |                         0 |
-                                                                                                                                                                                                                                           (1 row)
-
-               ----
-               /{if(true(),1),if(false(),1),if(null(),1),if(true(),1,0),if(false(),1,0),if(null(),1,0),if(true(),1,true(),2),if(true(),1,false(),2),if(false(),1,true(),2),if(false(),1,false(),2),if(false(),1,false(),2,0)}
-               SELECT (CASE WHEN TRUE THEN 1 END),
-                      (CASE WHEN FALSE THEN 1 END),
-                      (CASE WHEN NULL THEN 1 END),
-                      (CASE WHEN TRUE THEN 1 ELSE 0 END),
-                      (CASE WHEN FALSE THEN 1 ELSE 0 END),
-                      (CASE WHEN NULL THEN 1 ELSE 0 END),
-                      (CASE WHEN TRUE THEN 1 WHEN TRUE THEN 2 END),
-                      (CASE WHEN TRUE THEN 1 WHEN FALSE THEN 2 END),
-                      (CASE WHEN FALSE THEN 1 WHEN TRUE THEN 2 END),
-                      (CASE WHEN FALSE THEN 1 WHEN FALSE THEN 2 END),
-                      (CASE WHEN FALSE THEN 1 WHEN FALSE THEN 2 ELSE 0 END)
-          - uri: /{switch('Y','X',1),switch('Y','Y',1), switch('Y','X',1,0),switch('Y','Y',1,0),
-              switch(null(),null(),1,0), switch('Y','X',1,'Y',2,'Z',3), switch('Y','A',1,'B',2,'C',3,0)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                                                                                 |
-              -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-
-               | switch('Y','X',1) | switch('Y','Y',1) | switch('Y','X',1,0) | switch('Y','Y',1,0) | switch(null(),null(),1,0) | switch('Y','X',1,'Y',2,'Z',3) | switch('Y','A',1,'B',2,'C',3,0) |
-              -+-------------------+-------------------+---------------------+---------------------+---------------------------+-------------------------------+---------------------------------+-
-               |                   |                 1 |                   0 |                   1 |                         0 |                             2 |                               0 |
-                                                                                                                                                                                           (1 row)
-
-               ----
-               /{switch('Y','X',1),switch('Y','Y',1),switch('Y','X',1,0),switch('Y','Y',1,0),switch(null(),null(),1,0),switch('Y','X',1,'Y',2,'Z',3),switch('Y','A',1,'B',2,'C',3,0)}
-               SELECT (CASE 'Y' WHEN 'X' THEN 1 END),
-                      (CASE 'Y' WHEN 'Y' THEN 1 END),
-                      (CASE 'Y' WHEN 'X' THEN 1 ELSE 0 END),
-                      (CASE 'Y' WHEN 'Y' THEN 1 ELSE 0 END),
-                      (CASE NULL WHEN NULL THEN 1 ELSE 0 END),
-                      (CASE 'Y' WHEN 'X' THEN 1 WHEN 'Y' THEN 2 WHEN 'Z' THEN 3 END),
-                      (CASE 'Y' WHEN 'A' THEN 1 WHEN 'B' THEN 2 WHEN 'C' THEN 3 ELSE 0 END)
-          - uri: /{1=1,1=0,1=null(),null()=null(), 1!=1,1!=0,1!=null(),null()!=null(),
-              1==1,1==0,1==null(),null()==null(), 1!==1,1!==0,1!==null(),null()!==null()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                                                                                |
-              -+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-
-               | 1=1  | 1=0   | 1=null() | null()=null() | 1!=1  | 1!=0 | 1!=null() | null()!=null() | 1==1 | 1==0  | 1==null() | null()==null() | 1!==1 | 1!==0 | 1!==null() | null()!==null() |
-              -+------+-------+----------+---------------+-------+------+-----------+----------------+------+-------+-----------+----------------+-------+-------+------------+-----------------+-
-               | true | false |          |               | false | true |           |                | true | false | false     | true           | false | true  | true       | false           |
-                                                                                                                                                                                          (1 row)
-
-               ----
-               /{1=1,1=0,1=null(),null()=null(),1!=1,1!=0,1!=null(),null()!=null(),1==1,1==0,1==null(),null()==null(),1!==1,1!==0,1!==null(),null()!==null()}
-               SELECT (1 = 1),
-                      (1 = 0),
-                      NULL,
-                      NULL,
-                      (1 <> 1),
-                      (1 <> 0),
-                      NULL,
-                      NULL,
-                      (1 = 1),
-                      (1 = 0),
-                      FALSE,
-                      TRUE,
-                      (1 <> 1),
-                      (1 <> 0),
-                      TRUE,
-                      FALSE
-          - uri: /{'X'='X',1=1.0,1=1e0,1.0=1e0,1='1'}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                           |
-              -+-------------------------------------------+-
-               | 'X'='X' | 1=1.0 | 1=1e0 | 1.0=1e0 | 1='1' |
-              -+---------+-------+-------+---------+-------+-
-               | true    | true  | true  | true    | true  |
-                                                     (1 row)
-
-               ----
-               /{'X'='X',1=1.0,1=1e0,1.0=1e0,1='1'}
-               SELECT ('X' = 'X'),
-                      (1::NUMERIC = 1.0::NUMERIC),
-                      (1.0::FLOAT8 = 1.0::FLOAT8),
-                      (1.0::FLOAT8 = 1.0::FLOAT8),
-                      (1 = 1)
-          - uri: /{0={1,2,3},2={1,2,3},0!={1,2,3},2!={1,2,3}}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                 |
-              -+-------------------------------------------------+-
-               | 0={1,2,3} | 2={1,2,3} | 0!={1,2,3} | 2!={1,2,3} |
-              -+-----------+-----------+------------+------------+-
-               | false     | true      | true       | false      |
-                                                           (1 row)
-
-               ----
-               /{0={1,2,3},2={1,2,3},0!={1,2,3},2!={1,2,3}}
-               SELECT (0 IN (1, 2, 3)),
-                      (2 IN (1, 2, 3)),
-                      (0 NOT IN (1, 2, 3)),
-                      (2 NOT IN (1, 2, 3))
-          - uri: /{'X'!={'A','B','C'},1.0={0,1,2}}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                  |
-              -+----------------------------------+-
-               | 'X'!={'A','B','C'} | 1.0={0,1,2} |
-              -+--------------------+-------------+-
-               | true               | true        |
-                                            (1 row)
-
-               ----
-               /{'X'!={'A','B','C'},1.0={0,1,2}}
-               SELECT ('X' NOT IN ('A', 'B', 'C')),
-                      (1.0::NUMERIC IN (0::NUMERIC, 1::NUMERIC, 2::NUMERIC))
-          - uri: /{integer('1')=string('1')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              bind error: incompatible arguments:
-                  /{integer('1')=string('1')}
-                    ^^^^^^^^^^^^^^^^^^^^^^^^
-          - uri: /{'X'<'Y','X'<='Y','X'>'Y','X'>='Y', 'X'<null(),'X'<=null(),'X'>null(),'X'>=null()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                               |
-              -+-----------------------------------------------------------------------------------------------+-
-               | 'X'<'Y' | 'X'<='Y' | 'X'>'Y' | 'X'>='Y' | 'X'<null() | 'X'<=null() | 'X'>null() | 'X'>=null() |
-              -+---------+----------+---------+----------+------------+-------------+------------+-------------+-
-               | true    | true     | false   | false    |            |             |            |             |
-                                                                                                         (1 row)
-
-               ----
-               /{'X'<'Y','X'<='Y','X'>'Y','X'>='Y','X'<null(),'X'<=null(),'X'>null(),'X'>=null()}
-               SELECT ('X' < 'Y'),
-                      ('X' <= 'Y'),
-                      ('X' > 'Y'),
-                      ('X' >= 'Y'),
-                      ('X' < NULL),
-                      ('X' <= NULL),
-                      ('X' > NULL),
-                      ('X' >= NULL)
-          - uri: /{1<2,1<=2,1>2,1>=2, 1<2.0,1<=2.0,1>2.0,1>=2.0, 1e0<2.0,1e0<=2.0,1e0>2.0,1e0>2.0}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                        |
-              -+--------------------------------------------------------------------------------------------------------+-
-               | 1<2  | 1<=2 | 1>2   | 1>=2  | 1<2.0 | 1<=2.0 | 1>2.0 | 1>=2.0 | 1e0<2.0 | 1e0<=2.0 | 1e0>2.0 | 1e0>2.0 |
-              -+------+------+-------+-------+-------+--------+-------+--------+---------+----------+---------+---------+-
-               | true | true | false | false | true  | true   | false | false  | true    | true     | false   | false   |
-                                                                                                                  (1 row)
-
-               ----
-               /{1<2,1<=2,1>2,1>=2,1<2.0,1<=2.0,1>2.0,1>=2.0,1e0<2.0,1e0<=2.0,1e0>2.0,1e0>2.0}
-               SELECT (1 < 2),
-                      (1 <= 2),
-                      (1 > 2),
-                      (1 >= 2),
-                      (1::NUMERIC < 2.0::NUMERIC),
-                      (1::NUMERIC <= 2.0::NUMERIC),
-                      (1::NUMERIC > 2.0::NUMERIC),
-                      (1::NUMERIC >= 2.0::NUMERIC),
-                      (1.0::FLOAT8 < 2.0::FLOAT8),
-                      (1.0::FLOAT8 <= 2.0::FLOAT8),
-                      (1.0::FLOAT8 > 2.0::FLOAT8),
-                      (1.0::FLOAT8 > 2.0::FLOAT8)
-          - uri: /{integer('1')<string('1')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              bind error: incompatible arguments:
-                  /{integer('1')<string('1')}
-                    ^^^^^^^^^^^^^^^^^^^^^^^^
-        - id: numeric-functions-and-operators
-          tests:
-          - uri: /{integer('1'),integer(string('1')), integer(1),integer(1.0),integer(1e0)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                |
-              -+--------------------------------------------------------------------------------+-
-               | integer('1') | integer(string('1')) | integer(1) | integer(1.0) | integer(1e0) |
-              -+--------------+----------------------+------------+--------------+--------------+-
-               |            1 |                    1 |          1 |            1 |            1 |
-                                                                                          (1 row)
-
-               ----
-               /{integer('1'),integer(string('1')),integer(1),integer(1.0),integer(1e0)}
-               SELECT 1,
-                      CAST('1' AS INTEGER),
-                      1,
-                      CAST(1.0::NUMERIC AS INTEGER),
-                      CAST(1.0::FLOAT8 AS INTEGER)
-          - uri: /{integer(65536.0),integer(65.536),integer(655.36), integer(65536e0),integer(65536e-3),integer(65535e-2)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                 |
-              -+-----------------------------------------------------------------------------------------------------------------+-
-               | integer(65536.0) | integer(65.536) | integer(655.36) | integer(65536e0) | integer(65536e-3) | integer(65535e-2) |
-              -+------------------+-----------------+-----------------+------------------+-------------------+-------------------+-
-               |            65536 |              66 |             655 |            65536 |                66 |               655 |
-                                                                                                                           (1 row)
-
-               ----
-               /{integer(65536.0),integer(65.536),integer(655.36),integer(65536e0),integer(65536e-3),integer(65535e-2)}
-               SELECT CAST(65536.0::NUMERIC AS INTEGER),
-                      CAST(65.536::NUMERIC AS INTEGER),
-                      CAST(655.36::NUMERIC AS INTEGER),
-                      CAST(65536.0::FLOAT8 AS INTEGER),
-                      CAST(65.536000000000001::FLOAT8 AS INTEGER),
-                      CAST(655.35000000000002::FLOAT8 AS INTEGER)
-          - uri: /{integer(100000000000000000000.0)}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing 'SELECT CAST(100000000000000000000.0::NUMERIC AS INTEGER)\n': integer out of range
-              :
-                  /{integer(100000000000000000000.0)}
-                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-          - uri: /{integer(1e100)}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing 'SELECT CAST(1e+100::FLOAT8 AS INTEGER)\n': integer out of range
-              :
-                  /{integer(1e100)}
-                  ^^^^^^^^^^^^^^^^^
-          - uri: /{integer('X')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              encode error: invalid integer literal: expected an integer in a decimal format; got 'X':
-                  /{integer('X')}
-                    ^^^^^^^^^^^^
-          - uri: /{integer(string('X'))}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing "SELECT CAST('X' AS INTEGER)\n": invalid input syntax for integer: "X"
-              LINE 1: SELECT CAST('X' AS INTEGER)
-                                  ^
-              :
-                  /{integer(string('X'))}
-                  ^^^^^^^^^^^^^^^^^^^^^^^
-          - uri: /{decimal('1.5'),decimal(string('1.5')), decimal(15),decimal(1.5),decimal(15e-1)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                       |
-              -+---------------------------------------------------------------------------------------+-
-               | decimal('1.5') | decimal(string('1.5')) | decimal(15) | decimal(1.5) | decimal(15e-1) |
-              -+----------------+------------------------+-------------+--------------+----------------+-
-               |            1.5 |                    1.5 |          15 |          1.5 |            1.5 |
-                                                                                                 (1 row)
-
-               ----
-               /{decimal('1.5'),decimal(string('1.5')),decimal(15),decimal(1.5),decimal(15e-1)}
-               SELECT 1.5::NUMERIC,
-                      CAST('1.5' AS NUMERIC),
-                      15::NUMERIC,
-                      1.5::NUMERIC,
-                      CAST(1.5::FLOAT8 AS NUMERIC)
-          - uri: /{decimal(65535e0),decimal(65535e10),decimal(65535e-10)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                           |
-              -+-----------------------------------------------------------+-
-               | decimal(65535e0) | decimal(65535e10) | decimal(65535e-10) |
-              -+------------------+-------------------+--------------------+-
-               |            65535 |   655350000000000 |       0.0000065535 |
-                                                                     (1 row)
-
-               ----
-               /{decimal(65535e0),decimal(65535e10),decimal(65535e-10)}
-               SELECT CAST(65535.0::FLOAT8 AS NUMERIC),
-                      CAST(655350000000000.0::FLOAT8 AS NUMERIC),
-                      CAST(6.5535e-06::FLOAT8 AS NUMERIC)
-          - uri: /{decimal(1e300),decimal(1e-300)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                                                                                                                                                                                                                                                 |
-              -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-
-               | decimal(1e300)                                                                                                                                                                                                                                                                                                | decimal(1e-300) |
-              -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-
-               | 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |          1E-300 |
-                                                                                                                                                                                                                                                                                                                                           (1 row)
-
-               ----
-               /{decimal(1e300),decimal(1e-300)}
-               SELECT CAST(1.0000000000000001e+300::FLOAT8 AS NUMERIC),
-                      CAST(1e-300::FLOAT8 AS NUMERIC)
-          - uri: /{decimal('X')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              encode error: invalid decimal literal: X:
-                  /{decimal('X')}
-                    ^^^^^^^^^^^^
-          - uri: /{decimal(string('X'))}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing "SELECT CAST('X' AS NUMERIC)\n": invalid input syntax for type numeric: "X"
-              LINE 1: SELECT CAST('X' AS NUMERIC)
-                                  ^
-              :
-                  /{decimal(string('X'))}
-                  ^^^^^^^^^^^^^^^^^^^^^^^
-          - uri: /{float('1.5'),float(string('1.5')), float(15),float(1.5),float(15e-1)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                             |
-              -+-----------------------------------------------------------------------------+-
-               | float('1.5') | float(string('1.5')) | float(15) | float(1.5) | float(15e-1) |
-              -+--------------+----------------------+-----------+------------+--------------+-
-               |          1.5 |                  1.5 |      15.0 |        1.5 |          1.5 |
-                                                                                       (1 row)
-
-               ----
-               /{float('1.5'),float(string('1.5')),float(15),float(1.5),float(15e-1)}
-               SELECT 1.5::FLOAT8,
-                      CAST('1.5' AS FLOAT8),
-                      15.0::FLOAT8,
-                      1.5::FLOAT8,
-                      1.5::FLOAT8
-          - uri: /{float(123456789.123456789)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                            |
-              -+----------------------------+-
-               | float(123456789.123456789) |
-              -+----------------------------+-
-               |              123456789.123 |
-                                      (1 row)
-
-               ----
-               /{float(123456789.123456789)}
-               SELECT 123456789.12345679::FLOAT8
-          - uri: /{float('X')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              encode error: invalid float literal: X:
-                  /{float('X')}
-                    ^^^^^^^^^^
-          - uri: /{float(string('X'))}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing "SELECT CAST('X' AS FLOAT8)\n": invalid input syntax for type double precision: "X"
-              LINE 1: SELECT CAST('X' AS FLOAT8)
-                                  ^
-              :
-                  /{float(string('X'))}
-                  ^^^^^^^^^^^^^^^^^^^^^
-          - uri: /{+2,+2.0,+2e0,-2,-2.0,-2e0,++1,+-1,-+1,--1}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                             |
-              -+-------------------------------------------------------------+-
-               | +2 | +2.0 | +2e0 | -2 | -2.0 | -2e0 | ++1 | +-1 | -+1 | --1 |
-              -+----+------+------+----+------+------+-----+-----+-----+-----+-
-               |  2 |  2.0 |  2.0 | -2 | -2.0 | -2.0 |   1 |  -1 |  -1 |   1 |
-                                                                       (1 row)
-
-               ----
-               /{+2,+2.0,+2e0,-2,-2.0,-2e0,++1,+-1,-+1,--1}
-               SELECT 2,
-                      2.0::NUMERIC,
-                      2.0::FLOAT8,
-                      (- 2),
-                      (- 2.0::NUMERIC),
-                      (- 2.0::FLOAT8),
-                      1,
-                      (- 1),
-                      (- 1),
-                      (- (- 1))
-          - uri: /{2+2,2+2.0,2+2e0,2.0+2.0,2.0+2e0,2e0+2e0}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                   |
-              -+---------------------------------------------------+-
-               | 2+2 | 2+2.0 | 2+2e0 | 2.0+2.0 | 2.0+2e0 | 2e0+2e0 |
-              -+-----+-------+-------+---------+---------+---------+-
-               |   4 |   4.0 |   4.0 |     4.0 |     4.0 |     4.0 |
-                                                             (1 row)
-
-               ----
-               /{2+2,2+2.0,2+2e0,2.0+2.0,2.0+2e0,2e0+2e0}
-               SELECT (2 + 2),
-                      (2::NUMERIC + 2.0::NUMERIC),
-                      (2.0::FLOAT8 + 2.0::FLOAT8),
-                      (2.0::NUMERIC + 2.0::NUMERIC),
-                      (2.0::FLOAT8 + 2.0::FLOAT8),
-                      (2.0::FLOAT8 + 2.0::FLOAT8)
-          - uri: /{2-1,2-1.0,2-1e0,2.0-1.0,2.0-1e0,2e0-1e0}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                   |
-              -+---------------------------------------------------+-
-               | 2-1 | 2-1.0 | 2-1e0 | 2.0-1.0 | 2.0-1e0 | 2e0-1e0 |
-              -+-----+-------+-------+---------+---------+---------+-
-               |   1 |   1.0 |   1.0 |     1.0 |     1.0 |     1.0 |
-                                                             (1 row)
-
-               ----
-               /{2-1,2-1.0,2-1e0,2.0-1.0,2.0-1e0,2e0-1e0}
-               SELECT (2 - 1),
-                      (2::NUMERIC - 1.0::NUMERIC),
-                      (2.0::FLOAT8 - 1.0::FLOAT8),
-                      (2.0::NUMERIC - 1.0::NUMERIC),
-                      (2.0::FLOAT8 - 1.0::FLOAT8),
-                      (2.0::FLOAT8 - 1.0::FLOAT8)
-          - uri: /{5*5,5*5.0,5*5e0,5.0*5.0,5.0*5e0,5e0*5e0}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                   |
-              -+---------------------------------------------------+-
-               | 5*5 | 5*5.0 | 5*5e0 | 5.0*5.0 | 5.0*5e0 | 5e0*5e0 |
-              -+-----+-------+-------+---------+---------+---------+-
-               |  25 |  25.0 |  25.0 |   25.00 |    25.0 |    25.0 |
-                                                             (1 row)
-
-               ----
-               /{5*5,5*5.0,5*5e0,5.0*5.0,5.0*5e0,5e0*5e0}
-               SELECT (5 * 5),
-                      (5::NUMERIC * 5.0::NUMERIC),
-                      (5.0::FLOAT8 * 5.0::FLOAT8),
-                      (5.0::NUMERIC * 5.0::NUMERIC),
-                      (5.0::FLOAT8 * 5.0::FLOAT8),
-                      (5.0::FLOAT8 * 5.0::FLOAT8)
-          - uri: /{1/2,1/2.0,1/2e0,1.0/2.0,1.0/2e0, 1e0/2e0}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                                      |
-              -+------------------------------------------------------------------------------------------------------+-
-               | 1/2                    | 1/2.0                  | 1/2e0 | 1.0/2.0                | 1.0/2e0 | 1e0/2e0 |
-              -+------------------------+------------------------+-------+------------------------+---------+---------+-
-               | 0.50000000000000000000 | 0.50000000000000000000 |   0.5 | 0.50000000000000000000 |     0.5 |     0.5 |
-                                                                                                                (1 row)
-
-               ----
-               /{1/2,1/2.0,1/2e0,1.0/2.0,1.0/2e0,1e0/2e0}
-               SELECT (1::NUMERIC / 2::NUMERIC),
-                      (1::NUMERIC / 2.0::NUMERIC),
-                      (1.0::FLOAT8 / 2.0::FLOAT8),
-                      (1.0::NUMERIC / 2.0::NUMERIC),
-                      (1.0::FLOAT8 / 2.0::FLOAT8),
-                      (1.0::FLOAT8 / 2.0::FLOAT8)
-          - uri: /{1/0}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing 'SELECT (1::NUMERIC / 0::NUMERIC)\n': division by zero
-              :
-                  /{1/0}
-                  ^^^^^^
-          - uri: /{1+'1'}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              bind error: incompatible arguments:
-                  /{1+'1'}
-                    ^^^^^
-          - uri: /{65536*65536}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing 'SELECT (65536 * 65536)\n': integer out of range
-              :
-                  /{65536*65536}
-                  ^^^^^^^^^^^^^^
-          - uri: /{round(65.536),round(65.536,0), round(65.536,1),round(65.536,-1)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                      |
-              -+----------------------------------------------------------------------+-
-               | round(65.536) | round(65.536,0) | round(65.536,1) | round(65.536,-1) |
-              -+---------------+-----------------+-----------------+------------------+-
-               |            66 |              66 |            65.5 |               70 |
-                                                                                (1 row)
-
-               ----
-               /{round(65.536),round(65.536,0),round(65.536,1),round(65.536,-1)}
-               SELECT ROUND(65.536::NUMERIC),
-                      ROUND(65.536::NUMERIC, 0),
-                      ROUND(65.536::NUMERIC, 1),
-                      ROUND(65.536::NUMERIC, (- 1))
-          - uri: /{round(65535),round(65536,-3)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                |
-              -+--------------------------------+-
-               | round(65535) | round(65536,-3) |
-              -+--------------+-----------------+-
-               |        65535 |           66000 |
-                                          (1 row)
-
-               ----
-               /{round(65535),round(65536,-3)}
-               SELECT ROUND(65535::NUMERIC),
-                      ROUND(65536::NUMERIC, (- 3))
-          - uri: /{round(35536e-3)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                 |
-              -+-----------------+-
-               | round(35536e-3) |
-              -+-----------------+-
-               |            36.0 |
-                           (1 row)
-
-               ----
-               /{round(35536e-3)}
-               SELECT ROUND(35.536000000000001::FLOAT8)
-          - uri: /{round(35536e-3,1)}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              bind error: incompatible arguments:
-                  /{round(35536e-3,1)}
-                    ^^^^^^^^^^^^^^^^^
-        - id: string-functions-and-operators
-          tests:
-          - uri: /{string('X'),string(string('X')), string(1), string(1.0), string(1e0)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                           |
-              -+---------------------------------------------------------------------------+-
-               | string('X') | string(string('X')) | string(1) | string(1.0) | string(1e0) |
-              -+-------------+---------------------+-----------+-------------+-------------+-
-               | X           | X                   | 1         | 1.0         | 1           |
-                                                                                     (1 row)
-
-               ----
-               /{string('X'),string(string('X')),string(1),string(1.0),string(1e0)}
-               SELECT 'X',
-                      'X',
-                      CAST(1 AS TEXT),
-                      CAST(1.0::NUMERIC AS TEXT),
-                      CAST(1.0::FLOAT8 AS TEXT)
-          - uri: /{'HTSQL':length,'':length,null():length}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                            |
-              -+--------------------------------------------+-
-               | 'HTSQL':length | '':length | null():length |
-              -+----------------+-----------+---------------+-
-               |              5 |         0 |               |
-                                                      (1 row)
-
-               ----
-               /{'HTSQL':length,'':length,null():length}
-               SELECT CHARACTER_LENGTH('HTSQL'),
-                      CHARACTER_LENGTH(''),
-                      CHARACTER_LENGTH(NULL)
-          - uri: /{'HTSQL'~'sql','HTSQL'~'HTTP','HTSQL'~'', 'HTSQL'~null(),null()~'HTSQL',null()~null()}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                               |
-              -+-----------------------------------------------------------------------------------------------+-
-               | 'HTSQL'~'sql' | 'HTSQL'~'HTTP' | 'HTSQL'~'' | 'HTSQL'~null() | null()~'HTSQL' | null()~null() |
-              -+---------------+----------------+------------+----------------+----------------+---------------+-
-               | true          | false          | true       |                |                |               |
-                                                                                                         (1 row)
-
-               ----
-               /{'HTSQL'~'sql','HTSQL'~'HTTP','HTSQL'~'','HTSQL'~null(),null()~'HTSQL',null()~null()}
-               SELECT ('HTSQL' ILIKE '%sql%'),
-                      ('HTSQL' ILIKE '%HTTP%'),
-                      ('HTSQL' ILIKE '%%'),
-                      ('HTSQL' ILIKE NULL),
-                      (NULL ILIKE '%HTSQL%'),
-                      (NULL ILIKE NULL)
-        - id: date-functions-and-operators
-          tests:
-          - uri: /{date('2010-07-28'),date(string('2010-07-28'))}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                 |
-              -+-------------------------------------------------+-
-               | date('2010-07-28') | date(string('2010-07-28')) |
-              -+--------------------+----------------------------+-
-               | 2010-07-28         | 2010-07-28                 |
-                                                           (1 row)
-
-               ----
-               /{date('2010-07-28'),date(string('2010-07-28'))}
-               SELECT '2010-07-28'::DATE,
-                      CAST('2010-07-28' AS DATE)
-          - uri: /{date(2010,07,28)}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                  |
-              -+------------------+-
-               | date(2010,07,28) |
-              -+------------------+-
-               | 2010-07-28       |
-                            (1 row)
-
-               ----
-               /{date(2010,07,28)}
-               SELECT CAST('0001-01-01'::DATE + (2010 - 1) * '1 YEAR'::INTERVAL + (7 - 1) * '1 MONTH'::INTERVAL + (28 - 1) * '1 DAY'::INTERVAL AS DATE)
-          - uri: /{date('X')}
-            status: 400 Bad Request
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              encode error: invalid date literal: expected a valid date in a 'YYYY-MM-DD' format; got 'X':
-                  /{date('X')}
-                    ^^^^^^^^^
-          - uri: /{date(string('X'))}
-            status: 409 Conflict
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |
-              engine failure: error while executing "SELECT CAST('X' AS DATE)\n": invalid input syntax for type date: "X"
-              LINE 1: SELECT CAST('X' AS DATE)
-                                  ^
-              :
-                  /{date(string('X'))}
-                  ^^^^^^^^^^^^^^^^^^^^
-          - uri: /{date('2010-07-28')+1,date('2010-07-28')-1, date('2010-07-28')-date('2009-07-28')}
-            status: 200 OK
-            headers:
-            - [Content-Type, text/plain; charset=UTF-8]
-            body: |2
-               |                                                                                     |
-              -+-------------------------------------------------------------------------------------+-
-               | date('2010-07-28')+1 | date('2010-07-28')-1 | date('2010-07-28')-date('2009-07-28') |
-              -+----------------------+----------------------+---------------------------------------+-
-               | 2010-07-29           | 2010-07-27           |                                   365 |
-                                                                                               (1 row)
-
-               ----
-               /{date('2010-07-28')+1,date('2010-07-28')-1,date('2010-07-28')-date('2009-07-28')}
-               SELECT ('2010-07-28'::DATE + 1),
-                      ('2010-07-28'::DATE - 1),
-                      ('2010-07-28'::DATE - '2009-07-28'::DATE)
-      - id: table-functions
+        - uri: /school.program
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | school.program                                                |
+            -+---------------------------------------------------------------+-
+             | school | code     | title                            | degree |
+            -+--------+----------+----------------------------------+--------+-
+             | art    | gart     | Post Baccalaureate in Art        | pb     |
+             :        :          : History                          :        :
+             | art    | uhist    | Bachelor of Arts in Art History  | ba     |
+             | art    | ustudio  | Bachelor of Arts in Studio Art   | ba     |
+             | bus    | pacc     | Graduate Certificate in          | ct     |
+             :        :          : Accounting                       :        :
+             | bus    | pcap     | Certificate in Capital Markets   | ct     |
+             | bus    | uacct    | Bachelor of Science in           | bs     |
+             :        :          : Accounting                       :        :
+             | bus    | ubusad   | Bachelor of Science in Business  | bs     |
+             :        :          : Administration                   :        :
+             | bus    | ucorpfi  | Bachelor of Science in Corporate | bs     |
+             :        :          : Finance                          :        :
+             | edu    | gedlead  | Master of Arts in Educational    | ma     |
+             :        :          : Leadership                       :        :
+             | edu    | gedu     | Master of Science in Education   | ms     |
+             | edu    | glited   | Master of Arts in Literacy       | ma     |
+             :        :          : Education                        :        :
+             | edu    | gtch     | Master of Arts in Teaching       | ma     |
+             | edu    | psci     | Certificate in Science Teaching  | ct     |
+             | edu    | umath    | Bachelor of Arts in Math         | ba     |
+             :        :          : Education                        :        :
+             | edu    | usci     | Bachelor of Arts in Science      | ba     |
+             :        :          : Education                        :        :
+             | egn    | gbe      | Master of Science in             | ms     |
+             :        :          : Bioengineering                   :        :
+             | egn    | gbuseng  | Master of Science in Business    | ms     |
+             :        :          : and Engineering                  :        :
+             | egn    | gee      | Master of Science in Electrical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | gme      | Master of Science in Mechanical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | ubio     | Bachelor of Science in           | bs     |
+             :        :          : Bioengineering                   :        :
+             | egn    | ucompsci | Bachelor of Science in Computer  | bs     |
+             :        :          : Science                          :        :
+             | egn    | uelec    | Bachelor of Science in           | bs     |
+             :        :          : Electrical Engineering           :        :
+             | egn    | umech    | Bachelor of Science in           | bs     |
+             :        :          : Mechanical Engineering           :        :
+             | la     | gengl    | Master of Arts in English        | ma     |
+             | la     | glang    | Master of Arts in Modern         | ma     |
+             :        :          : Languages                        :        :
+             | la     | gscitch  | Master of Arts in Science        | ma     |
+             :        :          : Teaching                         :        :
+             | la     | psciwri  | Science Writing                  | ct     |
+             | la     | uengl    | Bachelor of Arts in English      | ba     |
+             | la     | uhist    | Bachelor of Arts in History      | ba     |
+             | la     | upolisci | Bachelor of Arts in Political    | ba     |
+             :        :          : Science                          :        :
+             | la     | upsych   | Bachelor of Arts in Psychology   | ba     |
+             | la     | uspan    | Bachelor of Arts in Spanish      | ba     |
+             | mart   | bmart    | Bachelor of Modern Art           | ba     |
+             | ns     | uastro   | Bachelor of Science in Astronomy | bs     |
+             | ns     | uchem    | Bachelor of Science in Chemistry | bs     |
+             | ns     | uphys    | Bachelor of Science in Physics   | bs     |
+                                                                     (36 rows)
+
+             ----
+             /school.program
+             SELECT "program"."school",
+                    "program"."code",
+                    "program"."title",
+                    "program"."degree"
+             FROM "ad"."school" AS "school"
+                  INNER JOIN "ad"."program" AS "program"
+                             ON ("school"."code" = "program"."school")
+             ORDER BY "school"."code" ASC, 1 ASC, 2 ASC
+        - uri: /school.department
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | school.department                        |
+            -+------------------------------------------+-
+             | code   | name                   | school |
+            -+--------+------------------------+--------+-
+             | arthis | Art History            | art    |
+             | stdart | Studio Art             | art    |
+             | acc    | Accounting             | bus    |
+             | capmrk | Capital Markets        | bus    |
+             | corpfi | Corporate Finance      | bus    |
+             | edpol  | Educational Policy     | edu    |
+             | tched  | Teacher Education      | edu    |
+             | be     | Bioengineering         | egn    |
+             | comp   | Computer Science       | egn    |
+             | ee     | Electrical Engineering | egn    |
+             | me     | Mechanical Engineering | egn    |
+             | eng    | English                | la     |
+             | hist   | History                | la     |
+             | lang   | Foreign Languages      | la     |
+             | poli   | Political Science      | la     |
+             | psych  | Psychology             | la     |
+             | pia    | Piano                  | mus    |
+             | str    | Strings                | mus    |
+             | voc    | Vocals                 | mus    |
+             | win    | Wind                   | mus    |
+             | astro  | Astronomy              | ns     |
+             | chem   | Chemistry              | ns     |
+             | mth    | Mathematics            | ns     |
+             | phys   | Physics                | ns     |
+                                                (24 rows)
+
+             ----
+             /school.department
+             SELECT "department"."code",
+                    "department"."name",
+                    "department"."school"
+             FROM "ad"."school" AS "school"
+                  INNER JOIN "ad"."department" AS "department"
+                             ON ("school"."code" = "department"."school")
+             ORDER BY "school"."code" ASC, 1 ASC
+        - uri: /program.school
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | program.school                          |
+            -+-----------------------------------------+-
+             | code | name                             |
+            -+------+----------------------------------+-
+             | art  | School of Art and Design         |
+             | art  | School of Art and Design         |
+             | art  | School of Art and Design         |
+             | bus  | School of Business               |
+             | bus  | School of Business               |
+             | bus  | School of Business               |
+             | bus  | School of Business               |
+             | bus  | School of Business               |
+             | edu  | College of Education             |
+             | edu  | College of Education             |
+             | edu  | College of Education             |
+             | edu  | College of Education             |
+             | edu  | College of Education             |
+             | edu  | College of Education             |
+             | edu  | College of Education             |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | egn  | School of Engineering            |
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | mart | School of Modern Art             |
+             | ns   | School of Natural Sciences       |
+             | ns   | School of Natural Sciences       |
+             | ns   | School of Natural Sciences       |
+                                               (36 rows)
+
+             ----
+             /program.school
+             SELECT "school"."code",
+                    "school"."name"
+             FROM "ad"."program" AS "program"
+                  INNER JOIN "ad"."school" AS "school"
+                             ON ("program"."school" = "school"."code")
+             ORDER BY "program"."school" ASC, "program"."code" ASC
+        - uri: /department.school
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | department.school                       |
+            -+-----------------------------------------+-
+             | code | name                             |
+            -+------+----------------------------------+-
+             | bus  | School of Business               |
+             | art  | School of Art and Design         |
+             | ns   | School of Natural Sciences       |
+             | egn  | School of Engineering            |
+             | bus  | School of Business               |
+             | ns   | School of Natural Sciences       |
+             | egn  | School of Engineering            |
+             | bus  | School of Business               |
+             | edu  | College of Education             |
+             | egn  | School of Engineering            |
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | egn  | School of Engineering            |
+             | ns   | School of Natural Sciences       |
+             | ns   | School of Natural Sciences       |
+             | mus  | Musical School                   |
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | la   | School of Arts, Letters, and the |
+             :      : Humanities                       :
+             | art  | School of Art and Design         |
+             | mus  | Musical School                   |
+             | edu  | College of Education             |
+             | mus  | Musical School                   |
+             | mus  | Musical School                   |
+                                               (24 rows)
+
+             ----
+             /department.school
+             SELECT "school"."code",
+                    "school"."name"
+             FROM "ad"."department" AS "department"
+                  INNER JOIN "ad"."school" AS "school"
+                             ON ("department"."school" = "school"."code")
+             ORDER BY "department"."code" ASC
+        - uri: /instructor.confidential
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | instructor.confidential                                |
+            -+--------------------------------------------------------+-
+             | instructor   | ssn         | pay_grade | home_phone    |
+            -+--------------+-------------+-----------+---------------+-
+             | afrenski     | 987-65-4321 |         4 |               |
+             | alang42      | 788-33-0000 |         6 | 702-555-1721  |
+             | amiller213   | 987-65-4324 |         7 | 452-555-7728  |
+             | anabib       | 787-22-0000 |         7 | 702-55-1627   |
+             | asacco       | 783-78-0000 |         5 | 702-555-1692  |
+             | astone77     | 688-33-0000 |         8 | 702-555-0173  |
+             | bburling     | 672-88-0000 |         5 |               |
+             | bsacks66     | 782-78-0000 |         7 | 202-555-7283  |
+             | cfergus12    | 987-65-4320 |         6 | 702-555-1738  |
+             | dbundt31     | 000-53-2873 |         7 | 202-555-1738  |
+             | dfallon23    | 274-66-0000 |         4 | 702-555-1778  |
+             | dsims51      | 987-65-4325 |         5 | 452-555-9273  |
+             | egasner      | 784-44-0000 |         8 | 702-555-8995  |
+             | elhill4      | 933-55-0000 |         4 | 702-555-8829  |
+             | emurphy55    | 787-22-0000 |         8 | 452-555-7849  |
+             | hbarone      | 511-66-0000 |         4 | 702-555-1089  |
+             | hbenmahem    | 674-57-0000 |         4 | 702-555-0115  |
+             | icampbell12  | 000-52-8758 |         5 |               |
+             | jconnell51   | 717-67-0000 |         8 | 702-555-1672  |
+             | jflug29      | 578-41-0000 |         6 | 702-555-7727  |
+             | kcavallaro   | 123-74-0000 |         5 | 702-555-1670  |
+             | kmaas11      | 371-55-0000 |         7 | 702-555-1875  |
+             | kmarkman     | 000-72-1875 |         4 | 702-555-8211  |
+             | kmurray44    | 152-62-0000 |         7 | 702-555-6612  |
+             | lbrooks61    | 673-11-0000 |         8 | 452-555-7276  |
+             | lmcooper11   | 987-65-4329 |         8 | 702-555-9992  |
+             | mbyer55      | 000-22-4320 |         6 | 452-555-7311  |
+             | mscott51     | 126-33-0000 |         7 | 702-555-7819  |
+             | pblum21      | 000-33-2783 |         5 | 702-555-6522  |
+             | rrosenfeld31 | 857-22-0000 |         7 | 702-555-0989  |
+             | sbadhreya    | 987-65-4328 |         4 | 702-555-66738 |
+             | sbyrne202    | 987-65-4327 |         5 | 617-555-8382  |
+             | srandrews    | 987-65-4326 |         8 | 702-555-3627  |
+             | tobrien21    | 000-38-2875 |         4 |               |
+             | vball77      | 799-11-0000 |         4 | 702-555-1425  |
+             | wyu112       | 987-65-4323 |         5 | 702-555-2954  |
+                                                              (36 rows)
+
+             ----
+             /instructor.confidential
+             SELECT "confidential"."instructor",
+                    "confidential"."ssn",
+                    "confidential"."pay_grade",
+                    "confidential"."home_phone"
+             FROM "id"."instructor" AS "instructor"
+                  INNER JOIN "id"."confidential" AS "confidential"
+                             ON ("instructor"."code" = "confidential"."instructor")
+             ORDER BY "instructor"."code" ASC
+        - uri: /confidential.instructor
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | confidential.instructor                                                           |
+            -+-----------------------------------------------------------------------------------+-
+             | code         | title | full_name            | phone    | email                    |
+            -+--------------+-------+----------------------+----------+--------------------------+-
+             | afrenski     | mr    | Andre Frenski        | 555-1723 | afrenski@example.com     |
+             | alang42      | prof  | Adrian Laang         | 555-0973 | alang42@example.com      |
+             | amiller213   | ms    | Antoinette Miller    | 555-7728 | amiller213@example.com   |
+             | anabib       | prof  | Ashish Nabib         | 555-1667 | anabib@example.com       |
+             | asacco       | prof  | Andrea Sacco         | 555-1381 | asacco@example.com       |
+             | astone77     | mr    | Alan P. Stone        | 555-1738 | astone77@example.com     |
+             | bburling     | prof  | Benjamin Burling     | 555-1823 | bburling@example.com     |
+             | bsacks66     | prof  | Benjamin Sacks       | 555-2212 | bsacks66@example.com     |
+             | cfergus12    | prof  | Adam Ferguson        |          | cfergus12@example.com    |
+             | dbundt31     | dr    | David Bundt          | 555-1553 | dbundt31@example.com     |
+             | dfallon23    | prof  | David N. Fallon      | 555-1666 | dfallon23@example.com    |
+             | dsims51      | mr    | Dante Sims           |          | dsims51@example.com      |
+             | egasner      | dr    | Ernst Gasner         | 555-6652 | egasner@example.com      |
+             | elhill4      | dr    | Ellen Last Hill      | 555-1995 | ehill4@example.com       |
+             | emurphy55    | prof  | Erin L. Murphy       |          | emurphy55@example.com    |
+             | hbarone      | prof  | Harold Barone        | 555-0911 | hbarone@example.com      |
+             | hbenmahem    | mr    | Hani Ben-Mahem       | 555-1827 | hbenmahem@example.com    |
+             | icampbell12  | prof  | Ian W. Campbell      | 555-2275 | icampbell12@example.com  |
+             | jconnell51   | dr    | Jamie Connell        | 555-2157 | jconnell51@example.com   |
+             | jflug29      | dr    | Jason Flug           | 555-6672 | jflug23@example.com      |
+             | kcavallaro   | prof  | Katherine Cavallaro  | 555-4325 | kvallaro@example.com     |
+             | kmaas11      | prof  | Kari Maas            | 555-1027 | kmaas11@example.com      |
+             | kmarkman     | ms    | Kristen Maison       |          | kmarkman@example.com     |
+             | kmurray44    | mr    | Kevin Murray         | 555-1753 | kmurray44@example.com    |
+             | lbrooks61    | prof  | Lynn L. Brooks       | 555-8872 | lbrooks61@example.com    |
+             | lmcooper11   | prof  | Louisa M. Cooper     | 555-2112 | lmscooper11@example.com  |
+             | mbyer55      | prof  | Michael L. Byer      | 555-1287 |                          |
+             | mscott51     | prof  | Mindy Scott          | 555-3521 | mscott51@example.com     |
+             | pblum21      | ms    | Petra Blum           | 555-2873 | pblum21@example.com      |
+             | rrosenfeld31 | ms    | Rebecca L. Rosenfeld | 555-8816 | rrosenfeld31@example.com |
+             | sbadhreya    | prof  | Said Badhreya        | 555-2873 | sbadhreya@example.com    |
+             | sbyrne202    | ms    | Susan Byrne          | 555-9002 |                          |
+             | srandrews    | mr    | Stuart Andrews       | 555-2113 | srandrews@example.com    |
+             | tobrien21    | prof  | Timothy O'Brien      |          | tobrien21@example.com    |
+             | vball77      | ms    | Vivienne Ball        | 555-2830 |                          |
+             | wyu112       | mr    | Walter Yu            | 555-2954 | wyu112@example.com       |
+                                                                                         (36 rows)
+
+             ----
+             /confidential.instructor
+             SELECT "instructor"."code",
+                    "instructor"."title",
+                    "instructor"."full_name",
+                    "instructor"."phone",
+                    "instructor"."email"
+             FROM "id"."confidential" AS "confidential"
+                  INNER JOIN "id"."instructor" AS "instructor"
+                             ON ("confidential"."instructor" = "instructor"."code")
+             ORDER BY "confidential"."instructor" ASC
+        - uri: /department.fiber(program,school)
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | department.fiber(program,school)                              |
+            -+---------------------------------------------------------------+-
+             | school | code     | title                            | degree |
+            -+--------+----------+----------------------------------+--------+-
+             | bus    | pacc     | Graduate Certificate in          | ct     |
+             :        :          : Accounting                       :        :
+             | bus    | pcap     | Certificate in Capital Markets   | ct     |
+             | bus    | uacct    | Bachelor of Science in           | bs     |
+             :        :          : Accounting                       :        :
+             | bus    | ubusad   | Bachelor of Science in Business  | bs     |
+             :        :          : Administration                   :        :
+             | bus    | ucorpfi  | Bachelor of Science in Corporate | bs     |
+             :        :          : Finance                          :        :
+             | art    | gart     | Post Baccalaureate in Art        | pb     |
+             :        :          : History                          :        :
+             | art    | uhist    | Bachelor of Arts in Art History  | ba     |
+             | art    | ustudio  | Bachelor of Arts in Studio Art   | ba     |
+             | ns     | uastro   | Bachelor of Science in Astronomy | bs     |
+             | ns     | uchem    | Bachelor of Science in Chemistry | bs     |
+             | ns     | uphys    | Bachelor of Science in Physics   | bs     |
+             | egn    | gbe      | Master of Science in             | ms     |
+             :        :          : Bioengineering                   :        :
+             | egn    | gbuseng  | Master of Science in Business    | ms     |
+             :        :          : and Engineering                  :        :
+             | egn    | gee      | Master of Science in Electrical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | gme      | Master of Science in Mechanical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | ubio     | Bachelor of Science in           | bs     |
+             :        :          : Bioengineering                   :        :
+             | egn    | ucompsci | Bachelor of Science in Computer  | bs     |
+             :        :          : Science                          :        :
+             | egn    | uelec    | Bachelor of Science in           | bs     |
+             :        :          : Electrical Engineering           :        :
+             | egn    | umech    | Bachelor of Science in           | bs     |
+             :        :          : Mechanical Engineering           :        :
+             | bus    | pacc     | Graduate Certificate in          | ct     |
+             :        :          : Accounting                       :        :
+             | bus    | pcap     | Certificate in Capital Markets   | ct     |
+             | bus    | uacct    | Bachelor of Science in           | bs     |
+             :        :          : Accounting                       :        :
+             | bus    | ubusad   | Bachelor of Science in Business  | bs     |
+             :        :          : Administration                   :        :
+             | bus    | ucorpfi  | Bachelor of Science in Corporate | bs     |
+             :        :          : Finance                          :        :
+             | ns     | uastro   | Bachelor of Science in Astronomy | bs     |
+             | ns     | uchem    | Bachelor of Science in Chemistry | bs     |
+             | ns     | uphys    | Bachelor of Science in Physics   | bs     |
+             | egn    | gbe      | Master of Science in             | ms     |
+             :        :          : Bioengineering                   :        :
+             | egn    | gbuseng  | Master of Science in Business    | ms     |
+             :        :          : and Engineering                  :        :
+             | egn    | gee      | Master of Science in Electrical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | gme      | Master of Science in Mechanical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | ubio     | Bachelor of Science in           | bs     |
+             :        :          : Bioengineering                   :        :
+             | egn    | ucompsci | Bachelor of Science in Computer  | bs     |
+             :        :          : Science                          :        :
+             | egn    | uelec    | Bachelor of Science in           | bs     |
+             :        :          : Electrical Engineering           :        :
+             | egn    | umech    | Bachelor of Science in           | bs     |
+             :        :          : Mechanical Engineering           :        :
+             | bus    | pacc     | Graduate Certificate in          | ct     |
+             :        :          : Accounting                       :        :
+             | bus    | pcap     | Certificate in Capital Markets   | ct     |
+             | bus    | uacct    | Bachelor of Science in           | bs     |
+             :        :          : Accounting                       :        :
+             | bus    | ubusad   | Bachelor of Science in Business  | bs     |
+             :        :          : Administration                   :        :
+             | bus    | ucorpfi  | Bachelor of Science in Corporate | bs     |
+             :        :          : Finance                          :        :
+             | edu    | gedlead  | Master of Arts in Educational    | ma     |
+             :        :          : Leadership                       :        :
+             | edu    | gedu     | Master of Science in Education   | ms     |
+             | edu    | glited   | Master of Arts in Literacy       | ma     |
+             :        :          : Education                        :        :
+             | edu    | gtch     | Master of Arts in Teaching       | ma     |
+             | edu    | psci     | Certificate in Science Teaching  | ct     |
+             | edu    | umath    | Bachelor of Arts in Math         | ba     |
+             :        :          : Education                        :        :
+             | edu    | usci     | Bachelor of Arts in Science      | ba     |
+             :        :          : Education                        :        :
+             | egn    | gbe      | Master of Science in             | ms     |
+             :        :          : Bioengineering                   :        :
+             | egn    | gbuseng  | Master of Science in Business    | ms     |
+             :        :          : and Engineering                  :        :
+             | egn    | gee      | Master of Science in Electrical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | gme      | Master of Science in Mechanical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | ubio     | Bachelor of Science in           | bs     |
+             :        :          : Bioengineering                   :        :
+             | egn    | ucompsci | Bachelor of Science in Computer  | bs     |
+             :        :          : Science                          :        :
+             | egn    | uelec    | Bachelor of Science in           | bs     |
+             :        :          : Electrical Engineering           :        :
+             | egn    | umech    | Bachelor of Science in           | bs     |
+             :        :          : Mechanical Engineering           :        :
+             | la     | gengl    | Master of Arts in English        | ma     |
+             | la     | glang    | Master of Arts in Modern         | ma     |
+             :        :          : Languages                        :        :
+             | la     | gscitch  | Master of Arts in Science        | ma     |
+             :        :          : Teaching                         :        :
+             | la     | psciwri  | Science Writing                  | ct     |
+             | la     | uengl    | Bachelor of Arts in English      | ba     |
+             | la     | uhist    | Bachelor of Arts in History      | ba     |
+             | la     | upolisci | Bachelor of Arts in Political    | ba     |
+             :        :          : Science                          :        :
+             | la     | upsych   | Bachelor of Arts in Psychology   | ba     |
+             | la     | uspan    | Bachelor of Arts in Spanish      | ba     |
+             | la     | gengl    | Master of Arts in English        | ma     |
+             | la     | glang    | Master of Arts in Modern         | ma     |
+             :        :          : Languages                        :        :
+             | la     | gscitch  | Master of Arts in Science        | ma     |
+             :        :          : Teaching                         :        :
+             | la     | psciwri  | Science Writing                  | ct     |
+             | la     | uengl    | Bachelor of Arts in English      | ba     |
+             | la     | uhist    | Bachelor of Arts in History      | ba     |
+             | la     | upolisci | Bachelor of Arts in Political    | ba     |
+             :        :          : Science                          :        :
+             | la     | upsych   | Bachelor of Arts in Psychology   | ba     |
+             | la     | uspan    | Bachelor of Arts in Spanish      | ba     |
+             | la     | gengl    | Master of Arts in English        | ma     |
+             | la     | glang    | Master of Arts in Modern         | ma     |
+             :        :          : Languages                        :        :
+             | la     | gscitch  | Master of Arts in Science        | ma     |
+             :        :          : Teaching                         :        :
+             | la     | psciwri  | Science Writing                  | ct     |
+             | la     | uengl    | Bachelor of Arts in English      | ba     |
+             | la     | uhist    | Bachelor of Arts in History      | ba     |
+             | la     | upolisci | Bachelor of Arts in Political    | ba     |
+             :        :          : Science                          :        :
+             | la     | upsych   | Bachelor of Arts in Psychology   | ba     |
+             | la     | uspan    | Bachelor of Arts in Spanish      | ba     |
+             | egn    | gbe      | Master of Science in             | ms     |
+             :        :          : Bioengineering                   :        :
+             | egn    | gbuseng  | Master of Science in Business    | ms     |
+             :        :          : and Engineering                  :        :
+             | egn    | gee      | Master of Science in Electrical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | gme      | Master of Science in Mechanical  | ms     |
+             :        :          : Engineering                      :        :
+             | egn    | ubio     | Bachelor of Science in           | bs     |
+             :        :          : Bioengineering                   :        :
+             | egn    | ucompsci | Bachelor of Science in Computer  | bs     |
+             :        :          : Science                          :        :
+             | egn    | uelec    | Bachelor of Science in           | bs     |
+             :        :          : Electrical Engineering           :        :
+             | egn    | umech    | Bachelor of Science in           | bs     |
+             :        :          : Mechanical Engineering           :        :
+             | ns     | uastro   | Bachelor of Science in Astronomy | bs     |
+             | ns     | uchem    | Bachelor of Science in Chemistry | bs     |
+             | ns     | uphys    | Bachelor of Science in Physics   | bs     |
+             | ns     | uastro   | Bachelor of Science in Astronomy | bs     |
+             | ns     | uchem    | Bachelor of Science in Chemistry | bs     |
+             | ns     | uphys    | Bachelor of Science in Physics   | bs     |
+             | la     | gengl    | Master of Arts in English        | ma     |
+             | la     | glang    | Master of Arts in Modern         | ma     |
+             :        :          : Languages                        :        :
+             | la     | gscitch  | Master of Arts in Science        | ma     |
+             :        :          : Teaching                         :        :
+             | la     | psciwri  | Science Writing                  | ct     |
+             | la     | uengl    | Bachelor of Arts in English      | ba     |
+             | la     | uhist    | Bachelor of Arts in History      | ba     |
+             | la     | upolisci | Bachelor of Arts in Political    | ba     |
+             :        :          : Science                          :        :
+             | la     | upsych   | Bachelor of Arts in Psychology   | ba     |
+             | la     | uspan    | Bachelor of Arts in Spanish      | ba     |
+             | la     | gengl    | Master of Arts in English        | ma     |
+             | la     | glang    | Master of Arts in Modern         | ma     |
+             :        :          : Languages                        :        :
+             | la     | gscitch  | Master of Arts in Science        | ma     |
+             :        :          : Teaching                         :        :
+             | la     | psciwri  | Science Writing                  | ct     |
+             | la     | uengl    | Bachelor of Arts in English      | ba     |
+             | la     | uhist    | Bachelor of Arts in History      | ba     |
+             | la     | upolisci | Bachelor of Arts in Political    | ba     |
+             :        :          : Science                          :        :
+             | la     | upsych   | Bachelor of Arts in Psychology   | ba     |
+             | la     | uspan    | Bachelor of Arts in Spanish      | ba     |
+             | art    | gart     | Post Baccalaureate in Art        | pb     |
+             :        :          : History                          :        :
+             | art    | uhist    | Bachelor of Arts in Art History  | ba     |
+             | art    | ustudio  | Bachelor of Arts in Studio Art   | ba     |
+             | edu    | gedlead  | Master of Arts in Educational    | ma     |
+             :        :          : Leadership                       :        :
+             | edu    | gedu     | Master of Science in Education   | ms     |
+             | edu    | glited   | Master of Arts in Literacy       | ma     |
+             :        :          : Education                        :        :
+             | edu    | gtch     | Master of Arts in Teaching       | ma     |
+             | edu    | psci     | Certificate in Science Teaching  | ct     |
+             | edu    | umath    | Bachelor of Arts in Math         | ba     |
+             :        :          : Education                        :        :
+             | edu    | usci     | Bachelor of Arts in Science      | ba     |
+             :        :          : Education                        :        :
+                                                                    (124 rows)
+
+             ----
+             /department.fiber(program,school)
+             SELECT "program"."school",
+                    "program"."code",
+                    "program"."title",
+                    "program"."degree"
+             FROM "ad"."department" AS "department"
+                  CROSS JOIN "ad"."program" AS "program"
+             WHERE ("department"."school" = "program"."school")
+             ORDER BY "department"."code" ASC, 1 ASC, 2 ASC
+        - uri: /classification.fiber(classification,code,part_of) {part_of, code}
+          status: 200 OK
+          headers:
+          - [Content-Type, text/plain; charset=UTF-8]
+          body: |2
+             | classification.fiber(classification,code,part_of) |
+            -+---------------------------------------------------+-
+             | part_of                 | code                    |
+            -+-------------------------+-------------------------+-
+             | ancient                 | classical               |
+             | ancient                 | eastern                 |
+             | artdesign               | artstudio               |
+             | artdesign               | digital                 |
+             | artdesign               | industrial              |
+             | artdesign               | society                 |
+             | artdesign               | studio                  |
+             | arthistory              | ancient                 |
+             | arthistory              | artbus                  |
+             | arthistory              | modern                  |
+             | artstudio               | drawing                 |
+             | artstudio               | printmaking             |
+             | artstudio               | sculpture               |
+             | astronomy               | astrolab                |
+             | astronomy               | astrotheory             |
+             | astronomy               | observation             |
+             | be                      | beclinical              |
+             | be                      | begeneral               |
+             | be                      | biomaterials            |
+             | be                      | nanotech                |
+             | business                | ethics                  |
+             | business                | management              |
+             | chemistry               | chemcomputation         |
+             | chemistry               | chemlab                 |
+             | chemistry               | chemtheory              |
+             | compsci                 | compai                  |
+             | compsci                 | comptheory              |
+             | compsci                 | softeng                 |
+             | cross                   | diversity               |
+             | cross                   | reasoning               |
+             | cross                   | research                |
+             | cross                   | writing                 |
+             | edpol                   | edresearch              |
+             | edpol                   | edstudies               |
+             | education               | edpol                   |
+             | education               | teached                 |
+             | ee                      | eeconcentration         |
+             | ee                      | eetheory                |
+             | eeconcentration         | eecom                   |
+             | eeconcentration         | eenetworking            |
+             | eeconcentration         | power                   |
+             | eeconcentration         | signal                  |
+             | engineering             | be                      |
+             | engineering             | compsci                 |
+             | engineering             | ee                      |
+             | engineering             | me                      |
+             | financial               | accounting              |
+             | financial               | financial               |
+             | financial               | investment              |
+             | financial               | markets                 |
+             | humanities              | amhistory               |
+             | humanities              | arthistory              |
+             | humanities              | dischistory             |
+             | humanities              | englit                  |
+             | humanities              | eurohistory             |
+             | humanities              | eurolit                 |
+             | humanities              | history                 |
+             | humanities              | language                |
+             | humanities              | literature              |
+             | humanities              | nonwesternhist          |
+             | humanities              | polisci                 |
+             | humanities              | psychology              |
+             | investment              | institutional           |
+             | investment              | personal                |
+             | language                | anclanguage             |
+             | language                | linguistics             |
+             | language                | modlanguage             |
+             | literature              | fiction                 |
+             | literature              | journalism              |
+             | literature              | nonfiction              |
+             | literature              | poetry                  |
+             | math                    | algebra                 |
+             | math                    | analysis                |
+             | math                    | statistics              |
+             | me                      | medesign                |
+             | me                      | memechanics             |
+             | me                      | mesystems               |
+             | modlanguage             | french                  |
+             | modlanguage             | german                  |
+             | modlanguage             | spanish                 |
+             | physics                 | physcomputer            |
+             | physics                 | physlab                 |
+             | physics                 | phystheory              |
+             | polisci                 | government              |
+             | polisci                 | intrelations            |
+             | polisci                 | poliecon                |
+             | psychology              | behpsych                |
+             | psychology              | chipsych                |
+             | psychology              | cogpsych                |
+             | science                 | astronomy               |
+             | science                 | chemistry               |
+             | science                 | math                    |
+             | science                 | physics                 |
+             | teached                 | earlyed                 |