Commit Graph

1037 Commits

Author SHA1 Message Date
Tom Lane 30ec31604d Add code to extract dependencies from an expression tree, and use it
to build dependencies for rules, constraint expressions, and default
expressions.  Repair some problems in the original design of
recursiveDeletion() exposed by more complex dependency sets.  Fix
regression tests that were deleting things in illegal sequences.
2002-07-16 05:53:34 +00:00
Tom Lane 7c6df91dda Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
constraints all have real live entries in pg_constraint.  pg_depend
exists, and RESTRICT/CASCADE options work on most kinds of DROP;
however, pg_depend is not yet very well populated with dependencies.
(Most of the ones that are present at this point just replace formerly
hardwired associations, such as the implicit drop of a relation's pg_type
entry when the relation is dropped.)  Need to add more logic to create
dependency entries, improve pg_dump to dump constraints in place of
indexes and triggers, and add some regression tests.
2002-07-12 18:43:19 +00:00
Bruce Momjian 29dfd5fa26 Change error messages ExecAppend->ExecInsert and ExecReplace->ExecUpdate
as discussed on hackers.
2002-07-11 21:36:20 +00:00
Tatsuo Ishii fcc962566a Add new CREATE CONVERSION/DROP CONVERSION command.
This is the first cut toward CREATE CONVERSION/DROP CONVERSION implementaion.
The commands can now add/remove tuples to the new pg_conversion system
catalog, but that's all. Still need work to make them actually working.
Documentations, regression tests also need work.
2002-07-11 07:39:28 +00:00
Bruce Momjian 1666970275 I've fixed up the way domain constraints (not null and type length)
are managed as per request.

Moved from merging with table attributes to applying themselves during
coerce_type() and coerce_type_typmod.

Regression tests altered to test the cast() scenarios.

Rod Taylor
2002-07-06 20:16:36 +00:00
Bruce Momjian 866103989d Back out regress/results changes. Real CVS problem worked-around. 2002-07-02 05:43:34 +00:00
Bruce Momjian a2e7c3d34e Fix removal of results directory on 'make clean'. Just remove *.out
files.  Was causing CVS problems.
2002-07-02 04:53:52 +00:00
Bruce Momjian 73ad6ca96c The attached patch fixes some spelling mistakes, makes the
comments on one of the optimizer functions a lot more
clear, adds a summary of the recent KSQO discussion to the
comments in the code, adds regression tests for the bug with
sequence state Tom fixed recently and another reg. test, and
removes some PostQuel legacy stuff: ExecAppend -> ExecInsert,
ExecRetrieve -> ExecSelect, etc.

Error messages remain unchanged until a vote.

Neil Conway
2002-06-26 21:58:56 +00:00
Bruce Momjian e2c007046f Back out cleanup patch. Got old version and needs work.
Neil Conway
2002-06-25 17:58:10 +00:00
Bruce Momjian ed275aea42 The attached patch fixes some spelling mistakes, makes the
comments on one of the optimizer functions a lot more
clear, adds a summary of the recent KSQO discussion to the
comments in the code, adds regression tests for the bug with
sequence state Tom fixed recently and another reg. test, and
removes some PostQuel legacy stuff: ExecAppend -> ExecInsert,
ExecRetrieve -> ExecSelect, etc. This was changed because the
elog() messages from this routine are user-visible, so we
should be using the SQL terms.

Neil Conway
2002-06-25 17:27:20 +00:00
Bruce Momjian 95712b15b1 Add missing regression files for SRF. 2002-06-20 20:35:56 +00:00
Bruce Momjian d84fe82230 Update copyright to 2002. 2002-06-20 20:29:54 +00:00
Bruce Momjian bffc4b6da1 Attached is a regression test patch for SRFs. I based it on the test
scripts that I have been using, minus the C function tests and without
calls to random() -- figured random() wouldn't work too well for a
regression test ;-)

Joe Conway
2002-06-20 17:09:42 +00:00
Bruce Momjian c2c2fd57ee Improve COPY syntax to use WITH clause, keep backward compatibility. 2002-06-20 16:00:44 +00:00
Bruce Momjian 0bb61f4af8 Back out accidental COPY data changes. 2002-06-17 15:01:45 +00:00
Bruce Momjian 10f05d8127 Merge ALTER GROUP ADD/DROP rules by creating add_drop action. 2002-06-17 07:00:27 +00:00
Thomas G. Lockhart ea01a451cc Implement SQL99 OVERLAY(). Allows substitution of a substring in a string.
Implement SQL99 SIMILAR TO as a synonym for our existing operator "~".
Implement SQL99 regular expression SUBSTRING(string FROM pat FOR escape).
 Extend the definition to make the FOR clause optional.
 Define textregexsubstr() to actually implement this feature.
Update the regression test to include these new string features.
 All tests pass.
Rename the regular expression support routines from "pg95_xxx" to "pg_xxx".
Define CREATE CHARACTER SET in the parser per SQL99. No implementation yet.
2002-06-11 15:44:38 +00:00
Peter Eisentraut d60f10b0e7 Add optional "validator" function to languages that can validate the
function body (and other properties) as a function in the language
is created.  This generalizes ad hoc code that already existed for
the built-in languages.

The validation now happens after the pg_proc tuple of the new function
is created, so it is possible to define recursive SQL functions.

Add some regression test cases that cover bogus function definition
attempts.
2002-05-22 17:21:02 +00:00
Peter Eisentraut 13cd9eb9b8 Remove bitrotten view_perms test. Add some similar test cases to
privileges test.
2002-05-19 15:13:20 +00:00
Peter Eisentraut e8ac187c68 Allow functions to be executed with the privileges of the function owner.
I took the opportunity to remove the pg_proc.proistrusted field.
2002-05-18 13:48:01 +00:00
Tom Lane 22d641a7d4 Get rid of the last few uses of typeidTypeName() rather than
format_type_be() in error messages.
2002-05-17 22:35:13 +00:00
Peter Eisentraut 5c4e5aa3ff Make regression tests locale-proof by setting some locale categories
to C at run-time, and providing alternative output files for different
sort orders.
2002-05-14 13:05:43 +00:00
Tom Lane 53cedcac22 Retire xlateSqlType/xlateSqlFunc; all type name translations are now
handled as special productions.  This is needed to keep us honest about
user-schema type names that happen to coincide with system type names.
Per pghackers discussion 24-Apr.  To avoid bloating the keyword list
too much, I removed the translations for datetime, timespan, and lztext,
all of which were slated for destruction several versions back anyway.
2002-05-03 00:32:19 +00:00
Tom Lane 61446e0927 Improve lexer's error reporting. You get the whole token mentioned now
in parse error messages, not just the part scanned by the last flex rule.
For example,
	select "foo" "bar";
