Commit Graph

5034 Commits

Author SHA1 Message Date
Bruce Momjian 9dcd8c528f More more liszt language code, so remove it from pg_language. 1999-10-06 18:20:31 +00:00
Hiroshi Inoue 9df8ced9d1 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
1999-10-06 06:38:04 +00:00
Vadim B. Mikheev 66fbea5041 Don't set BootstrapProcessingMode in AddNewRelationTuple() before
heap_insert() any more. No reasons to do it, and old comments
said about this.
1999-10-06 03:08:46 +00:00
Bruce Momjian 56ba75cb53 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!


Vince
1999-10-06 03:00:16 +00:00
Bruce Momjian 00c85b44b8 Allow comment-only lines, and ;;; lines too. 1999-10-05 18:14:31 +00:00
Bruce Momjian d0741fb42f As we now use lipq++.H which wasn't around when I first posted the
2 line GetIsNull diffs, we now need this too:

Patrick Welche
1999-10-04 15:17:06 +00:00
Tom Lane 0655b1500f Less noisy rule display... 1999-10-04 04:38:46 +00:00
Tom Lane 3e21ecbbe6 Make the rule deparser a little less quote-happy, so that
display of default expressions isn't quite so ugly.
1999-10-04 04:37:23 +00:00
Tom Lane 7cd67c800a Oops, DEFAULT processing wasn't doing type compatibility checking
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...
1999-10-04 02:12:26 +00:00
Tom Lane eabc714a91 Reimplement parsing and storage of default expressions and constraint
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.
1999-10-03 23:55:40 +00:00
Bruce Momjian f29ccc8270 autoconf 1999-10-03 18:24:03 +00:00
Bruce Momjian c70c4e367d I hope this is what you had in mind:
--enable-debug adds -g (unconditionally)
--disable-debug removes -g (if it was already in there somehow)
(giving neither does nothing)

Since none of the templates default CFLAGS with a -g you're not likely
to
end up with two -g flags. Not that they'd hurt though.

It doesn't do anything about C++.

Peter Eisentraut
1999-10-03 18:05:04 +00:00
Tom Lane b40ac42efb Teach parse_coerce about non-cachable functions (actually,
make it call eval_const_expressions() so that it doesn't have to know).
1999-10-02 23:29:19 +00:00
Tom Lane 6eb8d255d2 Allow CREATE FUNCTION's WITH clause to be used for all language types,
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).
1999-10-02 21:33:33 +00:00
Tom Lane 1f122a7c4c Replace float.c's #ifdef finite check with a proper autoconf check, so it
works if finite() is a function.  Patch from Christof Petig.
1999-10-02 17:45:31 +00:00
Tom Lane 54204e6c78 Stick finger into a couple more holes in the leaky dike of
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.
1999-10-02 04:42:04 +00:00
Tom Lane fc43696d1a Fix make_clause and make_opclause to record valid type info
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.
1999-10-02 04:37:52 +00:00
Tom Lane cd243d27ce Revise rule-printing routines to use expandable StringInfo buffers, so that
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.
1999-10-02 01:08:05 +00:00
Tom Lane 389af07cf0 Clean up rewriter routines to use expression_tree_walker and
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 ...
1999-10-01 04:08:24 +00:00
Jan Wieck ce1f5ed547 Fixed opr_sanity regression test to ignore the new
RI_FKey_... constrint triggers when looking for illegal
pg_proc entries.

Jan
1999-09-30 15:28:34 +00:00
Jan Wieck ccecf1fa46 Added utils/adt/ri_triggers with empty shells for the
FOREIGN KEY triggers.

Added pg_proc entries for all the new functions.

Jan
1999-09-30 14:54:24 +00:00
Jan Wieck daaeafd9e1 Removed (useless) pg_proc_prosrc_index
Jan
1999-09-30 10:31:47 +00:00
Tom Lane 2993f0c100 Reverse out getopt patch --- turns out it doesn't help on my
platform, and there are at least some people it's not broken for.  So undo
change until we can discuss a more portable solution.
1999-09-30 02:45:17 +00:00
Tom Lane 1764d9579e Un-break optarg() call --- some peoples' optarg libraries
don't like extraneous colons in the option list...
1999-09-30 02:17:23 +00:00
Tom Lane 5fc889fbea Hmm, guess I forgot to commit this file the other day ...
just some cosmetic changes now, Vadim already fixed the heap_xxx calls.
1999-09-30 01:12:36 +00:00
Jan Wieck b5c4b77283 Added nbtree operator class for NUMERIC
Jan
1999-09-29 21:13:31 +00:00
Bruce Momjian a6528e08a5 Disable new FROM-clause warning. 1999-09-29 18:16:04 +00:00
Jan Wieck 1547ee017c This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.
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
1999-09-29 16:06:40 +00:00
Bruce Momjian 008f354af4 Add mention of pg_upgrade for release checklist. 1999-09-28 18:08:29 +00:00
Bruce Momjian 692b83730b Fix pg_upgrade so it vacuums all databases. 1999-09-28 18:04:18 +00:00
Bruce Momjian 008ef1de22 Add subquery mention in auto-create table entry. 1999-09-28 17:50:23 +00:00
Bruce Momjian 57d0ae5590 Fix for AIX dynaloader from Zeugswetter Andrea 1999-09-28 17:35:12 +00:00
Bruce Momjian 1e821d05f2 pg_upgrade reminder. 1999-09-28 16:02:28 +00:00
Bruce Momjian 8ccebab8bd More cleanup for | and ^. 1999-09-28 14:49:36 +00:00
Bruce Momjian 77bef41c7f More cleanup for | and ^. 1999-09-28 14:38:02 +00:00
Bruce Momjian f44c7bad6c Fix for creation of operator |. 1999-09-28 14:31:19 +00:00
Bruce Momjian f282b4ff4c libpq++ cleanup from Vince Vielhaber 1999-09-28 12:59:29 +00:00
Vadim B. Mikheev 3fea625e9d Make tree compilable (+WAL). 1999-09-28 11:41:09 +00:00
Vadim B. Mikheev 539b6304b3 heap_close(rel, AccessShareLock);
^^^^^^^^^^^^^^^^^ need in
1999-09-28 11:27:13 +00:00
Bruce Momjian 5bb6bb8dd6 Addition of CmdTuples(). Wraps PQcmdTuples.
Vince Vielhaber
1999-09-28 04:49:22 +00:00
Bruce Momjian 9394d62c73 I have been working with user defined types and user defined c
functions.  One problem that I have encountered with the function
manager is that it does not allow the user to define type conversion
functions that convert between user types. For instance if mytype1,
mytype2, and mytype3 are three Postgresql user types, and if I wish to
define Postgresql conversion functions like

I run into problems, because the Postgresql dynamic loader would look
for a single link symbol, mytype3, for both pieces of object code.  If
I just change the name of one of the Postgresql functions (to make the
symbols distinct), the automatic type conversion that Postgresql uses,
for example, when matching operators to arguments no longer finds the
type conversion function.

The solution that I propose, and have implemented in the attatched
patch extends the CREATE FUNCTION syntax as follows. In the first case
above I use the link symbol mytype2_to_mytype3 for the link object
that implements the first conversion function, and define the
Postgresql operator with the following syntax

The patch includes changes to the parser to include the altered
syntax, changes to the ProcedureStmt node in nodes/parsenodes.h,
changes to commands/define.c to handle the extra information in the AS
clause, and changes to utils/fmgr/dfmgr.c that alter the way that the
dynamic loader figures out what link symbol to use.  I store the
string for the link symbol in the prosrc text attribute of the pg_proc
table which is currently unused in rows that reference dynamically
loaded
functions.


Bernie Frankpitt
1999-09-28 04:34:56 +00:00
Bruce Momjian 63a85082e3 Reverse out last scan.l patch for minus handling.\ 1999-09-28 03:41:40 +00:00
Tom Lane a55888ec9c Fix nodeAgg coredump in case where lower-level plan has
an empty targetlist *and* fails to return any tuples, as will happen
for example with 'SELECT COUNT(1) FROM table WHERE ...' if the where-
clause selects no tuples.  It's so nice to make a fix by diking out code,
instead of adding more...
1999-09-28 02:03:19 +00:00
Bruce Momjian 341e360d67 Sorry, guys. Here is the ultimate patch which keeps the entire
behavior as it was, apart from forbidding minus-terminated
operators. Seems that I have to break the habit of doing before
thinking properly :-/  The point is that my second patch breaks
constructs like a & b  or   a ! b. This patch is to be applied
instead of any of two other today's patches.

Leon
1999-09-27 21:02:54 +00:00
Bruce Momjian 283da86feb Irix fix from Mark Dalphin 1999-09-27 20:54:56 +00:00
Bruce Momjian d62a7ac6d3 Massimo's SET FSYNC and SHOW PG_OPTIONS changes, without SET QUERY_LIMIT. 1999-09-27 20:27:32 +00:00
Bruce Momjian 12a932251c Cancel query support from Massimo 1999-09-27 20:00:44 +00:00
Bruce Momjian 7d7fb02148 Following advice from Michael Ansley, I broke up the patch in
two: one fixes uminus and other literal length. They are to be
applied - uminus first, then possilbly literal on top of uminus.

Leon
1999-09-27 19:40:40 +00:00
Bruce Momjian 3f5a164387 Hello,
Two patches included:
- the first one enables the use of bool variables in fields which might
become NULL.
  Up to now the lib told you that NULL is not a bool variable, even if
you provide a indicator.

- the second patch checks whether a value is null and issues an error if
no indicator is provided.

Sidenote: IIRC, the variable should be left alone if the value is NULL.
ECPGlib sets it's value to 0 on NULL. Is this a violation of the
standard?

Regards
     Christof
1999-09-27 19:16:29 +00:00
Bruce Momjian 7b2a8e4e56 Currently,only the first column of multi-column indices
is used to find start scan position of Indexscan-s.

To speed up finding scan start position,I have changed
_bt_first() to use as many keys as possible.

I'll attach the patch here.

Regards.

Hiroshi Inoue
1999-09-27 18:20:21 +00:00