Commit Graph

6591 Commits

Author SHA1 Message Date
Hiroshi Inoue b0d5036c7c CREATE btree INDEX takes dead tuples into account when old transactions
are running.
2000-08-10 02:33:20 +00:00
Thomas G. Lockhart 5ab40f0b85 Reimplement MULTIBYTE support (oops). Not tested, but it does compile. 2000-08-09 14:13:03 +00:00
Tom Lane 62e29fe2e7 Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist'
from Param nodes, per discussion a few days ago on pghackers.  Add new
expression node type FieldSelect that implements the functionality where
it's actually needed.  Clean up some other unused fields in Func nodes
as well.
NOTE: initdb forced due to change in stored expression trees for rules.
2000-08-08 15:43:12 +00:00
Philip Warner 8fc32374be Buf fix to pg_restire -S option in getopts 2000-08-08 11:48:59 +00:00
Tom Lane 0224177400 TOAST mop-up work: update comments for tuple-size-related symbols such
as MaxHeapAttributeNumber.  Increase MaxAttrSize to something more
reasonable (given what it's used for, namely checking char(n) declarations,
I didn't make it the full 1G that it could theoretically be --- 10Mb
seemed a more reasonable number).  Improve calculation of MaxTupleSize.
2000-08-07 20:16:13 +00:00
Philip Warner a222f3afe9 - version # change in header
CVs: ----------------------------------------------------------------------
2000-08-07 12:39:37 +00:00
Philip Warner 74e3311085 - Support for iscachable when dumping functions 2000-08-07 12:32:54 +00:00
Thomas G. Lockhart 7f6e021ca8 Allow LIKE and ILIKE as TokenId (and hence ColId) to make sure that they
are allowed in the func_name production. Otherwise, we can't define
 more like() and ilike() functions for new data types.
2000-08-07 06:54:51 +00:00
Thomas G. Lockhart 12e1c9efad Clean up code to remove the explicit backslash cruft.
If the backslash default is still wanted, just pass a backslash
 to MatchText() for the two-parameter callable routines.
2000-08-07 01:45:00 +00:00
Thomas G. Lockhart 371a485dba Include the case-insensitive LIKE prototypes. 2000-08-07 01:43:35 +00:00
Thomas G. Lockhart 701de35a3f Forgot to update the regression test output. 2000-08-07 01:43:14 +00:00
Tom Lane 9426047021 Clean up bogosities in use of random(3) and srandom(3) --- do not assume
that RAND_MAX applies to them, since it doesn't.  Instead add a
config.h parameter MAX_RANDOM_VALUE.  This is currently set at 2^31-1
but could be auto-configured if that ever proves necessary.  Also fix
some outright bugs like calling srand() where srandom() is appropriate.
2000-08-07 00:51:42 +00:00
Thomas G. Lockhart 259489bab7 Implement LIKE/ESCAPE. Change parser to use like()/notlike()
rather than the "~~" operator; this made it easy to add ESCAPE features.
Implement ILIKE, NOT ILIKE, and the ESCAPE clause for them.
 afaict this is not MultiByte clean, but lots of other stuff isn't either.
Fix up underlying support code for LIKE/NOT LIKE.
 Things should be faster and does not require internal string copying.
Update regression test to add explicit checks for
 LIKE/NOT LIKE/ILIKE/NOT ILIKE.
Remove colon and semi-colon operators as threatened in 7.0.
Implement SQL99 COMMIT/AND NO CHAIN.
 Throw elog(ERROR) on COMMIT/AND CHAIN per spec
 since we don't yet support it.
Implement SQL99 CREATE/DROP SCHEMA as equivalent to CREATE DATABASE.
 This is only a stopgap or demo since schemas will have another
 implementation soon.
Remove a few unused production rules to get rid of warnings
 which crept in on the last commit.
Fix up tabbing in some places by removing embedded spaces.
2000-08-06 18:13:42 +00:00
Thomas G. Lockhart 30ab107dbf Implement LIKE/ESCAPE. Change parser to use like()/notlike()
rather than the "~~" operator; this made it easy to add ESCAPE features.
Implement ILIKE, NOT ILIKE, and the ESCAPE clause for them.
 afaict this is not MultiByte clean, but lots of other stuff isn't either.
Fix up underlying support code for LIKE/NOT LIKE.
 Things should be faster and does not require internal string copying.
Update regression test to add explicit checks for
 LIKE/NOT LIKE/ILIKE/NOT ILIKE.
Remove colon and semi-colon operators as threatened in 7.0.
Implement SQL99 COMMIT/AND NO CHAIN.
 Throw elog(ERROR) on COMMIT/AND CHAIN per spec
 since we don't yet support it.
Implement SQL99 CREATE/DROP SCHEMA as equivalent to CREATE DATABASE.
 This is only a stopgap or demo since schemas will have another
 implementation soon.
Remove a few unused production rules to get rid of warnings
 which crept in on the last commit.
Fix up tabbing in some places by removing embedded spaces.
2000-08-06 18:06:44 +00:00
Thomas G. Lockhart df40234639 Support SQL99 embedded double-quote syntax for quoted identifiers.
Allow this in the parser and in pg_dump, but it is probably not enough
 for a complete solution.
Better to have the feature started then never here.
2000-08-06 17:50:48 +00:00
Tom Lane c3e2a951b4 Toast all the system-table columns that seem to need it. It turns out
that giving pg_proc a toast table required solving the same problems
we'd have to solve for pg_class --- pg_proc is one of the relations
that gets bootstrapped in relcache.c.  Solution is to go back at the
end of initialization and read in the *real* pg_class row to replace
the phony entry created by formrdesc().  This should work as long as
there's no need to touch any toasted values during initialization,
which seems a reasonable assumption.
Although I did not add a toast-table for every single system table
with a varlena attribute, I believe that it would work to just do
ALTER TABLE pg_class CREATE TOAST TABLE.  So anyone who's really
intent on having several thousand ACL entries for a rel could do it.
NOTE: I didn't force initdb, but you must do one to see the effects
of this patch.
2000-08-06 04:40:08 +00:00
Tom Lane 8ae23135bc Clean up inefficiency in ExecRelCheck, and cause it to do the right
thing when there are multiple result relations.  Formerly, during
something like 'UPDATE foo*', foo's constraints and *only* foo's
constraints would be applied to all foo's children.  Wrong-o ...
2000-08-06 04:26:40 +00:00
Tom Lane 925418d2fa Ensure that catcache 'busy' flags are reset at transaction abort.
Without this, an elog during cache-entry load leaves that catcache
unusable.  elog in that segment of code is pretty unusual but it can
happen.
2000-08-06 04:17:47 +00:00
Tom Lane 465a3b0a24 Copy sub-Query nodes to avoid trouble when same sub-Query is linked to
multiple times in the parsetree (can happen in COALESCE or BETWEEN
contexts, for example).  This is a pretty grotty solution --- it will
do for now, but perhaps we can do better when we redesign querytrees.
What we need is a consistent policy about whether querytrees should be
considered read-only structures or not ...
2000-08-06 04:13:22 +00:00
Bruce Momjian 75b61043b0 > I had to back out the patch. It only compiles with multi-byte enabled.
Ooops, I forget... here it is again.

> > >  If encoding is not supported returns ERROR.

 and if multibyte not enabled too....


 Thanks.

                                Karel
~
2000-08-05 14:59:29 +00:00
Philip Warner 4ebb751219 - Minor fix to create temp table for xrefs 2000-08-05 10:02:28 +00:00
Philip Warner c2e302071f - Only disable triggers for the table being loaded
- disable triggers prior to BLOB load
- better query for loading blob xrefs
- Fixes to error handling code
2000-08-05 09:57:46 +00:00
Bruce Momjian 129f1a31aa Back out to_ascii patch from Karel. 2000-08-04 20:46:47 +00:00
Bruce Momjian 403e522f15 Add missing files from Karel, tip from Jan. 2000-08-04 20:22:52 +00:00
Bruce Momjian 317ff59ced to_ascii( text )
- encode 'text' from database encoding to ASCII

        to_ascii('\256\341k')


 to_ascii( text, int4 )

        - encode 'text' from 'int4' encoding to ASCII

          to_ascii('\256\341k', 8)


 to_ascii( text, name )

        - encode 'text' from 'name' encoding to ASCII

          to_ascii('\256\341k', 'LATIN2')


  Now is supported LATIN1, LATIN2, WIN1250. For other character sets I
haven't good resources. Add new encoding is easy...

 If encoding is not supported returns ERROR.

 Note --- not exists total corect conversion to ASCII, this function try
        convert chars those is _probably_ interpret-able in ASCII for
        others use ' '. But for example for all Czech characters it is
        sufficient ... hmm Chinese / JAP and other complicated langs
have
        bad luck here :-(

                                                Karel
2000-08-04 15:45:12 +00:00
Hiroshi Inoue a1464e971c Subclasses inherit constraints of super classes properly 2000-08-04 06:12:11 +00:00
Tom Lane dd8ad64118 Fix tuptoaster bugs induced by making bytea toastable. Durn thing was
trying to toast tuples inserted into toast tables!  Fix is two-pronged:
first, ensure all columns of a toast table are marked attstorage='p',
and second, alter the target chunk size so that it's less than the
threshold for trying to toast a tuple.  (Code tried to do that but the
expression was wrong.)  A few cosmetic cleanups in tuptoaster too.
NOTE: initdb forced due to change in toaster chunk-size.
2000-08-04 04:16:17 +00:00
Tom Lane ed9ca68758 Convert inet-related functions to new fmgr style. I have also taken it
on myself to do something about the non-self-consistency of the inet
comparison functions.  The results are probably still semantically wrong
(inet and cidr should have different comparison semantics, I think)
but at least the boolean operators now agree with each other and with
the sort order of indexes on inet/cidr.
2000-08-03 23:07:51 +00:00
Tom Lane 61aca818c4 Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.
These two routines will now ALWAYS elog() on failure, whether you ask for
a lock or not.  If you really want to get a NULL return on failure, call
the new routines heap_open_nofail()/heap_openr_nofail().  By my count there
are only about three places that actually want that behavior.  There were
rather more than three places that were missing the check they needed to
make under the old convention :-(.
2000-08-03 19:19:38 +00:00
Tom Lane c298d74d49 More functions updated to new fmgr style --- money, name, tid datatypes.
We're reaching the mopup stage here (good thing too, this is getting
tedious).
2000-08-03 16:35:08 +00:00
Tom Lane 1bd3a8f58b Repair bug noted by Paul Caskey: neqsel() has been generating a bogus
result, in fact nearly the opposite of what it should, because it
was passing the not-equal operator to eqsel() which would use it to
compare the value against the most common value in the column, and
of course obtain the wrong result therefrom.  Must pass the equality
operator to eqsel() instead.  Fortunately that's easy to get from
the oprnegate link.
2000-08-03 00:58:22 +00:00
Tom Lane 463f1f5cda Convert all remaining float4 and float8 functions to new fmgr style.
At this point I think it'd be possible to make float4 be pass-by-value
without too much work --- and float8 too on machines where Datum is
8 bytes.  Something to try when the mood strikes, anyway.
2000-08-01 18:29:35 +00:00
Philip Warner 92bd532c1e - Added --create, --no-owner, --superuser, --no-reconnect (pg_dump & pg_restore)
- Added code to dump 'Create Schema' statement (pg_dump)
- Don't bother to disable/enable triggers if we don't have a superuser (pg_restore)
- Cleaned up code for reconnecting to database.
- Force a reconnect as superuser before enabling/disabling triggers.
- Added & Removed --throttle (pg_dump)
- Fixed minor bug in language dumping code: expbuffres were not being reset.
- Fixed version number initialization in _allocAH (pg_backup_archiver.c)
- Added second connection when restoring BLOBs to allow temp. table to survive
  (db reconnection causes temp tables to be lost).
2000-08-01 15:51:45 +00:00
Tom Lane 7d0c4188f1 Make acl-related functions safe for TOAST. Mark pg_class.relacl as
compressible but not externally storable (since we're not sure about
whether creating a toast relation for pg_class would work).
2000-07-31 22:39:17 +00:00
Hiroshi Inoue b7319d3717 Cancel request while waiting for a lock should try to wake
up sleeping processes.
2000-07-31 01:16:24 +00:00
Tom Lane 8f9fa0e143 Type lztext is toast.
(Sorry, couldn't help it...)

Removed type filename as well, since it's unused and probably useless.
INITDB FORCED, because pg_rewrite columns are now plain text again.
2000-07-30 22:14:09 +00:00
Tom Lane 3a9a74a09d Convert all remaining geometric operators to new fmgr style. This
allows fixing problems with operators that expected to be able to
return a NULL, such as the '#' line-segment-intersection operator
that tried to return NULL when the two segments don't intersect.
(See, eg, bug report from 1-Nov-99 on pghackers.)  Fix some other
bugs in passing, such as backwards comparison in path_distance().
2000-07-30 20:44:02 +00:00
Tom Lane d70d46fd60 PATH and POLYGON datatypes are now TOASTable. Associated functions
updated to new fmgr style.  Deleted hoary old functions for compatibility
with pre-6.1 representations of these datatypes.
2000-07-29 18:46:12 +00:00
Tom Lane 1ebe1da296 bpchar, varchar, bytea, numeric are toastable --- if you initdb, which
I did not force.  I marked numeric as compressable-but-not-move-off-able,
partly to test that storage mode and partly because I've got doubts
that numerics are large enough to need external storage.
2000-07-29 03:26:51 +00:00
Thomas G. Lockhart 20f6a1e562 Fix acceptance of PATH as a type and column name.
Note that this has changed some of the edge cases for what is accepted
 as a type name and/or column id. Regression test passes, but more
 tweaks may be coming...
2000-07-28 14:47:23 +00:00
Tom Lane d2d7865b5b Add int2-vs-int8 comparison operators. These are now necessary because
the planner may try to generate them as a result of transitivity of the
existing int2-vs-int4 and int4-vs-int8 operators.  In fact, it is now
necessary that mergejoinable cross-datatype operators form closed sets.
Add an opr_sanity regress test to detect missing operators.
2000-07-28 05:07:49 +00:00
Tom Lane 87cdaf5491 Remove <values.h> inclusions, no-longer-needed MAXINT definitions. 2000-07-28 02:13:52 +00:00
Tom Lane ad7b47aa02 Fix sloppy macro coding (not enough parentheses). 2000-07-28 01:04:40 +00:00
Tom Lane ff7da2f498 Make planner safe for recursive calls --- needed for cases where
eval_const_expressions tries to simplify an SQL function.
2000-07-27 23:16:04 +00:00
Bruce Momjian 56c754a555 Some pedantic compile syntax errors to fix with the following patch
for today's snapshot

Andreas
2000-07-27 19:49:24 +00:00
Bruce Momjian e3b4400667 Here is a bug and patch to fix it. I have tested this bug and fix on
FreeBSD/Intel and DecUX/Alpha machines. The bug appears in postgresql
6.5.3 and 7.0.2. Can someone please review it and apply it to the
source tree?

Sometimes when the postgres connection dies it is necessary to
attempt to reconnect. Calling the pgconnection::Connect method in a
derived class leaks memory because it does not clear the current
connection (if there is one). These patches ensures that any open
connections are closed before attempting to open a new one.

-Michael Richards
2000-07-27 19:44:01 +00:00
Tom Lane 1cffbfcb56 Arrange to free planning memory (or most of it, anyway) at completion
of planning.  This should reduce memory requirements for large joins.
2000-07-27 04:51:04 +00:00
Tom Lane c7793a731c Ensure that values stored within arrays are not toasted, per
discussion on pghackers a few days ago.
2000-07-27 03:50:52 +00:00
Tom Lane 90451fe7f3 When dealing with OR-of-ANDs quals, extract multiple subclauses of an AND
to use with a multiple-key index.  Formerly we would only extract clauses
that had to do with the first key of the index, which was correct but
didn't exploit the index fully.
2000-07-26 23:46:22 +00:00
Tom Lane 0e06e68387 ExecRestrPos() really needs to raise ERROR, not a wimpy DEBUG message,
if given a node type it doesn't support.  As is, wrong results from a
mergejoin would go undetected.
2000-07-25 23:43:38 +00:00
Tom Lane 742cd87999 Ensure that if the OID counter wraps around, we will not generate 0,
nor any OID in the reserved range (1-16383).
2000-07-25 20:18:19 +00:00
Tom Lane 667d5ed206 Fix confusion between sizeof(long) and sizeof(long*), as well as
failure to MAXALIGN the start of shmem allocable space.  No reports
of trouble here, just compulsive tidiness.
2000-07-25 20:17:02 +00:00
Tom Lane dc73e25a5e Add commentary about varying usage of scankeys in btree code. 2000-07-25 05:26:40 +00:00
Tom Lane 916b2321ad Clean up and document btree code for ordering keys. Neat stuff,
actually, but who could understand it with no comments?  Fix bug
while at it: _bt_orderkeys would try to invoke comparisons on
NULL inputs, given the right sort of redundant quals.
2000-07-25 04:47:59 +00:00
Tom Lane da1ad323b7 Update comments. 2000-07-25 04:30:42 +00:00
Bruce Momjian b9e6f068dc Update bsdi template 2000-07-24 13:53:16 +00:00
Philip Warner 93802c88bb pg_backup_plain_text.c replaced by pg_backup_null.c 2000-07-24 06:30:16 +00:00
Philip Warner bb080400f8 - no longer put ACLs at end of dump
- connect as appropriate user in pg_restore with db connection
- dump owner of rule in pg_dump
2000-07-24 06:24:26 +00:00
Tom Lane cd9f0ca545 Deduce equality constraints that are implied by transitivity of
mergejoinable qual clauses, and add them to the query quals.  For
example, WHERE a = b AND b = c will cause us to add AND a = c.
This is necessary to ensure that it's safe to use these variables
as interchangeable sort keys, which is something 7.0 knows how to do.
Should provide a useful improvement in planning ability, too.
2000-07-24 03:11:01 +00:00
Peter Eisentraut c39c198bc3 Unset locale variables before running regression tests. (All of them!)
Don't do config.status substitutions into the regression test makefile.
2000-07-23 13:01:11 +00:00
Tom Lane 8d77c1a8aa Clean up some sloppy casts --- Oid vs. Datum, that sort of thing. 2000-07-23 03:50:26 +00:00
Tom Lane e4e6459c0f Further cleanup of array behavior. Slice assignments to arrays with
varlena elements work now.  Allow assignment to previously-nonexistent
subscript position to extend array, but only for 1-D arrays and only
if adjacent to existing positions (could do more if we had a way to
represent nulls in arrays, but I don't want to tackle that now).
Arrange for assignment of NULL to an array element in UPDATE to be a
no-op, rather than setting the entire array to NULL as it used to.
(Throwing an error would be a reasonable alternative, but it's never
done that...)  Update regress test accordingly.
2000-07-23 01:36:05 +00:00
Peter Eisentraut ef2a6b8b83 Shed some light onto SysV IPC configuration. 2000-07-22 14:49:01 +00:00
Jan Wieck f67e79045d 2nd try for the index tuple toast hack. This time as suggested
by Tom.

Jan
2000-07-22 11:18:47 +00:00
Tom Lane a5a12887a1 Make update lists like 'UPDATE tab SET foo[1] = bar, foo[3] = baz'
work as expected.  THe underlying implementation is essentially
'SET foo = array_set(foo, 1, bar)', so we have to turn the items
into nested invocations of array_set() to make it work correctly.
Side effect: we now complain about 'UPDATE tab SET foo = bar, foo = baz'
which is illegal per SQL92 but we didn't detect it before.
2000-07-22 06:19:04 +00:00
Tom Lane 4bdb348628 Remove 'Array' node type, which has evidently been dead code for
a very long time.
2000-07-22 04:22:47 +00:00
Tom Lane 1afdccc8b2 Missed some array updates ... 2000-07-22 04:16:13 +00:00
Tom Lane d0e17e2112 Arrays are toastable. (At least if you initdb, which I didn't force.)
Remove a bunch of crufty code for large-object-based arrays, which is
superseded by TOAST and likely hasn't worked in a long time anyway.
Clean up array code a little, and in particular eliminate its habit
of scribbling on the input array (ie, modifying the input tuple :-().
2000-07-22 03:34:43 +00:00
Peter Eisentraut bb13830d6f maintainer-clean and distclean ought to remove dependency information as well. 2000-07-22 01:48:53 +00:00
Tom Lane cf14ccd0ea Fix typo in version-mismatch error report. 2000-07-21 22:27:29 +00:00
Tom Lane 421f0baaff Further cleanup of btbuild (CREATE INDEX). Avoid storing unneeded
left keys during bottom-up index build, and leave some free space
instead of packing the pages to the brim (so as to avoid vast numbers
of page splits during the first interactive insertions).
2000-07-21 22:14:09 +00:00
Tom Lane 1ea912e16d Fix sloppiness about alignment requirements in findsplitloc() space
calculation, also make it stop when it has a 'good enough' split instead
of exhaustively trying all split points.
2000-07-21 19:21:00 +00:00
Philip Warner c3e18804ff - Support for TAR output
- Support for BLOB output from pg_dump and input via pg_restore
- Support for direct DB connection in pg_restore
- Fixes in support for --insert flag
- pg_dump now outputs in modified OID order
2000-07-21 11:43:26 +00:00
Philip Warner e8f69be054 - Support for BLOB output from pg_dump and input via pg_restore
- Support for direct DB connection in pg_restore
- Fixes in support for --insert flag
- pg_dump now outputs in modified OID order
- various other bug fixes
2000-07-21 11:40:08 +00:00
Jan Wieck 0143d391c6 Need to switch to tuples memory context when replacing the toasted
one with the plain one.

Jan
2000-07-21 11:18:51 +00:00
Jan Wieck 82f3945a67 Temporary fix to make TOAST vacuum-safe. All values are forced to be
in memory (plain or compressed) in the tuple returned from the heap-am.
So no index will ever contain an external reference.

Jan
2000-07-21 10:31:31 +00:00
Tom Lane 9e85183bfc Major overhaul of btree index code. Eliminate special BTP_CHAIN logic for
duplicate keys by letting search go to the left rather than right when an
equal key is seen at an upper tree level.  Fix poor choice of page split
point (leading to insertion failures) that was forced by chaining logic.
Don't store leftmost key in non-leaf pages, since it's not necessary.
Don't create root page until something is first stored in the index, so an
unused index is now 8K not 16K.  (Doesn't seem to be as easy to get rid of
the metadata page, unfortunately.)  Massive cleanup of unreadable code,
fix poor, obsolete, and just plain wrong documentation and comments.
See src/backend/access/nbtree/README for the gory details.
2000-07-21 06:42:39 +00:00
Peter Mount 9eddc7519d Fixed DatabaseMetaData.getTableTypes() 2000-07-20 15:30:05 +00:00
Jan Wieck 9b0fe4eee2 Fixed memory allocation problems when compressing multi-MB
items. Lookup history is now a double linked list, used in
a wrap-around style.

Jan
2000-07-20 14:23:28 +00:00
Peter Eisentraut 6a00a7eb72 Don't need this anymore. It's now handled in the Makefile. 2000-07-19 22:47:13 +00:00
Peter Eisentraut 32163099d7 Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
2000-07-19 16:30:27 +00:00
Jan Wieck 79e6648649 Added untrusted PL/TclU (pltclu) language. Executes all procedures
in a non-safe interpreter, so with full OS access! Language is
restricted to be used by DB superusers.

Added "argisnull n" and "return_null" commands to gain full control
over NULL values from new FMGR capabilities.

Jan
2000-07-19 11:53:02 +00:00
Jan Wieck ec1ea5295a Fixed an ordering problem in test queries and
formatting differences due to new psql.

Jan
2000-07-18 11:28:20 +00:00
Tom Lane ba930a016c Add an opr_sanity check for misdefined aggregates that have transition
type different from input type but are expecting ExecAgg to insert the
first non-null input as the starting transition value.  This has always
been verboten, but wasn't checked for until now...
2000-07-18 05:02:19 +00:00
Tom Lane 8b1b34f6c0 Update pltcl regress test's expected output for 7.0 psql output format.
NOTE: this implementation of tcl_avg() fails with 'divide by zero'
for zero input rows.  It ought to return NULL, but pltcl does not
currently provide a way to do that, so I'm leaving the problem unsolved
for now.
2000-07-18 04:45:59 +00:00
Tom Lane 0d72b2d060 'const' decorations are fine, but not when they're inserted without
bothering to clean up the resulting warnings ...
2000-07-18 03:57:33 +00:00
Peter Eisentraut 44eaafe3f8 End users shouldn't have to invoke a separate command to install the
documentation. Therefore it's now installed by default. If there is no
documentation to be found (i.e., you are not using the distribution)
then this step is skipped.

Add --docdir option to configure to control installation directory.
2000-07-17 22:31:59 +00:00
Peter Eisentraut 5da7e533f7 Don't strip trailing backslashes from a line. Treat them more reasonably. 2000-07-17 18:24:33 +00:00
Tom Lane ba87ab548e I concur with Andreas: unconditionally including <sys/fcntl.h> is not
portable.  Seems to have been added for O_BINARY, which is only needed
for __CYGWIN32__, so include it here only in that case.
2000-07-17 04:35:55 +00:00
Tom Lane bec98a31c5 Revise aggregate functions per earlier discussions in pghackers.
There's now only one transition value and transition function.
NULL handling in aggregates is a lot cleaner.  Also, use Numeric
accumulators instead of integer accumulators for sum/avg on integer
datatypes --- this avoids overflow at the cost of being a little slower.
Implement VARIANCE() and STDDEV() aggregates in the standard backend.

Also, enable new LIKE selectivity estimators by default.  Unrelated
change, but as long as I had to force initdb anyway...
2000-07-17 03:05:41 +00:00
Tom Lane 139f19c302 update pltcl test to have at least some chance of running ... still
seems to be busted though ...
2000-07-17 02:22:50 +00:00
Tom Lane a2c6bf5a59 pltcl seems to be broken on HPUX with recent Tcl versions, because
link needs to specify -lc but doesn't.  Quick hack to make it better.
2000-07-17 01:26:42 +00:00
Bruce Momjian 8a70a1c75d Hmm. I didn't expect a change since I hadn't added tests for the new
stuff, but fixing the bug that existed in reporting the constraint name
changes the error line.  Patch to expected output enclosed.

Stephan Szabo
2000-07-16 19:27:29 +00:00
Peter Eisentraut 0d59dad770 Automatic dependency tracking
The .DEFAULT rule in backend/Makefile is harmful -- removed.
Replace `::' rules by `:'.
2000-07-16 14:50:44 +00:00
Peter Eisentraut 3eec6ee145 Rename templates to match names in makefiles/Makefile.* and include/port.
Read templates after compiler is detected. Convert all templates to real
shell scripts. Rename bsd->openbsd, alpha->osf.
2000-07-15 15:54:52 +00:00
Bruce Momjian 739a0566a6 This should be a slighly more complete patch for commands/command.c
AlterTableAddConstraint.  The major changes from the last patch
are that it should hopefully check for references to temp tables
(not in the shadow case, but at defination time) from permanent tables in
foreign keys and refuse them and that it doesn't allow the table(s)
being constrained to be views (because those cases don't currently
work).

Stephan SzaboThis should be a slighly more complete patch for commands/command.c
AlterTableAddConstraint.  The major changes from the last patch
are that it should hopefully check for references to temp tables
(not in the shadow case, but at defination time) from permanent tables in
foreign keys and refuse them and that it doesn't allow the table(s)
being constrained to be views (because those cases don't currently
work).

Stephan Szabo
2000-07-15 12:37:14 +00:00
Tom Lane f2e3f621c5 Update implementation notes for new memory management logic. 2000-07-15 00:52:22 +00:00
Tom Lane e40492ec6e Remove useless and dangerous 'opt_type' option from CREATE INDEX. 2000-07-15 00:01:41 +00:00
Tom Lane 6bfe64032e Cleanup of code for creating index entries. Functional indexes with
pass-by-ref data types --- eg, an index on lower(textfield) --- no longer
leak memory during index creation or update.  Clean up a lot of redundant
code ... did you know that copy, vacuum, truncate, reindex, extend index,
and bootstrap each basically duplicated the main executor's logic for
extracting information about an index and preparing index entries?
Functional indexes should be a little faster now too, due to removal
of repeated function lookups.
CREATE INDEX 'opt_type' clause is deimplemented by these changes,
but I haven't removed it from the parser yet (need to merge with
Thomas' latest change set first).
2000-07-14 22:18:02 +00:00
Peter Eisentraut a30bc7c75a Remove dangling else warning (Cyrillic recode stuff) 2000-07-14 16:41:44 +00:00