summaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAgeFilesLines
* Remove fixed-size literal buffer from scan.l, and repairTom Lane1999-10-182-62/+73
| | | | | | | | 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.
* Except_Intersect_Rewrite() forgot to move LIMIT info to newTom Lane1999-10-171-1/+8
| | | | topmost SELECT node after rearranging query tree.
* Change fd.c so that temp files are closed and deleted atTom Lane1999-10-171-5/+9
| | | | | | | 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?
* Remove now-dead sort modules.Tom Lane1999-10-172-1380/+0
|
* Final stage of psort reconstruction work: replace psort.c withTom Lane1999-10-176-996/+1664
| | | | | | | 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.
* Actually, nodeMergejoin shouldn't include psort.h at all...Tom Lane1999-10-171-2/+1
|
* nodeMergejoin was depending on an inclusion from psort.h...Tom Lane1999-10-161-1/+2
|
* Second phase of psort reconstruction project: add bookkeeping logic toTom Lane1999-10-164-366/+1245
| | | | | | 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.
* Check RELSEG_SIZE when postmaster starting up.Tatsuo Ishii1999-10-161-0/+10
| | | | | this is neccesary to make sure that the backend and the database uses same RELSEG_SIZE.
* This patch implements ORACLE's COMMENT SQL command.Bruce Momjian1999-10-156-16/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >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. Hope this makes the grade, Mike Mascari (mascarim@yahoo.com)
* Split 'BufFile' routines out of fd.c into a new module, buffile.c. ExtendTom Lane1999-10-137-277/+648
| | | | | | | | 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.
* I have created a small patch that makes possible to compile pgsql on newerBruce Momjian1999-10-121-3/+3
| | | | | | | | | | | 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 Dan
* Add blcksz to struct ControlFileData to check BLCKSZ is sameTatsuo Ishii1999-10-121-0/+5
| | | | as BLCKSZ which the backend was compiled in.
* The 1st step to implement new type of scan,TidScan.Hiroshi Inoue1999-10-112-5/+216
| | | | | Now WHERE restriction on ctid is allowed though it is sequentially scanned.
* Re-add mention of FAQ's for shared memory/ipc errors.Bruce Momjian1999-10-101-6/+9
|
* Allow \r as whitespace.Bruce Momjian1999-10-091-2/+2
|
* First real FOREIGN KEY constraint trigger functionality.Jan Wieck1999-10-081-12/+942
| | | | | | | | | Implemented now: FOREIGN KEY ... REFERENCES ... MATCH FULL FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE Jan
* Update display of debug levels.Bruce Momjian1999-10-082-5/+5
|
* clean up debug flags.Bruce Momjian1999-10-081-11/+3
|
* Comment cleanup.Bruce Momjian1999-10-081-3/+3
|
* Fix for "--" comment and no trailing newline, as seen in Perl.Bruce Momjian1999-10-081-2/+2
|
* Cleanup -is flag to -l for SSL. Another PERL variable name fix. CleanBruce Momjian1999-10-083-31/+27
| | | | | up debugging options for postmaster and postgres programs. postmaster -d is no longer optional. Documentation updates.
* Remove a no-longer-needed kluge for degenerate aggregate cases,Tom Lane1999-10-082-23/+12
| | | | and update some comments.
* More startup/shutdown log messages.Vadim B. Mikheev1999-10-081-10/+43
|
* Somehow missed this call to addRangeTableEntry() ...Tom Lane1999-10-071-2/+2
|
* Fix planner and rewriter to follow SQL semantics for tables that areTom Lane1999-10-0717-355/+356
| | | | | | | | | | | 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.
* Small cleanup.Vadim B. Mikheev1999-10-061-2/+6
|
* XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.Vadim B. Mikheev1999-10-0614-956/+1068
| | | | | First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit.
* Improve the treatment of partial(incomplete) blocks of relation files.Hiroshi Inoue1999-10-061-5/+22
| | | | | This may solve a TODO item * Recover or force failure when disk space is exhausted
* Don't set BootstrapProcessingMode in AddNewRelationTuple() beforeVadim B. Mikheev1999-10-061-18/+4
| | | | | heap_insert() any more. No reasons to do it, and old comments said about this.
* Allow comment-only lines, and ;;; lines too.Bruce Momjian1999-10-051-8/+19
|
* Make the rule deparser a little less quote-happy, so thatTom Lane1999-10-041-63/+147
| | | | display of default expressions isn't quite so ugly.
* Oops, DEFAULT processing wasn't doing type compatibility checkingTom Lane1999-10-041-17/+41
| | | | | | quite the same way that transformInsertStatement does, so that an expression could be accepted by CREATE TABLE and then fail when used. Also, put back check that CONSTRAINT expressions must yield boolean...
* Reimplement parsing and storage of default expressions and constraintTom Lane1999-10-0311-859/+843
| | | | | | | | | | | | | | | expressions in CREATE TABLE. There is no longer an emasculated expression syntax for these things; it's full a_expr for constraints, and b_expr for defaults (unfortunately the fact that NOT NULL is a part of the column constraint syntax causes a shift/reduce conflict if you try a_expr. Oh well --- at least parenthesized boolean expressions work now). Also, stored expression for a column default is not pre-coerced to the column type; we rely on transformInsertStatement to do that when the default is actually used. This means "f1 datetime default 'now'" behaves the way people usually expect it to. BTW, all the support code is now there to implement ALTER TABLE ADD CONSTRAINT and ALTER TABLE ADD COLUMN with a default value. I didn't actually teach ALTER TABLE to call it, but it wouldn't be much work.
* Teach parse_coerce about non-cachable functions (actually,Tom Lane1999-10-021-32/+17
| | | | make it call eval_const_expressions() so that it doesn't have to know).
* Allow CREATE FUNCTION's WITH clause to be used for all language types,Tom Lane1999-10-024-117/+105
| | | | | | | not just C, so that ISCACHABLE attribute can be specified for user-defined functions. Get rid of ParamString node type, which wasn't actually being generated by gram.y anymore, even though define.c thought that was what it was getting. Clean up minor bug in dfmgr.c (premature heap_close).
* Replace float.c's #ifdef finite check with a proper autoconf check, so itTom Lane1999-10-021-5/+5
| | | | works if finite() is a function. Patch from Christof Petig.
* Stick finger into a couple more holes in the leaky dike ofTom Lane1999-10-021-1/+16
| | | | | | | modifyAggrefQual. This routine really, really needs to be retired, but until we have subselects in FROM there's no chance of doing the job right. In the meantime try to respond to unhandlable cases with elog rather than coredump.
* Fix make_clause and make_opclause to record valid type infoTom Lane1999-10-021-20/+22
| | | | | | | in the Expr nodes they produce. This fixes a few cases of errors like 'typeidTypeRelid: Invalid type - oid = 0' caused by calling parser-related routines on expression trees that have already been processed by planner- related routines.
* Revise rule-printing routines to use expandable StringInfo buffers, so thatTom Lane1999-10-021-402/+340
| | | | | | | they have no hardwired limit on the length of a rule's text. Fix a couple of minor bugs in passing --- deparsed UPDATE queries didn't have quotes around relation name, and quotes and backslashes in constant values weren't backslash-quoted.
* Clean up rewriter routines to use expression_tree_walker andTom Lane1999-10-013-2430/+953
| | | | | | | | | | | | expression_tree_mutator rather than ad-hoc tree walking code. This shortens the code materially and fixes a fair number of sins of omission. Also, change modifyAggrefQual to *not* recurse into subselects, since its mission is satisfied if it removes aggregate functions from the top level of a WHERE clause. This cures problems with queries of the form SELECT ... WHERE x IN (SELECT ... HAVING something-using-an-aggregate), which would formerly get mucked up by modifyAggrefQual. The routine is still fundamentally broken, of course, but I don't think there's any way to get rid of it before we implement subselects in FROM ...
* Added utils/adt/ri_triggers with empty shells for theJan Wieck1999-09-303-4/+190
| | | | | | | | FOREIGN KEY triggers. Added pg_proc entries for all the new functions. Jan
* Removed (useless) pg_proc_prosrc_indexJan Wieck1999-09-303-39/+21
| | | | Jan
* Reverse out getopt patch --- turns out it doesn't help on myTom Lane1999-09-301-2/+2
| | | | | platform, and there are at least some people it's not broken for. So undo change until we can discuss a more portable solution.
* Un-break optarg() call --- some peoples' optarg librariesTom Lane1999-09-301-7/+7
| | | | don't like extraneous colons in the option list...
* Hmm, guess I forgot to commit this file the other day ...Tom Lane1999-09-301-24/+19
| | | | just some cosmetic changes now, Vadim already fixed the heap_xxx calls.
* Added nbtree operator class for NUMERICJan Wieck1999-09-291-1/+29
| | | | Jan
* Disable new FROM-clause warning.Bruce Momjian1999-09-292-2/+8
|
* This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.Jan Wieck1999-09-299-84/+1296
| | | | | | | | | | | | Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
* Add subquery mention in auto-create table entry.Bruce Momjian1999-09-282-5/+11
|