Tom Lane [Thu, 8 Mar 2001 00:24:34 +0000 (00:24 +0000)]
Modify wchar conversion routines to not fetch the next byte past the end
of a counted input string. Marinos Yannikos' recent crash report turns
out to be due to applying pg_ascii2wchar_with_len to a TEXT object that
is smack up against the end of memory. This is the second just-barely-
reproducible bug report I have seen that traces to some bit of code
fetching one more byte than it is allowed to. Let's be more careful
out there, boys and girls.
While at it, I changed the code to not risk a similar crash when there
is a truncated multibyte character at the end of an input string. The
output in this case might not be the most reasonable output possible;
if anyone wants to improve it further, step right up...
Tom Lane [Wed, 7 Mar 2001 21:20:26 +0000 (21:20 +0000)]
Repair a number of places that didn't bother to check whether PageAddItem
succeeds or not. Revise rtree page split algorithm to take care about
making a feasible split --- ie, will the incoming tuple actually fit?
Failure to make a feasible split, combined with failure to notice the
failure, account for Jim Stone's recent bug report. I suspect that
hash and gist indices may have the same type of bug, but at least now
we'll get error messages rather than silent failures if so. Also clean
up rtree code to use Datum rather than char* where appropriate.
Bruce Momjian [Wed, 7 Mar 2001 16:18:08 +0000 (16:18 +0000)]
> Applied. Thanks.
One more :)) It's for improper function argumets for
PLTCL_UNKNOWN_SUPPORT code
I'm not an autoconf expert, but is it possible to enable unknown
support in pltcl with configure option ?
This support is really handy for real life usage of pl/tcl.
Peter Mount [Tue, 6 Mar 2001 12:04:46 +0000 (12:04 +0000)]
Tue Mar 06 12:05:00 GMT 2001 peter@retep.org.uk
- Removed org.postgresql.xa.Test from the JDBC EE driver as it's an old
test class and prevented it from compiling.
Philip Warner [Tue, 6 Mar 2001 04:08:04 +0000 (04:08 +0000)]
- Only disable triggers in DataOnly (or implied data-only) restores.
- Change -U option to -L to allow -U to specify username in future.\7f (pg_restore)
Bruce Momjian [Mon, 5 Mar 2001 18:42:57 +0000 (18:42 +0000)]
I'm attaching those diffs for the Reference Guide in a tar file, as
not all of them attached properly in the post I made a few minutes
ago. Please disregard those earlier files. The diffs in the tar file
replace them.
Peter Mount [Mon, 5 Mar 2001 09:40:02 +0000 (09:40 +0000)]
Ok, I've split todays commit into three, the first two already done had some
bits in JDBC & the first set of tools into contrib.
This is the third, and deals with enabling JDBC to be compiled with the main
source.
What it does is add a new option to configure: --with-java
This option tells configure to look for ant (our build tool of choice) and
if found, it then compiles both the JDBC driver and the new tools as part
of the normal make.
Also, when the postgresql install is done, all the .jar files are also
installed into the ${PGLIB}/java directory (thought best to keep then separate)
Now I had some conflicts when this applied so could someone please double check
that everything is ok?
Incrementing version number in preparation for next release. Note that I
am talking with Thomas Lockhart about the idea of bringing the PyGreSQL
version number into alignment with PostgreSQL so this may change to 7.1
before the release.
I have added to the copyright to indicate that from now on the PostgreSQL
copyright will apply. If someone wants to make that clearer please do.
The existing copyrights need to stay there for now but if necessary I can
ask Pascal Andre if he agrees to a different wording.
Added reference to the Python DB-API 2.0 compliant API wrapper.
Tom Lane [Tue, 27 Feb 2001 22:07:34 +0000 (22:07 +0000)]
Tweak portal (cursor) code so that it will not call the executor again
when user does another FETCH after reaching end of data, or another
FETCH backwards after reaching start. This is needed because some plan
nodes are not very robust about being called again after they've already
returned NULL; for example, MergeJoin will crash in some states but not
others. While the ideal approach would be for them all to handle this
correctly, it seems foolish to assume that no such bugs would creep in
again once cleaned up. Therefore, the most robust answer is to prevent
the situation from arising at all.
Tom Lane [Tue, 27 Feb 2001 20:34:10 +0000 (20:34 +0000)]
Mark new text<->date, text<->time, text<->timetz conversion functions as
noncachable, so that CURRENT_DATE and CURRENT_TIME work as functions
again, rather than being collapsed to constants immediately. Marking the
reverse conversions noncachable might be overkill, but I'm not sure;
do these datatypes have the notion of a CURRENT value? Better safe than
sorry, for now.
Tatsuo Ishii [Mon, 26 Feb 2001 05:15:48 +0000 (05:15 +0000)]
Allow pgaccess to input Japanese. See included mail.
Subject: [HACKERS] pgaccess Japanese input capability patch
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: teo@flex.ro Cc: pgsql-hackers@postgresql.org, pgsql-interfaces@postgresql.org
Date: Sat, 24 Feb 2001 21:41:14 +0900
Hi Teodorescu,
I have made patches which enable pgaccess to input Japanese characters
in the table editing window. As you might know, to input Japanese
characters, we first type in "hiragana" then convert it to "kanji". To
make this proccess transparent to tcl application programs, libraries
are provided with localized version of Tcl/Tk. The patches bind
certain keys to initiate a function (kanjiInput) that is responsible
for the conversion process. If the function is not available, those
keys will not be binded.
Tom Lane [Mon, 26 Feb 2001 00:50:08 +0000 (00:50 +0000)]
Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur
only if at least N other backends currently have open transactions. This
is not a great deal of intelligence about whether a delay might be
profitable ... but it beats no intelligence at all. Note that the default
COMMIT_DELAY is still zero --- this new code does nothing unless that
setting is changed.
Also, mark ENABLEFSYNC as a system-wide setting. It's no longer safe to
allow that to be set per-backend, since we may be relying on some other
backend's fsync to have synced the WAL log.
Tom Lane [Sat, 24 Feb 2001 22:42:45 +0000 (22:42 +0000)]
At least on HPUX, select with delay.tv_sec = 0 and delay.tv_usec = 1000000
does not lead to a one-second delay, but to an immediate EINVAL failure.
This causes CHECKPOINT to crash with s_lock_stuck much too quickly :-(.
Fix by breaking down the requested wait div/mod 1e6.
Tom Lane [Sat, 24 Feb 2001 02:04:51 +0000 (02:04 +0000)]
When under postmaster, bogus arguments should cause proc_exit(0) not
proc_exit(1). Unless you think a system-wide restart is an appropriate
response to bogus PGOPTIONS, that is.
Tom Lane [Fri, 23 Feb 2001 22:52:32 +0000 (22:52 +0000)]
Fix pg_dump crashes caused by bogus use of va_start/va_end (only seen
on some platforms, which is not too surprising considering how platform
specific these macros must be).
Bruce Momjian [Fri, 23 Feb 2001 20:38:35 +0000 (20:38 +0000)]
I had a need to read such things as the backend locale and the catalog
version number from the current database, and couldn't find any existing
program to do that.
linda:~$ pg_controldata
Log file id: 0
Log file segment: 5
Last modified: Wed Feb 7 19:35:47 2001
Database block size: 8192
Blocks per segment of large relation: 131072
Catalog version number: 200101061
LC_COLLATE: en_GB
LC_CTYPE: en_GB
Log archive directory:
Tom Lane [Fri, 23 Feb 2001 20:12:37 +0000 (20:12 +0000)]
As long as we're fixing this space calculation, let's actually do it
right. We should MAXALIGN the individual items because we'll
allocate them individually, not as an array.
Bruce Momjian [Fri, 23 Feb 2001 18:28:46 +0000 (18:28 +0000)]
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Is there one LOCKMETHODCTL for every backend? I thought there was only
> one of them.
>>
>> You're right, that line is erroneous; it should read
>>
>> size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL));
>>
>> Not a significant error but it should be changed for clarity ...
Bruce Momjian [Thu, 22 Feb 2001 15:33:14 +0000 (15:33 +0000)]
The attachement is the Chinese (GB) patch for PgAccess, don't know
if it's correct to post here.
It's simple to do the translation, And I've test in 7.0.2 & current CVS,
seems pretty good.
If anyone want this little thing, I'll very happy.
use it is very simple, just gunzip it and copy to
$PGDIR/share/pgaccess/lib/languages/ for current CVS version,
and $PGDIR/pgaccess/lib/languages/ for 7.0*
BTW: I havn't got the tools to translate it to BIG5 encoding, is there
anybody to to it?
Tom Lane [Wed, 21 Feb 2001 18:53:47 +0000 (18:53 +0000)]
Change case-folding of keywords to conform to SQL99 and fix misbehavior
in Turkish locale. Keywords are now checked under pure ASCII case-folding
rules ('A'-'Z'->'a'-'z' and nothing else). However, once a word is
determined not to be a keyword, it will be case-folded under the current
locale, same as before. See pghackers discussion 20-Feb-01.
Tom Lane [Tue, 20 Feb 2001 20:37:13 +0000 (20:37 +0000)]
Clean out any old versions of no-longer-installed header files that may
be lurking in the install target directory. But don't zap up-to-date
headers (so install-all-headers before regular install will work).
Per suggestion from Larry Rosenman.