Commit a64d3bc4 authored by Bruce Momjian's avatar Bruce Momjian

Solaris has always had problems with 1947 in the

regression tests so I prepared a set of expected
files to make things look OK.

There's also a file to account for minor variations
in the geopmetry output and a resultmap patch to
pull them all together.

With these changes PostgreSQL, from CVS, builds and
regression tests (runcheck) cleanly.

Keith Parks.
parent 81fc1d5e
.\" This is -*-nroff-*- .\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here.... .\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.3 2000/01/22 23:50:08 tgl Exp $ .\" $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.4 2000/02/06 05:09:31 momjian Exp $
.TH "SYSTEM CATALOGS" INTRO 03/13/94 PostgreSQL PostgreSQL .TH "SYSTEM CATALOGS" INTRO 03/13/94 PostgreSQL PostgreSQL
.SH "Section 7 - System Catalogs" .SH "Section 7 - System Catalogs"
.de LS .de LS
...@@ -28,7 +28,7 @@ These catalogs form the core of the extensibility system: ...@@ -28,7 +28,7 @@ These catalogs form the core of the extensibility system:
pg_amproc local procedures used with specific access methods pg_amproc local procedures used with specific access methods
pg_attribute local class attributes pg_attribute local class attributes
pg_class local classes pg_class local classes
pg_index local secondary indices pg_index local indices
pg_inherits local class inheritance hierarchy pg_inherits local class inheritance hierarchy
pg_language local procedure implementation languages pg_language local procedure implementation languages
pg_opclass local operator classes pg_opclass local operator classes
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<title>Copyrights and Trademarks</title> <title>Copyrights and Trademarks</title>
<para> <para>
<productname>PostgreSQL</productname> is Copyright &copy; 1996-9 <productname>PostgreSQL</productname> is Copyright &copy; 1996-2000
by the PostgreSQL Global Development Group, by the PostgreSQL Inc.
and is distributed under the terms of the Berkeley license. and is distributed under the terms of the Berkeley license.
</para> </para>
......
abbrev|name_en |name_gr abbrev | name_en | name_gr
------+--------------------+------------------------------------------------------------ --------+----------------------+--------------------------------------------------------------
AK |Alaska | ID | Idaho |
AL |Alabama | IA | Iowa |
AZ |Arizona | AL | Alabama |
AR |Arkansas | AK | Alaska |
ID |Idaho | AZ | Arizona |
IA |Iowa | AR | Arkansas |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
NC |North Carolina | NC | North Carolina |
ND |North Dakota | ND | North Dakota |
UT |Utah | FL | Florida |
WY |Wyoming | IL | Illinois |
WV |West Virginia | IN | Indiana |
WI |Wisconsin | CA | California |
WA |Washington | KY | Kentucky |
DC |Washington DC | CO | Colorado |
IL |Illinois | CT | Connecticut |
IN |Indiana | KA | Kansas |
KA |Kansas | LA | Louisiana |
CA |California | MA | Massachusetts |
KY |Kentucky | MD | Maryland |
CO |Colorado | MN | Minnesota |
CT |Connecticut | MS | Mississippi |
LA |Louisiana | MO | Missouri |
ME |Maine | MT | Montana |
MI |Michigan | ME | Maine |
MD |Maryland | MI | Michigan |
MA |Massachusetts | NV | Nevada |
MN |Minnesota | NE | Nebraska |
MS |Mississippi | DE | Delaware |
MO |Missouri | NJ | New Jersey |
MT |Montana | NY | New York |
NJ |New Jersey | NH | New Hampshire |
NY |New York | NM | New Mexico |
NM |New Mexico | SC | South Carolina |
NH |New Hampshire | SD | South Dakota |
NV |Nevada | OH | Ohio |
NE |Nebraska | OK | Oklahoma |
DE |Delaware | OR | Oregon |
SC |South Carolina | PA | Pennsylvania |
SD |South Dakota | TN | Tennessee |
OK |Oklahoma | GA | Georgia |
OR |Oregon | TX | Texas |
OH |Ohio | UT | Utah |
PA |Pennsylvania | WY | Wyoming |
RI |Rhode Island | WV | West Virginia |
TX |Texas | WI | Wisconsin |
TN |Tennessee | WA | Washington |
GA |Georgia | DC | Washington DC |
FL |Florida | RI | Rhode Island |
(50 rows) (50 rows)
EOF
abbrev|name_en |name_gr abbrev | name_en | name_gr
------+--------------------+------------------ --------+----------------------+--------------------
UT |Utah | UT | Utah |
WY |Wyoming | WY | Wyoming |
WV |West Virginia | WV | West Virginia |
WI |Wisconsin | WI | Wisconsin |
WA |Washington | WA | Washington |
DC |Washington DC | DC | Washington DC |
(6 rows) (6 rows)
EOF
abbrev|name_en |name_gr abbrev | name_en | name_gr
------+--------------------+------------------ --------+----------------------+--------------------
AK |Alaska | ID | Idaho |
AL |Alabama | IA | Iowa |
AZ |Arizona | AL | Alabama |
AR |Arkansas | AK | Alaska |
ID |Idaho | AZ | Arizona |
IA |Iowa | AR | Arkansas |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
NC |North Carolina | NC | North Carolina |
ND |North Dakota | ND | North Dakota |
UT |Utah | FL | Florida |
WY |Wyoming | IL | Illinois |
WV |West Virginia | IN | Indiana |
WI |Wisconsin | CA | California |
WA |Washington | KY | Kentucky |
DC |Washington DC | CO | Colorado |
IL |Illinois | CT | Connecticut |
IN |Indiana | KA | Kansas |
KA |Kansas | LA | Louisiana |
CA |California | MA | Massachusetts |
KY |Kentucky | MD | Maryland |
CO |Colorado | MN | Minnesota |
CT |Connecticut | MS | Mississippi |
LA |Louisiana | MO | Missouri |
ME |Maine | MT | Montana |
MI |Michigan | ME | Maine |
MD |Maryland | MI | Michigan |
MA |Massachusetts | NV | Nevada |
MN |Minnesota | NE | Nebraska |
MS |Mississippi | DE | Delaware |
MO |Missouri | NJ | New Jersey |
MT |Montana | NY | New York |
NJ |New Jersey | NH | New Hampshire |
NY |New York | NM | New Mexico |
NM |New Mexico | SC | South Carolina |
NH |New Hampshire | SD | South Dakota |
NV |Nevada | OH | Ohio |
NE |Nebraska | OK | Oklahoma |
DE |Delaware | OR | Oregon |
SC |South Carolina | PA | Pennsylvania |
SD |South Dakota | TN | Tennessee |
OK |Oklahoma | GA | Georgia |
OR |Oregon | TX | Texas |
OH |Ohio | UT | Utah |
PA |Pennsylvania | WY | Wyoming |
RI |Rhode Island | WV | West Virginia |
TX |Texas | WI | Wisconsin |
TN |Tennessee | WA | Washington |
GA |Georgia | DC | Washington DC |
FL |Florida | RI | Rhode Island |
(50 rows) (50 rows)
EOF
abbrev|name_en |name_gr abbrev | name_en | name_gr
------+--------------------+------------------ --------+----------------------+--------------------
AK |Alaska | ID | Idaho |
AL |Alabama | IA | Iowa |
AZ |Arizona | AL | Alabama |
AR |Arkansas | AK | Alaska |
ID |Idaho | AZ | Arizona |
IA |Iowa | AR | Arkansas |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
NC |North Carolina | NC | North Carolina |
ND |North Dakota | ND | North Dakota |
UT |Utah | FL | Florida |
WY |Wyoming | IL | Illinois |
WV |West Virginia | IN | Indiana |
WI |Wisconsin | CA | California |
WA |Washington | KY | Kentucky |
DC |Washington DC | CO | Colorado |
IL |Illinois | CT | Connecticut |
IN |Indiana | KA | Kansas |
KA |Kansas | LA | Louisiana |
CA |California | MA | Massachusetts |
KY |Kentucky | MD | Maryland |
CO |Colorado | MN | Minnesota |
CT |Connecticut | MS | Mississippi |
LA |Louisiana | MO | Missouri |
ME |Maine | MT | Montana |
MI |Michigan | ME | Maine |
MD |Maryland | MI | Michigan |
MA |Massachusetts | NV | Nevada |
MN |Minnesota | NE | Nebraska |
MS |Mississippi | DE | Delaware |
MO |Missouri | NJ | New Jersey |
MT |Montana | NY | New York |
NJ |New Jersey | NH | New Hampshire |
NY |New York | NM | New Mexico |
NM |New Mexico | SC | South Carolina |
NH |New Hampshire | SD | South Dakota |
NV |Nevada | OH | Ohio |
NE |Nebraska | OK | Oklahoma |
DE |Delaware | OR | Oregon |
SC |South Carolina | PA | Pennsylvania |
SD |South Dakota | TN | Tennessee |
OK |Oklahoma | GA | Georgia |
OR |Oregon | TX | Texas |
OH |Ohio | UT | Utah |
PA |Pennsylvania | WY | Wyoming |
RI |Rhode Island | WV | West Virginia |
TX |Texas | WI | Wisconsin |
TN |Tennessee | WA | Washington |
GA |Georgia | DC | Washington DC |
FL |Florida | RI | Rhode Island |
(50 rows) (50 rows)
EOF
...@@ -39,7 +39,7 @@ for f in char varchar text; do ...@@ -39,7 +39,7 @@ for f in char varchar text; do
fi fi
echo "Testing PgSQL: sort on $ftype type..." echo "Testing PgSQL: sort on $ftype type..."
destroydb testlocale >/dev/null 2>&1 dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed" createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_gr $ftype);" >/dev/null 2>&1 || abort "createtable failed" psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_gr $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-gr.sql.in > test-gr-$f.sql.out 2>/dev/null || abort "test query failed" psql testlocale < test-gr.sql.in > test-gr-$f.sql.out 2>/dev/null || abort "test query failed"
...@@ -48,5 +48,5 @@ done ...@@ -48,5 +48,5 @@ done
echo "Testing PgSQL: select on regexp..." echo "Testing PgSQL: select on regexp..."
psql testlocale < test-gr-select.sql.in > test-gr-select.sql.out 2>/dev/null || abort "select query failed" psql testlocale < test-gr-select.sql.in > test-gr-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-gr-select.sql.out test-gr-select.sql.out diff expected/test-gr-select.sql.out test-gr-select.sql.out
destroydb testlocale || abort "destroydb failed" dropdb testlocale || abort "dropdb failed"
echo "Finished." echo "Finished."
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+------------------------------------------------------------ --------+----------------------+--------------------------------------------------------------
ID |Idaho | ID | Idaho |
IA |Iowa | IA | Iowa |
AL |Alabama | AL | Alabama |
AK |Alaska | AK | Alaska |
AZ |Arizona | AZ | Arizona |
AR |Arkansas | AR | Arkansas |
WY |Wyoming | WY | Wyoming |
WA |Washington | WA | Washington |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
WI |Wisconsin | WI | Wisconsin |
DE |Delaware | DE | Delaware |
GA |Georgia | GA | Georgia |
WV |West Virginia | WV | West Virginia |
IL |Illinois | IL | Illinois |
IN |Indiana | IN | Indiana |
CA |California | CA | California |
KA |Kansas | KA | Kansas |
KY |Kentucky | KY | Kentucky |
CO |Colorado | CO | Colorado |
CT |Connecticut | CT | Connecticut |
LA |Louisiana | LA | Louisiana |
MA |Massachusetts | MA | Massachusetts |
MN |Minnesota | MN | Minnesota |
MS |Mississippi | MS | Mississippi |
MO |Missouri | MO | Missouri |
MI |Michigan | MI | Michigan |
MT |Montana | MT | Montana |
ME |Maine | ME | Maine |
MD |Maryland | MD | Maryland |
NE |Nebraska | NE | Nebraska |
NV |Nevada | NV | Nevada |
NH |New Hampshire |- NH | New Hampshire | -
NJ |New Jersey |- NJ | New Jersey | -
NY |New York |- NY | New York | -
NM |New Mexico |- NM | New Mexico | -
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
PA |Pennsylvania | PA | Pennsylvania |
RI |Rhode Island |- RI | Rhode Island | -
ND |North Dakota | ND | North Dakota |
NC |North Carolina | NC | North Carolina |
TN |Tennessee | TN | Tennessee |
TX |Texas | TX | Texas |
FL |Florida | FL | Florida |
SD |South Dakota | SD | South Dakota |
SC |South Carolina | SC | South Carolina |
UT |Utah | UT | Utah |
(50 rows) (50 rows)
EOF
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+---------------------------------------------- --------+----------------------+------------------------------------------------
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
(4 rows) (4 rows)
EOF
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+---------------------------------------------- --------+----------------------+------------------------------------------------
ID |Idaho | ID | Idaho |
IA |Iowa | IA | Iowa |
AL |Alabama | AL | Alabama |
AK |Alaska | AK | Alaska |
AZ |Arizona | AZ | Arizona |
AR |Arkansas | AR | Arkansas |
WY |Wyoming | WY | Wyoming |
WA |Washington | WA | Washington |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
WI |Wisconsin | WI | Wisconsin |
DE |Delaware | DE | Delaware |
GA |Georgia | GA | Georgia |
WV |West Virginia | WV | West Virginia |
IL |Illinois | IL | Illinois |
IN |Indiana | IN | Indiana |
CA |California | CA | California |
KA |Kansas | KA | Kansas |
KY |Kentucky | KY | Kentucky |
CO |Colorado | CO | Colorado |
CT |Connecticut | CT | Connecticut |
LA |Louisiana | LA | Louisiana |
MA |Massachusetts | MA | Massachusetts |
MN |Minnesota | MN | Minnesota |
MS |Mississippi | MS | Mississippi |
MO |Missouri | MO | Missouri |
MI |Michigan | MI | Michigan |
MT |Montana | MT | Montana |
ME |Maine | ME | Maine |
MD |Maryland | MD | Maryland |
NE |Nebraska | NE | Nebraska |
NV |Nevada | NV | Nevada |
NH |New Hampshire |- NH | New Hampshire | -
NJ |New Jersey |- NJ | New Jersey | -
NY |New York |- NY | New York | -
NM |New Mexico |- NM | New Mexico | -
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
PA |Pennsylvania | PA | Pennsylvania |
RI |Rhode Island |- RI | Rhode Island | -
ND |North Dakota | ND | North Dakota |
NC |North Carolina | NC | North Carolina |
TN |Tennessee | TN | Tennessee |
TX |Texas | TX | Texas |
FL |Florida | FL | Florida |
SD |South Dakota | SD | South Dakota |
SC |South Carolina | SC | South Carolina |
UT |Utah | UT | Utah |
(50 rows) (50 rows)
EOF
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+---------------------------------------------- --------+----------------------+------------------------------------------------
ID |Idaho | ID | Idaho |
IA |Iowa | IA | Iowa |
AL |Alabama | AL | Alabama |
AK |Alaska | AK | Alaska |
AZ |Arizona | AZ | Arizona |
AR |Arkansas | AR | Arkansas |
WY |Wyoming | WY | Wyoming |
WA |Washington | WA | Washington |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
WI |Wisconsin | WI | Wisconsin |
DE |Delaware | DE | Delaware |
GA |Georgia | GA | Georgia |
WV |West Virginia | WV | West Virginia |
IL |Illinois | IL | Illinois |
IN |Indiana | IN | Indiana |
CA |California | CA | California |
KA |Kansas | KA | Kansas |
KY |Kentucky | KY | Kentucky |
CO |Colorado | CO | Colorado |
CT |Connecticut | CT | Connecticut |
LA |Louisiana | LA | Louisiana |
MA |Massachusetts | MA | Massachusetts |
MN |Minnesota | MN | Minnesota |
MS |Mississippi | MS | Mississippi |
MO |Missouri | MO | Missouri |
MI |Michigan | MI | Michigan |
MT |Montana | MT | Montana |
ME |Maine | ME | Maine |
MD |Maryland | MD | Maryland |
NE |Nebraska | NE | Nebraska |
NV |Nevada | NV | Nevada |
NH |New Hampshire |- NH | New Hampshire | -
NJ |New Jersey |- NJ | New Jersey | -
NY |New York |- NY | New York | -
NM |New Mexico |- NM | New Mexico | -
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
PA |Pennsylvania | PA | Pennsylvania |
RI |Rhode Island |- RI | Rhode Island | -
ND |North Dakota | ND | North Dakota |
NC |North Carolina | NC | North Carolina |
TN |Tennessee | TN | Tennessee |
TX |Texas | TX | Texas |
FL |Florida | FL | Florida |
SD |South Dakota | SD | South Dakota |
SC |South Carolina | SC | South Carolina |
UT |Utah | UT | Utah |
(50 rows) (50 rows)
EOF
...@@ -39,7 +39,7 @@ for f in char varchar text; do ...@@ -39,7 +39,7 @@ for f in char varchar text; do
fi fi
echo "Testing PgSQL: sort on $ftype type..." echo "Testing PgSQL: sort on $ftype type..."
destroydb testlocale >/dev/null 2>&1 dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed" createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed" psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed" psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
...@@ -48,5 +48,5 @@ done ...@@ -48,5 +48,5 @@ done
echo "Testing PgSQL: select on regexp..." echo "Testing PgSQL: select on regexp..."
psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed" psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-koi8-select.sql.out test-koi8-select.sql.out diff expected/test-koi8-select.sql.out test-koi8-select.sql.out
destroydb testlocale || abort "destroydb failed" dropdb testlocale || abort "dropdb failed"
echo "Finished." echo "Finished."
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+------------------------------------------------------------ --------+----------------------+--------------------------------------------------------------
ID |Idaho | ID | Idaho |
IA |Iowa | IA | Iowa |
AL |Alabama | AL | Alabama |
AK |Alaska | AK | Alaska |
AZ |Arizona | AZ | Arizona |
AR |Arkansas | AR | Arkansas |
WY |Wyoming | WY | Wyoming |
WA |Washington | WA | Washington |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
WI |Wisconsin | WI | Wisconsin |
DE |Delaware | DE | Delaware |
GA |Georgia | GA | Georgia |
WV |West Virginia | WV | West Virginia |
IL |Illinois | IL | Illinois |
IN |Indiana | IN | Indiana |
CA |California | CA | California |
KA |Kansas | KA | Kansas |
KY |Kentucky | KY | Kentucky |
CO |Colorado | CO | Colorado |
CT |Connecticut | CT | Connecticut |
LA |Louisiana | LA | Louisiana |
MA |Massachusetts | MA | Massachusetts |
MN |Minnesota | MN | Minnesota |
MS |Mississippi | MS | Mississippi |
MO |Missouri | MO | Missouri |
MI |Michigan | MI | Michigan |
MT |Montana | MT | Montana |
ME |Maine | ME | Maine |
MD |Maryland | MD | Maryland |
NE |Nebraska | NE | Nebraska |
NV |Nevada | NV | Nevada |
NH |New Hampshire |- NH | New Hampshire | -
NJ |New Jersey |- NJ | New Jersey | -
NY |New York |- NY | New York | -
NM |New Mexico |- NM | New Mexico | -
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
PA |Pennsylvania | PA | Pennsylvania |
RI |Rhode Island |- RI | Rhode Island | -
ND |North Dakota | ND | North Dakota |
NC |North Carolina | NC | North Carolina |
TN |Tennessee | TN | Tennessee |
TX |Texas | TX | Texas |
FL |Florida | FL | Florida |
SD |South Dakota | SD | South Dakota |
SC |South Carolina | SC | South Carolina |
UT |Utah | UT | Utah |
(50 rows) (50 rows)
EOF
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+---------------------------------------------- --------+----------------------+------------------------------------------------
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
(4 rows) (4 rows)
EOF
...@@ -2,8 +2,8 @@ Bording ...@@ -2,8 +2,8 @@ Bording
hoarding hoarding
Vesta Vesta
vesta vesta
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+---------------------------------------------- --------+----------------------+------------------------------------------------
ID |Idaho | ID | Idaho |
IA |Iowa | IA | Iowa |
AL |Alabama | AL | Alabama |
AK |Alaska | AK | Alaska |
AZ |Arizona | AZ | Arizona |
AR |Arkansas | AR | Arkansas |
WY |Wyoming | WY | Wyoming |
WA |Washington | WA | Washington |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
WI |Wisconsin | WI | Wisconsin |
DE |Delaware | DE | Delaware |
GA |Georgia | GA | Georgia |
WV |West Virginia | WV | West Virginia |
IL |Illinois | IL | Illinois |
IN |Indiana | IN | Indiana |
CA |California | CA | California |
KA |Kansas | KA | Kansas |
KY |Kentucky | KY | Kentucky |
CO |Colorado | CO | Colorado |
CT |Connecticut | CT | Connecticut |
LA |Louisiana | LA | Louisiana |
MA |Massachusetts | MA | Massachusetts |
MN |Minnesota | MN | Minnesota |
MS |Mississippi | MS | Mississippi |
MO |Missouri | MO | Missouri |
MI |Michigan | MI | Michigan |
MT |Montana | MT | Montana |
ME |Maine | ME | Maine |
MD |Maryland | MD | Maryland |
NE |Nebraska | NE | Nebraska |
NV |Nevada | NV | Nevada |
NH |New Hampshire |- NH | New Hampshire | -
NJ |New Jersey |- NJ | New Jersey | -
NY |New York |- NY | New York | -
NM |New Mexico |- NM | New Mexico | -
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
PA |Pennsylvania | PA | Pennsylvania |
RI |Rhode Island |- RI | Rhode Island | -
ND |North Dakota | ND | North Dakota |
NC |North Carolina | NC | North Carolina |
TN |Tennessee | TN | Tennessee |
TX |Texas | TX | Texas |
FL |Florida | FL | Florida |
SD |South Dakota | SD | South Dakota |
SC |South Carolina | SC | South Carolina |
UT |Utah | UT | Utah |
(50 rows) (50 rows)
EOF
abbrev|name_en |name_ru abbrev | name_en | name_ru
------+--------------------+---------------------------------------------- --------+----------------------+------------------------------------------------
ID |Idaho | ID | Idaho |
IA |Iowa | IA | Iowa |
AL |Alabama | AL | Alabama |
AK |Alaska | AK | Alaska |
AZ |Arizona | AZ | Arizona |
AR |Arkansas | AR | Arkansas |
WY |Wyoming | WY | Wyoming |
WA |Washington | WA | Washington |
VT |Vermont | VT | Vermont |
VA |Virginia | VA | Virginia |
WI |Wisconsin | WI | Wisconsin |
DE |Delaware | DE | Delaware |
GA |Georgia | GA | Georgia |
WV |West Virginia | WV | West Virginia |
IL |Illinois | IL | Illinois |
IN |Indiana | IN | Indiana |
CA |California | CA | California |
KA |Kansas | KA | Kansas |
KY |Kentucky | KY | Kentucky |
CO |Colorado | CO | Colorado |
CT |Connecticut | CT | Connecticut |
LA |Louisiana | LA | Louisiana |
MA |Massachusetts | MA | Massachusetts |
MN |Minnesota | MN | Minnesota |
MS |Mississippi | MS | Mississippi |
MO |Missouri | MO | Missouri |
MI |Michigan | MI | Michigan |
MT |Montana | MT | Montana |
ME |Maine | ME | Maine |
MD |Maryland | MD | Maryland |
NE |Nebraska | NE | Nebraska |
NV |Nevada | NV | Nevada |
NH |New Hampshire |- NH | New Hampshire | -
NJ |New Jersey |- NJ | New Jersey | -
NY |New York |- NY | New York | -
NM |New Mexico |- NM | New Mexico | -
OH |Ohio | OH | Ohio |
OK |Oklahoma | OK | Oklahoma |
DC |Washington DC | ( ) DC | Washington DC | ( )
OR |Oregon | OR | Oregon |
PA |Pennsylvania | PA | Pennsylvania |
RI |Rhode Island |- RI | Rhode Island | -
ND |North Dakota | ND | North Dakota |
NC |North Carolina | NC | North Carolina |
TN |Tennessee | TN | Tennessee |
TX |Texas | TX | Texas |
FL |Florida | FL | Florida |
SD |South Dakota | SD | South Dakota |
SC |South Carolina | SC | South Carolina |
UT |Utah | UT | Utah |
(50 rows) (50 rows)
EOF
...@@ -36,7 +36,7 @@ for f in char varchar text; do ...@@ -36,7 +36,7 @@ for f in char varchar text; do
fi fi
echo "Testing PgSQL: sort on $ftype type..." echo "Testing PgSQL: sort on $ftype type..."
destroydb testlocale >/dev/null 2>&1 dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed" createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed" psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed" psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
...@@ -45,5 +45,5 @@ done ...@@ -45,5 +45,5 @@ done
echo "Testing PgSQL: select on regexp..." echo "Testing PgSQL: select on regexp..."
psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed" psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-koi8-select.sql.out test-koi8-select.sql.out diff expected/test-koi8-select.sql.out test-koi8-select.sql.out
destroydb testlocale || abort "destroydb failed" dropdb testlocale || abort "dropdb failed"
echo "Finished." echo "Finished."
--
-- ABSTIME
-- testing built-in time type abstime
-- uses reltime and tinterval
--
--
-- timezones may vary based not only on location but the operating
-- system. the main correctness issue is that the OS may not get
-- daylight savings time right for times prior to Unix epoch (jan 1 1970).
--
CREATE TABLE ABSTIME_TBL (f1 abstime);
INSERT INTO ABSTIME_TBL (f1) VALUES ('Jan 14, 1973 03:14:21');
-- was INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'now'):
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'Mon May 1 00:30:30 1995');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'epoch');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'current');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'infinity');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime '-infinity');
INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'May 10, 1947 23:59:12');
-- what happens if we specify slightly misformatted abstime?
INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00');
ERROR: Bad abstime external representation 'Feb 35, 1946 10:00:00'
INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10');
ERROR: Bad abstime external representation 'Feb 28, 1984 25:08:10'
-- badly formatted abstimes: these should result in invalid abstimes
INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
ERROR: Bad abstime external representation 'bad date format'
INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
-- test abstime operators
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
| Sat May 10 23:59:12 1947 PDT
| invalid
(8 rows)
SELECT '' AS six, ABSTIME_TBL.*
WHERE ABSTIME_TBL.f1 < abstime 'Jun 30, 2001';
six | f1
-----+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
| epoch
| current
| -infinity
| Sat May 10 23:59:12 1947 PDT
(6 rows)
SELECT '' AS six, ABSTIME_TBL.*
WHERE ABSTIME_TBL.f1 > abstime '-infinity';
six | f1
-----+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
| epoch
| current
| infinity
| Sat May 10 23:59:12 1947 PDT
(6 rows)
SELECT '' AS six, ABSTIME_TBL.*
WHERE abstime 'May 10, 1947 23:59:12' <> ABSTIME_TBL.f1;
six | f1
-----+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
| epoch
| current
| infinity
| -infinity
(6 rows)
SELECT '' AS one, ABSTIME_TBL.*
WHERE abstime 'current' = ABSTIME_TBL.f1;
one | f1
-----+---------
| current
(1 row)
SELECT '' AS three, ABSTIME_TBL.*
WHERE abstime 'epoch' >= ABSTIME_TBL.f1;
three | f1
-------+------------------------------
| epoch
| -infinity
| Sat May 10 23:59:12 1947 PDT
(3 rows)
SELECT '' AS four, ABSTIME_TBL.*
WHERE ABSTIME_TBL.f1 <= abstime 'Jan 14, 1973 03:14:21';
four | f1
------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| -infinity
| Sat May 10 23:59:12 1947 PDT
(4 rows)
SELECT '' AS four, ABSTIME_TBL.*
WHERE ABSTIME_TBL.f1 <?>
tinterval '["Apr 1 1950 00:00:00" "Dec 30 1999 23:00:00"]';
four | f1
------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| Mon May 01 00:30:30 1995 PDT
| epoch
(3 rows)
-- these four queries should return the same answer
-- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
-- therefore, should not show up in the results.
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
< abstime 'Jan 14 14:00:00 1977';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PDT
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
< abstime 'Jan 14 14:00:00 1971';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PDT
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
< abstime 'Jan 14 14:00:00 1971';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PDT
(3 rows)
SELECT '' AS three, ABSTIME_TBL.*
WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
< abstime 'Jan 14 14:00:00 1977';
three | f1
-------+------------------------------
| Sun Jan 14 03:14:21 1973 PST
| epoch
| Sat May 10 23:59:12 1947 PDT
(3 rows)
SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1)
< abstime 'Jan 14 14:00:00 1971'
ORDER BY abstime, reltime;
ten | abstime | reltime
-----+------------------------------+---------------
| Sat May 10 23:59:12 1947 PDT | @ 14 secs ago
| Sat May 10 23:59:12 1947 PDT | @ 1 min
| Sat May 10 23:59:12 1947 PDT | @ 5 hours
| Sat May 10 23:59:12 1947 PDT | @ 10 days
| Sat May 10 23:59:12 1947 PDT | @ 3 mons
| epoch | @ 14 secs ago
| epoch | @ 1 min
| epoch | @ 5 hours
| epoch | @ 10 days
| epoch | @ 3 mons
(10 rows)
This diff is collapsed.
This diff is collapsed.
--
-- TINTERVAL
--
CREATE TABLE TINTERVAL_TBL (f1 tinterval);
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["-infinity" "infinity"]');
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["May 10, 1947 23:59:12" "Jan 14, 1973 03:14:21"]');
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["Sep 4, 1983 23:59:12" "Oct 4, 1983 23:59:12"]');
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["epoch" "Mon May 1 00:30:30 1995"]');
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["Feb 15 1990 12:15:03" "current"]');
-- badly formatted tintervals
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["bad time specifications" ""]');
ERROR: Bad abstime external representation 'bad time specifications'
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["" "infinity"]');
ERROR: Bad abstime external representation ''
-- test tinterval operators
SELECT '' AS five, TINTERVAL_TBL.*;
five | f1
------+-----------------------------------------------------------------
| ["-infinity" "infinity"]
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
| ["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"]
(5 rows)
-- length ==
SELECT '' AS one, t.*
FROM TINTERVAL_TBL t
WHERE t.f1 #= '@ 1 months';
one | f1
-----+-----------------------------------------------------------------
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
(1 row)
-- length <>
SELECT '' AS three, t.*
FROM TINTERVAL_TBL t
WHERE t.f1 #<> '@ 1 months';
three | f1
-------+-----------------------------------------------------------------
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
| ["epoch" "Mon May 01 00:30:30 1995 PDT"]
| ["Thu Feb 15 12:15:03 1990 PST" "current"]
(3 rows)
-- length <
SELECT '' AS zero, t.*
FROM TINTERVAL_TBL t
WHERE t.f1 #< '@ 1 month';
zero | f1
------+----
(0 rows)
-- length <=
SELECT '' AS one, t.*
FROM TINTERVAL_TBL t
WHERE t.f1 #<= '@ 1 month';
one | f1
-----+-----------------------------------------------------------------
| ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
(1 row)
-- length >
SELECT '' AS three, t.*
FROM TINTERVAL_TBL t
WHERE t.f1 #> '@ 1 year';
three | f1
-------+-----------------------------------------------------------------
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
| ["epoch" "Mon May 01 00:30:30 1995 PDT"]
| ["Thu Feb 15 12:15:03 1990 PST" "current"]
(3 rows)
-- length >=
SELECT '' AS three, t.*
FROM TINTERVAL_TBL t
WHERE t.f1 #>= '@ 3 years';
three | f1
-------+-----------------------------------------------------------------
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
| ["epoch" "Mon May 01 00:30:30 1995 PDT"]
| ["Thu Feb 15 12:15:03 1990 PST" "current"]
(3 rows)
-- overlaps
SELECT '' AS three, t1.*
FROM TINTERVAL_TBL t1
WHERE t1.f1 &&
tinterval '["Aug 15 14:23:19 1983" "Sep 16 14:23:19 1983"]';
three | f1
-------+-----------------------------------------------------------------
| ["-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"]
(3 rows)
SET geqo TO 'off';
SELECT '' AS five, t1.f1, t2.f1
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
WHERE t1.f1 && t2.f1 and
t1.f1 = t2.f1
ORDER BY t1.f1, t2.f1;
five | f1 | 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"]
| ["Thu Feb 15 12:15:03 1990 PST" "current"] | ["Thu Feb 15 12:15:03 1990 PST" "current"]
| ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"] | ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
(5 rows)
SELECT '' AS fourteen, t1.f1 AS interval1, t2.f1 AS interval2
FROM TINTERVAL_TBL t1, TINTERVAL_TBL t2
WHERE t1.f1 && t2.f1 and not t1.f1 = t2.f1
ORDER BY interval1, interval2;
fourteen | interval1 | interval2
----------+-----------------------------------------------------------------+-----------------------------------------------------------------
| ["-infinity" "infinity"] | ["Sun Sep 04 23:59:12 1983 PDT" "Tue Oct 04 23:59:12 1983 PDT"]
| ["-infinity" "infinity"] | ["Thu Feb 15 12:15:03 1990 PST" "current"]
| ["-infinity" "infinity"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
| ["-infinity" "infinity"] | ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
| ["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"]
| ["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"]
| ["epoch" "Mon May 01 00:30:30 1995 PDT"] | ["-infinity" "infinity"]
| ["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"] | ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"] | ["-infinity" "infinity"]
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"] | ["epoch" "Mon May 01 00:30:30 1995 PDT"]
(14 rows)
-- contains
SELECT '' AS five, t1.f1
FROM TINTERVAL_TBL t1
WHERE not t1.f1 <<
tinterval '["Aug 15 14:23:19 1980" "Sep 16 14:23:19 1990"]'
ORDER BY t1.f1;
five | f1
------+-----------------------------------------------------------------
| ["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"]
| ["Sat May 10 23:59:12 1947 PDT" "Sun Jan 14 03:14:21 1973 PST"]
(3 rows)
-- make time interval
SELECT '' AS three, t1.f1
FROM TINTERVAL_TBL t1
WHERE t1.f1 &&
(abstime 'Aug 15 14:23:19 1983' <#>
abstime 'Sep 16 14:23:19 1983')
ORDER BY t1.f1;
three | f1
-------+-----------------------------------------------------------------
| ["-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"]
(3 rows)
RESET geqo;
...@@ -4,7 +4,13 @@ int2/.*-netbsd=int2-too-large ...@@ -4,7 +4,13 @@ int2/.*-netbsd=int2-too-large
int4/.*-netbsd=int4-too-large int4/.*-netbsd=int4-too-large
int2/i.86-pc-linux-gnulibc=int2-not-representable int2/i.86-pc-linux-gnulibc=int2-not-representable
int4/i.86-pc-linux-gnulibc=int4-not-representable int4/i.86-pc-linux-gnulibc=int4-not-representable
int2/sparc-sun-solaris=int2-too-large
int4/sparc-sun-solaris=int4-too-large
geometry/hppa=geometry-positive-zeros geometry/hppa=geometry-positive-zeros
geometry/.*-netbsd=geometry-positive-zeros geometry/.*-netbsd=geometry-positive-zeros
geometry/i.86-.*-gnulibc=geometry-i86-gnulibc geometry/i.86-.*-gnulibc=geometry-i86-gnulibc
geometry/sparc-sun-solaris=geometry-solaris-precision
horology/hppa=horology-no-DST-before-1970 horology/hppa=horology-no-DST-before-1970
horology/sparc-sun-solaris=horology-solaris-1947
abstime/sparc-sun-solaris=abstime-solaris-1947
tinterval/sparc-sun-solaris=tinterval-solaris-1947
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment