Tom Lane [Tue, 16 Jul 2002 17:48:46 +0000 (17:48 +0000)]
Add initdb code to set up initial contents of pg_depend, pinning all
objects created during initdb (except for the system views, which I
think do not need to be pinned).
Bruce Momjian [Tue, 16 Jul 2002 17:05:46 +0000 (17:05 +0000)]
> pgsql-bugs@postgresql.org wrote:
> > David Clark (dclarknospam@opsi.co.za) reports a bug with a severity
> > Table 3-7 SQL Literal escaped octets shows the input escape
> > representation for a single quote as '\\'' , but the third paragraph
> > below table 3-8 SQL Output Escaped Octets says that the single quote
> > must be input as '\''
>
> Nice catch. '\'' is correct as shown in the example in Table 3-7.
>
> >
> > Also in the same paragraph mentioned above it says input for the
> > single quote must be '\'' (or '\\134') shouldn't this be (or '\\047')
>
> Also a bug. Should be '\\047', as you pointed out.
>
Here's a patch to fix the binary string doc errors.
Tom Lane [Tue, 16 Jul 2002 05:53:34 +0000 (05:53 +0000)]
Add code to extract dependencies from an expression tree, and use it
to build dependencies for rules, constraint expressions, and default
expressions. Repair some problems in the original design of
recursiveDeletion() exposed by more complex dependency sets. Fix
regression tests that were deleting things in illegal sequences.
Bruce Momjian [Tue, 16 Jul 2002 00:51:37 +0000 (00:51 +0000)]
This fixes 2 inaccuracies in the recently added SQL99 feature list docs.
UNIQUE and DISTINCT predicates are both listed as implemented -- AFAIK,
neither is.
I also included another trivial patch which adds the default location
of the DSSSL stylesheets on my system (Debian unstable, docbook-dsssl
1.76) to the list of paths that configure looks for.
Tom Lane [Mon, 15 Jul 2002 16:33:32 +0000 (16:33 +0000)]
Use the dependency mechanism to manage column defaults. We need this
so that dependencies in default expressions (on operators, functions,
etc) can be expressed properly.
Tom Lane [Sun, 14 Jul 2002 23:38:13 +0000 (23:38 +0000)]
Add COMMENT ON CONSTRAINT facility (from Rod Taylor's pg_constraint patch).
Fix comment.c to not depend on parser token values, per discussion awhile
back.
Tom Lane [Sun, 14 Jul 2002 21:08:08 +0000 (21:08 +0000)]
In DeleteAttributeTuples, use a single indexscan instead of the multiple
scans that will most likely be caused by SearchSysCache probes. Also,
share some code between index deletion and table deletion.
Tom Lane [Sat, 13 Jul 2002 19:20:34 +0000 (19:20 +0000)]
Fix testing of partial-index predicates to work correctly in cases where
varno of index's relation is not 1. This embarrassing oversight pointed
out by Dmitry Tkach 12-Jul-02.
Bruce Momjian [Sat, 13 Jul 2002 02:42:16 +0000 (02:42 +0000)]
Mark as done, per Rod:
> o -Add ALTER TABLE DROP non-CHECK CONSTRAINT
> * -Allow psql \d to show foreign keys
> * -Auto-destroy sequence on DROP of table with SERIAL; perhaps a separate
> * -Prevent column dropping if column is used by foreign key
> * -Automatically drop constraints/functions when object is dropped
> * -Make foreign key constraints clearer in dump file
> * -Make foreign keys easier to identify
Tom Lane [Fri, 12 Jul 2002 18:43:19 +0000 (18:43 +0000)]
Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
constraints all have real live entries in pg_constraint. pg_depend
exists, and RESTRICT/CASCADE options work on most kinds of DROP;
however, pg_depend is not yet very well populated with dependencies.
(Most of the ones that are present at this point just replace formerly
hardwired associations, such as the implicit drop of a relation's pg_type
entry when the relation is dropped.) Need to add more logic to create
dependency entries, improve pg_dump to dump constraints in place of
indexes and triggers, and add some regression tests.
Dave Cramer [Fri, 12 Jul 2002 13:07:48 +0000 (13:07 +0000)]
Changed getCrossReference to return information about each composite key seperately
It used to return them as a,b in one row, and now returns
a in one row, and b in one row
Add new CREATE CONVERSION/DROP CONVERSION command.
This is the first cut toward CREATE CONVERSION/DROP CONVERSION implementaion.
The commands can now add/remove tuples to the new pg_conversion system
catalog, but that's all. Still need work to make them actually working.
Documentations, regression tests also need work.
Barry Lind [Fri, 5 Jul 2002 18:50:27 +0000 (18:50 +0000)]
fixed bug reported by Michael, Dietrich (mdt@emdete.de) where a large object handle was being used after the end of the transaction and thus resulting in an error.
Add a few new lines to display recently added fields in the ControlFile
structure.
Now includes the following new fields:
integer/float date/time storage
maximum length of names (+1; they must also include a null termination)
maximum number of function arguments
maximum length of locale name
Implement the IS DISTINCT FROM operator per SQL99.
Reused the Expr node to hold DISTINCT which strongly resembles
the existing OP info. Define DISTINCT_EXPR which strongly resembles
the existing OPER_EXPR opType, but with handling for NULLs required
by SQL99.
We have explicit support for single-element DISTINCT comparisons
all the way through to the executor. But, multi-element DISTINCTs
are handled by expanding into a comparison tree in gram.y as is done for
other row comparisons. Per discussions, it might be desirable to move
this into one or more purpose-built nodes to be handled in the backend.
Define the optional ROW keyword and token per SQL99.
This allows single-element row constructs, which were formerly disallowed
due to shift/reduce conflicts with parenthesized a_expr clauses.
Define the SQL99 TREAT() function. Currently, use as a synonym for CAST().
Bruce Momjian [Thu, 4 Jul 2002 03:04:55 +0000 (03:04 +0000)]
Document function args are required for pg_restore -P.
Fix pg_dump to not quote the function name in the storage tag.
Fix pg_dump so GRANT/REVOKE(ACL) tag entries are not quoted, for
consistency.
Fix pg_restore to properly handle quotes and some spaces in -P.
Tom Lane [Wed, 3 Jul 2002 16:47:46 +0000 (16:47 +0000)]
Fix some more boundary-case errors in psql variable substitution:
wasn't really right for case where :var is at the end of the line,
was definitely not right if var expanded to empty in that case,
and failed to recalculate thislen before jumping back to rescan.
Bruce Momjian [Tue, 2 Jul 2002 06:18:57 +0000 (06:18 +0000)]
>the extra level of struct naming for pd_opaque has no obvious
>usefulness.
>
>> [...] should I post a patch that puts pagesize directly into
>> PageHeaderData?
>
>If you're so inclined. Given that pd_opaque is hidden in those macros,
>there wouldn't be much of any gain in readability either, so I haven't
>worried about changing the declaration.
Thanks for the clarification. Here is the patch. Not much gain, but at
least it saves the next junior hacker from scratching his head ...
Bruce Momjian [Tue, 2 Jul 2002 05:48:44 +0000 (05:48 +0000)]
There already was a macro PageGetItemId; this is now used in (almost)
all places, where pd_linp is accessed. Also introduce new macros
SizeOfPageHeaderData and BTMaxItemSize. This is just source code
cosmetic, no behaviour changed.
Bruce Momjian [Tue, 2 Jul 2002 05:47:37 +0000 (05:47 +0000)]
Minor code cleanup in bufmgr.c and bufmgr.h, mainly by moving repeated
lines of code into internal routines (drop_relfilenode_buffers,
release_buffer) and by hiding unused routines (PrintBufferDescs,
PrintPinnedBufs) behind #ifdef NOT_USED. Remove AbortBufferIO()
declaration from bufmgr.c (already declared in bufmgr.h)
Bruce Momjian [Tue, 2 Jul 2002 05:46:14 +0000 (05:46 +0000)]
This patch, which is built upon the "HeapTupleHeader accessor macros"
patch from 2002-06-10, is supposed to reduce the heap tuple header size
by four bytes on most architectures. Of course it changes the on-disk
tuple format and therefore requires initdb.
This overlays cmin/cmax/xmax fields into only two fields.
Tom Lane [Mon, 1 Jul 2002 15:27:56 +0000 (15:27 +0000)]
First phase of applying Rod Taylor's pg_depend patch. This just adds
RESTRICT/CASCADE syntax to the DROP commands that need it, and propagates
the behavioral option through the parser to the routines that execute
drops. Doesn't do anything useful yet, but I figured I'd commit these
changes so I could get out of the parser area while working on the rest.
Michael Meskes [Sun, 30 Jun 2002 09:34:14 +0000 (09:34 +0000)]
Committing parser changes. Note, however, that the development bison seems ot have a problem on my home machine. So these go in untested for the time being. But at least I have them in the archive.
Bruce Momjian [Wed, 26 Jun 2002 21:58:56 +0000 (21:58 +0000)]
The attached patch fixes some spelling mistakes, makes the
comments on one of the optimizer functions a lot more
clear, adds a summary of the recent KSQO discussion to the
comments in the code, adds regression tests for the bug with
sequence state Tom fixed recently and another reg. test, and
removes some PostQuel legacy stuff: ExecAppend -> ExecInsert,
ExecRetrieve -> ExecSelect, etc.