Tom Lane [Mon, 18 Oct 1999 03:32:29 +0000 (03:32 +0000)]
Drive a stake through the heart of the last use of MAX_PARSE_BUFFER
in the backend. Still a few stragglers, but we're getting closer to
being rid of query length limits...
Tom Lane [Mon, 18 Oct 1999 02:42:31 +0000 (02:42 +0000)]
Remove fixed-size literal buffer from scan.l, and repair
boundary-condition bug in myinput() which caused flex scanner to fail
on tokens larger than a bufferload. Turns out flex doesn't want null-
terminated input ... and if it gives you a 1-character buffer, you'd
better supply a character, not a null, lest you be thought to be
reporting end of input.
Tom Lane [Sun, 17 Oct 1999 23:09:02 +0000 (23:09 +0000)]
Change fd.c so that temp files are closed and deleted at
proc_exit time. I discovered that if the frontend closes the connection
when you're inside a transaction block, there is nothing ensuring that
temp files go away ... I wonder whether proc_exit ought to try to do an
explicit transaction abort?
Tom Lane [Sun, 17 Oct 1999 22:15:09 +0000 (22:15 +0000)]
Final stage of psort reconstruction work: replace psort.c with
a generalized module 'tuplesort.c' that can sort either HeapTuples or
IndexTuples, and is not tied to execution of a Sort node. Clean up
memory leakages in sorting, and replace nbtsort.c's private implementation
of mergesorting with calls to tuplesort.c.
Tom Lane [Sat, 16 Oct 1999 19:49:28 +0000 (19:49 +0000)]
Second phase of psort reconstruction project: add bookkeeping logic to
recycle storage within sort temp file on a block-by-block basis. This
reduces peak disk usage to essentially just the volume of data being
sorted, whereas it had been about 4x the data volume before.
Bruce Momjian [Fri, 15 Oct 1999 01:49:49 +0000 (01:49 +0000)]
This patch implements ORACLE's COMMENT SQL command.
>From the ORACLE 7 SQL Language Reference Manual:
-----------------------------------------------------
COMMENT
Purpose:
To add a comment about a table, view, snapshot, or
column into the data dictionary.
Prerequisites:
The table, view, or snapshot must be in your own
schema
or you must have COMMENT ANY TABLE system privilege.
Syntax:
COMMENT ON [ TABLE table ] |
[ COLUMN table.column] IS 'text'
You can effectively drop a comment from the database
by setting it to the empty string ''.
-----------------------------------------------------
Example:
COMMENT ON TABLE workorders IS
'Maintains base records for workorder information';
COMMENT ON COLUMN workorders.hours IS
'Number of hours the engineer worked on the task';
to drop a comment:
COMMENT ON COLUMN workorders.hours IS '';
The current patch will simply perform the insert into
pg_description, as per the TODO. And, of course, when
the table is dropped, any comments relating to it
or any of its attributes are also dropped. I haven't
looked at the ODBC source yet, but I do know from
an ODBC client standpoint that the standard does
support the notion of table and column comments.
Hopefully the ODBC driver is already fetching these
values from pg_description, but if not, it should be
trivial.
Tom Lane [Wed, 13 Oct 1999 15:02:32 +0000 (15:02 +0000)]
Split 'BufFile' routines out of fd.c into a new module, buffile.c. Extend
BufFile so that it handles multi-segment temporary files transparently.
This allows sorts and hashes to work with data exceeding 2Gig (or whatever
the local limit on file size is). Change psort.c to use relative seeks
instead of absolute seeks for backwards scanning, so that it won't fail
when the data volume exceeds 2Gig.
Bruce Momjian [Wed, 13 Oct 1999 02:26:37 +0000 (02:26 +0000)]
BLOBs containing NUL characters (ASCII 0) can be written to the
database, but they get truncated at the first NUL by lo_read
when they are read back. The reason for this is that lo_read in
Pg.xs is using the default:
OUTPUT:
RETVAL
buf
which uses C's strlen() to work out the length of the scalar.
The code ought to read something more like:
OUTPUT:
RETVAL
buf sv_setpvn((SV*)ST(2), buf, RETVAL);
I am not sure if this needs to be done on both lo_read methods
in this file, but I changed both and have not since had any
problems with truncated BLOBs.
Bruce Momjian [Tue, 12 Oct 1999 14:54:28 +0000 (14:54 +0000)]
I have created a small patch that makes possible to compile pgsql on newer
Cygwin snapshots (tested on 990115 which is recommended to use - it fixes
some errors in B20.1)
And I have another patch for including <sys/ipc.h> before <sys/sem.h> in
backend/storage/lmgr/proc.c - it is required due the design of cygipc
headers
Add DEC and SESSION_USER as reserved words.
Move around a few other keywords which were not in the right category.
DEC and SESSION_USER are not yet committed to gram.y,
since I'm in the middle of working on JOIN syntax too.
Bruce Momjian [Fri, 8 Oct 1999 04:28:57 +0000 (04:28 +0000)]
Cleanup -is flag to -l for SSL. Another PERL variable name fix. Clean
up debugging options for postmaster and postgres programs. postmaster
-d is no longer optional. Documentation updates.
Tom Lane [Thu, 7 Oct 1999 04:23:24 +0000 (04:23 +0000)]
Fix planner and rewriter to follow SQL semantics for tables that are
mentioned in FROM but not elsewhere in the query: such tables should be
joined over anyway. Aside from being more standards-compliant, this allows
removal of some very ugly hacks for COUNT(*) processing. Also, allow
HAVING clause without aggregate functions, since SQL does. Clean up
CREATE RULE statement-list syntax the same way Bruce just fixed the
main stmtmulti production.
CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules;
you will have to initdb if you have any rules.
XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
First step in cleaning up backend initialization code.
Fix for FATAL: now FATAL is ERROR + exit.
Hiroshi Inoue [Wed, 6 Oct 1999 06:38:04 +0000 (06:38 +0000)]
Improve the treatment of partial(incomplete) blocks of relation files.
This may solve a TODO item
* Recover or force failure when disk space is exhausted
Bruce Momjian [Wed, 6 Oct 1999 03:00:16 +0000 (03:00 +0000)]
CmdTuples() returns an int showing the number of affected tuples after an
insert, update or delete. It will return -1 on error, although I've yet
to an error situation to prove that out!