Commit Graph

16740 Commits

Author SHA1 Message Date
Michael Meskes
ea41a8cc5f - Fixed segfault due to missing check for variable declaration.
- Added check for multidimensional array usage.
2004-03-04 07:38:50 +00:00
Kris Jurka
926fd43d77 Update build number in anticipation of 7.4.2 release. With no
currently outstanding issues we'll flag now, so the release doesn't
slip out the door without it.
2004-03-04 03:25:10 +00:00
Tom Lane
f0d32c033a Always schema-qualify the name of a function referenced in CREATE CAST.
The former coding failed if the cast function was not in the pg_catalog
schema.  How'd this escape detection?
2004-03-02 21:14:59 +00:00
Tom Lane
819bfac66a Junkfilter logic to force a projection step during SELECT INTO was too
simplistic; it recognized SELECT * FROM but not SELECT * FROM LIMIT.
Per bug report from Jeff Bohmer.
2004-03-02 18:56:28 +00:00
Bruce Momjian
aff13a9714 [ backpatch]
Add missing checks for Borland C compiler.

L J Bayuk
2004-03-02 18:38:28 +00:00
Bruce Momjian
887a136572 Update Turkish FAQ, Devrim GUNDUZ 2004-03-02 15:46:34 +00:00
Bruce Momjian
fee9629cf1 Add missing sprompt.obj psql usage for Borland compiler, per private
report from krizsan.

Backpatch to 7.4.X.
2004-03-02 15:17:32 +00:00
Michael Meskes
f7a9dbce8d Added the missing rules for VOLATILE. 2004-03-02 06:52:18 +00:00
Tom Lane
44990772e0 Update release notes for 7.3.6. 2004-03-02 00:38:56 +00:00
Tom Lane
b6a7df8b29 Replace unportable use of /dev/stdin with lynx's -stdin switch. 2004-03-02 00:03:08 +00:00
Tom Lane
f91bde3fb6 make_sort_from_pathkeys()'s method for choosing which of several
equivalent sort expressions to use was broken: you can't just look
at the relation membership, you have to actually grovel over the
individual Vars in each expression.  I think this did work when it
was written, but it was broken by subsequent optimizations that made
join relations not propagate every single input variable upward.
Must find the Var that got propagated, not choose one at random.
Per bug report from Daniel O'Neill.
2004-02-29 17:36:48 +00:00
Dennis Bjorklund
02760606d1 Translation updates 2004-02-28 11:16:58 +00:00
Tom Lane
5cfb44a82e genericcostestimate() neglected to include qual startup cost in
indexTotalCost.  I think this may not make any real difference in 7.4,
but it definitely is a problem with CVS tip's new equation.
2004-02-27 21:44:44 +00:00
Tom Lane
36be19e3ed process_implied_equality must copy the substructure of the clauses it
is generating, to avoid problems when subselects are involved.  Per
report from Damon Hart.
2004-02-27 21:42:10 +00:00
Tom Lane
aed597102c anyarray really needs to be declared with typalign = 'd', so that entries
in pg_statistic are correctly aligned if they contain values that require
double alignment.  Too bad we cannot force initdb for this in 7.4 branch.
2004-02-24 22:59:22 +00:00
Michael Meskes
bc0476f9c8 - Corrected error handling in PGTYPEStimestamp_from_asc.
- Set pgtypeslib version to 1.2.
2004-02-24 16:09:16 +00:00
Kris Jurka
935e6e502d Closing a Connection or Statement object twice should be a no-op
instead of throwing an Exception.

Per report from Victor Sergienko.
2004-02-24 13:11:45 +00:00
Joe Conway
27ae96c2b6 When returning type "record", replace use of pgresultGetTupleDesc
with ReturnSetInfo->expectedDesc. This allows custom datatypes
(e.g. from tsearch2) to be returned at runtime. Previous behavior
depended on the type oid to match between the remote and local
database, which obviously doesn't work well for custom types.
Per report from Mark Gibson.
2004-02-24 06:07:34 +00:00
Joe Conway
78c97b156e Apply quote_literal to the start_with argument of connectby. Fixes problem
reported by David Garamond when working with bytea parent and child keys.
2004-02-24 05:26:07 +00:00
Tom Lane
d159c4ba4c Cause pg_dump to emit a 'SET client_encoding' command at the start of
any restore operation, thereby ensuring that dumped data is interpreted
the same way it was dumped even if the target database has a different
encoding.  Per suggestions from Pavel Stehule and others.  Also,
simplify scheme for handling check_function_bodies ... we may as well
just set that at the head of the script.
2004-02-24 03:35:45 +00:00
Tom Lane
bce5fd63fd Don't crash when a rowtype argument to a plpgsql function is NULL.
Per report from Chris Campbell.
2004-02-24 01:44:47 +00:00
Tom Lane
6b534f3c33 Replace opendir/closedir calls throughout the backend with AllocateDir
and FreeDir routines modeled on the existing AllocateFile/FreeFile.
Like the latter, these routines will avoid failing on EMFILE/ENFILE
conditions whenever possible, and will prevent leakage of directory
descriptors if an elog() occurs while one is open.
Also, reduce PANIC to ERROR in MoveOfflineLogs() --- this is not
critical code and there is no reason to force a DB restart on failure.
All per recent trouble report from Olivier Hubaut.
2004-02-23 23:03:43 +00:00
Tom Lane
95a6dbf12b Do a direct probe during postmaster startup to determine the maximum
number of openable files and the number already opened.  This eliminates
depending on sysconf(_SC_OPEN_MAX), and allows much saner behavior on
platforms where open-file slots are used up by semaphores.
2004-02-23 20:46:16 +00:00
Michael Meskes
fd7d98a271 Fixed incorrect output of indicator structs using the name of the data struct. 2004-02-23 18:14:30 +00:00
Bruce Momjian
41d9c5e067 The following bug has been logged online:
Bug reference:      1081
Logged by:          Aarjav Trivedi

Email address:      aarjav@cc.gatech.edu

PostgreSQL version: 7.4

Operating system:   Linux

Description:        Spelling error in tsearch2.sql leading to problems
with
tsearch

Details:

On line 620 of tsearch2.sql which is required to install and run
TSEARCH,

REATE FUNCTION tsstat_in(cstring)

should be

CREATE FUNCTION tsstat_in(cstring)

because of this error, TSEARCH fails to work as specified,
2004-02-21 03:48:55 +00:00
Tom Lane
8c99671a3b Implement a solution to the 'Turkish locale downcases I incorrectly'
problem, per previous discussion.  Make some additional changes to
centralize the knowledge of just how identifier downcasing is done,
in hopes of simplifying any future tweaking in this area.
2004-02-21 00:35:13 +00:00
Michael Meskes
fe92ed8b78 - Allowed some C keywords to be used as SQL column names. This used to work in 7.3.* 2004-02-15 15:40:54 +00:00
Michael Meskes
67893da1c1 - Added missing braces to array parsing.
- Set ecpg version to 3.1.1.
        - Removed that old debugging output that I forgot the last time.
2004-02-15 13:50:02 +00:00
Tom Lane
0d4c8f26ae Repair optimization bug I introduced in a moment of brain fade back in
Nov 2002: when constant-expression simplification removes all the
aggregate function calls from a query, that doesn't mean we can act as
though there never were any aggregates.  Per bug report from Gabor Szucs.
2004-02-13 22:26:43 +00:00
Bruce Momjian
3d6dabfc70 Tom Lane wrote:
> momjian@svr1.postgresql.org (Bruce Momjian) writes:
>>      someone asked me about the FK deadlock fix, mentioned in the 7.3.3
>>      release notes as 3rd change:
>>      http://www.postgresql.org/docs/current/static/release-7-3-3.html
>>      Actually, that fix was available with 7.4, not 7.3. Don't know if we can
>>      retroactively change the release-notes though.
>
> This is completely erroneous, please undo it.
>
> 2003-05-21 14:14  tgl
>
>       * src/: backend/utils/adt/ri_triggers.c,
>       test/regress/expected/foreign_key.out (REL7_3_STABLE): Back-patch
>       Jan's fix to avoid primary key lookup (and lock) if foreign key
>       does not change on UPDATE.

Oh ... didn't know that you did a backpatch. Sorry


Jan
2004-02-13 04:40:43 +00:00
Bruce Momjian
c37a75a529 Jan:
someone asked me about the FK deadlock fix, mentioned in the 7.3.3
release notes as 3rd change:

     http://www.postgresql.org/docs/current/static/release-7-3-3.html

Actually, that fix was available with 7.4, not 7.3. Don't know if we can
retroactively change the release-notes though.
2004-02-12 20:18:13 +00:00
Peter Eisentraut
f8cdde14da Translation updates 2004-02-12 19:17:41 +00:00
Bruce Momjian
29760bbdaf Properly set NEED_REENTRANT_FUNCS for threaded libpq/ecpg.
Without this patch, no thread locking or *_r functions were being used.
2004-02-11 17:32:09 +00:00
Tom Lane
18b8cb5a9e Repair missing inclusions of -lintl for shared libraries. 2004-02-10 07:26:48 +00:00
Kris Jurka
24bd490369 Don't try to turn the random bytes from a md5 salt into a String
because it may not be a valid String depending on the encoding.

Per report from Nadeem Bitar.
2004-02-10 01:58:48 +00:00
Tom Lane
2194ed88de Ensure that memcmp() does not run off the end of memory, per Kurt Roeckx.
(Same patch committed to HEAD but I fat-fingered the commit message...)
2004-02-03 17:56:04 +00:00
Kris Jurka
932001350b V3 NotificationResonse messages were trying to be received as V2
messages.  Also the PID was being read in the wrong byte order.
Finally add a test case for listen/notify.

Per report from Hans Nather.
2004-02-03 05:43:24 +00:00
Kris Jurka
d71188860e ConnectionPool and SimpleDataSource are marked Serializable, but their
superclass (which contains a number of state variables) is not.  To
correctly serialize these objects we need to manually implement
writeObject and readObject.

Per report from R. Lemos
2004-02-03 05:28:17 +00:00
Kris Jurka
1a92a4c10c ResultSet.next() and previous() incremented or decremented the
internal current_row variable regardless of wether they succeeded or
not.  This generated some ArrayIndexOutOfBoundsExceptions when the
errorneous adjustment current_row led to out of range values.

Per report from Fischer Krisztian.
2004-02-03 05:25:38 +00:00
Kris Jurka
9287630fbc Fix the setXXXStream methods. If passed a null InputStream, convert
this to a setNull call.  The code originally would try to read the
whole stream in one call to read(), but this doesn't work.  The
InputStream API makes it clear you must be prepared to loop and
continue reading if you didn't get the whole request on the first
try.

Per report from Martin Holz.
2004-02-03 05:13:56 +00:00
Kris Jurka
7ca2bff95f Newer versions of the 1.4.2 jdk give warnings about having return in a
finally clause.
2004-02-03 05:00:21 +00:00
Tom Lane
fce397ed12 Do not let external specification of CFLAGS stop us from adding
-fno-strict-aliasing.
2004-02-02 04:07:40 +00:00
Tom Lane
a8fcb748e3 Avoid generating invalid character encoding sequences in make_greater_string.
Not sure how this mistake evaded detection for so long.
2004-02-02 03:07:14 +00:00
Neil Conway
a2b5cc81df Use Tcl_PutEnv() in place of putenv() in libpgtcl, as the latter can
apparently corrupt the Tcl runtime. Per suggestion from Michael
Brusser <michael@synchronicity.com>
2004-02-02 01:00:58 +00:00
Tom Lane
871e56709d Fix text_position to not scan past end of source string in multibyte
case, per report from Korea PostgreSQL Users' Group.
2004-01-31 00:45:34 +00:00
Michael Meskes
94189c9fc9 - Fixed prototype for ECPGprepared_statement to not moan about "const char"
- Fixed parsing of nested structures.
2004-01-28 09:55:53 +00:00
Tom Lane
fd950e878c Fix oversight in check_ungrouped_columns optimization that avoids
unnecessary checks for complex grouping expressions: we cannot check
whether the expressions are simple Vars until after we apply
flatten_join_alias_vars, because in the case of FULL JOIN that routine
can introduce non-Var expressions.  Per example from Joel Knight.
2004-01-28 07:47:07 +00:00
Tom Lane
9f017115f5 simplify_function() mustn't try to evaluate functions that return
composite types, because TupleTableSlots aren't Datums and can't be
stored in Const nodes.  We can remove this restriction if we ever
adopt a cleaner runtime representation for whole-tuple results, but
at the moment it's broken.  Per example from Thomas Hallgren.
2004-01-28 00:05:25 +00:00
Tom Lane
03ef7ebafa Run stats test separately, not as part of a parallel group, to avoid
possible failures due to stats collector not updating fast enough under
heavy load.  Per report from Jeremy Yoder.
2004-01-27 00:50:52 +00:00
Tom Lane
a51d4b8dc0 Repair incorrect order of operations in GetNewTransactionId(). We must
complete ExtendCLOG() before advancing nextXid, so that if that routine
fails, the next incoming transaction will try it again.  Per trouble
report from Christopher Kings-Lynne.
2004-01-26 19:16:23 +00:00