aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* server_min_messages and friends should have valid values at bootup.Tom Lane2002-09-22
|
* Replace pg_attribute.attisinherited with attislocal and attinhcountTom Lane2002-09-22
| | | | | columns, to allow more correct behavior in multiple-inheritance cases. Patch by Alvaro Herrera, review by Tom Lane.
* Bring SIMILAR TO and SUBSTRING into some semblance of conformance withTom Lane2002-09-22
| | | | | | | 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.
* Move most of the error checking for foreign-key constraints out ofTom Lane2002-09-22
| | | | | | | | | | | | | | | | | | | | | | 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.
* Add last-ditch defense against attempts to compile datetime code withTom Lane2002-09-21
| | | | -ffast-math.
* Provide an upgrade strategy for dump files containing functions declaredTom Lane2002-09-21
| | | | | | | | with OPAQUE. CREATE LANGUAGE, CREATE TRIGGER, and CREATE TYPE will all accept references to functions declared with OPAQUE --- but they will issue a NOTICE, and will modify the function entries in pg_proc to have the preferred type-safe argument or result types instead of OPAQUE. Per recent pghackers discussions.
* Fix PPC s_lock operations to work correctly on multi-CPU machines.Tom Lane2002-09-21
| | | | Need 'isync' during TAS and 'sync' during S_UNLOCK.
* Performance improvement for MultiRecordFreeSpace on large relations ---Tom Lane2002-09-20
| | | | | avoid O(N^2) behavior. Problem noted and fixed by Stephen Marshall <smarshall@wsicorp.com>, with some help from Tom Lane.
* Code review for check-domain-constraints-in-COPY patch. Do correct thingTom Lane2002-09-20
| | | | | when default expression for a domain is being used. Avoid repetitive catalog lookups.
* Update regression expected results for to_char() change.Tom Lane2002-09-20
|
* Change domain patch to COERCE_IMPLICIT_CAST, per Tom.Bruce Momjian2002-09-20
|
* Fix compile error from Rod's patch.Bruce Momjian2002-09-20
|
* The patch fix bug described in TODO:Bruce Momjian2002-09-20
| | | | | | * to_char(0,'FM999.99') returns a period, to_char(1,'FM999.99') does not Karel Zak
* Tom Lane wrote:Bruce Momjian2002-09-20
| | | | | | | | | | | | | | | > I see in your recent bytea-LIKE patch > > if (datatype != BYTEAOID && pg_database_encoding_max_length() > 1) > len = pg_mbcliplen((const unsigned char *) workstr, len, len - 1); > else > len -= -1; > > Surely there's one too many minus signs in that last? Joe Conway
* This patch cleans up some of the code in src/util/adt/formatting.c,Bruce Momjian2002-09-20
| | | | | | | fixes a few minor bugs (typos, potential buffer overruns, etc.), and fixes some spelling/grammar mistakes. Neil Conway
* This patch fixes two typos in src/backend/storage/ipc/README.Bruce Momjian2002-09-20
| | | | Neil Conway
* Fixed this problem and added regression tests in domain.sql.Bruce Momjian2002-09-20
| | | | | | | | Also: - Changed header file order (alphabetical) - Changed to m = attnum - 1 in binary copy code for consistency Rod Taylor
* > I'm not sure why NDirectFileRead/NDirectFileWrite are unused at theBruce Momjian2002-09-20
| | | | | | | | | | | | | | | > moment, but they used to be used; I think the correct response is to > put back the missing counter increments, not rip out the counters. Ok, fair enough. It's worth noting that they've been broken for a while -- for example, the HashJoin counter increments were broken when you comitted r1.20 of executor/nodeHashJoin.c in May of '99. I've attached a revised patch that doesn't remove the counters (but doesn't increment them either: I'm not sure of all the places where the counter should be incremented). Neil Conway
* Tweak heap.c to refuse attempts to create table columns of standaloneTom Lane2002-09-19
| | | | | | composite types. Add a couple more lsyscache.c routines to support this, and make use of them in some other places that were doing lookups the hard way.
* Department of second thoughts: suppressing implicit casts everywhere inTom Lane2002-09-19
| | | | | | | | 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.
* Extend pg_cast castimplicit column to a three-way value; this allows usTom Lane2002-09-18
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix bug in encoding conversion map.Tatsuo Ishii2002-09-18
|
* Update Japanese README so that it reflects the changes made to theTatsuo Ishii2002-09-18
| | | | conversion function interface.
* Remove src/test/regress/sql: plpgsql-nsp-testing.sql per Joe Conway.Bruce Momjian2002-09-17
|
* Un-break duplicate_oids script.Tom Lane2002-09-17
|
* Remove retest Makefile entry because it does not compile.Bruce Momjian2002-09-16
|
* Fix for rare race-condition-like failure: if a backend receives SIGUSR2Tom Lane2002-09-16
| | | | | | | | | | (notify/SI-overrun interrupt) while it is in process of doing proc_exit, it is possible for Async_NotifyHandler() to try to start a transaction when one is already running. This leads to Asserts() or worse. I think it may only be possible to occur when frontend synchronization is lost (ie, the elog(FATAL) in SocketBackend() fires), but that is a standard occurrence after error during COPY. In any case, I have seen this failure occur during regression tests, so it is definitely possible.
* Cast functions can be immutable or stable.Peter Eisentraut2002-09-15
|
* Update obsolete comment.Tom Lane2002-09-14
|
* Cosmetic fixes from Neil Conway.Tom Lane2002-09-14
|
* Avoid overflow for large elapsed times in \timing output. PerTom Lane2002-09-14
| | | | Kenji Sugita.
* Shrink the pg_hba.conf and pg_ident.conf default files and move most of thePeter Eisentraut2002-09-14
| | | | inline documentation to the main docs.
* Translation updatesPeter Eisentraut2002-09-14
|
* Added regression test for using server side prepared statements in jdbcBarry Lind2002-09-14
| | | | | | | | | | and fixed a bug found by the regression test Modified Files: jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java Added Files: jdbc/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java
* Change Assert(len > 0) to Assert(len >= 0)Tatsuo Ishii2002-09-13
| | | | Change PG_RETURN_INT32(0) to PG_RETURN_VOID()
* Fix likely cause of rare ALTER TABLE ADD FOREIGN KEY failures ---Tom Lane2002-09-12
| | | | | don't assume relname field of a relcache entry will stay valid across lots of operations.
* Avoid misleading error message when SET/RESET target variable nameTom Lane2002-09-12
| | | | doesn't match any known variable.
* The small context diff below corrects what seems to be an oversight inBruce Momjian2002-09-12
| | | | | | | | | | | | | | | | | | fmgr.h - it's discouraged to access fcinfo directly but there is no macro to get the number of arguments passed to the function. Checking the number of arguments is often useful when you have a function which can be called like: func('arg'); func(null); func(); all mapping to the same C function. the macro has a function-like appearance to match the other PG_* macros. Lee Kindness.
* > Sean Chittenden <sean@chittenden.org> writes:Bruce Momjian2002-09-12
| | | | | | | | | | | | | | | | | | | | | | | > >>::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
* Joe Conway wrote:Bruce Momjian2002-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 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
* > BTW, clusterdb is not schema-aware and will surely fail in any databaseBruce Momjian2002-09-12
| | | | | | | | | | | | > where more than one schema is in use, because it doesn't trouble to > schema-qualify table names. Ok, the following patch should solve this concern. It also tries to connect as little times as possible (the previous one would connect one time per table plus one per database; this one connects two times per database). Alvaro Herrera
* Add sprompt.obj to Win32 makefiles.Bruce Momjian2002-09-11
|
* Add comment about sharing of sprompt.c file.Bruce Momjian2002-09-11
|
* Tweak querytree-dependency-extraction code so that columns of tablesTom Lane2002-09-11
| | | | | | | | | that are explicitly JOINed are not considered dependencies unless they are actually used in the query: mere presence in the joinaliasvars list of a JOIN RTE doesn't count as being used. The patch touches a number of files because I needed to generalize the API of query_tree_walker to support an additional flag bit, but the changes are otherwise quite small.
* Patches submitted by Kris Jurka (jurka@ejurka.com) for the following bugs:Barry Lind2002-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Properly drop tables in jdbc regression tests with cascade for 7.3 - problem with Statement.execute() and executeUpdate() not clearing binds - problem with ResultSet not correctly handling default encoding - changes to correctly support show transaction isolation level in 7.3 - changed DatabaseMetaDataTest to handle differences in FK names in 7.3 - better fix for dynamically checking server NAME data length (With the fixes above the jdbc regression tests pass on jdbc2 and jdbc3 against both a 7.2 and 7.3 server) Patchs submitted by David Wall (d.wall@computer.org): - problem with getBlob when largeobject oid is null - improvements to BlobOutputStream Patch submitted by Haris Peco (snpe@snpe.co.yu): - problem with callable statement not supporting prepared statement methods Modified Files: jdbc/org/postgresql/Driver.java.in jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java jdbc/org/postgresql/largeobject/BlobOutputStream.java jdbc/org/postgresql/largeobject/LargeObject.java jdbc/org/postgresql/test/TestUtil.java jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java jdbc/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java jdbc/org/postgresql/test/jdbc2/optional/SimpleDataSourceTest.java
* Fix portability problem (size_t != int).Tom Lane2002-09-10
|
* Powerup defaults for LC_foo GUC variables should match what main.c does.Tom Lane2002-09-10
|
* Use different sed separator for configure arguments.Peter Eisentraut2002-09-09
|
* Fixed DatabaseMetaData to correctly handle NAME size of 64Barry Lind2002-09-08
| | | | | | | | | Fixed Statement to correctly DEALLOCATE any prepared statements Modified Files: jdbc/org/postgresql/PGStatement.java jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
* Changes to documentation and the regression tests for the defaultBruce Momjian2002-09-07
| | | | | | NAMEDATALEN of 64. Kris Jurka