mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Massive regression test patches from Thomas *woo hoo!*
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.17 1997/04/25 18:40:13 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.18 1997/04/27 02:55:49 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -455,6 +455,9 @@ timespan_ne(TimeSpan *timespan1, TimeSpan *timespan2)
|
|||||||
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (TIMESPAN_IS_INVALID(*timespan1) || TIMESPAN_IS_INVALID(*timespan2))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return( (timespan1->time != timespan2->time)
|
return( (timespan1->time != timespan2->time)
|
||||||
|| (timespan1->month != timespan2->month));
|
|| (timespan1->month != timespan2->month));
|
||||||
} /* timespan_ne() */
|
} /* timespan_ne() */
|
||||||
@ -467,10 +470,13 @@ timespan_lt(TimeSpan *timespan1, TimeSpan *timespan2)
|
|||||||
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (TIMESPAN_IS_INVALID(*timespan1) || TIMESPAN_IS_INVALID(*timespan2))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
span1 = timespan1->time;
|
span1 = timespan1->time;
|
||||||
if (timespan1->month != 0) span1 += (timespan1->month * 30);
|
if (timespan1->month != 0) span1 += (timespan1->month * (30*86400));
|
||||||
span2 = timespan2->time;
|
span2 = timespan2->time;
|
||||||
if (timespan2->month != 0) span2 += (timespan2->month * 30);
|
if (timespan2->month != 0) span2 += (timespan2->month * (30*86400));
|
||||||
|
|
||||||
return( span1 < span2);
|
return( span1 < span2);
|
||||||
} /* timespan_lt() */
|
} /* timespan_lt() */
|
||||||
@ -483,10 +489,13 @@ timespan_gt(TimeSpan *timespan1, TimeSpan *timespan2)
|
|||||||
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (TIMESPAN_IS_INVALID(*timespan1) || TIMESPAN_IS_INVALID(*timespan2))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
span1 = timespan1->time;
|
span1 = timespan1->time;
|
||||||
if (timespan1->month != 0) span1 += (timespan1->month * 30);
|
if (timespan1->month != 0) span1 += (timespan1->month * (30*86400));
|
||||||
span2 = timespan2->time;
|
span2 = timespan2->time;
|
||||||
if (timespan2->month != 0) span2 += (timespan2->month * 30);
|
if (timespan2->month != 0) span2 += (timespan2->month * (30*86400));
|
||||||
|
|
||||||
return( span1 > span2);
|
return( span1 > span2);
|
||||||
} /* timespan_gt() */
|
} /* timespan_gt() */
|
||||||
@ -499,10 +508,13 @@ timespan_le(TimeSpan *timespan1, TimeSpan *timespan2)
|
|||||||
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (TIMESPAN_IS_INVALID(*timespan1) || TIMESPAN_IS_INVALID(*timespan2))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
span1 = timespan1->time;
|
span1 = timespan1->time;
|
||||||
if (timespan1->month != 0) span1 += (timespan1->month * 30);
|
if (timespan1->month != 0) span1 += (timespan1->month * (30*86400));
|
||||||
span2 = timespan2->time;
|
span2 = timespan2->time;
|
||||||
if (timespan2->month != 0) span2 += (timespan2->month * 30);
|
if (timespan2->month != 0) span2 += (timespan2->month * (30*86400));
|
||||||
|
|
||||||
return( span1 <= span2);
|
return( span1 <= span2);
|
||||||
} /* timespan_le() */
|
} /* timespan_le() */
|
||||||
@ -515,10 +527,13 @@ timespan_ge(TimeSpan *timespan1, TimeSpan *timespan2)
|
|||||||
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
if (!PointerIsValid(timespan1) || !PointerIsValid(timespan2))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (TIMESPAN_IS_INVALID(*timespan1) || TIMESPAN_IS_INVALID(*timespan2))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
span1 = timespan1->time;
|
span1 = timespan1->time;
|
||||||
if (timespan1->month != 0) span1 += (timespan1->month * 30);
|
if (timespan1->month != 0) span1 += (timespan1->month * (30*86400));
|
||||||
span2 = timespan2->time;
|
span2 = timespan2->time;
|
||||||
if (timespan2->month != 0) span2 += (timespan2->month * 30);
|
if (timespan2->month != 0) span2 += (timespan2->month * (30*86400));
|
||||||
|
|
||||||
return( span1 >= span2);
|
return( span1 >= span2);
|
||||||
} /* timespan_ge() */
|
} /* timespan_ge() */
|
||||||
|
@ -7,14 +7,14 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.6 1997/04/26 06:31:55 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.7 1997/04/27 02:56:03 scrappy Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
SRCDIR= ../..
|
SRCDIR= ../..
|
||||||
include ../../Makefile.global
|
include ../../Makefile.global
|
||||||
|
|
||||||
CFLAGS+= -I$(LIBPQDIR)
|
CFLAGS+= -I$(LIBPQDIR) -I../../include
|
||||||
|
|
||||||
LDADD+= -L$(LIBPQDIR) -lpq
|
LDADD+= -L$(LIBPQDIR) -lpq
|
||||||
|
|
||||||
|
@ -2,23 +2,39 @@
|
|||||||
Introduction
|
Introduction
|
||||||
|
|
||||||
The PostgreSQL regression tests are a comprehensive set of tests for the
|
The PostgreSQL regression tests are a comprehensive set of tests for the
|
||||||
SQL implementation embeded in PostgreSQL developed by Jolly Chen and
|
SQL implementation embedded in PostgreSQL developed by Jolly Chen and
|
||||||
Andrew Yu. It tests standard SQL operations as well as the extensability
|
Andrew Yu. It tests standard SQL operations as well as the extensibility
|
||||||
capabilities of PostgreSQL.
|
capabilities of PostgreSQL.
|
||||||
|
|
||||||
|
These tests have recently been revised by Marc Fournier and others to
|
||||||
|
become current for PostgreSQL v6.1. The tests are now packaged as
|
||||||
|
functional units and should be easier to run and easier to interpret.
|
||||||
|
|
||||||
|
Some properly installed and fully functional PostgreSQL installations
|
||||||
|
can fail these regression tests due to artifacts of the genetic optimizer.
|
||||||
|
See the v6.1-specific release notes in this document for further details.
|
||||||
|
|
||||||
Preparation
|
Preparation
|
||||||
|
|
||||||
The regression test is invoked thru by the 'make' command which compiles
|
The regression test is invoked by the 'make' command which compiles
|
||||||
a 'c' program with PostgreSQL extension functions into a shared library
|
a 'c' program with PostgreSQL extension functions into a shared library
|
||||||
in the current directory. Localized shell scripts are also created in
|
in the current directory. Localized shell scripts are also created in
|
||||||
the current directory. The 'expected.input' file is massaged into the
|
the current directory. The output file templates are massaged into the
|
||||||
'expected.out' file. The localization replaces macros in the source
|
./expected/*.out files. The localization replaces macros in the source
|
||||||
files with absolute pathnames and user names.
|
files with absolute pathnames and user names.
|
||||||
|
|
||||||
|
The postmaster should be invoked with the system time zone set for
|
||||||
|
Berkeley, California. On some systems, this can be accomplished by
|
||||||
|
setting the TZ environment variable before starting the postmaster
|
||||||
|
(for csh/bash; use set/export for some other shells):
|
||||||
|
|
||||||
|
setenv TZ PST8PDT7,M04.01.0,M10.05.03
|
||||||
|
/usr/local/pgsql/bin/postmaster -s
|
||||||
|
|
||||||
Directory Layout
|
Directory Layout
|
||||||
|
|
||||||
input/ .... .source files that are converted using 'make all' into
|
input/ .... .source files that are converted using 'make all' into
|
||||||
.sql files in the 'sql' subdirectory
|
some of the .sql files in the 'sql' subdirectory
|
||||||
|
|
||||||
output/ ... .source files that are converted using 'make all' into
|
output/ ... .source files that are converted using 'make all' into
|
||||||
.out files in the 'expected' subdirectory
|
.out files in the 'expected' subdirectory
|
||||||
@ -29,7 +45,7 @@ Directory Layout
|
|||||||
look like
|
look like
|
||||||
|
|
||||||
results/ .. .out files that represent what the results *actually* look
|
results/ .. .out files that represent what the results *actually* look
|
||||||
like
|
like. Also used as temporary storage for table copy testing.
|
||||||
|
|
||||||
Running the regression test
|
Running the regression test
|
||||||
|
|
||||||
@ -45,14 +61,14 @@ Running the regression test
|
|||||||
Normally, the regression test should be run as the pg_superuser as the
|
Normally, the regression test should be run as the pg_superuser as the
|
||||||
'src/test/regress' directory and sub-directories are owned by the
|
'src/test/regress' directory and sub-directories are owned by the
|
||||||
pg_superuser. If you run the regression test as another user the
|
pg_superuser. If you run the regression test as another user the
|
||||||
'src/test/regress' directory should be writeable to that user.
|
'src/test/regress' directory tree should be writeable to that user.
|
||||||
|
|
||||||
Comparing expected/actual output
|
Comparing expected/actual output
|
||||||
|
|
||||||
The results are in the file 'regress.out' which can be compared
|
The results are in the files in the ./results directory. These
|
||||||
with the 'expected.out' file using 'diff'. The files will NOT
|
results can be compared with results in the ./expected directory
|
||||||
compare exactly. The following paragraphs attempt to explain the
|
using 'diff'. The files might not compare exactly. The following
|
||||||
differences.
|
paragraphs attempt to explain the differences.
|
||||||
|
|
||||||
OID differences
|
OID differences
|
||||||
|
|
||||||
@ -62,7 +78,7 @@ OID differences
|
|||||||
If you run the regression test on a non-virgin database or run it multiple
|
If you run the regression test on a non-virgin database or run it multiple
|
||||||
times, the OID's reported will have different values.
|
times, the OID's reported will have different values.
|
||||||
|
|
||||||
The following SQL statements in 'regress.out' have shown this behavior:
|
The following SQL statements in 'misc.out' have shown this behavior:
|
||||||
|
|
||||||
QUERY: SELECT user_relns() AS user_relns ORDER BY user_relns;
|
QUERY: SELECT user_relns() AS user_relns ORDER BY user_relns;
|
||||||
|
|
||||||
@ -96,8 +112,8 @@ POLYGON differences
|
|||||||
|
|
||||||
Several of the tests involve operations on geographic date about the
|
Several of the tests involve operations on geographic date about the
|
||||||
Oakland/Berkley CA street map. The map data is expressed as polygons
|
Oakland/Berkley CA street map. The map data is expressed as polygons
|
||||||
whose verticies are represened as pairs of FLOAT8 numbers (decimal
|
whose vertices are represented as pairs of FLOAT8 numbers (decimal
|
||||||
lattitude and longitude). Initially, some tables are created and
|
latitude and longitude). Initially, some tables are created and
|
||||||
loaded with geographic data, then some views are created which join
|
loaded with geographic data, then some views are created which join
|
||||||
two tables using the polygon intersection operator (##), then a select
|
two tables using the polygon intersection operator (##), then a select
|
||||||
is done on the view.
|
is done on the view.
|
||||||
@ -111,24 +127,84 @@ POLYGON differences
|
|||||||
|
|
||||||
DATE/TIME differences
|
DATE/TIME differences
|
||||||
|
|
||||||
|
On many supported platforms, you can force PostgreSQL to believe that it
|
||||||
|
is running in the same time zone as Berkeley, California. See details in
|
||||||
|
the section on how to run the regression tests.
|
||||||
|
|
||||||
The Makefile attempts to adjust for timezone differences, but it is
|
The Makefile attempts to adjust for timezone differences, but it is
|
||||||
totally possible to eliminate them. People outside North America
|
not possible to totally eliminate them. People outside North America
|
||||||
will probabablly find the Makefile's adjustments are incorrect. Also
|
will probabablly find the Makefile's adjustments are incorrect. Also
|
||||||
entries that use the time -infinity display with year 1970 plus/minus the
|
entries that use the time -infinity display with year 1970 plus/minus the
|
||||||
number of hours you are different from GMT.
|
number of hours you are different from GMT.
|
||||||
|
|
||||||
--------[ old stuff that needs to be rewritten ]-----
|
Random differences
|
||||||
|
|
||||||
The 'expected.input' file and the 'sample.regress.out' file
|
There is at least one test case in misc.out which is intended to produce
|
||||||
|
random results. This causes misc to fail the regression testing.
|
||||||
|
Typing "diff results/misc.out expected/misc.out" should produce only
|
||||||
|
one or a few lines of differences for this reason, but other floating
|
||||||
|
point differences on dissimilar architectures might cause many more
|
||||||
|
differences.
|
||||||
|
|
||||||
The 'expected.input' file was created on a SPARC Solaris 2.4 system
|
The 'expected' files
|
||||||
using the 'postgres5-1.02a5.tar.gz' source tree. It has been compared
|
|
||||||
|
The ./expected/*.out files were adapted from the original monolithic
|
||||||
|
'expected.input' file provided by Jolly Chen et al. Newer versions of these
|
||||||
|
files generated on various development machines have been substituted after
|
||||||
|
careful (?) inspection. Many of the development machines are running a
|
||||||
|
Unix OS variant (FreeBSD, Linux, etc) on Ix86 hardware.
|
||||||
|
|
||||||
|
The original 'expected.input' file was created on a SPARC Solaris 2.4
|
||||||
|
system using the 'postgres5-1.02a5.tar.gz' source tree. It was compared
|
||||||
with a file created on an I386 Solaris 2.4 system and the differences
|
with a file created on an I386 Solaris 2.4 system and the differences
|
||||||
are only in the floating point polygons in the 3rd digit to the right
|
were only in the floating point polygons in the 3rd digit to the right
|
||||||
of the decimal point. (see below)
|
of the decimal point. (see below)
|
||||||
|
|
||||||
The 'sample.regress.out' file is from the postgres-1.01 release
|
The original 'sample.regress.out' file was from the postgres-1.01 release
|
||||||
constructed by Jolly Chen and is included here for reference. It may
|
constructed by Jolly Chen and is included here for reference. It may
|
||||||
have been created on a DEC ALPHA machine as the 'Makefile.global'
|
have been created on a DEC ALPHA machine as the 'Makefile.global'
|
||||||
in the postgres-1.01 release has PORTNAME=alpha.
|
in the postgres-1.01 release has PORTNAME=alpha.
|
||||||
|
|
||||||
|
Current release notes
|
||||||
|
|
||||||
|
There are no release notes for PostgreSQL v6.0.
|
||||||
|
|
||||||
|
v6.1beta release notes
|
||||||
|
|
||||||
|
The regression tests have been adapted and extensively modified for the
|
||||||
|
v6.1 release of PostgreSQL.
|
||||||
|
|
||||||
|
Three new data types (datetime, timespan, and circle) have been added to
|
||||||
|
the native set of PostgreSQL types. Points, boxes, paths, and polygons
|
||||||
|
have had their output formats improved, but the old-style input formats
|
||||||
|
are accepted by v6.1. The source data files have not been updated to the
|
||||||
|
new formats, but should be for the next release. The polygon output in
|
||||||
|
misc.out has only been spot-checked for correctness relative to the
|
||||||
|
original regression output.
|
||||||
|
|
||||||
|
To get consistant results from the regression tests, compile the PostgreSQL
|
||||||
|
backend with the genetic optimizer (GEQ) turned off. The genetic algorithms
|
||||||
|
introduce a random behavior in the output ordering which causes the
|
||||||
|
simple "diff" implementation of the tests to fail. To turn off the genetic
|
||||||
|
optimizer, edit the src/include/config.h file and comment-out the line
|
||||||
|
containing "#define GEQ", then do a "make clean install" to regenerate
|
||||||
|
the backend. Existing v6.1 databases are not affected by the choice of
|
||||||
|
optimizer, so there is no need to reload after changing the optimizer.
|
||||||
|
The new genetic optimizer has very nice performance with many-table joins,
|
||||||
|
so you may want to make sure to re-enable it and reinstall the code after
|
||||||
|
you have concluded your regression testing.
|
||||||
|
|
||||||
|
XXX update this for the production release - tgl 97/04/26
|
||||||
|
The interpretation of array specifiers (the curly braces around atomic
|
||||||
|
values) appears to have changed sometime after the original regression
|
||||||
|
tests were generated. The current ./expected/*.out files reflect this
|
||||||
|
new interpretation, which may not be correct!
|
||||||
|
|
||||||
|
XXX update this for the production release - tgl 97/04/26
|
||||||
|
The float8 regression test fails. This may be due to the parser continuing
|
||||||
|
rather than aborting when given invalid constants for input values.
|
||||||
|
|
||||||
|
XXX update this for the production release - tgl 97/04/26
|
||||||
|
Regression tests involving indexed tables fail in at least some environments.
|
||||||
|
This may indicate a problem with the current index code.
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
jeff 23 (8,7.7) 600 sharon 3.50000000000000000e+00
|
jeff 23 (8,7.7) 600 sharon 3.50000000000000000e+00 \N
|
||||||
cim 30 (10.5,4.7) 400 3.39999999999999990e+00
|
cim 30 (10.5,4.7) 400 \N 3.39999999999999990e+00 \N
|
||||||
linda 19 (0.9,6.1) 100 2.89999999999999990e+00
|
linda 19 (0.9,6.1) 100 \N 2.89999999999999990e+00 \N
|
||||||
|
@ -7,67 +7,60 @@ QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('infinity'::abstime);
|
|||||||
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('-infinity'::abstime);
|
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('-infinity'::abstime);
|
||||||
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('May 10, 1943 23:59:12');
|
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('May 10, 1943 23:59:12');
|
||||||
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00');
|
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00');
|
||||||
|
WARN:Bad abstime external representation 'Feb 35, 1946 10:00:00'
|
||||||
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10');
|
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10');
|
||||||
|
WARN:Bad abstime external representation 'Feb 28, 1984 25:08:10'
|
||||||
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
|
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
|
||||||
|
WARN:Bad abstime external representation 'bad date format'
|
||||||
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
|
QUERY: INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
|
||||||
|
QUERY: SELECT '' AS eight, ABSTIME_TBL.*;
|
||||||
|
eight|f1
|
||||||
|
-----+----------------------------
|
||||||
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|
|Mon May 01 00:30:30 1995 PDT
|
||||||
|
|epoch
|
||||||
|
|current
|
||||||
|
|infinity
|
||||||
|
|-infinity
|
||||||
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|
|invalid
|
||||||
|
(8 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS eleven, ABSTIME_TBL.*;
|
QUERY: SELECT '' AS six, ABSTIME_TBL.*
|
||||||
eleven|f1
|
|
||||||
------+----------------------------
|
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|
||||||
|Mon May 01 00:30:30 1995 PDT
|
|
||||||
|epoch
|
|
||||||
|current
|
|
||||||
|infinity
|
|
||||||
|-infinity
|
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
|Invalid Abstime
|
|
||||||
|Invalid Abstime
|
|
||||||
(11 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS eight, ABSTIME_TBL.*
|
|
||||||
WHERE ABSTIME_TBL.f1 < 'Jun 30, 2001'::abstime;
|
WHERE ABSTIME_TBL.f1 < 'Jun 30, 2001'::abstime;
|
||||||
eight|f1
|
six|f1
|
||||||
-----+----------------------------
|
---+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|Mon May 01 00:30:30 1995 PDT
|
|Mon May 01 00:30:30 1995 PDT
|
||||||
|epoch
|
|epoch
|
||||||
|current
|
|current
|
||||||
|-infinity
|
|-infinity
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(6 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(8 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS eight, ABSTIME_TBL.*
|
QUERY: SELECT '' AS six, ABSTIME_TBL.*
|
||||||
WHERE ABSTIME_TBL.f1 > '-infinity'::abstime;
|
WHERE ABSTIME_TBL.f1 > '-infinity'::abstime;
|
||||||
eight|f1
|
six|f1
|
||||||
-----+----------------------------
|
---+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|Mon May 01 00:30:30 1995 PDT
|
|Mon May 01 00:30:30 1995 PDT
|
||||||
|epoch
|
|epoch
|
||||||
|current
|
|current
|
||||||
|infinity
|
|infinity
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(6 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(8 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS eight, ABSTIME_TBL.*
|
QUERY: SELECT '' AS six, ABSTIME_TBL.*
|
||||||
WHERE 'May 10, 1943 23:59:12'::abstime <> ABSTIME_TBL.f1;
|
WHERE 'May 10, 1943 23:59:12'::abstime <> ABSTIME_TBL.f1;
|
||||||
eight|f1
|
six|f1
|
||||||
-----+----------------------------
|
---+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|Mon May 01 00:30:30 1995 PDT
|
|Mon May 01 00:30:30 1995 PDT
|
||||||
|epoch
|
|epoch
|
||||||
|current
|
|current
|
||||||
|infinity
|
|infinity
|
||||||
|-infinity
|
|-infinity
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(6 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(8 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS one, ABSTIME_TBL.*
|
QUERY: SELECT '' AS one, ABSTIME_TBL.*
|
||||||
WHERE 'current'::abstime = ABSTIME_TBL.f1;
|
WHERE 'current'::abstime = ABSTIME_TBL.f1;
|
||||||
@ -76,114 +69,90 @@ one|f1
|
|||||||
|current
|
|current
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, ABSTIME_TBL.*
|
QUERY: SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE 'epoch'::abstime >= ABSTIME_TBL.f1;
|
WHERE 'epoch'::abstime >= ABSTIME_TBL.f1;
|
||||||
five|f1
|
three|f1
|
||||||
|
-----+----------------------------
|
||||||
|
|epoch
|
||||||
|
|-infinity
|
||||||
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
QUERY: SELECT '' AS four, ABSTIME_TBL.*
|
||||||
|
WHERE ABSTIME_TBL.f1 <= 'Jan 14, 1973 03:14:21'::abstime;
|
||||||
|
four|f1
|
||||||
----+----------------------------
|
----+----------------------------
|
||||||
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|epoch
|
|epoch
|
||||||
|-infinity
|
|-infinity
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(4 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(5 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS six, ABSTIME_TBL.*
|
QUERY: SELECT '' AS four, ABSTIME_TBL.*
|
||||||
WHERE ABSTIME_TBL.f1 <= 'Jan 14, 1973 03:14:21'::abstime;
|
|
||||||
six|f1
|
|
||||||
---+----------------------------
|
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|
||||||
|epoch
|
|
||||||
|-infinity
|
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(6 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS six, ABSTIME_TBL.*
|
|
||||||
WHERE ABSTIME_TBL.f1 <?>
|
WHERE ABSTIME_TBL.f1 <?>
|
||||||
'["Apr 1 1945 00:00:00" "Dec 30 1999 23:00:00"]'::tinterval;
|
'["Apr 1 1945 00:00:00" "Dec 30 1999 23:00:00"]'::tinterval;
|
||||||
six|f1
|
four|f1
|
||||||
---+----------------------------
|
----+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|Mon May 01 00:30:30 1995 PDT
|
|Mon May 01 00:30:30 1995 PDT
|
||||||
|epoch
|
|epoch
|
||||||
|current
|
|current
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(4 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(6 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, ABSTIME_TBL.*
|
QUERY: SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 + '@ 3 year'::reltime)
|
WHERE (ABSTIME_TBL.f1 + '@ 3 year'::reltime)
|
||||||
< 'Jan 14 14:00:00 1977'::abstime;
|
< 'Jan 14 14:00:00 1977'::abstime;
|
||||||
five|f1
|
three|f1
|
||||||
----+----------------------------
|
-----+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|epoch
|
|epoch
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(3 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(5 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, ABSTIME_TBL.*
|
QUERY: SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 + '@ 3 year ago'::reltime)
|
WHERE (ABSTIME_TBL.f1 + '@ 3 year ago'::reltime)
|
||||||
< 'Jan 14 14:00:00 1971'::abstime;
|
< 'Jan 14 14:00:00 1971'::abstime;
|
||||||
five|f1
|
three|f1
|
||||||
----+----------------------------
|
-----+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|epoch
|
|epoch
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(3 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(5 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, ABSTIME_TBL.*
|
QUERY: SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 - '@ 3 year'::reltime)
|
WHERE (ABSTIME_TBL.f1 - '@ 3 year'::reltime)
|
||||||
< 'Jan 14 14:00:00 1971'::abstime;
|
< 'Jan 14 14:00:00 1971'::abstime;
|
||||||
five|f1
|
three|f1
|
||||||
----+----------------------------
|
-----+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|epoch
|
|epoch
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(3 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(5 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, ABSTIME_TBL.*
|
QUERY: SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 - '@ 3 year ago'::reltime)
|
WHERE (ABSTIME_TBL.f1 - '@ 3 year ago'::reltime)
|
||||||
< 'Jan 14 14:00:00 1977'::abstime;
|
< 'Jan 14 14:00:00 1977'::abstime;
|
||||||
five|f1
|
three|f1
|
||||||
----+----------------------------
|
-----+----------------------------
|
||||||
|Sun Jan 14 03:14:21 1973 PST
|
|Sun Jan 14 03:14:21 1973 PST
|
||||||
|epoch
|
|epoch
|
||||||
|Mon May 10 23:59:12 1943 PWT
|
|Mon May 10 23:59:12 1943 PST
|
||||||
|Thu Mar 07 10:00:00 1946 PST
|
(3 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST
|
|
||||||
(5 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS twenty, ABSTIME_TBL.*, RELTIME_TBL.*
|
QUERY: SELECT '' AS ten, ABSTIME_TBL.*, RELTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
|
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
|
||||||
< 'Jan 14 14:00:00 1971'::abstime;
|
< 'Jan 14 14:00:00 1971'::abstime;
|
||||||
twenty|f1 |f1
|
ten|f1 |f1
|
||||||
------+----------------------------+----------------
|
---+----------------------------+----------------
|
||||||
|epoch |@ 1 minute
|
|epoch |@ 1 minute
|
||||||
|Mon May 10 23:59:12 1943 PWT|@ 1 minute
|
|Mon May 10 23:59:12 1943 PST|@ 1 minute
|
||||||
|Thu Mar 07 10:00:00 1946 PST|@ 1 minute
|
|epoch |@ 5 hours
|
||||||
|Wed Dec 31 15:59:59 1969 PST|@ 1 minute
|
|Mon May 10 23:59:12 1943 PST|@ 5 hours
|
||||||
|epoch |@ 5 hours
|
|epoch |@ 10 days
|
||||||
|Mon May 10 23:59:12 1943 PWT|@ 5 hours
|
|Mon May 10 23:59:12 1943 PST|@ 10 days
|
||||||
|Thu Mar 07 10:00:00 1946 PST|@ 5 hours
|
|epoch |@ 3 months
|
||||||
|Wed Dec 31 15:59:59 1969 PST|@ 5 hours
|
|Mon May 10 23:59:12 1943 PST|@ 3 months
|
||||||
|epoch |@ 10 days
|
|epoch |@ 14 seconds ago
|
||||||
|Mon May 10 23:59:12 1943 PWT|@ 10 days
|
|Mon May 10 23:59:12 1943 PST|@ 14 seconds ago
|
||||||
|Thu Mar 07 10:00:00 1946 PST|@ 10 days
|
(10 rows)
|
||||||
|Wed Dec 31 15:59:59 1969 PST|@ 10 days
|
|
||||||
|epoch |@ 3 months
|
|
||||||
|Mon May 10 23:59:12 1943 PWT|@ 3 months
|
|
||||||
|Thu Mar 07 10:00:00 1946 PST|@ 3 months
|
|
||||||
|Wed Dec 31 15:59:59 1969 PST|@ 3 months
|
|
||||||
|epoch |@ 14 seconds ago
|
|
||||||
|Mon May 10 23:59:12 1943 PWT|@ 14 seconds ago
|
|
||||||
|Thu Mar 07 10:00:00 1946 PST|@ 14 seconds ago
|
|
||||||
|Wed Dec 31 15:59:59 1969 PST|@ 14 seconds ago
|
|
||||||
(20 rows)
|
|
||||||
|
|
||||||
|
@ -162,18 +162,18 @@ tf_12_ff_4|f1|f1
|
|||||||
|t |f
|
|t |f
|
||||||
|t |f
|
|t |f
|
||||||
|t |f
|
|t |f
|
||||||
|t |f
|
|f |f
|
||||||
|t |f
|
|
||||||
|t |f
|
|
||||||
|t |f
|
|
||||||
|t |f
|
|
||||||
|t |f
|
|
||||||
|t |f
|
|t |f
|
||||||
|t |f
|
|t |f
|
||||||
|t |f
|
|t |f
|
||||||
|f |f
|
|f |f
|
||||||
|
|t |f
|
||||||
|
|t |f
|
||||||
|
|t |f
|
||||||
|f |f
|
|f |f
|
||||||
|f |f
|
|t |f
|
||||||
|
|t |f
|
||||||
|
|t |f
|
||||||
|f |f
|
|f |f
|
||||||
(16 rows)
|
(16 rows)
|
||||||
|
|
||||||
|
@ -8,145 +8,145 @@ WARN:Bad box external representation '(2.3, 4.5)'
|
|||||||
QUERY: INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad');
|
QUERY: INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad');
|
||||||
WARN:Bad box external representation 'asdfasdf(ad'
|
WARN:Bad box external representation 'asdfasdf(ad'
|
||||||
QUERY: SELECT '' AS four, BOX_TBL.*;
|
QUERY: SELECT '' AS four, BOX_TBL.*;
|
||||||
four|f1
|
four|f1
|
||||||
----+-----------------
|
----+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS four, b.*, box_area(b.f1) as barea
|
QUERY: SELECT '' AS four, b.*, box_area(b.f1) as barea
|
||||||
FROM BOX_TBL b;
|
FROM BOX_TBL b;
|
||||||
four|f1 |barea
|
four|f1 |barea
|
||||||
----+-----------------+-----
|
----+-------------------+-----
|
||||||
|(2,2,0,0) | 4
|
|(2,2),(0,0) | 4
|
||||||
|(3,3,1,1) | 4
|
|(3,3),(1,1) | 4
|
||||||
|(2.5,3.5,2.5,2.5)| 0
|
|(2.5,3.5),(2.5,2.5)| 0
|
||||||
|(3,3,3,3) | 0
|
|(3,3),(3,3) | 0
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, b.f1
|
QUERY: SELECT '' AS three, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 && '(2.5,2.5,1.0,1.0)'::box;
|
WHERE b.f1 && '(2.5,2.5,1.0,1.0)'::box;
|
||||||
three|f1
|
three|f1
|
||||||
-----+-----------------
|
-----+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b1.*
|
QUERY: SELECT '' AS two, b1.*
|
||||||
FROM BOX_TBL b1
|
FROM BOX_TBL b1
|
||||||
WHERE b1.f1 &< '(2.0,2.0,2.5,2.5)'::box;
|
WHERE b1.f1 &< '(2.0,2.0,2.5,2.5)'::box;
|
||||||
two|f1
|
two|f1
|
||||||
---+-----------------
|
---+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b1.*
|
QUERY: SELECT '' AS two, b1.*
|
||||||
FROM BOX_TBL b1
|
FROM BOX_TBL b1
|
||||||
WHERE b1.f1 &> '(2.0,2.0,2.5,2.5)'::box;
|
WHERE b1.f1 &> '(2.0,2.0,2.5,2.5)'::box;
|
||||||
two|f1
|
two|f1
|
||||||
---+-----------------
|
---+-------------------
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b.f1
|
QUERY: SELECT '' AS two, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 << '(3.0,3.0,5.0,5.0)'::box;
|
WHERE b.f1 << '(3.0,3.0,5.0,5.0)'::box;
|
||||||
two|f1
|
two|f1
|
||||||
---+-----------------
|
---+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS four, b.f1
|
QUERY: SELECT '' AS four, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 <= '(3.0,3.0,5.0,5.0)'::box;
|
WHERE b.f1 <= '(3.0,3.0,5.0,5.0)'::box;
|
||||||
four|f1
|
four|f1
|
||||||
----+-----------------
|
----+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b.f1
|
QUERY: SELECT '' AS two, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 < '(3.0,3.0,5.0,5.0)'::box;
|
WHERE b.f1 < '(3.0,3.0,5.0,5.0)'::box;
|
||||||
two|f1
|
two|f1
|
||||||
---+-----------------
|
---+-------------------
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b.f1
|
QUERY: SELECT '' AS two, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 = '(3.0,3.0,5.0,5.0)'::box;
|
WHERE b.f1 = '(3.0,3.0,5.0,5.0)'::box;
|
||||||
two|f1
|
two|f1
|
||||||
---+---------
|
---+-----------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b.f1
|
QUERY: SELECT '' AS two, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 > '(3.5,3.0,4.5,3.0)'::box;
|
WHERE b.f1 > '(3.5,3.0,4.5,3.0)'::box;
|
||||||
two|f1
|
two|f1
|
||||||
---+---------
|
---+-----------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS four, b.f1
|
QUERY: SELECT '' AS four, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 >= '(3.5,3.0,4.5,3.0)'::box;
|
WHERE b.f1 >= '(3.5,3.0,4.5,3.0)'::box;
|
||||||
four|f1
|
four|f1
|
||||||
----+-----------------
|
----+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, b.f1
|
QUERY: SELECT '' AS two, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE '(3.0,3.0,5.0,5.0)'::box >> b.f1;
|
WHERE '(3.0,3.0,5.0,5.0)'::box >> b.f1;
|
||||||
two|f1
|
two|f1
|
||||||
---+-----------------
|
---+-------------------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(2.5,3.5,2.5,2.5)
|
|(2.5,3.5),(2.5,2.5)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, b.f1
|
QUERY: SELECT '' AS three, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE b.f1 @ '(0,0,3,3)'::box;
|
WHERE b.f1 @ '(0,0,3,3)'::box;
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------
|
-----+-----------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, b.f1
|
QUERY: SELECT '' AS three, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE '(0,0,3,3)'::box ~ b.f1;
|
WHERE '(0,0,3,3)'::box ~ b.f1;
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------
|
-----+-----------
|
||||||
|(2,2,0,0)
|
|(2,2),(0,0)
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
|(3,3,3,3)
|
|(3,3),(3,3)
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS one, b.f1
|
QUERY: SELECT '' AS one, b.f1
|
||||||
FROM BOX_TBL b
|
FROM BOX_TBL b
|
||||||
WHERE '(1,1,3,3)'::box ~= b.f1;
|
WHERE '(1,1,3,3)'::box ~= b.f1;
|
||||||
one|f1
|
one|f1
|
||||||
---+---------
|
---+-----------
|
||||||
|(3,3,1,1)
|
|(3,3),(1,1)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS four, @@(b1.f1) AS p
|
QUERY: SELECT '' AS four, @@(b1.f1) AS p
|
||||||
@ -162,8 +162,8 @@ four|p
|
|||||||
QUERY: SELECT '' AS one, b1.*, b2.*
|
QUERY: SELECT '' AS one, b1.*, b2.*
|
||||||
FROM BOX_TBL b1, BOX_TBL b2
|
FROM BOX_TBL b1, BOX_TBL b2
|
||||||
WHERE b1.f1 ~ b2.f1 and not b1.f1 ~= b2.f1;
|
WHERE b1.f1 ~ b2.f1 and not b1.f1 ~= b2.f1;
|
||||||
one|f1 |f1
|
one|f1 |f1
|
||||||
---+---------+---------
|
---+-----------+-----------
|
||||||
|(3,3,1,1)|(3,3,3,3)
|
|(3,3),(1,1)|(3,3),(3,3)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ WARN:pg_atoi: error in "34.5": can't parse ".5"
|
|||||||
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('32767');
|
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('32767');
|
||||||
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('-32767');
|
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('-32767');
|
||||||
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('100000');
|
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('100000');
|
||||||
WARN:pg_atoi: error reading "100000": Result too large
|
WARN:pg_atoi: error reading "100000": Math result not representable
|
||||||
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('asdf');
|
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('asdf');
|
||||||
WARN:pg_atoi: error in "asdf": can't parse "asdf"
|
WARN:pg_atoi: error in "asdf": can't parse "asdf"
|
||||||
QUERY: SELECT '' AS five, INT2_TBL.*;
|
QUERY: SELECT '' AS five, INT2_TBL.*;
|
||||||
|
@ -7,7 +7,7 @@ WARN:pg_atoi: error in "34.5": can't parse ".5"
|
|||||||
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('2147483647');
|
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('2147483647');
|
||||||
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('-2147483647');
|
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('-2147483647');
|
||||||
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
|
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
|
||||||
WARN:pg_atoi: error reading "1000000000000": Result too large
|
WARN:pg_atoi: error reading "1000000000000": Math result not representable
|
||||||
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('asdf');
|
QUERY: INSERT INTO INT4_TBL(f1) VALUES ('asdf');
|
||||||
WARN:pg_atoi: error in "asdf": can't parse "asdf"
|
WARN:pg_atoi: error in "asdf": can't parse "asdf"
|
||||||
QUERY: SELECT '' AS five, INT4_TBL.*;
|
QUERY: SELECT '' AS five, INT4_TBL.*;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('1235/9873');
|
|||||||
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('987/-1234');
|
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('987/-1234');
|
||||||
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('123456');
|
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('123456');
|
||||||
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('123456/123456');
|
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('123456/123456');
|
||||||
WARN:pg_atoi: error reading "123456": Result too large
|
WARN:pg_atoi: error reading "123456": Math result not representable
|
||||||
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('');
|
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('');
|
||||||
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('asdfasd');
|
QUERY: INSERT INTO OIDINT2_TBL(f1) VALUES ('asdfasd');
|
||||||
WARN:pg_atoi: error in "asdfasd": can't parse "asdfasd"
|
WARN:pg_atoi: error in "asdfasd": can't parse "asdfasd"
|
||||||
|
@ -4,7 +4,7 @@ QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('1235/9873');
|
|||||||
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('987/-1234');
|
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('987/-1234');
|
||||||
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('123456');
|
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('123456');
|
||||||
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('123456/1234568901234567890');
|
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('123456/1234568901234567890');
|
||||||
WARN:pg_atoi: error reading "1234568901234567890": Result too large
|
WARN:pg_atoi: error reading "1234568901234567890": Math result not representable
|
||||||
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('');
|
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('');
|
||||||
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('asdfasd');
|
QUERY: INSERT INTO OIDINT4_TBL(f1) VALUES ('asdfasd');
|
||||||
WARN:pg_atoi: error in "asdfasd": can't parse "asdfasd"
|
WARN:pg_atoi: error in "asdfasd": can't parse "asdfasd"
|
||||||
|
@ -7,20 +7,20 @@ QUERY: INSERT INTO POINT_TBL(f1) VALUES ('(-5.0,-12.0)');
|
|||||||
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('asdfasdf');
|
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('asdfasdf');
|
||||||
WARN:Bad point external representation 'asdfasdf'
|
WARN:Bad point external representation 'asdfasdf'
|
||||||
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('10.0,10.0');
|
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('10.0,10.0');
|
||||||
WARN:Bad point external representation '10.0,10.0'
|
|
||||||
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)');
|
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)');
|
||||||
WARN:Bad point external representation '(10.0 10.0)'
|
WARN:Bad point external representation '(10.0 10.0)'
|
||||||
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
|
QUERY: INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
|
||||||
WARN:Bad point external representation '(10.0,10.0'
|
WARN:Bad point external representation '(10.0,10.0'
|
||||||
QUERY: SELECT '' AS five, POINT_TBL.*;
|
QUERY: SELECT '' AS six, POINT_TBL.*;
|
||||||
five|f1
|
six|f1
|
||||||
----+----------
|
---+----------
|
||||||
|(0,0)
|
|(0,0)
|
||||||
|(-10,0)
|
|(-10,0)
|
||||||
|(-3,4)
|
|(-3,4)
|
||||||
|(5.1,34.5)
|
|(5.1,34.5)
|
||||||
|(-5,-12)
|
|(-5,-12)
|
||||||
(5 rows)
|
|(10,10)
|
||||||
|
(6 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p WHERE p.f1 !< '(0.0, 0.0)';
|
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p WHERE p.f1 !< '(0.0, 0.0)';
|
||||||
three|f1
|
three|f1
|
||||||
@ -56,13 +56,14 @@ one|f1
|
|||||||
|(5.1,34.5)
|
|(5.1,34.5)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, p.* FROM POINT_TBL p
|
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p
|
||||||
WHERE p.f1 ===> '(0,0,100,100)';
|
WHERE p.f1 ===> '(0,0,100,100)';
|
||||||
two|f1
|
three|f1
|
||||||
---+----------
|
-----+----------
|
||||||
|(0,0)
|
|(0,0)
|
||||||
|(5.1,34.5)
|
|(5.1,34.5)
|
||||||
(2 rows)
|
|(10,10)
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p
|
QUERY: SELECT '' AS three, p.* FROM POINT_TBL p
|
||||||
WHERE not on_pb(p.f1,'(0,0,100,100)'::box);
|
WHERE not on_pb(p.f1,'(0,0,100,100)'::box);
|
||||||
@ -81,100 +82,128 @@ two|f1
|
|||||||
|(-10,0)
|
|(-10,0)
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, p.f1, p.f1 <===> '(0,0)' AS dist FROM POINT_TBL p;
|
QUERY: SELECT '' AS six, p.f1, p.f1 <===> '(0,0)'::point AS dist FROM POINT_TBL p;
|
||||||
five|f1 |dist
|
six|f1 | dist
|
||||||
----+----------+----
|
---+----------+----------------
|
||||||
|(0,0) | 0
|
|(0,0) | 0
|
||||||
|(-10,0) | 10
|
|(-10,0) | 10
|
||||||
|(-3,4) | 5
|
|(-3,4) | 5
|
||||||
|(5.1,34.5)| 34
|
|(5.1,34.5)|34.8749193547455
|
||||||
|(-5,-12) | 13
|
|(-5,-12) | 13
|
||||||
(5 rows)
|
|(10,10) | 14.142135623731
|
||||||
|
(6 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS twentyfive, p1.f1, p2.f1, p1.f1 <===> p2.f1 AS dist
|
QUERY: SELECT '' AS thirtysix, p1.f1, p2.f1, p1.f1 <===> p2.f1 AS dist
|
||||||
FROM POINT_TBL p1, POINT_TBL p2;
|
FROM POINT_TBL p1, POINT_TBL p2;
|
||||||
twentyfive|f1 |f1 |dist
|
thirtysix|f1 |f1 | dist
|
||||||
----------+----------+----------+----
|
---------+----------+----------+----------------
|
||||||
|(0,0) |(0,0) | 0
|
|(0,0) |(0,0) | 0
|
||||||
|(-10,0) |(0,0) | 10
|
|(-10,0) |(0,0) | 10
|
||||||
|(-3,4) |(0,0) | 5
|
|(-3,4) |(0,0) | 5
|
||||||
|(5.1,34.5)|(0,0) | 34
|
|(5.1,34.5)|(0,0) |34.8749193547455
|
||||||
|(-5,-12) |(0,0) | 13
|
|(-5,-12) |(0,0) | 13
|
||||||
|(0,0) |(-10,0) | 10
|
|(10,10) |(0,0) | 14.142135623731
|
||||||
|(-10,0) |(-10,0) | 0
|
|(0,0) |(-10,0) | 10
|
||||||
|(-3,4) |(-10,0) | 8
|
|(-10,0) |(-10,0) | 0
|
||||||
|(5.1,34.5)|(-10,0) | 37
|
|(-3,4) |(-10,0) |8.06225774829855
|
||||||
|(-5,-12) |(-10,0) | 13
|
|(5.1,34.5)|(-10,0) |37.6597928831267
|
||||||
|(0,0) |(-3,4) | 5
|
|(-5,-12) |(-10,0) | 13
|
||||||
|(-10,0) |(-3,4) | 8
|
|(10,10) |(-10,0) |22.3606797749979
|
||||||
|(-3,4) |(-3,4) | 0
|
|(0,0) |(-3,4) | 5
|
||||||
|(5.1,34.5)|(-3,4) | 31
|
|(-10,0) |(-3,4) |8.06225774829855
|
||||||
|(-5,-12) |(-3,4) | 16
|
|(-3,4) |(-3,4) | 0
|
||||||
|(0,0) |(5.1,34.5)| 34
|
|(5.1,34.5)|(-3,4) |31.5572495632937
|
||||||
|(-10,0) |(5.1,34.5)| 37
|
|(-5,-12) |(-3,4) |16.1245154965971
|
||||||
|(-3,4) |(5.1,34.5)| 31
|
|(10,10) |(-3,4) |14.3178210632764
|
||||||
|(5.1,34.5)|(5.1,34.5)| 0
|
|(0,0) |(5.1,34.5)|34.8749193547455
|
||||||
|(-5,-12) |(5.1,34.5)| 47
|
|(-10,0) |(5.1,34.5)|37.6597928831267
|
||||||
|(0,0) |(-5,-12) | 13
|
|(-3,4) |(5.1,34.5)|31.5572495632937
|
||||||
|(-10,0) |(-5,-12) | 13
|
|(5.1,34.5)|(5.1,34.5)| 0
|
||||||
|(-3,4) |(-5,-12) | 16
|
|(-5,-12) |(5.1,34.5)|47.5842410888311
|
||||||
|(5.1,34.5)|(-5,-12) | 47
|
|(10,10) |(5.1,34.5)|24.9851956166046
|
||||||
|(-5,-12) |(-5,-12) | 0
|
|(0,0) |(-5,-12) | 13
|
||||||
(25 rows)
|
|(-10,0) |(-5,-12) | 13
|
||||||
|
|(-3,4) |(-5,-12) |16.1245154965971
|
||||||
|
|(5.1,34.5)|(-5,-12) |47.5842410888311
|
||||||
|
|(-5,-12) |(-5,-12) | 0
|
||||||
|
|(10,10) |(-5,-12) |26.6270539113887
|
||||||
|
|(0,0) |(10,10) | 14.142135623731
|
||||||
|
|(-10,0) |(10,10) |22.3606797749979
|
||||||
|
|(-3,4) |(10,10) |14.3178210632764
|
||||||
|
|(5.1,34.5)|(10,10) |24.9851956166046
|
||||||
|
|(-5,-12) |(10,10) |26.6270539113887
|
||||||
|
|(10,10) |(10,10) | 0
|
||||||
|
(36 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS twenty, p1.f1, p2.f1
|
QUERY: SELECT '' AS thirty, p1.f1, p2.f1
|
||||||
FROM POINT_TBL p1, POINT_TBL p2
|
FROM POINT_TBL p1, POINT_TBL p2
|
||||||
WHERE (p1.f1 <===> p2.f1) > 3;
|
WHERE (p1.f1 <===> p2.f1) > 3;
|
||||||
twenty|f1 |f1
|
thirty|f1 |f1
|
||||||
------+----------+----------
|
------+----------+----------
|
||||||
|(-10,0) |(0,0)
|
|(-10,0) |(0,0)
|
||||||
|(-3,4) |(0,0)
|
|(-3,4) |(0,0)
|
||||||
|(5.1,34.5)|(0,0)
|
|(5.1,34.5)|(0,0)
|
||||||
|(-5,-12) |(0,0)
|
|(-5,-12) |(0,0)
|
||||||
|
|(10,10) |(0,0)
|
||||||
|(0,0) |(-10,0)
|
|(0,0) |(-10,0)
|
||||||
|(-3,4) |(-10,0)
|
|(-3,4) |(-10,0)
|
||||||
|(5.1,34.5)|(-10,0)
|
|(5.1,34.5)|(-10,0)
|
||||||
|(-5,-12) |(-10,0)
|
|(-5,-12) |(-10,0)
|
||||||
|
|(10,10) |(-10,0)
|
||||||
|(0,0) |(-3,4)
|
|(0,0) |(-3,4)
|
||||||
|(-10,0) |(-3,4)
|
|(-10,0) |(-3,4)
|
||||||
|(5.1,34.5)|(-3,4)
|
|(5.1,34.5)|(-3,4)
|
||||||
|(-5,-12) |(-3,4)
|
|(-5,-12) |(-3,4)
|
||||||
|
|(10,10) |(-3,4)
|
||||||
|(0,0) |(5.1,34.5)
|
|(0,0) |(5.1,34.5)
|
||||||
|(-10,0) |(5.1,34.5)
|
|(-10,0) |(5.1,34.5)
|
||||||
|(-3,4) |(5.1,34.5)
|
|(-3,4) |(5.1,34.5)
|
||||||
|(-5,-12) |(5.1,34.5)
|
|(-5,-12) |(5.1,34.5)
|
||||||
|
|(10,10) |(5.1,34.5)
|
||||||
|(0,0) |(-5,-12)
|
|(0,0) |(-5,-12)
|
||||||
|(-10,0) |(-5,-12)
|
|(-10,0) |(-5,-12)
|
||||||
|(-3,4) |(-5,-12)
|
|(-3,4) |(-5,-12)
|
||||||
|(5.1,34.5)|(-5,-12)
|
|(5.1,34.5)|(-5,-12)
|
||||||
(20 rows)
|
|(10,10) |(-5,-12)
|
||||||
|
|(0,0) |(10,10)
|
||||||
|
|(-10,0) |(10,10)
|
||||||
|
|(-3,4) |(10,10)
|
||||||
|
|(5.1,34.5)|(10,10)
|
||||||
|
|(-5,-12) |(10,10)
|
||||||
|
(30 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS ten, p1.f1, p2.f1
|
QUERY: SELECT '' AS fifteen, p1.f1, p2.f1
|
||||||
FROM POINT_TBL p1, POINT_TBL p2
|
FROM POINT_TBL p1, POINT_TBL p2
|
||||||
WHERE (p1.f1 <===> p2.f1) > 3 and
|
WHERE (p1.f1 <===> p2.f1) > 3 and
|
||||||
p1.f1 !< p2.f1;
|
p1.f1 !< p2.f1;
|
||||||
ten|f1 |f1
|
fifteen|f1 |f1
|
||||||
---+--------+----------
|
-------+----------+----------
|
||||||
|(-10,0) |(0,0)
|
|(-10,0) |(0,0)
|
||||||
|(-3,4) |(0,0)
|
|(-3,4) |(0,0)
|
||||||
|(-5,-12)|(0,0)
|
|(-5,-12) |(0,0)
|
||||||
|(-10,0) |(-3,4)
|
|(-10,0) |(-3,4)
|
||||||
|(-5,-12)|(-3,4)
|
|(-5,-12) |(-3,4)
|
||||||
|(0,0) |(5.1,34.5)
|
|(0,0) |(5.1,34.5)
|
||||||
|(-10,0) |(5.1,34.5)
|
|(-10,0) |(5.1,34.5)
|
||||||
|(-3,4) |(5.1,34.5)
|
|(-3,4) |(5.1,34.5)
|
||||||
|(-5,-12)|(5.1,34.5)
|
|(-5,-12) |(5.1,34.5)
|
||||||
|(-10,0) |(-5,-12)
|
|(-10,0) |(-5,-12)
|
||||||
(10 rows)
|
|(0,0) |(10,10)
|
||||||
|
|(-10,0) |(10,10)
|
||||||
|
|(-3,4) |(10,10)
|
||||||
|
|(5.1,34.5)|(10,10)
|
||||||
|
|(-5,-12) |(10,10)
|
||||||
|
(15 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, p1.f1, p2.f1
|
QUERY: SELECT '' AS three, p1.f1, p2.f1
|
||||||
FROM POINT_TBL p1, POINT_TBL p2
|
FROM POINT_TBL p1, POINT_TBL p2
|
||||||
WHERE (p1.f1 <===> p2.f1) > 3 and
|
WHERE (p1.f1 <===> p2.f1) > 3 and
|
||||||
p1.f1 !< p2.f1 and
|
p1.f1 !< p2.f1 and
|
||||||
p1.f1 !^ p2.f1;
|
p1.f1 !^ p2.f1;
|
||||||
two|f1 |f1
|
three|f1 |f1
|
||||||
---+-------+--------
|
-----+----------+--------
|
||||||
|(-3,4) |(0,0)
|
|(-3,4) |(0,0)
|
||||||
|(-10,0)|(-5,-12)
|
|(-10,0) |(-5,-12)
|
||||||
(2 rows)
|
|(5.1,34.5)|(10,10)
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
@ -14,51 +14,51 @@ WARN:Bad polygon external representation '(0,1,2,3'
|
|||||||
QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('asdf');
|
QUERY: INSERT INTO POLYGON_TBL(f1) VALUES ('asdf');
|
||||||
WARN:Bad polygon external representation 'asdf'
|
WARN:Bad polygon external representation 'asdf'
|
||||||
QUERY: SELECT '' AS four, POLYGON_TBL.*;
|
QUERY: SELECT '' AS four, POLYGON_TBL.*;
|
||||||
four|f1
|
four|f1
|
||||||
----+-------------------------------------------------------------------------------
|
----+-------------------
|
||||||
|( 2, 2, 0, 0, 4, 0)
|
|((2,0),(2,4),(0,0))
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
|( 0, 0)
|
|((0,0))
|
||||||
|( 0, 0, 1, 1)
|
|((0,1),(0,1))
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, p.*
|
QUERY: SELECT '' AS three, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 && '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 && '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
three|f1
|
three|f1
|
||||||
-----+-------------------------------------------------------------------------------
|
-----+-------------------
|
||||||
|( 2, 2, 0, 0, 4, 0)
|
|((2,0),(2,4),(0,0))
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
|( 0, 0, 1, 1)
|
(2 rows)
|
||||||
(3 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS four, p.*
|
QUERY: SELECT '' AS four, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 &< '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 &< '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
four|f1
|
four|f1
|
||||||
----+-------------------------------------------------------------------------------
|
----+-------------------
|
||||||
|( 2, 2, 0, 0, 4, 0)
|
|((2,0),(2,4),(0,0))
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
|( 0, 0)
|
|((0,0))
|
||||||
|( 0, 0, 1, 1)
|
|((0,1),(0,1))
|
||||||
(4 rows)
|
(4 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS two, p.*
|
QUERY: SELECT '' AS two, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 &> '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 &> '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
two|f1
|
two|f1
|
||||||
---+-------------------------------------------------------------------------------
|
---+-------------------
|
||||||
|( 2, 2, 0, 0, 4, 0)
|
|((2,0),(2,4),(0,0))
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS one, p.*
|
QUERY: SELECT '' AS one, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 << '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 << '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
one|f1
|
one|f1
|
||||||
---+---------------------------
|
---+-------------
|
||||||
|( 0, 0)
|
|((0,0))
|
||||||
(1 row)
|
|((0,1),(0,1))
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS zero, p.*
|
QUERY: SELECT '' AS zero, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
@ -70,25 +70,25 @@ zero|f1
|
|||||||
QUERY: SELECT '' AS one, p.*
|
QUERY: SELECT '' AS one, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 @ '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 @ '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
one|f1
|
one|f1
|
||||||
---+-------------------------------------------------------------------------------
|
---+-------------------
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS one, p.*
|
QUERY: SELECT '' AS one, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 ~= '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 ~= '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
one|f1
|
one|f1
|
||||||
---+-------------------------------------------------------------------------------
|
---+-------------------
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS one, p.*
|
QUERY: SELECT '' AS one, p.*
|
||||||
FROM POLYGON_TBL p
|
FROM POLYGON_TBL p
|
||||||
WHERE p.f1 ~ '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
WHERE p.f1 ~ '(3.0,3.0,1.0,1.0,3.0,0.0)';
|
||||||
one|f1
|
one|f1
|
||||||
---+-------------------------------------------------------------------------------
|
---+-------------------
|
||||||
|( 3, 3, 1, 1, 3, 0)
|
|((3,1),(3,3),(1,0))
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '(2.0,2.0,0.0,0.0,4.0,0.0)'::polygon << '(3.0,3.0,1.0,1.0,3.0,0.0)'::polygon AS false;
|
QUERY: SELECT '(2.0,2.0,0.0,0.0,4.0,0.0)'::polygon << '(3.0,3.0,1.0,1.0,3.0,0.0)'::polygon AS false;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
=============== running regression queries ... =================
|
|
||||||
QUERY: SELECT onek.* WHERE onek.unique1 < 10;
|
QUERY: SELECT onek.* WHERE onek.unique1 < 10;
|
||||||
unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenthous|odd|even|stringu1|stringu2|string4
|
unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenthous|odd|even|stringu1|stringu2|string4
|
||||||
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
|
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
|
||||||
@ -176,7 +175,6 @@ unique1|string4
|
|||||||
QUERY: SELECT two, stringu1, ten, string4
|
QUERY: SELECT two, stringu1, ten, string4
|
||||||
INTO TABLE temp
|
INTO TABLE temp
|
||||||
FROM onek;
|
FROM onek;
|
||||||
|
|
||||||
QUERY: SELECT p.name, p.age FROM person* p;
|
QUERY: SELECT p.name, p.age FROM person* p;
|
||||||
name |age
|
name |age
|
||||||
-------+---
|
-------+---
|
||||||
|
@ -11,26 +11,26 @@ QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
|||||||
VALUES ('["Feb 15 1990 12:15:03" "current"]');
|
VALUES ('["Feb 15 1990 12:15:03" "current"]');
|
||||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||||
VALUES ('["bad time specifications" ""]');
|
VALUES ('["bad time specifications" ""]');
|
||||||
|
WARN:Bad abstime external representation 'bad time specifications'
|
||||||
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
QUERY: INSERT INTO TINTERVAL_TBL (f1)
|
||||||
VALUES ('["" "infinity"]');
|
VALUES ('["" "infinity"]');
|
||||||
|
WARN:Bad abstime external representation ''
|
||||||
QUERY: SELECT '' AS seven, TINTERVAL_TBL.*;
|
QUERY: SELECT '' AS seven, TINTERVAL_TBL.*;
|
||||||
seven|f1
|
seven|f1
|
||||||
-----+---------------------------------------------------------------
|
-----+---------------------------------------------------------------
|
||||||
|['-infinity' 'infinity']
|
|["-infinity" "infinity"]
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
|['Undefined Range']
|
(5 rows)
|
||||||
|['Undefined Range']
|
|
||||||
(7 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS one, t.*
|
QUERY: SELECT '' AS one, t.*
|
||||||
FROM TINTERVAL_TBL t
|
FROM TINTERVAL_TBL t
|
||||||
WHERE t.f1 #= '@ 1 months';
|
WHERE t.f1 #= '@ 1 months';
|
||||||
one|f1
|
one|f1
|
||||||
---+---------------------------------------------------------------
|
---+---------------------------------------------------------------
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, t.*
|
QUERY: SELECT '' AS three, t.*
|
||||||
@ -38,9 +38,9 @@ QUERY: SELECT '' AS three, t.*
|
|||||||
WHERE t.f1 #<> '@ 1 months';
|
WHERE t.f1 #<> '@ 1 months';
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------------------------------------------------------------
|
-----+---------------------------------------------------------------
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS zero, t.*
|
QUERY: SELECT '' AS zero, t.*
|
||||||
@ -55,7 +55,7 @@ QUERY: SELECT '' AS one, t.*
|
|||||||
WHERE t.f1 #<= '@ 1 month';
|
WHERE t.f1 #<= '@ 1 month';
|
||||||
one|f1
|
one|f1
|
||||||
---+---------------------------------------------------------------
|
---+---------------------------------------------------------------
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, t.*
|
QUERY: SELECT '' AS three, t.*
|
||||||
@ -63,9 +63,9 @@ QUERY: SELECT '' AS three, t.*
|
|||||||
WHERE t.f1 #> '@ 1 year';
|
WHERE t.f1 #> '@ 1 year';
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------------------------------------------------------------
|
-----+---------------------------------------------------------------
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, t.*
|
QUERY: SELECT '' AS three, t.*
|
||||||
@ -73,79 +73,77 @@ QUERY: SELECT '' AS three, t.*
|
|||||||
WHERE t.f1 #>= '@ 3 years';
|
WHERE t.f1 #>= '@ 3 years';
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------------------------------------------------------------
|
-----+---------------------------------------------------------------
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, t1.*
|
QUERY: SELECT '' AS three, t1.*
|
||||||
FROM TINTERVAL_TBL t1
|
FROM TINTERVAL_TBL t1
|
||||||
WHERE t1.f1 &&
|
WHERE t1.f1 &&
|
||||||
'["Aug 15 14:23:19 1983" "Sep 16 14:23:19 1983"]'::tinterval;
|
'["Aug 15 14:23:19 1983" "Sep 16 14:23:19 1983"]'::tinterval;
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------------------------------------------------------------
|
-----+---------------------------------------------------------------
|
||||||
|['-infinity' 'infinity']
|
|["-infinity" "infinity"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, t1.*, t2.*
|
QUERY: SELECT '' AS five, t1.*, t2.*
|
||||||
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
|
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
|
||||||
WHERE t1.f1 && t2.f1 and
|
WHERE t1.f1 && t2.f1 and
|
||||||
t1.f1 = t2.f1;
|
t1.f1 = t2.f1;
|
||||||
five|f1 |f1
|
five|f1 |f1
|
||||||
----+---------------------------------------------------------------+---------------------------------------------------------------
|
----+---------------------------------------------------------------+---------------------------------------------------------------
|
||||||
|['-infinity' 'infinity'] |['-infinity' 'infinity']
|
|["-infinity" "infinity"] |["-infinity" "infinity"]
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT'] |['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current'] |['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"] |["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS fourteen, t1.*, t2.*
|
QUERY: SELECT '' AS fourteen, t1.*, t2.*
|
||||||
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
|
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
|
||||||
WHERE t1.f1 && t2.f1 and
|
WHERE t1.f1 && t2.f1 and
|
||||||
not t1.f1 = t2.f1;
|
not t1.f1 = t2.f1;
|
||||||
fourteen|f1 |f1
|
fourteen|f1 |f1
|
||||||
--------+---------------------------------------------------------------+---------------------------------------------------------------
|
--------+---------------------------------------------------------------+---------------------------------------------------------------
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']|['-infinity' 'infinity']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]|["-infinity" "infinity"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']|['-infinity' 'infinity']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]|["-infinity" "infinity"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT'] |['-infinity' 'infinity']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["-infinity" "infinity"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current'] |['-infinity' 'infinity']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"] |["-infinity" "infinity"]
|
||||||
|['-infinity' 'infinity'] |['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["-infinity" "infinity"] |["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT'] |['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['-infinity' 'infinity'] |['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["-infinity" "infinity"] |["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT'] |['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['-infinity' 'infinity'] |['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["-infinity" "infinity"] |["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current'] |['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"] |["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
|['-infinity' 'infinity'] |['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["-infinity" "infinity"] |["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT'] |['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"] |["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
(14 rows)
|
(14 rows)
|
||||||
|
|
||||||
QUERY: SELECT '' AS five, t1.*
|
QUERY: SELECT '' AS five, t1.*
|
||||||
FROM TINTERVAL_TBL t1
|
FROM TINTERVAL_TBL t1
|
||||||
WHERE not t1.f1 <<
|
WHERE not t1.f1 <<
|
||||||
'["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]'::tinterval;
|
'["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]'::tinterval;
|
||||||
five|f1
|
five|f1
|
||||||
----+---------------------------------------------------------------
|
----+---------------------------------------------------------------
|
||||||
|['Mon May 10 23:59:12 1943 PWT' 'Sun Jan 14 03:14:21 1973 PST']
|
|["Mon May 10 23:59:12 1943 PST" "Sun Jan 14 03:14:21 1973 PST"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['Thu Feb 15 12:15:03 1990 PST' 'current']
|
|["Thu Feb 15 12:15:03 1990 PST" "current"]
|
||||||
|['Undefined Range']
|
(3 rows)
|
||||||
|['Undefined Range']
|
|
||||||
(5 rows)
|
|
||||||
|
|
||||||
QUERY: SELECT '' AS three, t1.*
|
QUERY: SELECT '' AS three, t1.*
|
||||||
FROM TINTERVAL_TBL t1
|
FROM TINTERVAL_TBL t1
|
||||||
WHERE t1.f1 &&
|
WHERE t1.f1 &&
|
||||||
('Aug 15 14:23:19 1983'::abstime <#>
|
('Aug 15 14:23:19 1983'::abstime <#>
|
||||||
'Sep 16 14:23:19 1983'::abstime);
|
'Sep 16 14:23:19 1983'::abstime);
|
||||||
three|f1
|
three|f1
|
||||||
-----+---------------------------------------------------------------
|
-----+---------------------------------------------------------------
|
||||||
|['-infinity' 'infinity']
|
|["-infinity" "infinity"]
|
||||||
|['Sun Sep 04 23:59:12 1983 PDT' 'Tue Oct 04 23:59:12 1983 PDT']
|
|["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
|
||||||
|['epoch' 'Mon May 01 00:30:30 1995 PDT']
|
|["epoch" "Mon May 01 00:30:30 1995 PDT"]
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/test/regress/input/Attic/Makefile,v 1.3 1997/04/26 05:44:38 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/test/regress/input/Attic/Makefile,v 1.4 1997/04/27 02:58:15 scrappy Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -20,7 +20,8 @@ include ../../../Makefile.global
|
|||||||
# INFILES is the files the regression test uses for input.
|
# INFILES is the files the regression test uses for input.
|
||||||
INFILES= copy.sql \
|
INFILES= copy.sql \
|
||||||
create_function_1.sql \
|
create_function_1.sql \
|
||||||
create_function_2.sql
|
create_function_2.sql \
|
||||||
|
misc.sql
|
||||||
|
|
||||||
all: $(INFILES)
|
all: $(INFILES)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
QUERY: CREATE FUNCTION circle_in(opaque)
|
QUERY: CREATE FUNCTION widget_in(opaque)
|
||||||
RETURNS circle
|
RETURNS widget
|
||||||
AS '_CWD_/regress_DLSUFFIX_'
|
AS '_CWD_/regress_DLSUFFIX_'
|
||||||
LANGUAGE 'c';
|
LANGUAGE 'c';
|
||||||
NOTICE:ProcedureCreate: type 'circle' is not yet defined
|
NOTICE:ProcedureCreate: type 'widget' is not yet defined
|
||||||
QUERY: CREATE FUNCTION circle_out(opaque)
|
QUERY: CREATE FUNCTION widget_out(opaque)
|
||||||
RETURNS opaque
|
RETURNS opaque
|
||||||
AS '_CWD_/regress_DLSUFFIX_'
|
AS '_CWD_/regress_DLSUFFIX_'
|
||||||
LANGUAGE 'c';
|
LANGUAGE 'c';
|
||||||
|
@ -17,7 +17,7 @@ QUERY: CREATE FUNCTION user_relns()
|
|||||||
where relname !~ ''pg_.*'' and
|
where relname !~ ''pg_.*'' and
|
||||||
relkind <> ''i'' '
|
relkind <> ''i'' '
|
||||||
LANGUAGE 'sql';
|
LANGUAGE 'sql';
|
||||||
QUERY: CREATE FUNCTION pt_in_circle(point, circle)
|
QUERY: CREATE FUNCTION pt_in_widget(point, widget)
|
||||||
RETURNS int4
|
RETURNS int4
|
||||||
AS '_CWD_/regress_DLSUFFIX_'
|
AS '_CWD_/regress_DLSUFFIX_'
|
||||||
LANGUAGE 'c';
|
LANGUAGE 'c';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.7 1997/04/26 05:49:39 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.8 1997/04/27 02:56:18 scrappy Exp $
|
||||||
#
|
#
|
||||||
if [ -d ./obj ]; then
|
if [ -d ./obj ]; then
|
||||||
cd ./obj
|
cd ./obj
|
||||||
@ -10,26 +10,27 @@ TZ="PST8PDT7,M04.01.00,M10.05.03"; export TZ
|
|||||||
#FRONTEND=monitor
|
#FRONTEND=monitor
|
||||||
FRONTEND="psql -n -e -q"
|
FRONTEND="psql -n -e -q"
|
||||||
|
|
||||||
echo =============== Notes... =================
|
echo "=============== Notes... ================="
|
||||||
echo "You must be already running the postmaster"
|
echo "postmaster must already be running for the regression tests to succeed."
|
||||||
echo " for the regression tests to succeed."
|
echo "The non-GEQ optimizer will give more consistant results than will the"
|
||||||
echo "The time zone might need to be set to PST/PDT"
|
echo " GEQ optimizer. See the regression testing README for more details."
|
||||||
echo " for the date and time data types to pass the"
|
echo "The time zone might need to be set to PST/PDT for the date and time data"
|
||||||
echo " regression tests; to do this type"
|
echo " types to pass the regression tests; to do this type"
|
||||||
echo " setenv TZ $TZ"
|
echo " setenv TZ $TZ"
|
||||||
echo " before starting the postmaster."
|
echo " before starting the postmaster."
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo =============== destroying old regression database... =================
|
echo "=============== destroying old regression database... ================="
|
||||||
destroydb regression
|
destroydb regression
|
||||||
|
|
||||||
echo =============== creating new regression database... =================
|
echo "=============== creating new regression database... ================="
|
||||||
createdb regression
|
createdb regression
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo createdb failed
|
echo createdb failed
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo =============== running regression queries ... =================
|
echo "=============== running regression queries... ================="
|
||||||
for i in `cat sql/tests`
|
for i in `cat sql/tests`
|
||||||
do
|
do
|
||||||
echo -n "${i} .. "
|
echo -n "${i} .. "
|
||||||
@ -43,7 +44,7 @@ do
|
|||||||
done
|
done
|
||||||
exit
|
exit
|
||||||
|
|
||||||
echo =============== running error queries ... =================
|
echo "=============== running error queries ... ================="
|
||||||
$FRONTEND regression < errors.sql
|
$FRONTEND regression < errors.sql
|
||||||
# this will generate error result code
|
# this will generate error result code
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ if test "$debug" -eq 1
|
|||||||
then
|
then
|
||||||
echo Skipping clearing and deletion of the regression database
|
echo Skipping clearing and deletion of the regression database
|
||||||
else
|
else
|
||||||
echo =============== clearing regression database... =================
|
echo "=============== clearing regression database... ================="
|
||||||
$FRONTEND regression < destroy.sql
|
$FRONTEND regression < destroy.sql
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo the destroy script has an error
|
echo the destroy script has an error
|
||||||
@ -62,7 +63,7 @@ if [ $? -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
echo =============== destroying regression database... =================
|
echo "=============== destroying regression database... ================="
|
||||||
destroydb regression
|
destroydb regression
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo destroydb failed
|
echo destroydb failed
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/test/regress/sql/Attic/Makefile,v 1.1 1997/04/26 05:45:48 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/test/regress/sql/Attic/Makefile,v 1.2 1997/04/27 02:58:26 scrappy Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
CLFILES= create_function_1.sql create_function_2.sql copy.sql
|
CLFILES= create_function_1.sql create_function_2.sql copy.sql misc.sql
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CLFILES)
|
rm -f $(CLFILES)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
--
|
--
|
||||||
-- timezones may vary based not only on location but the operating
|
-- timezones may vary based not only on location but the operating
|
||||||
-- system. the main correctness issue is that the OS may not get
|
-- system. the main correctness issue is that the OS may not get
|
||||||
-- DST right for times prior to unix epoch (jan 1 1970).
|
-- daylight savings time right for times prior to Unix epoch (jan 1 1970).
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE ABSTIME_TBL (f1 abstime);
|
CREATE TABLE ABSTIME_TBL (f1 abstime);
|
||||||
@ -37,51 +37,51 @@ INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
|
|||||||
|
|
||||||
-- test abstime operators
|
-- test abstime operators
|
||||||
|
|
||||||
SELECT '' AS eleven, ABSTIME_TBL.*;
|
SELECT '' AS eight, ABSTIME_TBL.*;
|
||||||
|
|
||||||
SELECT '' AS eight, ABSTIME_TBL.*
|
SELECT '' AS six, ABSTIME_TBL.*
|
||||||
WHERE ABSTIME_TBL.f1 < 'Jun 30, 2001'::abstime;
|
WHERE ABSTIME_TBL.f1 < 'Jun 30, 2001'::abstime;
|
||||||
|
|
||||||
SELECT '' AS eight, ABSTIME_TBL.*
|
SELECT '' AS six, ABSTIME_TBL.*
|
||||||
WHERE ABSTIME_TBL.f1 > '-infinity'::abstime;
|
WHERE ABSTIME_TBL.f1 > '-infinity'::abstime;
|
||||||
|
|
||||||
SELECT '' AS eight, ABSTIME_TBL.*
|
SELECT '' AS six, ABSTIME_TBL.*
|
||||||
WHERE 'May 10, 1943 23:59:12'::abstime <> ABSTIME_TBL.f1;
|
WHERE 'May 10, 1943 23:59:12'::abstime <> ABSTIME_TBL.f1;
|
||||||
|
|
||||||
SELECT '' AS one, ABSTIME_TBL.*
|
SELECT '' AS one, ABSTIME_TBL.*
|
||||||
WHERE 'current'::abstime = ABSTIME_TBL.f1;
|
WHERE 'current'::abstime = ABSTIME_TBL.f1;
|
||||||
|
|
||||||
SELECT '' AS five, ABSTIME_TBL.*
|
SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE 'epoch'::abstime >= ABSTIME_TBL.f1;
|
WHERE 'epoch'::abstime >= ABSTIME_TBL.f1;
|
||||||
|
|
||||||
SELECT '' AS six, ABSTIME_TBL.*
|
SELECT '' AS four, ABSTIME_TBL.*
|
||||||
WHERE ABSTIME_TBL.f1 <= 'Jan 14, 1973 03:14:21'::abstime;
|
WHERE ABSTIME_TBL.f1 <= 'Jan 14, 1973 03:14:21'::abstime;
|
||||||
|
|
||||||
SELECT '' AS six, ABSTIME_TBL.*
|
SELECT '' AS four, ABSTIME_TBL.*
|
||||||
WHERE ABSTIME_TBL.f1 <?>
|
WHERE ABSTIME_TBL.f1 <?>
|
||||||
'["Apr 1 1945 00:00:00" "Dec 30 1999 23:00:00"]'::tinterval;
|
'["Apr 1 1945 00:00:00" "Dec 30 1999 23:00:00"]'::tinterval;
|
||||||
|
|
||||||
-- these four queries should return the same answer
|
-- these four queries should return the same answer
|
||||||
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
|
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
|
||||||
-- therefore, should not show up in the results.
|
-- therefore, should not show up in the results.
|
||||||
SELECT '' AS five, ABSTIME_TBL.*
|
SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 + '@ 3 year'::reltime) -- +3 years
|
WHERE (ABSTIME_TBL.f1 + '@ 3 year'::reltime) -- +3 years
|
||||||
< 'Jan 14 14:00:00 1977'::abstime;
|
< 'Jan 14 14:00:00 1977'::abstime;
|
||||||
|
|
||||||
SELECT '' AS five, ABSTIME_TBL.*
|
SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 + '@ 3 year ago'::reltime) -- -3 years
|
WHERE (ABSTIME_TBL.f1 + '@ 3 year ago'::reltime) -- -3 years
|
||||||
< 'Jan 14 14:00:00 1971'::abstime;
|
< 'Jan 14 14:00:00 1971'::abstime;
|
||||||
|
|
||||||
SELECT '' AS five, ABSTIME_TBL.*
|
SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 - '@ 3 year'::reltime) -- -(+3) years
|
WHERE (ABSTIME_TBL.f1 - '@ 3 year'::reltime) -- -(+3) years
|
||||||
< 'Jan 14 14:00:00 1971'::abstime;
|
< 'Jan 14 14:00:00 1971'::abstime;
|
||||||
|
|
||||||
SELECT '' AS five, ABSTIME_TBL.*
|
SELECT '' AS three, ABSTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 - '@ 3 year ago'::reltime) -- -(-3) years
|
WHERE (ABSTIME_TBL.f1 - '@ 3 year ago'::reltime) -- -(-3) years
|
||||||
< 'Jan 14 14:00:00 1977'::abstime;
|
< 'Jan 14 14:00:00 1977'::abstime;
|
||||||
|
|
||||||
|
|
||||||
SELECT '' AS twenty, ABSTIME_TBL.*, RELTIME_TBL.*
|
SELECT '' AS ten, ABSTIME_TBL.*, RELTIME_TBL.*
|
||||||
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
|
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
|
||||||
< 'Jan 14 14:00:00 1971'::abstime;
|
< 'Jan 14 14:00:00 1971'::abstime;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)');
|
|||||||
INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
|
INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
|
||||||
|
|
||||||
|
|
||||||
SELECT '' AS five, POINT_TBL.*;
|
SELECT '' AS six, POINT_TBL.*;
|
||||||
|
|
||||||
-- left of
|
-- left of
|
||||||
SELECT '' AS three, p.* FROM POINT_TBL p WHERE p.f1 !< '(0.0, 0.0)';
|
SELECT '' AS three, p.* FROM POINT_TBL p WHERE p.f1 !< '(0.0, 0.0)';
|
||||||
@ -40,7 +40,7 @@ SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 !| '(0.0, 0.0)';
|
|||||||
SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 =|= '(5.1, 34.5)';
|
SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 =|= '(5.1, 34.5)';
|
||||||
|
|
||||||
-- point in box
|
-- point in box
|
||||||
SELECT '' AS two, p.* FROM POINT_TBL p
|
SELECT '' AS three, p.* FROM POINT_TBL p
|
||||||
WHERE p.f1 ===> '(0,0,100,100)';
|
WHERE p.f1 ===> '(0,0,100,100)';
|
||||||
|
|
||||||
SELECT '' AS three, p.* FROM POINT_TBL p
|
SELECT '' AS three, p.* FROM POINT_TBL p
|
||||||
@ -49,24 +49,23 @@ SELECT '' AS three, p.* FROM POINT_TBL p
|
|||||||
SELECT '' AS two, p.* FROM POINT_TBL p
|
SELECT '' AS two, p.* FROM POINT_TBL p
|
||||||
WHERE on_ppath(p.f1,'(0,3,0,0,-10,0,-10,10)'::path);
|
WHERE on_ppath(p.f1,'(0,3,0,0,-10,0,-10,10)'::path);
|
||||||
|
|
||||||
SELECT '' AS five, p.f1, p.f1 <===> '(0,0)' AS dist FROM POINT_TBL p;
|
SELECT '' AS six, p.f1, p.f1 <===> '(0,0)'::point AS dist FROM POINT_TBL p;
|
||||||
|
|
||||||
SELECT '' AS twentyfive, p1.f1, p2.f1, p1.f1 <===> p2.f1 AS dist
|
SELECT '' AS thirtysix, p1.f1, p2.f1, p1.f1 <===> p2.f1 AS dist
|
||||||
FROM POINT_TBL p1, POINT_TBL p2;
|
FROM POINT_TBL p1, POINT_TBL p2;
|
||||||
|
|
||||||
SELECT '' AS twenty, p1.f1, p2.f1
|
SELECT '' AS thirty, p1.f1, p2.f1
|
||||||
FROM POINT_TBL p1, POINT_TBL p2
|
FROM POINT_TBL p1, POINT_TBL p2
|
||||||
WHERE (p1.f1 <===> p2.f1) > 3;
|
WHERE (p1.f1 <===> p2.f1) > 3;
|
||||||
|
|
||||||
SELECT '' AS ten, p1.f1, p2.f1
|
SELECT '' AS fifteen, p1.f1, p2.f1
|
||||||
FROM POINT_TBL p1, POINT_TBL p2
|
FROM POINT_TBL p1, POINT_TBL p2
|
||||||
WHERE (p1.f1 <===> p2.f1) > 3 and
|
WHERE (p1.f1 <===> p2.f1) > 3 and
|
||||||
p1.f1 !< p2.f1;
|
p1.f1 !< p2.f1;
|
||||||
|
|
||||||
SELECT '' AS two, p1.f1, p2.f1
|
SELECT '' AS three, p1.f1, p2.f1
|
||||||
FROM POINT_TBL p1, POINT_TBL p2
|
FROM POINT_TBL p1, POINT_TBL p2
|
||||||
WHERE (p1.f1 <===> p2.f1) > 3 and
|
WHERE (p1.f1 <===> p2.f1) > 3 and
|
||||||
p1.f1 !< p2.f1 and
|
p1.f1 !< p2.f1 and
|
||||||
p1.f1 !^ p2.f1;
|
p1.f1 !^ p2.f1;
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ create_operator
|
|||||||
create_view
|
create_view
|
||||||
create_index
|
create_index
|
||||||
sanity_check
|
sanity_check
|
||||||
|
timespan
|
||||||
|
datetime
|
||||||
reltime
|
reltime
|
||||||
abstime
|
abstime
|
||||||
boolean
|
boolean
|
||||||
@ -34,4 +36,5 @@ select
|
|||||||
select_into
|
select_into
|
||||||
select_distinct
|
select_distinct
|
||||||
select_distinct_on
|
select_distinct_on
|
||||||
|
errors
|
||||||
misc
|
misc
|
||||||
|
Reference in New Issue
Block a user