used to draw
	ERROR:  parser: parse error at or near """
which was rather unhelpful.  Now it gives
	ERROR:  parser: parse error at or near ""bar""
Also, error messages concerning bitstring literals and suchlike will
quote the source text at you, not the processed internal form of the literal.
2002-05-01 17:12:08 +00:00
Tom Lane 6c59886942 Second try at fixing join alias variables. Instead of attaching miscellaneous
lists to join RTEs, attach a list of Vars and COALESCE expressions that will
replace the join's alias variables during planning.  This simplifies
flatten_join_alias_vars while still making it easy to fix up varno references
when transforming the query tree.  Add regression test cases for interactions
of subqueries with outer joins.
2002-04-28 19:54:29 +00:00
Tom Lane 25dfba3954 Make ruleutils.c use format_type for printing typenames. Minor tweaks
in quoting rules and recognition of implicit type coercions.
2002-04-28 00:49:13 +00:00
Tom Lane 31c775adeb Restructure aclcheck error reporting to make permission-failure
messages more uniform and internationalizable: the global array
aclcheck_error_strings[] is gone in favor of a subroutine
aclcheck_error().  Partial implementation of namespace-related
permission checks --- not all done yet.
2002-04-27 03:45:03 +00:00
Tom Lane a309032d2f Add current_schema() and current_schemas() inquiry functions.
Update has_table_privilege functions to cope with schema-qualified
names in the same way as nextval() and others.
2002-04-26 01:24:08 +00:00
Tom Lane 52200befd0 Implement types regprocedure, regoper, regoperator, regclass, regtype
per pghackers discussion.  Add some more typsanity tests, and clean
up some problems exposed thereby (broken or missing array types for
some built-in types).  Also, clean up loose ends from unknownin/out
patch.
2002-04-25 02:56:56 +00:00
Bruce Momjian eb5df80759 Fix regression for new DROP RULE syntax. 2002-04-24 03:52:16 +00:00
Bruce Momjian fbc4b7110f The attached patch adds regression tests for setting and removing
default values using ALTER TABLE, on both views and tables.

(You'll need to apply the default-values-for-views patch that I sent
to -patches earlier for the regression tests to pass.)

Neil Conway <neilconway@rogers.com>
2002-04-24 02:47:23 +00:00
Bruce Momjian dd4ca824cc Reports missing values as bad.
BAD:  INSERT INTO tab (col1, col2) VALUES ('val1');
GOOD: INSERT INTO tab (col1, col2) VALUES ('val1', 'val2');

Regress tests against DEFAULT and normal values as they're managed
slightly different.

Rod Taylor
2002-04-24 02:22:54 +00:00
Bruce Momjian 2d81019493 Sorry for the package, but the following patch need to be applied to get
the new verion compiled on SCO Openserver 5.0.5 and Unixware 7.1.1

Nicolas Bazin
2002-04-24 01:56:20 +00:00
Tom Lane 67ef699ff4 Update horology-no-DST-before-1970.out (tested on HPUX), plus an extrapolated horology-solaris-1947.out
(needs verification).
2002-04-21 21:06:21 +00:00
Thomas G. Lockhart 547df0cc85 Support alternate storage scheme of 64-bit integer for date/time types.
Use "--enable-integer-datetimes" in configuration to use this rather
 than the original float8 storage. I would recommend the integer-based
 storage for any platform on which it is available. We perhaps should
 make this the default for the production release.
Change timezone(timestamptz) results to return timestamp rather than
 a character string. Formerly, we didn't have a way to represent
 timestamps with an explicit time zone other than freezing the info into
 a string. Now, we can reasonably omit the explicit time zone from the
 result and return a timestamp with values appropriate for the specified
 time zone. Much cleaner, and if you need the time zone in the result
 you can put it into a character string pretty easily anyway.
Allow fractional seconds in date/time types even for dates prior to 1BC.
Limit timestamp data types to 6 decimal places of precision. Just right
 for a micro-second storage of int8 date/time types, and reduces the
 number of places ad-hoc rounding was occuring for the float8-based types.
Use lookup tables for precision/rounding calculations for timestamp and
 interval types.  Formerly used pow() to calculate the desired value but
 with a more limited range there is no reason to not type in a lookup
 table. Should be *much* better performance, though formerly there were
 some optimizations to help minimize the number of times pow() was called.
Define a HAVE_INT64_TIMESTAMP variable. Based on the configure option
 "--enable-integer-datetimes" and the existing internal INT64_IS_BUSTED.
Add explicit date/interval operators and functions for addition and
 subtraction. Formerly relied on implicit type promotion from date to
 timestamp with time zone.
Change timezone conversion functions for the timetz type from "timetz()"
 to "timezone()". This is consistant with other time zone coersion
 functions for other types.
Bump the catalog version to 200204201.
Fix up regression tests to reflect changes in fractional seconds
 representation for date/times in BC eras.
All regression tests pass on my Linux box.
2002-04-21 19:52:18 +00:00
Tom Lane 6d6ca2166c Change naming rule for ON SELECT rules of views: they're all just
_RETURN now, since there's no need to keep 'em unique anymore.
2002-04-19 23:13:54 +00:00
Tom Lane 201737168c pg_trigger's index on tgrelid is replaced by a unique index on
(tgrelid, tgname).  This provides an additional check on trigger name
uniqueness per-table (which was already enforced by the code anyway).
With this change, RelationBuildTriggers will read the triggers in
order by tgname, since it's scanning using this index.  Since a
predictable trigger ordering has been requested for some time, document
this behavior as a feature.  Also document that rules fire in name
order, since yesterday's changes to pg_rewrite indexing cause that too.
2002-04-19 16:36:08 +00:00
Tom Lane b3120804ad Rule names are now unique per-relation, rather than unique globally.
DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause,
similar to TRIGGER syntaxes.  To allow loading of existing pg_dump
files containing COMMENT ON RULE, the COMMENT code will still accept
the old syntax --- but only if the target rulename is unique across
the whole database.
2002-04-18 20:01:11 +00:00
Tom Lane 6cef5d2549 Operators live in namespaces. CREATE/DROP/COMMENT ON OPERATOR take
qualified operator names directly, for example CREATE OPERATOR myschema.+
( ... ).  To qualify an operator name in an expression you need to write
OPERATOR(myschema.+) (thanks to Peter for suggesting an escape hatch).
I also took advantage of having to reformat pg_operator to fix something
that'd been bugging me for a while: mergejoinable operators should have
explicit links to the associated cross-data-type comparison operators,
rather than hardwiring an assumption that they are named < and >.
2002-04-16 23:08:12 +00:00
Tom Lane 9999f5a10e Checking to decide whether relations are system relations now depends
on the namespace not the name; pg_ is not a reserved prefix for table
names anymore.  From Fernando Nasser.
2002-04-12 20:38:31 +00:00
Tom Lane 902a6a0a4b Restructure representation of aggregate functions so that they have pg_proc
entries, per pghackers discussion.  This fixes aggregates to live in
namespaces, and also simplifies/speeds up lookup in parse_func.c.
Also, add a 'proimplicit' flag to pg_proc that controls whether a type
coercion function may be invoked implicitly, or only explicitly.  The
current settings of these flags are more permissive than I would like,
but we will need to debate and refine the behavior; for now, I avoided
breaking regression tests as much as I could.
2002-04-11 20:00:18 +00:00
Tom Lane f2d70d32eb Functions live in namespaces. Qualified function names work, eg
SELECT schema1.func2(...).  Aggregate names can be qualified at the
syntactic level, but the qualification is ignored for the moment.
2002-04-09 20:35:55 +00:00
Bruce Momjian 80f46fab63 This patch adds a missing heap_freetuple() to renamerel(), documents
the decision not to make renamerel() update the sequence name that
is stored within sequences themselves (thanks to Tom Lane), and adds
some rudimentary regression tests for ALTER TABLE ... RENAME on
non-table relations.

Neil Conway
2002-04-05 11:58:24 +00:00
Bruce Momjian 97b4e5ad30 Add INSERT(..., DEFAULT, ).
Rod Taylor
2002-04-05 11:56:55 +00:00
Tom Lane 4bdb4be62e Divide functions into three volatility classes (immutable, stable, and
volatile), rather than the old cachable/noncachable distinction.  This
allows indexscan optimizations in many places where we formerly didn't.
Also, add a pronamespace column to pg_proc (it doesn't do anything yet,
however).
2002-04-05 00:31:36 +00:00
Bruce Momjian 43a3543a4e Authentication improvements:
A new pg_hba.conf column, USER
Allow specifiction of lists of users separated by commas
Allow group names specified by +
Allow include files containing lists of users specified by @
Allow lists of databases, and database files
Allow samegroup in database column to match group name matching dbname
Removal of secondary password files
Remove pg_passwd utility
Lots of code cleanup in user.c and hba.c
New data/global/pg_pwd format
New data/global/pg_group file
2002-04-04 04:25:54 +00:00
Tom Lane 9b77f61930 ALTER TABLE SET/DROP NOT NULL, from Christopher Kings-Lynne. 2002-04-01 04:35:40 +00:00
Tom Lane 5f4745adf4 Further cleanups for relations in schemas: teach nextval and other
sequence functions how to cope with qualified names.  Same code is
also used for int4notin, currtid_byrelname, pgstattuple.  Also,
move TOAST tables into special pg_toast namespace.
2002-03-30 01:02:42 +00:00
Tom Lane d5e99ab4d6 pg_type has a typnamespace column; system now supports creating types
in different namespaces.  Also, cleanup work on relation namespace
support: drop, alter, rename commands work for tables in non-default
namespaces.
2002-03-29 19:06:29 +00:00
Tom Lane a25b94c080 Create the pg_namespace system catalog. Doesn't do much yet, but it's
there and CREATE SCHEMA will make entries in it...
2002-03-22 21:34:44 +00:00
Tom Lane 56c9b73c1d Change the aclchk.c routines to uniformly use OIDs to identify the
objects to be privilege-checked.  Some change in their APIs would be
necessary no matter what in the schema environment, and simply getting
rid of the name-based interface entirely seems like the best way.
2002-03-21 23:27:25 +00:00
Tom Lane 95ef6a3448 First phase of SCHEMA changes, concentrating on fixing the grammar and
the parsetree representation.  As yet we don't *do* anything with schema
names, just drop 'em on the floor; but you can enter schema-compatible
command syntax, and there's even a primitive CREATE SCHEMA command.
No doc updates yet, except to note that you can now extract a field
from a function-returning-row's result with (foo(...)).fieldname.
2002-03-21 16:02:16 +00:00
Tom Lane 337b22cb47 Code review for DOMAIN patch. 2002-03-20 19:45:13 +00:00
Bruce Momjian b292cafcd4 Just adds a regressions test suite for the ALTER TABLE/ADD PRIMARY KEY
feature.

I'll do ALTER TABLE / DROP CONSTRAINT next...

Christopher Kings-Lynne
2002-03-19 12:59:08 +00:00
Bruce Momjian d3788c3305 Add DOMAIN support. Includes manual pages and regression tests, from
Rod Taylor.
2002-03-19 02:18:25 +00:00
Tom Lane 6eeb95f0f5 Restructure representation of join alias variables. An explicit JOIN
now has an RTE of its own, and references to its outputs now are Vars
referencing the JOIN RTE, rather than CASE-expressions.  This allows
reverse-listing in ruleutils.c to use the correct alias easily, rather
than painfully reverse-engineering the alias namespace as it used to do.
Also, nested FULL JOINs work correctly, because the result of the inner
joins are simple Vars that the planner can cope with.  This fixes a bug
reported a couple times now, notably by Tatsuo on 18-Nov-01.  The alias
Vars are expanded into COALESCE expressions where needed at the very end
of planning, rather than during parsing.
Also, beginnings of support for showing plan qualifier expressions in
EXPLAIN.  There are probably still cases that need work.
initdb forced due to change of stored-rule representation.
2002-03-12 00:52:10 +00:00
Bruce Momjian 7ce0f9c375 Adjust elog() tags so source and regression tests match. 2002-03-07 20:18:15 +00:00
Bruce Momjian 92288a1cf9 Change made to elog:
o  Change all current CVS messages of NOTICE to WARNING.  We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.

o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.

o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.

o Remove INFO from the client_min_messages options and add NOTICE.

Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.

Regression passed.
2002-03-06 06:10:59 +00:00
Tom Lane 26c246036d Fix very ancient breakage in alter-table tests: apparently, there was a
type named 'dt' back in Postgres 4.2, and the regression test wasn't
updated when it was removed.  Per report from Patricia Holben of Great
Bridge.
2002-03-04 05:17:55 +00:00
Tatsuo Ishii 3382fbb60d Fix bug in extract/date_part for milliseconds/miscroseconds and
timestamp/timestamptz combo. Now extract/date_part returns
seconds*1000 or 1000000 + fraction part as the manual stats.
regression test are also fixed.

See the thread in pgsql-hackers:

Subject: Re: [HACKERS] timestamp_part() bug?
Date: Sat, 02 Mar 2002 11:29:53 +0900
2002-03-04 03:55:50 +00:00
Tom Lane ce7a4f06a2 Cause regression tests to pass again after elog changes. 2002-03-03 01:05:22 +00:00
Bruce Momjian a033daf566 Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages.  Added more text to
highlight ordering difference between it and client_min_messages.

---------------------------------------------------------------------------

REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
        DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
        DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
2002-03-02 21:39:36 +00:00
Peter Eisentraut 1aac2c852a User and database-specific session defaults for run-time configuration
variables.  New commands ALTER DATABASE ... SET and ALTER USER ... SET.
2002-03-01 22:45:19 +00:00
Peter Eisentraut 8adf56f77a Privileges on functions and procedural languages 2002-02-18 23:11:58 +00:00
Tom Lane 47503f954c Update horology expected results (this variant extrapolated by yours
truly; should be verified by someone with an appropriate system).
2002-01-12 18:07:34 +00:00
Tom Lane f171bd5219 Update horology expected results (this variant verified on HPUX). 2002-01-12 18:06:53 +00:00
Thomas G. Lockhart 192061e45b Repair bugs in declarations of routines to add timestamptz and interval.
Thanks to Bruce for spotting it and Tom Lane for diagnosing it.
Since horology test output is changing anyway, add some date/time input
 tests to horology.sql. Some of these should move to the tests for the
 individual data types, and we perhaps should add an entire new test
 for "timezone" to allow manipulating the current time zone without
 risking damage to the results of other tests.
2002-01-12 04:38:38 +00:00
Tom Lane bf2e5eedf0 In a VPATH build, resultmap must be one of the symlinked files, else
pg_regress doesn't see it and you don't get any port-specific
comparisons.
2002-01-08 21:00:30 +00:00
Tom Lane d02f0aaa3b Instead of waiting a fixed amount of time for the test postmaster to
start up, wait until a psql connection attempt succeeds.  Per gripe
from Jason Tishler.
2002-01-03 21:52:05 +00:00
Tom Lane ba8d7ac8e9 Select proper geometry comparison file for freebsd/alpha.
Per report from Christopher Kings-Lynne.
2001-12-21 03:03:55 +00:00
Tatsuo Ishii 960f6a5fdf Fix for SunOS4 horology test 2001-12-20 04:25:00 +00:00
Tom Lane 14e1270579 Tweak to make freebsd/alpha use the correct float8 comparison file. 2001-12-19 17:25:55 +00:00
Tom Lane 4e65c89fc3 AIX 5 needs same resultmap tweaks as AIX 4. 2001-12-10 16:31:23 +00:00
Tom Lane 18e4523829 Update IRIX geometry results to match newer MIPS FPUs, rather than
older ones.  We really gotta get out of the business of matching every
last low-order bit in this test ...
2001-12-03 17:48:57 +00:00
Tom Lane acf7aa6240 HPUX 11 should use geometry-solaris-precision, not geometry-positive-zeros
as is needed for HPUX 9 and 10.
2001-12-02 15:48:19 +00:00
Tom Lane 636a939fe5 Fix array_out's failure to backslash backslashes, per bug# 524. Also,
remove brain-dead rule that double quotes are needed if and only if the
datatype is pass-by-reference; neither direction of the implication holds
water.  Instead, examine the actual data string to see if it contains
any characters that force us to quote it.
Add some documentation about quoting of array values, which was previously
explained nowhere AFAICT.
2001-11-29 21:02:41 +00:00
Peter Eisentraut 15a028b1f5 Fix results to work with normal systems again. 2001-11-29 18:57:31 +00:00
Tom Lane 3e8b887e9d Remove extraneous space that somehow got into expected alter_table.out.
The default diff switches prevented regression tests from complaining,
but that doesn't make it correct.
2001-11-24 04:10:47 +00:00
Tom Lane 52ca149b36 Update regress tests to reflect removal of 'current'. 2001-11-21 18:27:25 +00:00
Tom Lane e1c0bc1b26 Bruce's octet_length change breaks this regression test. 2001-11-20 22:22:24 +00:00
Tom Lane 27e7ac190e Update for latest version of horology test. 2001-11-06 18:03:48 +00:00
Thomas G. Lockhart d2ff7e509c Fix last (?) problem with sensitivity to daylight savings time status
when running the regression test. Reported by Tom Lane.
2001-11-06 16:31:13 +00:00
Bruce Momjian ea08e6cd55 New pgindent run with fixes suggested by Tom. Patch manually reviewed,
initdb/regression tests pass.
2001-11-05 17:46:40 +00:00
Bruce Momjian 7cc8af5563 Got "ADD" to appear only in ALTER TABLE and not CREATE TABLE
UNIQUE-PRIMARY KEY notice message.  This is what Christopher wanted from
his patch.
2001-11-04 03:08:11 +00:00
Bruce Momjian 434077c4e6 Remove "ADD" from TABLE / ADD UNIQUE-PRIMARY error message because the
same code is called for both creation and alter.  Not worth worrying
about.
2001-11-04 02:41:09 +00:00
Tom Lane 7d05310828 Fix problem reported by Alex Korn: if a relation has been dropped and
recreated since the start of our transaction, our first reference to it
errored out because we'd try to reuse our old relcache entry for it.
Do this by accepting SI inval messages just before relcache search in
heap_openr, so that dead relcache entries will be flushed before we
search.  Also, break heap_open/openr into two pairs of routines,
relation_open(r) and heap_open(r).  The relation_open routines make
no tests on relkind and so can be used to open anything that has a
pg_class entry.  The heap_open routines are wrappers that add a relkind
test to preserve their established behavior.  Use the relation_open
routines in several places that had various kluge solutions for opening
rels that might be either heap or index rels.

Also, remove the old 'heap stats' code that's been superseded by Jan's
stats collector, and clean up some inconsistencies in error reporting
between the different types of ALTER TABLE.
2001-11-02 16:30:29 +00:00
Thomas G. Lockhart c859ff92d0 Fix queries to insulate from daylight savings time. 2001-10-31 14:44:23 +00:00
Bruce Momjian e7fc0604cd Modify *.po files and regression expected output for new clearer error
message spacing.
2001-10-31 05:14:33 +00:00
Bruce Momjian 4911c85e86 Add ALTER TABLE ADD UNIQUE regression tests from Christopher Kings-Lynne.
Add space between slash for ALTER TABLE / ADD ....

Regression and *.po updates to follow.
2001-10-31 04:49:44 +00:00
Tom Lane 9a88b8a600 Update solaris-1947 variant files for new datetime regression tests.
Results checked by Olivier Prenant.
2001-10-30 22:48:57 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Tom Lane b00c6c841f Update for latest fixes. 2001-10-22 19:52:41 +00:00
Bruce Momjian f363b3177d Remove LIMIT #,# and suggest LIMIT # OFFSET #, per mailing list discussion. 2001-10-20 02:55:39 +00:00
Thomas G. Lockhart 424d9389d6 Fix transposed arguments for typmod for one INTERVAL production.
Mask both typmod subfields for INTERVAL to avoid setting the high bit,
 per dire warning from Tom Lane.
Clear tmask for DTK_ISO_TIME case to avoid time zone troubles.
 Symptom reported by Tom Lane.
Clean up checking for valid time zone info in output routine.
 This should now work for both SQL99 and Unix-style time zones.
Put in explicit check for INTERVAL() typmod rounding to avoid accumulating
 cruft in the lower bits. Not sure that this helps, but we'll need to do
 something. The symptom is visible with a query like
 select interval(2) '10000 days 01:02:03.040506';
Regression tests are patched to repair the Tom Lane symptom, and all pass.
2001-10-20 01:02:22 +00:00
Tom Lane b522ce0bcf Update for new expected results. 2001-10-18 20:10:31 +00:00
Thomas G. Lockhart 9310075a13 Accept an INTERVAL argument for SET TIME ZONE per SQL99.
Modified the parser and the SET handlers to use full Node structures
 rather than simply a character string argument.
Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99.
 Does not yet accept the goofy string format that goes along with, but
 this should be fairly straight forward to fix now as a bug or later
 as a feature.
Implement precision for the INTERVAL() type.
 Use the typmod mechanism for both of INTERVAL features.
Fix the INTERVAL syntax in the parser:
 opt_interval was in the wrong place.
INTERVAL is now a reserved word, otherwise we get reduce/reduce errors.
Implement an explicit date_part() function for TIMETZ.
 Should fix coersion problem with INTERVAL reported by Peter E.
Fix up some error messages for date/time types.
 Use all caps for type names within message.
Fix recently introduced side-effect bug disabling 'epoch' as a recognized
 field for date_part() etc. Reported by Peter E. (??)
Bump catalog version number.
Rename "microseconds" current transaction time field
 from ...Msec to ...Usec. Duh!
date/time regression tests updated for reference platform, but a few
 changes will be necessary for others.
2001-10-18 17:30:21 +00:00
Tom Lane 70e6003c76 Use LEFT JOIN, not FULL JOIN, in statistical views. 2001-10-16 20:51:35 +00:00
Tatsuo Ishii df4cba68cf Commit Patrice's patches except:
> - corrects a bit the UTF-8 code from Tatsuo to allow Unicode 3.1
>  characters (characters with values >= 0x10000, which are encoded on
>  four bytes).

Also, update mb/expected/unicode.out. This is necessary since the
patches affetc the result of queries using UTF-8.
---------------------------------------------------------------
Hi,

I should have sent the patch earlier, but got delayed by other stuff.
Anyway, here is the patch:

- most of the functionality is only activated when MULTIBYTE is
  defined,

- check valid UTF-8 characters, client-side only yet, and only on
  output, you still can send invalid UTF-8 to the server (so, it's
  only partly compliant to Unicode 3.1, but that's better than
  nothing).

- formats with the correct number of columns (that's why I made it in
  the first place after all), but only for UNICODE. However, the code
  allows to plug-in routines for other encodings, as Tatsuo did for
  the other multibyte functions.

- corrects a bit the UTF-8 code from Tatsuo to allow Unicode 3.1
  characters (characters with values >= 0x10000, which are encoded on
  four bytes).

- doesn't depend on the locale capabilities of the glibc (useful for
  remote telnet).

I would like somebody to check it closely, as it is my first patch to
pgsql.  Also, I created dummy .orig files, so that the two files I
created are included, I hope that's the right way.

Now, a lot of functionality is NOT included here, but I will keep that
for 7.3 :) That includes all string checking on the server side (which
will have to be a bit more optimised ;) ), and the input checking on
the client side for UTF-8, though that should not be difficult. It's
just to send the strings through mbvalidate() before sending them to
the server. Strong checking on UTF-8 strings is mandatory to be
compliant with Unicode 3.1+ .

Do I have time to look for a patch to include iso-8859-15 for 7.2 ?
The euro is coming 1. january 2002 (before 7.3 !) and over 280
millions people in Europe will need the euro sign and only iso-8859-15
and iso-8859-16 have it (and unfortunately, I don't think all Unices
will switch to Unicode in the meantime)....

err... yes, I know that this is not every single person in Europe that
uses PostgreSql, so it's not exactly 280m, but it's just a matter of
time ! ;)

I'll come back (on pgsql-hackers) later to ask a few questions
regarding the full unicode support (normalisation, collation,
regexes,...) on the server side :)

Here is the patch !

Patrice.

--
Patrice HÉDÉ ------------------------------- patrice à islande org -----
  --  Isn't it weird  how scientists  can imagine  all the matter of the
universe exploding out of a dot smaller than the head of a pin, but they
can't come up with a more evocative name for it than "The Big Bang" ?
  -- What would _you_ call the creation of the universe ?
  -- "The HORRENDOUS SPACE KABLOOIE !"               - Calvin and Hobbes
------------------------------------------ http://www.islande.org/ -----
2001-10-15 01:25:10 +00:00
Tom Lane 9ca41c0413 Fixing closed-path intersection logic causes this test to find more
streets than it used to...
2001-10-13 17:41:11 +00:00
Tom Lane f9e6e27c87 Break transformCreateStmt() into multiple routines and make
transformAlterStmt() use these routines, instead of having lots of
duplicate (not to mention should-have-been-duplicate) code.
Adding a column with a CHECK constraint actually works now,
and the tests to reject unsupported DEFAULT and NOT NULL clauses
actually fire now.  ALTER TABLE ADD PRIMARY KEY works, modulo
having to have created the column(s) NOT NULL already.
2001-10-12 00:07:15 +00:00
Tom Lane 04d975f0ca Make regress tests safe for variable-resolution timestamps. 2001-10-04 14:51:06 +00:00
Tom Lane 2e5fda7b7e DROP AGGREGATE and COMMENT ON AGGREGATE now accept the expected syntax
'aggname (aggtype)'.  The old syntax 'aggname aggtype' is still accepted
for backwards compatibility.  Fix pg_dump, which was actually broken for
most cases of user-defined aggregates.  Clean up error messages associated
with these commands.
2001-10-03 20:54:22 +00:00
Tom Lane 16def00ffb Update error message wording for format_type change. 2001-10-03 19:24:36 +00:00
Tom Lane cf44762642 Update for latest regression tests. 2001-10-03 15:51:48 +00:00
Thomas G. Lockhart 3e1beda2cd Implement precision support for timestamp and time, both with and without
time zones.
SQL99 spec requires a default of zero (round to seconds) which is set
 in gram.y as typmod is set in the parse tree. We *could* change to a
 default of either 6 (for internal compatibility with previous versions)
 or 2 (for external compatibility with previous versions).
Evaluate entries in pg_proc wrt the iscachable attribute for timestamp and
 other date/time types. Try to recognize cases where side effects like the
 current time zone setting may have an effect on results to decide whether
 something is cachable or not.
2001-10-03 05:29:27 +00:00
Tom Lane 40ed132ce7 Addition of xid=int4 operator makes opr_sanity unhappy. 2001-09-30 17:37:32 +00:00
Tom Lane 6fdf7bed60 Fixes for datetime-related regress tests, from Tom Lockhart. 2001-09-29 15:17:42 +00:00
Tom Lane e3831d83a7 timetz test was omitted from parallel_schedule. 2001-09-29 05:33:25 +00:00
Tom Lane c0bff32c84 Update horology-no-DST-before-1970.out for new horology test.
Still need an update for horology-solaris-1947.out ...
2001-09-29 05:11:10 +00:00
Thomas G. Lockhart 1f075a32ee Add separate regression tests for timetz and the new timestamptz type.
Modify the timestamp test to reflect the "no time zone" behavior of this
 new code; timestamptz resembles the old timestamp code.
2001-09-28 08:00:11 +00:00
Bruce Momjian e19a5adaf7 Update regress tests for new LIMIT x,y behavior. 2001-09-23 04:28:18 +00:00
Tatsuo Ishii 67c26c12af Fix expected files. 2001-09-22 08:47:20 +00:00
Peter Eisentraut 4e77b4a548 Readd test/regress/README file, this time with a well-defined and simple
rule to remake it when necessary.
2001-09-21 18:37:05 +00:00
Tom Lane ae3129fd03 Quick-and-dirty fix for recursive plpgsql functions, per bug report from
Frank Miles 7-Sep-01.  This is really just sticking a finger in the dike.
Frank's case works now, but we still couldn't support a recursive function
returning a set.  Really need to restructure querytrees and execution
state so that the querytree is *read only*.  We've run into this over and
over and over again ... it has to happen sometime soon.
2001-09-21 00:11:31 +00:00
Peter Eisentraut 264f8f2b6c Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards.  Point backend's
default search location there.  The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well.  No changes in user interface
nevertheless.
2001-09-16 16:11:11 +00:00
Tom Lane 6c91eef7b7 Fix handling of pg_type.typdefault per bug report from Dave Blasby.
If there's anyone out there who's actually using datatype-defined
default values, this will be an incompatible change in behavior ...
but the old behavior was so broken that I doubt anyone was using it.
2001-09-06 02:07:42 +00:00
Peter Eisentraut 2c3bd9e8f3 /usr/local/bin/perl => /usr/bin/perl 2001-09-04 11:41:04 +00:00
Tom Lane 7d66bf261c Add some minimal exercising of functional-index feature to regression
tests.
2001-08-27 23:23:35 +00:00
Bruce Momjian 1be615f381 Here is a patch to the resultmap to make the regression tests work on
OU8.

Larry Rosenman
2001-08-26 00:55:15 +00:00
Tom Lane f933766ba7 Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in
pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
index AM, not a row for each opclass name.  This allows pg_opclass to show
directly whether an AM supports an opclass, and furthermore makes it possible
to store additional information about an opclass that might be AM-dependent.
pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
previously expected the user to remember to provide in CREATE INDEX commands.
Lossiness is no longer an index-level property, but is associated with the
use of a particular operator in a particular index opclass.

Along the way, IndexSupportInitialize now uses the syscaches to retrieve
pg_amop and pg_amproc entries.  I find this reduces backend launch time by
about ten percent, at the cost of a couple more special cases in catcache.c's
IndexScanOK.

Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.

initdb forced.
2001-08-21 16:36:06 +00:00
Tom Lane d4f4b971a4 Sequences are now based on int8, not int4, arithmetic. SERIAL pseudo-type
has an alias SERIAL4 and a sister SERIAL8.  SERIAL8 is just the same
except the created column is type int8 not int4.
initdb forced.  Note this also breaks any chance of pg_upgrade from 7.1,
unless we hack up pg_upgrade to drop and recreate sequences.  (Which is
not out of the question, but I don't wanna do it.)
2001-08-16 20:38:56 +00:00
Tom Lane 5f7c2bdb53 sum() on int2 and int4 columns now uses an int8, not numeric, accumulator
for speed reasons; its result type also changes to int8.  avg() on these
datatypes now accumulates the running sum in int8 for speed; but we still
deliver the final result as numeric, so that fractional accuracy is
preserved.

count() now counts and returns in int8, not int4.  I am a little nervous
about this possibly breaking users' code, but there didn't seem to be
a strong sentiment for avoiding the problem.  If we get complaints during
beta, we can change count back to int4 and add a "count8" aggregate.
For that matter, users can do it for themselves with a simple CREATE
AGGREGATE command; the int4inc function is still present, so no C hacking
is needed.

Also added max() and min() aggregates for OID that do proper unsigned
comparison, instead of piggybacking on int4 aggregates.

initdb forced.
2001-08-14 22:21:59 +00:00
Tom Lane bf56f0759b Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them.
Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
pg_description has a three-column key instead of one.

Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
has some usefulness; pg_dump dumps comments on indexes, rules, and
triggers in a valid order.

initdb forced.
2001-08-10 18:57:42 +00:00
Tom Lane d062f0f4e9 Fix collateral damage from error message cleanup. 2001-08-10 18:40:53 +00:00
Peter Eisentraut 9c90a2b045 This should be the right expected file. 2001-08-09 21:03:11 +00:00
Peter Eisentraut 2e57875b97 Use format_type sibling in backend error messages, so the user sees
consistent type naming.
2001-08-09 18:28:18 +00:00
Tom Lane 2f4759d5ce Doesn't seem to be much point in keeping this README up to date anymore,
since it's completely redundant with regress.sgml.  I think we agreed to
remove it awhile back, actually, but no one got around to doing it.
2001-08-06 22:55:00 +00:00
Peter Eisentraut bf51b8608b Use a fixed error message for ERANGE to avoid duplicate test result files.
Add some resultmap entries for SCO OpenServer.
2001-08-06 21:55:16 +00:00
Tom Lane f31dc0ada7 Partial indexes work again, courtesy of Martijn van Oosterhout.
Note: I didn't force an initdb, figuring that one today was enough.
However, there is a new function in pg_proc.h, and pg_dump won't be
able to dump partial indexes until you add that function.
2001-07-16 05:07:00 +00:00
Tom Lane c8076f09d2 Restructure index AM interface for index building and index tuple deletion,
per previous discussion on pghackers.  Most of the duplicate code in
different AMs' ambuild routines has been moved out to a common routine
in index.c; this means that all index types now do the right things about
inserting recently-dead tuples, etc.  (I also removed support for EXTEND
INDEX in the ambuild routines, since that's about to go away anyway, and
it cluttered the code a lot.)  The retail indextuple deletion routines have
been replaced by a "bulk delete" routine in which the indexscan is inside
the access method.  I haven't pushed this change as far as it should go yet,
but it should allow considerable simplification of the internal bookkeeping
for deletions.  Also, add flag columns to pg_am to eliminate various
hardcoded tests on AM OIDs, and remove unused pg_am columns.

Fix rtree and gist index types to not attempt to store NULLs; before this,
gist usually crashed, while rtree managed not to crash but computed wacko
bounding boxes for NULL entries (which might have had something to do with
the performance problems we've heard about occasionally).

Add AtEOXact routines to hash, rtree, and gist, all of which have static
state that needs to be reset after an error.  We discovered this need long
ago for btree, but missed the other guys.

Oh, one more thing: concurrent VACUUM is now the default.
2001-07-15 22:48:19 +00:00
Tom Lane 997439f59e Add ORDER BY to a couple of test queries whose output ordering is not
as predictable as it used to be, due to recycling of free space with
new VACUUM.
2001-07-15 20:16:17 +00:00
Tom Lane cb052e0bf1 Fix rule rewriter so that new ordering of ON INSERT actions applies
in cases of qualified rules as well as unqualified ones.  Tweak rules
test to avoid cluttering output with dummy SELECT results.  Update
documentation to match code.
2001-07-09 23:50:32 +00:00
Tom Lane 755e367cb2 Update abstime expected results to match post-30-June-2001 reality.
Probably the right fix is to remove 'current' special value entirely,
but I don't want to see regression test failures until that happens.
2001-07-02 19:31:52 +00:00
Jan Wieck 8d80b0d980 Statistical system views (yet without the config stuff, but
it's hard to keep such massive changes in sync with the tree
so I need to get it in and work from there now).

Jan
2001-06-22 19:16:24 +00:00
Bruce Momjian 7dac778561 Add GUC setting for Australian timezones. Uses new GUC boolean callback
functions to clear date cache.  Allow regression tests to pass when
timezone set.
2001-06-18 16:14:44 +00:00
Tom Lane 1f1ca182be Make inet/cidr << and <<= operators indexable. From Alex Pilosov <alex@pilosoft.com>. 2001-06-17 02:05:20 +00:00
Tom Lane 16ea152b7e Revoke public read access from pg_statistic, create new system view
pg_stats to provide controlled (and, hopefully, more readable) access
to statistics.  Comments on definition of pg_stats welcome.
I didn't force initdb, but the rules regress test will fail until you
do one.
2001-06-14 19:47:25 +00:00
Tom Lane c9499e68da has_table_privilege functions from Joe Conway (with some kibitzing from
Tom Lane).  For the moment, only the OID/name variants are provided.
I didn't force initdb, but the additions to the 'privileges' regress
test won't pass until you do one.
2001-06-14 01:09:22 +00:00
Bruce Momjian d4a4d4c326 Attached is a patch adding following functions:
inet(text), cidr(text): convert a text value into inet/cidr
set_masklen(inet): set masklen on the inet value

Patch also contains regression checks for these functions.

Alex Pilosov
2001-06-13 21:09:00 +00:00
Bruce Momjian 76e9ad1f55 Back out has_table_privilege patch. 2001-06-12 16:34:27 +00:00
Bruce Momjian 58c909bb8d OK -- here's take #5.
It "make"s and "make check"s clean against current cvs tip.

There are now both Text and Name variants, and the regression test support
is rolled into the patch. Note that to be complete wrt Name based variants,
there are now 12 user visible versions of has_table_privilege:

has_table_privilege(Text usename, Text relname, Text priv_type)
has_table_privilege(Text usename, Name relname, Text priv_type)
has_table_privilege(Name usename, Text relname, Text priv_type)
has_table_privilege(Name usename, Name relname, Text priv_type)
has_table_privilege(Text relname, Text priv_type) /* assumes current_user */
has_table_privilege(Name relname, Text priv_type) /* assumes current_user */
has_table_privilege(Text usename, Oid reloid, Text priv_type)
has_table_privilege(Name usename, Oid reloid, Text priv_type)
has_table_privilege(Oid reloid, Text priv_type)  /* assumes current_user */
has_table_privilege(Oid usesysid, Text relname, Text priv_type)
has_table_privilege(Oid usesysid, Name relname, Text priv_type)
has_table_privilege(Oid usesysid, Oid reloid, Text priv_type)

For the Text based inputs, a new internal function, get_Name is used
(shamelessly copied from get_seq_name in sequence.c) to downcase if not
quoted, or remove quotes if quoted, and truncate. I also added a few test
cases for the downcasing, quote removal, and Name based variants to the
regression test.

Joe Conway
2001-06-12 15:58:34 +00:00
Tom Lane 1d584f97b9 Clean up various to-do items associated with system indexes:
pg_database now has unique indexes on oid and on datname.
pg_shadow now has unique indexes on usename and on usesysid.
pg_am now has unique index on oid.
pg_opclass now has unique index on oid.
pg_amproc now has unique index on amid+amopclaid+amprocnum.
Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache.
Remove index on pg_listener and associated syscache for performance reasons
(caching rows that are certain to change before you need 'em again is
rather pointless).
Change pg_attrdef's nonunique index on adrelid into a unique index on
adrelid+adnum.

Fix various incorrect settings of pg_class.relisshared, make that the
primary reference point for whether a relation is shared or not.
IsSharedSystemRelationName() is now only consulted to initialize relisshared
during initial creation of tables and indexes.  In theory we might now
support shared user relations, though it's not clear how one would get
entries for them into pg_class &etc of multiple databases.

Fix recently reported bug that pg_attribute rows created for an index all have
the same OID.  (Proof that non-unique OID doesn't matter unless it's
actually used to do lookups ;-))

There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap
relations.  Convert them into plain system catalogs without hardwired
entries in pg_class and friends.

Unify global.bki and template1.bki into a single init script postgres.bki,
since the alleged distinction between them was misleading and pointless.
Not to mention that it didn't work for setting up indexes on shared
system relations.

Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use
AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do).
Also, hold locks until transaction commit where necessary.
2001-06-12 05:55:50 +00:00
Peter Eisentraut 7ceed2a9b5 Allow GRANT/REVOKE to/from more than one user per invocation. Command tag
for GRANT/REVOKE is now just that, not "CHANGE".

On the way, migrate some of the aclitem internal representation away from
the parser and build a real parse tree instead.  Also add some 'const'
qualifiers.
2001-06-09 23:21:55 +00:00
Bruce Momjian 28d2420eef This patch adds support for %TYPE in CREATE FUNCTION argument and return
types.  This version has an elog() to remind the user the type
resolution is not dynamic.

Ian Lance Taylor
2001-06-04 23:27:23 +00:00
Tom Lane 7c0c9b3cce New improved version of bpcharin() may have got the truncation case
right, but it failed to get the padding case right.

This was obscured by subsequent application of bpchar() in all but one
regression test case, and that one didn't fail in an obvious way ---
trailing blanks are hard to see.  Add another test case to make it
more obvious if it breaks again.
2001-06-01 17:49:17 +00:00
Bruce Momjian 7160c86ec2 These patches should fix check constraints not inheriting
when added by alter table add constraint.  The first file
patches backend/commands/command.c and the latter is a patch
to the alter table regression test.

Stephan Szabo
2001-05-30 13:00:03 +00:00
Peter Eisentraut 96147a6d1c Make UPDATE and DELETE privileges distinct. Add REFERENCES and TRIGGER
privileges.  INSERT and COPY FROM now require INSERT (only).  Add
privileges regression test.
2001-05-27 09:59:30 +00:00
Peter Eisentraut efcecd9eca Make bit and bit varying types reject too long input. (They already tried
to do that, but inconsistently.)  Make bit type reject too short input,
too, per SQL.  Since it no longer zero pads, 'zpbit*' has been renamed to
'bit*' in the source, hence initdb.
2001-05-22 16:37:17 +00:00
Peter Eisentraut 5546ec289b Make char(n) and varchar(n) types raise an error if the inserted string is
too long.  While I was adjusting the regression tests I moved the array
things all into array.sql, to make things more manageable.
2001-05-21 16:54:46 +00:00
Tom Lane be03eb25f3 Modify optimizer data structures so that IndexOptInfo lists built for
create_index_paths are not immediately discarded, but are available for
subsequent planner work.  This allows avoiding redundant syscache lookups
in several places.  Change interface to operator selectivity estimation
procedures to allow faster and more flexible estimation.
Initdb forced due to change of pg_proc entries for selectivity functions!
2001-05-20 20:28:20 +00:00
Tom Lane 78b674ba35 Add regression test to catch future breakage of avg(interval). This
aggregate seems uniquely fragile, because it's the only one with an
agginitval that's at all likely to change in format.
2001-05-18 16:02:01 +00:00
Bruce Momjian 0eacc60e23 Fix regression for new oids. 2001-05-15 04:12:56 +00:00
Bruce Momjian 9d17a1dd29 Update regression for new oids, some now two smaller. 2001-05-14 22:16:15 +00:00
Tom Lane 1c1eb0fa0e Suppress failures in parallel regress tests due to use of same table
name in two different tests.  This solution does not meet with universal
approval, so it may get changed later ...
2001-05-11 05:09:03 +00:00
Bruce Momjian 1f7cb07905 BSD/OS has new precision, and negative zeros now. 2001-05-10 23:46:25 +00:00
Bruce Momjian 8678929c22 This patch should catch cases where the types
in referencing and referenced columns of an fk constraint
aren't comparable using '=' at constraint definition time
rather than insert/update time.

Stephan Szabo
2001-05-09 21:10:39 +00:00
Tom Lane f905d65ee3 Rewrite of planner statistics-gathering code. ANALYZE is now available as
a separate statement (though it can still be invoked as part of VACUUM, too).
pg_statistic redesigned to be more flexible about what statistics are
stored.  ANALYZE now collects a list of several of the most common values,
not just one, plus a histogram (not just the min and max values).  Random
sampling is used to make the process reasonably fast even on very large
tables.  The number of values and histogram bins collected is now
user-settable via an ALTER TABLE command.

There is more still to do; the new stats are not being used everywhere
they could be in the planner.  But the remaining changes for this project
should be localized, and the behavior is already better than before.

A not-very-related change is that sorting now makes use of btree comparison
routines if it can find one, rather than invoking '<' twice.
2001-05-07 00:43:27 +00:00
Bruce Momjian 3f8e21c34a apply a little patch:
Oleg Bartunov
2001-05-03 19:20:24 +00:00
Tom Lane 2792374cff Ensure that btree sort ordering functions and boolean comparison operators
give consistent results for all datatypes.  Types float4, float8, and
numeric were broken for NaN values; abstime, timestamp, and interval
were broken for INVALID values; timetz was just plain broken (some
possible pairs of values were neither < nor = nor >).  Also clean up
text, bpchar, varchar, and bit/varbit to eliminate duplicate code and
thereby reduce the probability of similar inconsistencies arising in
the future.
2001-05-03 19:00:37 +00:00
Thomas G. Lockhart 9c3bbf256b Alter the previous test for "time with time zone" implicit time zone
(which failed miserably during DST) to just compare against a time
 derived from a timestamp value.
Certainly not a direct check for a correct result, but should work
 at any time of year.
2001-04-06 05:50:29 +00:00
Tom Lane 6faf150a30 Fix/cleanup DLLLIBS handling for Cygwin port. If it works it's to
Jason Tishler's credit, if it's broken it's my fault ...
2001-04-04 21:15:56 +00:00
Tom Lane 71d578ab68 Remove daylight-savings-time-dependent tests of 'time with time zone'
datatype.  Perhaps someday we can figure out a way of getting reproducible
results from testing this type, but for now ...
2001-04-04 20:03:11 +00:00
Tom Lane 648c09181e Re-allow specification of a new default value for an inherited column
in CREATE TABLE, but give a warning notice.  Clean up inconsistent
handling of defaults and NOT NULL flags from multiply-inherited columns.
Per pghackers discussion 28-Mar through 30-Mar.
2001-03-30 20:50:36 +00:00
Bruce Momjian 153237cc45 OpenBSD resultmap change:
I posted this to the list a few days ago,  but it was not addressed.  Can
someone please make the changes to the src/test/regress/resultmap?

Thanks.

- brandon
2001-03-26 17:51:41 +00:00
Peter Eisentraut 6ba0f31bdd Make less misleading message for failed + ignored tests. 2001-03-24 23:32:25 +00:00
Marc G. Fournier 69a2c2bad2 geometry tests 'FAILED' from a precision standpoint, but differently then
what solaris-precision takes into account ... its possible that solaris-precision
is 'stale', but created a new one "just in case" ...
2001-03-22 15:13:19 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane ca03b551fc Discuss LOCALE differences as a reason for regression test failure. 2001-03-20 00:09:36 +00:00
Tom Lane b200d0993d Adjust expected error message due to change of keyword case-folding. 2001-02-22 05:32:56 +00:00
Tatsuo Ishii 62e48272c2 new regression data for 7.1 2001-02-21 06:03:25 +00:00
Tatsuo Ishii ad7424e391 change destroydb -> dropdb 2001-02-21 06:02:04 +00:00
Peter Eisentraut cb6edf9d56 Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
2001-02-20 19:20:30 +00:00
Tom Lane c3b00e7e29 Add --template option to createdb script to allow access to WITH TEMPLATE
option of CREATE DATABASE.  In pg_regress, create regression database
from template0 to ensure that any installation-local cruft in template1
will not mess up the tests.
2001-02-18 17:53:55 +00:00
Bruce Momjian b9b045de4e Remove unused files, per Andreas 2001-02-13 14:33:51 +00:00
Bruce Momjian 7582bd91cb Please apply the following patch to fix AIX and IRIX timestamp behavior
as previously discussed.

It makes AIX and IRIX not use DST for dates before 1970.

The following expected files need to be removed from the regression tests,
they contain wrong results and are not needed any more.

src/test/regress/expected/horology-1947-PDT.out
src/test/regress/expected/tinterval-1947-PDT.out
src/test/regress/expected/abstime-1947-PDT.out

Zeugswetter Andreas
2001-02-13 14:32:52 +00:00
Tom Lane d08741eab5 Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant
to be the primary include files for backend .c files and frontend .c files
respectively.  By default, only include files meant for frontend use are
installed into the installation include directory.  There is a new make
target 'make install-all-headers' that adds the whole content of the
src/include tree to the installed fileset, for use by people who want to
develop server-side code without keeping the complete source tree on hand.
Cleaned up a whole lot of crufty and inconsistent header inclusions.
2001-02-10 02:31:31 +00:00
Bruce Momjian d67328f72a Just a quick patch to make the geometry test on Sparc/Linux
regression tests for Pgsql 7.1beta3 pass. This is very similr to the one I
submitted back in July for Linux/Alpha. Apparently non-x86 Linux machines
like to compute nth place float point digits like Sun/Solaris does?
        Otherwise, 7.1beta3 runs without problems (i.e. all other
regression tests pass) on my Sparc 20 running Debian GNU/Linux 2.2.

Ryan Kirkpatrick
2001-01-27 04:26:37 +00:00
Tom Lane b78d1bed07 Change float8-to-int8 conversion to round to nearest, rather than
truncating to integer.  Remove regress test that checks whether
4567890123456789 can be converted to float without loss; since that's
52 bits, it's on the hairy edge of failing with IEEE float8s, and indeed
rint seems to give platform-dependent results for it.
2001-01-26 22:50:26 +00:00
Bruce Momjian 623bf843d2 Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group. 2001-01-24 19:43:33 +00:00
Peter Eisentraut 58f4028518 From Jason Tishler <jt@dothill.com>
* doc/FAQ_MSWIN: Update to be consistent with software -- mainly change
comment from lack of Cygwin UNIX domain socket support and to list of
current Cygwin UNIX domain socket issues.
* src/include/config.h.in: Enable UNIX domain sockets for Cygwin.
* src/include/port/win.h: Disable UNIX domain sockets for Cygwin b20.1.
* src/test/regress/pg_regress.sh: Use UNIX domain sockets for Cygwin
instead of TCP/IP.
2001-01-19 23:43:36 +00:00
Peter Eisentraut e4e64e7fef Update to reality. 2001-01-19 19:43:27 +00:00
Peter Eisentraut e8990eba31 Repair circular dependencies and broken clean commands. 2001-01-19 19:15:33 +00:00
Peter Eisentraut d62d4c3300 Change
#! /usr/local/bin/perl -w
to
#! /usr/bin/perl

The path is probably more portable, and the -w was kind of silly for a six
line script that produces two warnings as it stands.
2001-01-19 19:06:48 +00:00
Peter Eisentraut b7001d0f6a Change
#! /usr/local/bin/python
to
#! /usr/bin/env python
which is the recommended way.
2001-01-19 18:35:40 +00:00
Thomas G. Lockhart 6acdebbd3a Fix up "Postgres-style" time interval representation when fields have
mixed-signs. Previous effort left way too many minus signs, and was at
 least as broken as the one before that :(
Clean up "ISO-style" time interval representation to omit zero fields if
 there is at least one non-zero field. Supress some leading plus signs
 when not necessary for clarity.
Replace every #ifdef __CYGWIN__ block with a cleaner TIMEZONE_GLOBAL macro
 defined in datetime.h.
2001-01-18 07:22:43 +00:00
Peter Eisentraut f8bdef0780 Windows wants shared libraries in PATH. 2001-01-13 03:25:48 +00:00
Tom Lane 4ced15ece4 Resultmap updates for OpenBSD, per report from bpalmer@crimelabs.net. 2001-01-07 01:14:35 +00:00
Tom Lane 2fb6cc9045 Remove not-really-standard implementation of CREATE TABLE's UNDER clause,
and revert documentation to describe the existing INHERITS clause
instead, per recent discussion in pghackers.  Also fix implementation
of SQL_inheritance SET variable: it is not cool to look at this var
during the initial parsing phase, only during parse_analyze().  See
recent bug report concerning misinterpretation of date constants just
after a SET TIMEZONE command.  gram.y really has to be an invariant
transformation of the query string to a raw parsetree; anything that
can vary with time must be done during parse analysis.
2001-01-05 06:34:23 +00:00
Tom Lane 3bdadd0426 Document tuple ordering differences as a possible cause of
regression test 'failures'.
2001-01-02 05:56:02 +00:00
Tom Lane 25d88e4c53 Tweak temporary-installation setup so that it doesn't break when the
configured install --prefix begins with /data/...
2001-01-02 02:13:48 +00:00
Tom Lane 144ec3c148 Update geometry-alpha-precision.out per reports from Brent Verner and
Adriaan Joubert.
2001-01-01 23:18:18 +00:00
Tom Lane 52522850fe Don't say 'export PGHOST' or 'export PGPORT' unless we actually define
those variables.  Some shells will invent an empty-string definition in
this case, which is not what we want.
2000-12-31 18:38:44 +00:00
Tom Lane ee6a91682d Apparently, special float8 comparison file for Alpha is only needed
when using vendor cc, not gcc.
2000-12-30 02:48:04 +00:00
Tom Lane 61784c54b5 Change default output formatting for CIDR to be unabbreviated, per
recommendation from Paul Vixie.  Add a new abbrev() function to produce
abbreviated format as text.  No forced initdb, but new function is not
available unless you do an initdb or add the pg_proc row manually.
2000-12-22 18:00:24 +00:00
Tom Lane c77e2e42fb Tweak regressplans.sh to use any already-set PGOPTIONS. 2000-12-18 02:45:47 +00:00
Tom Lane ea166f1146 Planner speedup hacking. Avoid saving useless pathkeys, so that path
comparison does not consider paths different when they differ only in
uninteresting aspects of sort order.  (We had a special case of this
consideration for indexscans already, but generalize it to apply to
ordered join paths too.)  Be stricter about what is a canonical pathkey
to allow faster pathkey comparison.  Cache canonical pathkeys and
dispersion stats for left and right sides of a RestrictInfo's clause,
to avoid repeated computation.  Total speedup will depend on number of
tables in a query, but I see about 4x speedup of planning phase for
a sample seven-table query.
2000-12-14 22:30:45 +00:00
Tom Lane b9110b97d9 Allow resultmap file to be missing, for use in contrib self-tests. 2000-12-11 19:00:33 +00:00
Tom Lane 70c5fdd2f6 Add Darwin-specific geometry test file. 2000-12-11 16:45:16 +00:00
Tom Lane 981a7d32d1 From Stephan Szabo:
I believe this should fix the issue that Philip Warner
noticed about the check for unique constraints meeting the
referenced keys of a foreign key constraint allowing the
specification of a subset of a foreign key instead of
rejecting it.  I also added tests for a base case of
this to the foreign key and alter table tests and patches
for expected output.
2000-12-05 19:57:56 +00:00
Tom Lane 5ce8ab96f5 Add regress test case for INSERT ... SELECT in rules. 2000-12-05 19:15:49 +00:00
Tom Lane 4d2a506526 Update for new tests. These are extrapolations and will need to be confirmed
correct on the relevant platforms.
2000-12-03 17:53:26 +00:00
Tom Lane f3e988443c Update for new tests. 2000-12-03 17:37:26 +00:00
Thomas G. Lockhart 6969b8fa11 Repair usage of the OVERLAPS operator.
Allow some operator-like tokens to be used as function names.
Flesh out support for time, timetz, and interval operators
 and interactions.
Regression tests pass, but non-reference-platform horology test results
 will need to be updated.
2000-12-03 14:51:12 +00:00
Peter Eisentraut bf14fb8fa3 Remove old regression test drivers. 2000-11-30 20:43:31 +00:00
Tom Lane d8bc37eb16 Correct portability-related errors in inet expected output. I'm not
sure that broadcast('foo/32') means anything, but if it does, surely
it ought to return foo, not 255.255.255.255.
2000-11-25 21:32:25 +00:00
Bruce Momjian 3f1998727d here is a patch for formatting.c (to_char/timestampt()), for 7.1
it fixing Y,YY,YYY,YYYY conversion, the docs and regress tests update
 are included too.

  During the patch testing I found small bug in miscadmin.h in
convertstr() declaration. Here it's fixed too.

 Thanks

        Karel
2000-11-25 05:00:33 +00:00
Peter Eisentraut 4cbeefb1e8 Remove obsolete test suite 2000-11-24 17:14:07 +00:00
Peter Eisentraut dc3fb8b152 Fix output file names for new driver 2000-11-22 16:40:22 +00:00
Peter Eisentraut f31844f15f Bit string regression test
from Adriaan Joubert <a.joubert@albourne.com>
2000-11-22 13:37:44 +00:00
Peter Eisentraut cf4ad01d36 Point runtest and runcheck targets at new regression test driver. 2000-11-22 13:16:24 +00:00
Peter Eisentraut 5ce0804b51 Allow running without a "schedule" file. This enables you to run tests
standalone, e.g., "./pg_regress int2".
2000-11-22 01:47:47 +00:00
Peter Eisentraut 9bc6fb37b9 geometry result files for unixware 2000-11-22 01:00:54 +00:00
Tom Lane 11391685d1 Tweak resultmap documentation, add to README too. 2000-11-22 00:58:47 +00:00
Peter Eisentraut 90cfa9ac19 Allow for different result files when using GCC versus native compiler. 2000-11-21 23:40:28 +00:00
Peter Eisentraut 22c528fc5a Don't hide error message from dropdb. 2000-11-21 17:34:21 +00:00
Tom Lane b31e83f461 Adjust opr_sanity.out for small change in OID allocation. 2000-11-21 04:29:44 +00:00
Tom Lane 93fcbd140a Make oidin/oidout produce and consume unsigned representation of Oid,
rather than just being aliases for int4in/int4out.  Give type Oid a
full set of comparison operators that do proper unsigned comparison,
instead of reusing the int4 comparators.  Since pg_dump is now doing
unsigned comparisons of OIDs, it is now *necessary* that we play by
the rules here.  In fact, given that btoidcmp() has been doing unsigned
comparison for quite some time, it seems likely that we have index-
corruption problems in 7.0 and before once the Oid counter goes past
2G.  Fixing these operators is a necessary step before we can think
about 8-byte Oid, too.
2000-11-21 03:23:21 +00:00
Tom Lane fdbd6ca75e Simplify definition of pg_tables and pg_views views by making use of
new separate relkind for views (per some discussion back in September).
I didn't force initdb, but rules regress test will show differences
until you do one.
2000-11-21 01:11:50 +00:00
Tom Lane 5bb2300b59 Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list.  Support for oldstyle internal functions is gone
(no longer needed, since conversion is complete) and pg_language entry
'internal' now implies newstyle call convention.  pg_language entry
'newC' is gone; both old and newstyle dynamically loaded C functions
are now called language 'C'.  A newstyle function must be identified
by an associated info routine.  See src/backend/utils/fmgr/README.
2000-11-20 20:36:57 +00:00
Tom Lane 2cf48ca04b Extend CREATE DATABASE to allow selection of a template database to be
cloned, rather than always cloning template1.  Modify initdb to generate
two identical databases rather than one, template0 and template1.
Connections to template0 are disallowed, so that it will always remain
in its virgin as-initdb'd state.  pg_dumpall now dumps databases with
restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0.
This allows proper behavior when there is user-added data in template1.
initdb forced!
2000-11-14 18:37:49 +00:00
Thomas G. Lockhart b9c8faedde Allow more timezone-like interpretation of INTERVALs.
Fix up labeling of some new test cases.
2000-11-11 19:57:03 +00:00
Thomas G. Lockhart d74c52c357 Allow more timezone-like interpretation of INTERVALs. 2000-11-11 19:56:43 +00:00
Thomas G. Lockhart a669bd74ee Check for existence of the results directory before invoking mkdir. 2000-11-11 19:56:20 +00:00
Tom Lane 9e877702fc Update expected output to track recent code changes. 2000-11-10 23:19:46 +00:00
Tom Lane a210023008 Adjust INET/CIDR display conventions and reimplement some INET/CIDR
functions, per recent discussions on pghackers.  For now, I have called
the verbose-display formatting function text(), but will reconsider if
enough people object.
initdb forced.
2000-11-10 20:13:27 +00:00
Tom Lane 9bbca2c0f0 Add some more union/intersect/except test cases, per suggestions
from Kevin O'Gorman.
2000-11-09 02:47:49 +00:00
Tom Lane 3908473c80 Make DROP TABLE rollback-able: postpone physical file delete until commit.
(WAL logging for this is not done yet, however.)  Clean up a number of really
crufty things that are no longer needed now that DROP behaves nicely.  Make
temp table mapper do the right things when drop or rename affecting a temp
table is rolled back.  Also, remove "relation modified while in use" error
check, in favor of locking tables at first reference and holding that lock
throughout the statement.
2000-11-08 22:10:03 +00:00
Tom Lane 5781dbc061 Update for new results. 2000-11-07 06:51:21 +00:00
Peter Eisentraut ff0bca613f Update geometry for FreeBSD 4.1 (same as 4.0) 2000-11-06 22:40:30 +00:00
Tom Lane db631de531 Add explicit ORDER BYs in a couple of cases --- seems to be necessary
to get platform-independent results.
2000-11-06 18:11:46 +00:00
Tom Lane e8f1340fe0 I think Thomas missed an update here... 2000-11-06 18:11:03 +00:00
Thomas G. Lockhart 07272c6f8b Add tests for more INTERVAL syntax.
Add more tests for JOIN syntax.
All tests pass on my Linux box (except for the usual couple of lines
 for geometry).
2000-11-06 16:03:47 +00:00
Peter Eisentraut 4aa1aabd7a This is no longer used since we have the 'resultmap'. 2000-11-04 13:37:39 +00:00
Peter Eisentraut b99ee7f37d This is the minimal version of the Darwin support patch from
Bruce Hartzler <bruceh@mail.utexas.edu>.  It contains shared library
support, regression test map, and the usual template files.  The dynamic
loader is missing, the spin lock code apparently doesn't assemble due to
syntax problems, and semaphores are to be hoped for from Apple.
2000-10-31 19:55:20 +00:00
Peter Eisentraut 8b04311293 Omit perl and python interfaces when making temporary installation. 2000-10-29 12:49:49 +00:00
Peter Eisentraut 7e77668e7a Make regression tests work with VPATH builds. 2000-10-27 20:00:22 +00:00
Tatsuo Ishii 29f6c8dff8 Fix for drop db message format changes 2000-10-27 02:25:34 +00:00
Tom Lane 063c0f6bea Disallow bits beyond the mask length for CIDR values, per discussion
on pghackers.  Arrange for the sort ordering of general INET values
to be network part as major sort key, host part as minor sort key.
I did not force an initdb for this change, but anyone who's running
indexes on general INET values may need to recreate those indexes.
2000-10-27 01:55:23 +00:00
Peter Eisentraut 0f5169b4af New config.guess and config.sub with Darwin support (from official GNU
source).  Adjust resultmap accordingly and fix some other regexps.
2000-10-24 18:11:48 +00:00
Tom Lane 4f44aa04b5 Major overhaul of large-object implementation, by Denis Perchine with
kibitzing from Tom Lane.  Large objects are now all stored in a single
system relation "pg_largeobject" --- no more xinv or xinx files, no more
relkind 'l'.  This should offer substantial performance improvement for
large numbers of LOs, since there won't be directory bloat anymore.
It'll also fix problems like running out of locktable space when you
access thousands of LOs in one transaction.
Also clean up cruft in read/write routines.  LOs with "holes" in them
(never-written byte ranges) now work just like Unix files with holes do:
a hole reads as zeroes but doesn't occupy storage space.
INITDB forced!
2000-10-24 01:38:44 +00:00
Tom Lane d7186cfa9b Add some modicum of error detection... 2000-10-24 00:08:02 +00:00
Tom Lane 570ed46401 Remove testlo2.c --- there seems to be no difference between this and
testlo.c, except it's even skimpier on error checking :-(
2000-10-24 00:04:11 +00:00
Peter Eisentraut 7b021ce17c Polish shared library build to reduce number of special hacks. In
particular, allow linking with arbitrary commands rather than only $(AR) or
$(LD), and treat C++ without hacks.

Add option to disable shared libraries.  This takes the place of the
BSD_SHLIB variable.  The regression test driver ignores the plpgsql test
if there are no shared libraries available.
2000-10-23 21:44:12 +00:00
Tom Lane 9ace03183c Some small polishing of Mark Hollomon's cleanup of DROP command: might
as well allow DROP multiple INDEX, RULE, TYPE as well.  Add missing
CommandCounterIncrement to DROP loop, which could cause trouble otherwise
with multiple DROP of items affecting same catalog entries.  Try to
bring a little consistency to various error messages using 'does not exist',
'nonexistent', etc --- I standardized on 'does not exist' since that's
what the vast majority of the existing uses seem to be.
2000-10-22 23:32:48 +00:00
Peter Eisentraut fba790ad58 Makeover for Unixware 7.1.1
* Makefile: Add more standard targets.  Improve shell redirection in GNU
make detection.
* src/backend/access/transam/rmgr.c: Fix incorrect(?) C.
* src/backend/libpq/pqcomm.c (StreamConnection): Work around accept() bug.
* src/include/port/unixware.h: ...with help from here.
* src/backend/nodes/print.c (plannode_type): Remove some "break"s after
"return"s.
* src/backend/tcop/dest.c (DestToFunction): ditto.
* src/backend/nodes/readfuncs.c: Add proper prototypes.
* src/backend/utils/adt/numutils.c (pg_atoi): Cope specially with strtol()
setting EINVAL. This saves us from creating an extra set of regression test
output for the affected systems.
* src/include/storage/s_lock.h (tas): Correct prototype.
* src/interfaces/libpq/fe-connect.c (parseServiceInfo): Don't use variable
as dimension in array definition.
* src/makefiles/Makefile.unixware: Add support for GCC.
* src/template/unixware: same here
* src/test/regress/expected/abstime-solaris-1947.out: Adjust whitespace.
* src/test/regress/expected/horology-solaris-1947.out: Part of this file
was evidently missing.
* src/test/regress/pg_regress.sh: Fix shell.  mkdir -p returns non-zero if
the directory exists.
* src/test/regress/resultmap: Add entries for Unixware.
2000-10-22 22:15:13 +00:00
Peter Eisentraut 805e431a38 Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
2000-10-20 21:04:27 +00:00
Bruce Momjian 73677dd92f The following patch was sent to the patches list:
This patch forces the use of 'DROP VIEW' to destroy views.

It also changes the syntax of DROP VIEW to
DROP VIEW v1, v2, ...
to match the syntax of DROP TABLE.

Some error messages were changed so this patch also includes changes to the
appropriate expected/*.out files.

Doc changes for 'DROP TABLE" and 'DROP VIEW' are included.


--
Mark Hollomon
2000-10-18 16:16:18 +00:00
Peter Eisentraut 0db3cb253d * doc/src/sgml/regress.sgml: Update for new driver script.
* doc/src/sgml/installation.sgml: ditto.

* src/test/regress/README: Regenerate.

* doc/src/sgml/docguide.sgml: Explain how it was done.  Explain how
INSTALL and HISTORY are (now) generated.

* doc/src/sgml/Makefile: Implement HISTORY generation to be analoguous
to INSTALL.
2000-10-17 15:26:40 +00:00
Bruce Momjian 1333f07ff1 I wasn't too sure where to mail this.
I have noticed that there are some identical files in
postgresql-7.0.2/src/test/regress/expected/

> diff float8-cygwin.out float8-small-is-zero.out #I recommend deleting
float8-cygwin.out
> diff geometry-cygwin-precision.out geometry-solaris-precision.out #I
recommend deleting geometry-cygwin-precision.out

below is the diff of postgresql-7.0.2/src/test/regress/resultmap
that has the above files deleted plus the addition of an alpha regression
test built with alphaev56-dec-osf4.0e/2.95.2/ . The alpha geometry
regression file is attached

11c11
< float8/i.86-pc-cygwin*=float8-cygwin
---
> float8/i.86-pc-cygwin*=float8-small-is-zero
18c18
< geometry/i.86-pc-cygwin*=geometry-cygwin-precision
---
> geometry/i.86-pc-cygwin*=geometry-solaris-precision
21a22
> geometry/alpha.*-dec-osf=geometry-alpha-precision



Ricardo Muggli
Systems Manager
Information and Technology Services
Minnesota State University, Mankato
2000-10-16 22:37:37 +00:00
Bruce Momjian d3902198b4 Here is a patch for resultmap and the results file.
I have counted 9 differences in the least significant digit compared
with geometry-positive-zeros.out.  It would be wise for someone else
to double check.

Pete Forman
2000-10-14 23:55:58 +00:00