Tom Lane [Wed, 9 Jan 2002 23:38:06 +0000 (23:38 +0000)]
Describe type casts under the heading of Value Expressions, and explain
the difference between a run-time type cast and casting a literal string
to a specific type. Minor editorial work in same area.
Tom Lane [Mon, 7 Jan 2002 16:33:00 +0000 (16:33 +0000)]
Tweak LWLock algorithms so that an awakened waiter for a lock is not
granted the lock when awakened; the signal now only means that the lock
is potentially available. The waiting process must retry its attempt
to get the lock when it gets to run. This allows the lock releasing
process to re-acquire the lock later in its timeslice. Since LWLocks
are usually held for short periods, it is possible for a process to
acquire and release the same lock many times in a timeslice. The old
spinlock-based implementation of these locks allowed for that; but the
original coding of LWLock would force a process swap for each acquisition
if there was any contention. Although this approach reopens the door to
process starvation (a waiter might repeatedly fail to get the lock),
the odds of that being a big problem seem low, and the performance cost
of the previous approach is considerable.
Tom Lane [Sun, 6 Jan 2002 21:40:02 +0000 (21:40 +0000)]
If we fail to fork a new backend process, (try to) report the failure
to the client before closing the connection. Before 7.2 this was done
correctly, but new code would simply close the connection with no report
to the client.
Bruce Momjian [Sun, 6 Jan 2002 17:54:14 +0000 (17:54 +0000)]
Remove ecpg TODO section:
> Looking at this I also found an ecpg TODO list in the docs:
>
>
http://candle.pha.pa.us/main/writings/pgsql/sgml/ecpg-develop.html
>
> Seems that TODO section should be removed. Some items are done,
others
> are on the main TODO list.
That's correct. I did not fix the docs for quite some time.
Barry Lind [Sat, 5 Jan 2002 22:26:23 +0000 (22:26 +0000)]
Bugfix for bug reported by Marcus Better (marcus@dactylis.com). When preforming
a get on a bytea value the code was running the raw value from the server
through character set conversion, which if the character set was SQL_ASCII
would cause all 8bit characters to become ?'s.
Bruce Momjian [Fri, 4 Jan 2002 21:32:28 +0000 (21:32 +0000)]
Re-order items:
> * Consider use of open/fctl(O_DIRECT) to minimize OS caching
> * Make blind writes go through the file descriptor cache 391d392
< * Make blind writes go through the file descriptor cache 409d409
< * Consider use of open/fctl(O_DIRECT) to minimize OS caching
Add more complete details on date/time keywords and parsing rules.
Move some tabular information on these from the chapter on data types to
the appendix on dates and times.
Have to_date() call timestamptz_date() per Karel's email instructions.
Fixes time zone problems introduced by Thomas' implementation of
TIMESTAMP WITHOUT TIME ZONE which caused the behavior of the previously
appropriate routine, timestamp_date(), to change for the worse in this
context.
Tom Lane [Thu, 3 Jan 2002 23:21:32 +0000 (23:21 +0000)]
Require ownership permission for CREATE INDEX, per bug report.
Disallow CREATE INDEX on system catalogs, non-tables (views, sequences, etc).
Disallow CREATE/DROP TRIGGER on system catalogs, non-tables.
Disallow ALTER TABLE ADD/DROP CONSTRAINT on system catalogs.
Disallow FOREIGN KEY reference to non-table.
None of these things can actually work in the present system structure,
but the code was letting them pass without complaint.
Tom Lane [Thu, 3 Jan 2002 21:52:05 +0000 (21:52 +0000)]
Instead of waiting a fixed amount of time for the test postmaster to
start up, wait until a psql connection attempt succeeds. Per gripe
from Jason Tishler.
Bruce Momjian [Thu, 3 Jan 2002 07:21:48 +0000 (07:21 +0000)]
> > On Fri, Dec 21, 2001 at 11:43:21AM +0800, Christopher Kings-Lynne
wrote:
> > > Just testing pgcrypto on freebsd/alpha. I get some warnings:
> > They should be harmless, although I should fix them.
>
> The actual code is:
>
> if ((dlen & 15) || (((unsigned) res) & 3))
> return -1;
> Hard to imagine how (uint *) & 3 makes any sense, unless res isn't
> always a (uint8 *). Is that true?
At some point it was casted to (uint32*) so I wanted to be sure its ok.
ATM its pointless. Please apply the following patch.
Tom Lane [Wed, 2 Jan 2002 22:09:23 +0000 (22:09 +0000)]
Fix to_timestamp/to_date so that zero year input for Y, YY, or YYY
formats will be taken as 2000, not year zero. Per bug report from
Aasmund Midttun Godal. Fix from Karel Zak.
Tom Lane [Wed, 2 Jan 2002 00:41:26 +0000 (00:41 +0000)]
Fix incorrect description of rowtype variable declarations. Eventually
(IMHO) the code should be fixed to do what the documentation formerly
claimed, and then revert this change.
Tom Lane [Tue, 1 Jan 2002 23:16:22 +0000 (23:16 +0000)]
Do not accept interrupts in RESUME_INTERRUPTS() and END_CRIT_SECTION()
macros, but only at explicit CHECK_FOR_INTERRUPTS() calls. Not clear
whether overenthusiastic acceptance of interrupts accounts for any real
bugs, but it definitely seems risky and unnecessary.
Tom Lane [Tue, 1 Jan 2002 20:32:37 +0000 (20:32 +0000)]
Fix race condition that could allow two concurrent transactions
to insert the same key into a supposedly unique index. The bug is of
low probability, and may not explain any of the recent reports of
duplicated rows; but a bug is a bug.
Tom Lane [Sun, 30 Dec 2001 23:09:42 +0000 (23:09 +0000)]
Make sure that all <ctype.h> routines are called with unsigned char
values; it's not portable to call them with signed chars. I recall doing
this for the last release, but a few more uncasted calls have snuck in.
Document the precision arguments for date/time types per SQL9x.
Update the list of recognized time zones.
Document the range of arguments allowed for SET TIME ZONE.
Still need to add info on other date/time symbols (e.g. "AM", "T")
and to freshen the docs on the date/time parsing rules.
Rework the date/time parsing to tighten up some cases and to enable other
cases which should have worked but did not.
Now supports julian day (J2452271), ISO time labels (T040506) and various
combinations of spaces and run-togethers of dates, times, and time zones.
All regression tests pass, and I have more tests to add after the 7.2
release (don't want to require changes to the ancillary horology result
files until after then).