1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-25 12:03:53 +03:00
Commit Graph

962 Commits

Author SHA1 Message Date
Tom Lane
660fcf0f67 Back-patch 7.4 change to show that freebsd 5 and up don't need
float8-small-is-zero.  Per Mark Kirkwood.
2005-12-15 05:43:35 +00:00
Tom Lane
304b231e7b Add regression test to see if the min/max values of int8 convert correctly. 2005-12-05 04:14:39 +00:00
Tom Lane
cb083b26d5 Adjust alter_table regression test to avoid conflicts with rangefuncs
and prepare tests, which cause intermittent failures in parallel test
mode.  Back-port of fix originally applied to 8.0 and 7.4 branches;
the problems do not appear to exist in 7.2 branch but they do occur
in 7.3.  Per buildfarm results.
2005-07-17 17:26:31 +00:00
Tom Lane
2401cfa155 Mark the geometry regression test as an ignorable failure in the pre-7.4
branches.  Per discussion, this seems saner than trying to maintain
last-significant-digit regression test outputs for all supported platforms.
2005-07-16 19:01:50 +00:00
Jan Wieck
dde926bfe0 Moved the recently added test for foreign key disabled by rewrite
rule into the rule.sql since it affects the latter if run in paralell.

Jan
2003-10-31 14:27:51 +00:00
Jan Wieck
d1c496e9d5 Fix for possible referential integrity violation when a qualified ON INSERT
rule split the query into one INSERT and one UPDATE where the UPDATE
then hit's the just created row without modifying the key fields again.
In this special case, the new key slipped in totally unchecked.

Jan
2003-10-31 03:57:42 +00:00
Tom Lane
3284e342a2 Back-patch Jan's fix to avoid primary key lookup (and lock) if foreign key
does not change on UPDATE.
2003-05-21 18:14:46 +00:00
Tom Lane
3ffaf20461 Apply fixes for problems with dropped columns whose types have also been
dropped.  Add regression test, too.
2003-05-12 00:17:34 +00:00
Tom Lane
db398d05be Repair an embarrassingly large number of alphabetization mistakes in the
datetime token tables.  Even more embarrassing, the regression tests
revealed some of the problems --- but evidently the bogus output wasn't
questioned.  Add code to postmaster startup to directly check the tables
for correct ordering, in hopes of not being embarrassed like this again.
2003-01-16 00:27:17 +00:00
Tom Lane
19ddc7ec17 Update resultmap pattern for geometry-solaris-i386-pc: should match
solaris 2.8 as well as 2.7.  Per report from Martin Renters.
2002-11-27 17:04:45 +00:00
Tom Lane
6d227ae782 NetBSD versions 1.6 and (we hope) later can use the standard geometry
comparison file, instead of geometry-positive-zeros.  Per report from
Patrick Welche.
2002-11-21 04:40:41 +00:00
Tom Lane
9b3bcdd41f This locale-specific variant file seems not to have been updated
when a test was added to select_having.sql back in June.
2002-11-21 00:45:18 +00:00
Tom Lane
c11e948244 Use cat instead of echo or awk, to avoid portability problems with backslashes. 2002-11-13 16:40:29 +00:00
Tom Lane
b5947f433e Update AIX resultmap for horology tests, per Andreas. 2002-11-12 20:02:38 +00:00
Tom Lane
400013ceec Remove NO_MKTIME_BEFORE_1970. I had speculated that it was not needed
anymore given the mktime() workaround now done in DetermineLocalTimeZone.
This has now been confirmed by Robert Bruccoleri for Irix, and I'm going
to extrapolate to AIX as well.
2002-11-12 00:39:36 +00:00
Tom Lane
a44b69ef4c Back-patch recent file removals into REL7_3_STABLE branch. 2002-11-04 21:27:47 +00:00
CVS to git conversion script
503b41f6e5 This commit was manufactured by cvs2git to create branch 'REL7_3_STABLE'.
Sprout from master 2002-11-04 17:14:29 UTC Tom Lane <tgl@sss.pgh.pa.us> 'Remove extraneous semicolons after routine bodies.  These don't bother'
Cherrypick from master 2002-09-04 07:23:04 UTC Bruce Momjian <bruce@momjian.us> 'Brand 7.3.  Ready for beta!':
    contrib/xml/README
    contrib/retep/CHANGELOG
    contrib/retep/Implementation
    contrib/retep/Makefile
    contrib/retep/README
    contrib/retep/build.xml
    contrib/retep/data/cds.dtd
    contrib/retep/data/cds.xml
    contrib/retep/uk/org/retep/tools.properties
    contrib/retep/uk/org/retep/dtu/DCollection.java
    contrib/retep/uk/org/retep/dtu/DConstants.java
    contrib/xml/pgxml_dom.source
    contrib/retep/uk/org/retep/dtu/DElement.java
    contrib/retep/uk/org/retep/dtu/DEnvironment.java
    contrib/retep/uk/org/retep/dtu/DModule.java
    contrib/retep/uk/org/retep/dtu/DModuleXML.java
    contrib/retep/uk/org/retep/dtu/DNode.java
    contrib/retep/uk/org/retep/dtu/DProcessor.java
    contrib/retep/uk/org/retep/dtu/DTransform.java
    contrib/retep/uk/org/retep/tools/Tool.java
    contrib/retep/uk/org/retep/util/ExceptionDialog.java
    contrib/retep/uk/org/retep/util/Globals.java
    contrib/retep/uk/org/retep/util/Logger.java
    contrib/retep/uk/org/retep/util/Main.java
    contrib/retep/uk/org/retep/util/StandaloneApp.java
    contrib/retep/uk/org/retep/util/hba/Editor.java
    contrib/retep/uk/org/retep/util/misc/IPAddress.java
    contrib/retep/uk/org/retep/util/misc/PropertiesIO.java
    contrib/retep/uk/org/retep/util/misc/WStringTokenizer.java
    contrib/retep/uk/org/retep/util/models/HBATableModel.java
    contrib/retep/uk/org/retep/util/models/PropertiesTableModel.java
    contrib/retep/uk/org/retep/util/proped/PropertyEditor.java
    contrib/retep/uk/org/retep/xml/core/XMLFactory.java
    contrib/retep/uk/org/retep/xml/core/XMLFactoryException.java
    contrib/retep/uk/org/retep/xml/jdbc/XMLDatabase.java
    contrib/retep/uk/org/retep/xml/jdbc/XMLResultSet.java
    contrib/retep/uk/org/retep/xml/parser/TagListener.java
    contrib/retep/uk/org/retep/xml/test/XMLExport.java
    doc/src/sgml/libpgeasy.sgml
    doc/src/sgml/odbc.sgml
    contrib/xml/pgxml.source
    doc/src/sgml/recovery.sgml
    src/test/regress/expected/geometry-bsdi-precision.out
    contrib/retep/uk/org/retep/xml/parser/TagHandler.java
    doc/src/sgml/version.sgml
    doc/src/sgml/y2k.sgml
    contrib/retep/retep.jpx
    src/interfaces/jdbc/utils/CheckVersion.java
    src/interfaces/jdbc/utils/changelog.pl
    contrib/retep/uk/org/retep/util/hba/Main.java
    contrib/retep/uk/org/retep/util/hba/Record.java
    contrib/retep/uk/org/retep/util/proped/Main.java
    src/interfaces/jdbc/CHANGELOG
    src/interfaces/jdbc/Implementation
    src/interfaces/jdbc/utils/buildDriver
    src/interfaces/jdbc/jdbc.jpx
