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.
Tom Lane [Tue, 20 Feb 2001 00:28:07 +0000 (00:28 +0000)]
Remove inclusion of <varargs.h> on SunOS; this does not work since we
use the ANSI varargs style (<stdarg.h>) not the old style. Tatsuo had
reported this change was necessary back in the 7.0 beta cycle (4/13/00)
but for some reason, making the edit never got done.
Tom Lane [Mon, 19 Feb 2001 00:24:30 +0000 (00:24 +0000)]
Update example of partially constraining join order to use a subselect
in FROM instead of an auxiliary view. We didn't have subselect-in-FROM
when I wrote this originally...
Tom Lane [Sun, 18 Feb 2001 17:53:55 +0000 (17:53 +0000)]
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.
Peter Eisentraut [Sun, 18 Feb 2001 17:17:17 +0000 (17:17 +0000)]
Enhance documentation of date/time functions. Add extract, current_date,
current_time, current_timestamp. Add more examples. Remove age(), because
it doesn't work like it is documented, and no one could explain it to me.
Tom Lane [Sun, 18 Feb 2001 04:39:42 +0000 (04:39 +0000)]
Change s_lock to not use any zero-delay select() calls; these are just a
waste of cycles on single-CPU machines, and of dubious utility on multi-CPU
machines too.
Tweak s_lock_stuck so that caller can specify timeout interval, and
increase interval before declaring stuck spinlock for buffer locks and XLOG
locks.
On systems that have fdatasync(), use that rather than fsync() to sync WAL
log writes. Ensure that WAL file is entirely allocated during XLogFileInit.
Tom Lane [Sun, 18 Feb 2001 04:28:31 +0000 (04:28 +0000)]
Remove bogus set_ps_display call --- changing displayed status here is
either wrong or unnecessary in most cases, and on systems where setting
status takes a kernel call, the overhead of setting status three times
per command rather than two is annoying.
Tom Lane [Fri, 16 Feb 2001 23:50:40 +0000 (23:50 +0000)]
Just noticed that use of 'volatile' in HPPA S_UNLOCK() was causing gcc
to generate unnecessarily stupid code. Tweak macro to describe a series
of store-constant ops, not store/load/store/load/store/load/store.
Peter Mount [Fri, 16 Feb 2001 16:45:01 +0000 (16:45 +0000)]
Some more updates...
Fri Feb 17 15:11:00 GMT 2001 peter@retep.org.uk
- Reduced the object overhead in PreparedStatement by reusing the same
StringBuffer object throughout. Similarly SimpleDateStamp's are alse
reused in a thread save manner.
- Implemented in PreparedStatement: setNull(), setDate/Time/Timestamp
using Calendar, setBlob(), setCharacterStream()
- Clob's are now implemented in ResultSet & PreparedStatement!
- Implemented a lot of DatabaseMetaData & ResultSetMetaData methods.
We have about 18 unimplemented methods left in JDBC2 at the current
time.
Tom Lane [Fri, 16 Feb 2001 03:26:40 +0000 (03:26 +0000)]
Fix bugs in pltcl's new return_null command: it was liable to go belly up
if the return datatype's input converter was at all strict, because the
converter would get called on junk data when returning NULL. Also
ensure that it gives an error rather than coredumping if someone tries
to use it in a trigger function.
Tom Lane [Fri, 16 Feb 2001 03:16:58 +0000 (03:16 +0000)]
Clean up two rather nasty bugs in operator selection code.
1. If there is exactly one pg_operator entry of the right name and oprkind,
oper() and related routines would return that entry whether its input type
had anything to do with the request or not. This is just premature
optimization: we shouldn't return the single candidate until after we verify
that it really is a valid candidate, ie, is at least coercion-compatible
with the given types.
2. oper() and related routines only promise a coercion-compatible result.
Unfortunately, there were quite a few callers that assumed the returned
operator is binary-compatible with the given datatype; they would proceed
to call it without making any datatype coercions. These callers include
sorting, grouping, aggregation, and VACUUM ANALYZE. In general I think
it is appropriate for these callers to require an exact or binary-compatible
match, so I've added a new routine compatible_oper() that only succeeds if
it can find an operator that doesn't require any run-time conversions.
Callers now call oper() or compatible_oper() depending on whether they are
prepared to deal with type conversion or not.
The upshot of these bugs is revealed by the following silliness in PL/Tcl's
selftest: it creates an operator @< on int4, and then tries to use it to
sort a char(N) column. The system would let it do that :-( (and evidently
has done so since 6.3 :-( :-(). The result in this case was just a silly
sort order, but the reverse combination would've provoked coredump from
trying to dereference integers. With this fix you get more reasonable
behavior:
pltcl_test=# select * from T_pkey1 order by key1, key2 using @<;
ERROR: Unable to identify an operator '@<' for types 'bpchar' and 'bpchar'
You will have to retype this query using an explicit cast
Hiroshi Inoue [Fri, 16 Feb 2001 03:10:09 +0000 (03:10 +0000)]
Add casting for numeric/float4/float8 type value
automatically to compensate the lack of automatic
conversion functionality of PostgreSQL server.
For example if there's a numeric type binding
1.2567 --> 1.2567::numeric.
I hope this change would enable the use of numeric
type in MS-Access etc.