2002-11-04 17:14:30 +00:00
Tom Lane
5123139210 Remove encoding lookups from grammar stage, push them back to places
where it's safe to do database access.  Along the way, fix core dump
for 'DEFAULT' parameters to CREATE DATABASE.  initdb forced due to
change in pg_proc entry.
2002-11-02 18:41:22 +00:00
Tom Lane
8d43947886 Reduce messages associated with shell-type function arguments/results
from WARNING to NOTICE, since they are expected messages in common cases.
2002-11-01 19:19:58 +00:00
Tom Lane
03a2371317 Update to match expected results on OS X 10.2. 2002-11-01 18:15:34 +00:00
Tom Lane
8631924e51 Correct ordering of geometry/freebsd entries, add one for freebsd5. 2002-11-01 16:32:32 +00:00
Tom Lane
a4007c0d5f Update for test changes. 2002-11-01 15:20:09 +00:00
Bruce Momjian
b1039e93d8 Add additional ORDER BY to join regression test, per Tatsuo. 2002-10-30 01:28:12 +00:00
Bruce Momjian
9e90d11810 Remove /src/utils. Is final cleanup of getopt.c resurection. 2002-10-30 01:15:51 +00:00
Bruce Momjian
579e5dcbaa Update regression for FreeBSD 4.7, for Larry Rosenman 2002-10-29 03:44:22 +00:00
Bruce Momjian
13d7a689ec Add ORDER BY to join regression test. 2002-10-28 22:54:45 +00:00
Tom Lane
7305aa0171 create_index test must run after create_misc test. 2002-10-22 20:20:10 +00:00
Peter Eisentraut
1c23cf4371 Update for test changes. 2002-10-22 20:01:15 +00:00
Bruce Momjian
e49c1a9234 Fix ALTER TABLE ... ADD COLUMN for inheritance cases.
Alvaro Herrera
2002-10-21 20:31:52 +00:00
Tom Lane
c1f91a38e2 Fix rewrite code so that rules are in fact executed in order by name,
rather than being reordered according to INSTEAD attribute for
implementation convenience.
Also, increase compiled-in recursion depth limit from 10 to 100 rewrite
cycles.  10 seems pretty marginal for situations where multiple rules
exist for the same query.  There was a complaint about this recently,
so I'm going to bump it up.  (Perhaps we should make the limit a GUC
parameter, but that's too close to being a new feature to do in beta.)
2002-10-19 19:00:47 +00:00
Bruce Momjian
bab3d29fba This patch adds some missing functions for float8 math operations,
specifically ceil(), floor(), and sign(). There may be other functions
that need to be added, but this is a start. I've included some simple
regression tests.

Neil Conway
2002-10-19 02:08:19 +00:00
Bruce Momjian
5c6a5fe18b Make regression tests safe for autocommit = 'off'. 2002-10-19 01:35:43 +00:00
Tom Lane
9886a46e76 Restore NOTICEs that were mistakenly removed from triggers regression
test expected output.  Tweak contrib/spi Makefile so that refint.so is
by default built with appropriate NOTICE support for regression testing.
2002-10-03 18:40:02 +00:00
Tom Lane
b813d143ae Alter scale selection for NUMERIC division and transcendental functions
so that precision of result is always at least as good as you'd get from
float8 arithmetic (ie, always at least 16 digits of accuracy).  Per
pg_hackers discussion a few days ago.
2002-10-02 19:21:26 +00:00
Tom Lane
6d0d15c451 Make the world at least somewhat safe for zero-column tables, and
remove the special case in ALTER DROP COLUMN to prohibit dropping a
table's last column.
2002-09-28 20:00:19 +00:00
Tom Lane
c6367df506 Change default privileges for languages and functions to be PUBLIC USAGE
and PUBLIC EXECUTE, respectively.  Per discussion about easing updates
from prior versions.
2002-09-24 23:14:25 +00:00
Peter Eisentraut
8c3ab663ab Tweak conversion names to follow the established naming scheme, and
document that scheme.
2002-09-24 20:14:59 +00:00
Tom Lane
c328b6dd8b Replace pg_attribute.attisinherited with attislocal and attinhcount
columns, to allow more correct behavior in multiple-inheritance cases.
Patch by Alvaro Herrera, review by Tom Lane.
2002-09-22 19:42:52 +00:00
Tom Lane
9946b83ded Bring SIMILAR TO and SUBSTRING into some semblance of conformance with
the SQL99 standard.  (I'm not sure that the character-class features are
quite right, but that can be fixed later.)  Document SQL99 and POSIX
regexps as being different features; provide variants of SUBSTRING for
each.
2002-09-22 17:27:25 +00:00
Tom Lane
ac355d558e Move most of the error checking for foreign-key constraints out of
parse analysis and into the execution code (in tablecmds.c).  This
eliminates a lot of unreasonably complex code that needed to have two
or more execution paths in case it was dealing with a not-yet-created
table column vs. an already-existing one.  The execution code is always
dealing with already-created tables and so needs only one case.  This
also eliminates some potential race conditions (the table wasn't locked
between parse analysis and execution), makes it easy to fix the gripe
about wrong referenced-column names generating a misleading error message,
and lets us easily add a dependency from the foreign-key constraint to
the unique index that it requires the referenced table to have.  (Cf.
complaint from Kris Jurka 12-Sep-2002 on pgsql-bugs.)

Also, third try at building a deletion mechanism that is not sensitive
to the order in which pg_depend entries are visited.  Adding the above-
mentioned dependency exposed the folly of what dependency.c had been
doing: it failed for cases where B depends on C while both auto-depend
on A.  Dropping A should succeed in this case, but was failing if C
happened to be visited before B.  It appears the only solution is two
separate walks over the dependency tree.
2002-09-22 00:37:09 +00:00
Tom Lane
4e5c2a8d52 Update regression expected results for to_char() change. 2002-09-20 16:44:55 +00:00
Bruce Momjian
07a6fa9df1 Fixed this problem and added regression tests in domain.sql.
Also:
- Changed header file order (alphabetical)
- Changed to m = attnum - 1 in binary copy code for consistency

Rod Taylor
2002-09-20 03:52:50 +00:00
Tom Lane
4a0c3a6142 Department of second thoughts: suppressing implicit casts everywhere in
ruleutils display is not such a great idea.  For arguments of functions
and operators I think we'd better keep the historical behavior of showing
such casts explicitly, to ensure that the function/operator is reparsed
the same way when the rule is reloaded.  This also makes the output of
EXPLAIN less obscurantist about exactly what's happening.
2002-09-19 22:48:34 +00:00
Tom Lane
b26dfb9522 Extend pg_cast castimplicit column to a three-way value; this allows us
to be flexible about assignment casts without introducing ambiguity in
operator/function resolution.  Introduce a well-defined promotion hierarchy
for numeric datatypes (int2->int4->int8->numeric->float4->float8).
Change make_const to initially label numeric literals as int4, int8, or
numeric (never float8 anymore).
Explicitly mark Func and RelabelType nodes to indicate whether they came
from a function call, explicit cast, or implicit cast; use this to do
reverse-listing more accurately and without so many heuristics.
Explicit casts to char, varchar, bit, varbit will truncate or pad without
raising an error (the pre-7.2 behavior), while assigning to a column without
any explicit cast will still raise an error for wrong-length data like 7.3.
This more nearly follows the SQL spec than 7.2 behavior (we should be
reporting a 'completion condition' in the explicit-cast cases, but we have
no mechanism for that, so just do silent truncation).
Fix some problems with enforcement of typmod for array elements;
it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
Provide a generalized array_length_coerce() function to replace the
specialized per-array-type functions that used to be needed (and were
missing for NUMERIC as well as all the datetime types).
Add missing conversions int8<->float4, text<->numeric, oid<->int8.
initdb forced.
2002-09-18 21:35:25 +00:00
Bruce Momjian
ff9973a8f1 Remove src/test/regress/sql: plpgsql-nsp-testing.sql per Joe Conway. 2002-09-17 04:27:41 +00:00
Bruce Momjian
b3f52320f6 > Sean Chittenden <sean@chittenden.org> writes:
>
>>::sigh:: Is it me or does it look like all
>>of pl/pgsql is schema un-aware (ie, all of the declarations).  -sc
>
>
> Yeah.  The group of routines parse_word, parse_dblword, etc that are
> called by the lexer certainly all need work.  There are some
> definitional issues to think about, too --- plpgsql presently relies on
> the number of names to give it some idea of what to look for, and those
> rules are probably all toast now.  Please come up with a sketch of what
> you think the behavior should be before you start hacking code.

Attached is a diff -c format proposal to fix this. I've also attached a short
test script. Seems to work OK and passes all regression tests.

Here's a breakdown of how I understand plpgsql's "Special word rules" -- I
think it illustrates the behavior reasonably well. New functions added by this
patch are plpgsql_parse_tripwordtype and plpgsql_parse_dblwordrowtype:

Joe Conway
2002-09-12 00:24:10 +00:00
Bruce Momjian
81186865fe Joe Conway wrote:
> Hannu Krosing wrote:
 >
 >> It seems that my last mail on this did not get through to the list
 >> ;(
 >>
 >> Please consider renaming the new builtin function
 >> split(text,text,int)
 >>
 >> to something else, perhaps
 >>
 >> split_part(text,text,int)
 >>
 >> (like date_part)
 >>
 >> The reason for this request is that 3 most popular scripting
 >> languages (perl, python, php) all have also a function with similar
 >> signature, but returning an array instead of single element and the
 >> (optional) third argument is limit (maximum number of splits to
 >> perform)
 >>
 >> I think that it would be good to have similar function in (some
 >> future release of) postgres, but if we now let in a function with
 >> same name and arguments but returning a single string instead an
 >> array of them, then we will need to invent a new and not so easy to
 >> recognise name for the "real" split function.
 >>
 >
 > This is a good point, and I'm not opposed to changing the name, but
 > it is too bad your original email didn't get through before beta1 was
 >  rolled. The change would now require an initdb, which I know we were
 >  trying to avoid once beta started (although we could change it
 > without *requiring* an initdb I suppose).
 >
 > I guess if we do end up needing an initdb for other reasons, we
 > should make this change too. Any other opinions? Is split_part an
 > acceptable name?
 >
 > Also, if we add a todo to produce a "real" split function that
 > returns an array, similar to those languages, I'll take it for 7.4.

No one commented on the choice of name, so the attached patch changes
the name of split(text,text,int) to split_part(text,text,int) per
Hannu's recommendation above. This can be applied without an initdb if
current beta testers are advised to run:

   update pg_proc set proname = 'split_part' where proname = 'split';

in the case they want to use this function. Regression and doc fix is
also included in the patch.

Joe Conway
2002-09-12 00:21:25 +00:00
Bruce Momjian
24507acc0b Changes to documentation and the regression tests for the default
NAMEDATALEN of 64.

Kris Jurka
2002-09-07 18:39:05 +00:00
Tom Lane
b73d8d22f7 Improve opr_sanity regression test to check oprltcmpop and opgtcmpop
mergejoin links.
2002-09-05 20:23:19 +00:00
Tom Lane
f4003816f5 Update oidjoins regression test for 7.3 catalogs. 2002-09-05 19:58:14 +00:00