Commit Graph

43049 Commits

Author SHA1 Message Date
Bruce Momjian 712c8bba84 Makefile.ports (copied from makefiles/Makefile.aix) is included before
the default target in GNUmakefile is reached.  This patch calls that
default target.

Pete Forman
2000-11-06 17:07:43 +00:00
Thomas G. Lockhart d9ef7e9ec7 Add support for AT TIME ZONE syntax. 2000-11-06 16:05:25 +00:00
Thomas G. Lockhart 07272c6f8b Add tests for more INTERVAL syntax.
Add more tests for JOIN syntax.
All tests pass on my Linux box (except for the usual couple of lines
 for geometry).
2000-11-06 16:03:47 +00:00
Thomas G. Lockhart 8e8fc32bec Add functions to support AT TIME ZONE syntax.
Update catalog version to today.
2000-11-06 15:58:46 +00:00
Thomas G. Lockhart 2cf1642461 Fix INTERVAL output when year/month has different sign as day/hour etc.
Previously, all fields were unsigned, with only a trailing "ago" to
 indicate negative intervals. Now, ISO format does not use "ago", and
 and the traditional PostgreSQL format has the first numeric field unsigned
 with "ago" supporting that field. So "1 month - 2 days ago" is two days
 less than a month in the past.
Fix interval arithmetic across daylight savings time boundaries.
 Previously, most math across boundaries introduced a one hour offset.
Allow some date/time functions to return NULL if called with NULL args.
Implement functions for AT TIME ZONE support.
Support "SAT" as an Australian time zone if USE_AUSTRALIAN_RULES
 is defined.
2000-11-06 15:57:00 +00:00
Thomas G. Lockhart df9462ac05 Implement AT TIME ZONE SQL9x syntax.
AT is now a keyword but is not a reserved word.
2000-11-06 15:47:17 +00:00
Thomas G. Lockhart 155e0b998a Allow type resolution for UNKNOWN arguments to functions to fall back to
any available string type. Previously, all candidate choices must have
 fallen within the same "type category" for PostgreSQL to be willing to
 choose any of them.
Need to apply the same fixup to operator type resolution.
2000-11-06 15:42:30 +00:00
Vadim B. Mikheev f0e37a8531 New CHECKPOINT command.
Auto removing of offline log files and creating new file
at checkpoint time.
2000-11-05 22:50:21 +00:00
Peter Eisentraut 7267fdd7a3 Add some configure checks for DocBook and related tools. With a somewhat
standard installation layout it should be possible to build the HTML
and print documentation without additional manual setup.
2000-11-05 21:04:07 +00:00
Tom Lane dd03129b9f UNION select in a CREATE RULE caused a weird error, because transformRuleStmt
got confused by 'dummy' targetlist built for the UNION's toplevel query.
Fix by making dummy targetlist a little less cheesy.
2000-11-05 01:42:07 +00:00
Tom Lane 11f7b29054 Allow ORDER BY, LIMIT in sub-selects. Fix most (not all) cases where
the grammar did not allow redundant parentheses around sub-selects.
Distinguish LIMIT ALL from LIMIT 0; make the latter behave as one would
expect.
2000-11-05 00:15:54 +00:00
Bruce Momjian 4b71943bb2 Make PROCEDURAL optional in CREATE/DROP LANGUAGE. 2000-11-04 21:04:56 +00:00
Bruce Momjian 90c63942c4 This patch should allow primary/foreign key
definitions using inherited columns in the
create table statement.

Stephan Szabo
2000-11-04 18:29:09 +00:00
Peter Eisentraut b61f681f23 Remove .SECONDARY: target again, because GNU make 3.78.1 will get mighty
confused in src/interfaces/libpq for some reason.  Seemingly, different
GNU make versions have several mutually conflicting problems with implicit
rule chains.  Words are not sufficient...
2000-11-04 16:39:02 +00:00
Peter Eisentraut c7a794998a Separate CFLAGS_SL and CXXFLAGS_SL, to allow building with C and C++
compilers from different providers.  (Especially important since the
C++ compiler that goes with your favourite C compiler might not work.)
2000-11-04 16:35:55 +00:00
Peter Eisentraut 1fdf2edc9d Put -Ae into CC not CFLAGS, since it's not optional. 2000-11-04 14:34:54 +00:00
Peter Eisentraut 4aa1aabd7a This is no longer used since we have the 'resultmap'. 2000-11-04 13:37:39 +00:00
Peter Eisentraut 1f2f53c648 Since the backend now handles relative PGDATA, initdb doesn't have to work
around anymore.
2000-11-04 12:47:48 +00:00
Peter Eisentraut abfb417574 Make the backend grok relative paths for the data directory by converting
it to an absolute path.
2000-11-04 12:43:24 +00:00
Tatsuo Ishii 6862a05364 Fix for missing EUC_TW encoding 2000-11-04 02:27:56 +00:00
Peter Eisentraut 7301660048 outdated and obsolete 2000-11-03 20:38:42 +00:00
Peter Eisentraut a18490b73d Add global .SECONDARY: target to not allow make to delete intermediate
target files in implicit rule chains.  That might have been a cool idea
but it seems to be too buggy to work, as it caused spurious recompiles in
several places.
2000-11-03 20:27:40 +00:00
Tom Lane 6be6a185d9 Minor code cleanups, make in_group() check faster. 2000-11-03 19:02:18 +00:00
Tom Lane aceec9ae1a Fix bug reported by bobson: aclinsert3 would delete the 'world' entry
from an ACL list if it had no permissions remaining, which confused
aclcheck terribly.  Also clean up code a little.
2000-11-03 19:01:36 +00:00
Peter Eisentraut dfda21e7a6 Add configure check to see whether <string.h> and <strings.h> may both be
included, and then include <strings.h> if so.  Several systems already
needed <strings.h> anyway.  Some new systems that claim to conform to the
Unix 9x "standard" do not declare str[n]casemp() in string.h, and C99
compilers will not like that.
2000-11-03 18:43:52 +00:00
Vadim B. Mikheev b98ba2a04c pg_variable is not used in WAL version now. 2000-11-03 11:39:36 +00:00
Michael Meskes b703c127ed Parser sync. 2000-11-03 10:47:54 +00:00
Tom Lane 94d8bbe5fb Improve inv_getsize() per suggestion from Denis Perchine; also fix
thinkos in inv_seek().
2000-11-02 23:52:06 +00:00
Tom Lane db263da468 Peter forgot to fix {operator} rule to match modified definition of
'self' characters.
2000-11-02 23:20:27 +00:00
Tom Lane 7a64100164 Fix insufficiently-parenthesized macro definitions.
No known bug here, but...
2000-11-02 23:11:03 +00:00
Peter Eisentraut b7f4c64202 Add pg_dumpall --accounts-only option. 2000-11-02 21:13:32 +00:00
Peter Eisentraut 26c825e4b0 Allow initdb to handle relative paths for PGDATA, by converting them to
absolute before starting a backend.
2000-11-02 19:48:39 +00:00
Bruce Momjian bc9b199c26 Change bool to boolean in docs. 2000-11-02 19:26:49 +00:00
Peter Eisentraut 54121b9a8b Pass on all CPPFLAGS that look like -I* to the PL/Perl build.
(This previously worked, but must have gotten lost somewhere...)
2000-11-02 18:40:13 +00:00
Peter Eisentraut d1bfa6c72e Add runtime configuration options to control permission bits and group
owner of unix socket.
2000-11-01 21:14:03 +00:00
Vadim B. Mikheev 855ffa0be0 Forgot to check page LSN and unlock buffer in btree_xlog_delete - fixed.
(Thanks to Tatsuo Ishii for finding bug)
2000-11-01 20:39:58 +00:00
Peter Mount 961eb5716b Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that absolute doesnt handle negative row numbers correctly. 2000-11-01 16:55:32 +00:00
Vadim B. Mikheev 3706f08ace Fix recovery cache code (thanks to Peter Eisentraut for
pointing to bug).
2000-10-31 23:56:36 +00:00
Peter Eisentraut b99ee7f37d This is the minimal version of the Darwin support patch from
Bruce Hartzler <bruceh@mail.utexas.edu>.  It contains shared library
support, regression test map, and the usual template files.  The dynamic
loader is missing, the spin lock code apparently doesn't assemble due to
syntax problems, and semaphores are to be hoped for from Apple.
2000-10-31 19:55:20 +00:00
Peter Eisentraut dc0f5cb090 Determine CXXFLAGS after the C++ compiler was detected. Also honor
--enable-debug and environment variable override.
2000-10-31 18:16:20 +00:00
Michael Meskes fae180f477 Added patch by Christof Petig <christof.petig@wtal.de> that fixes some bugs in preproc.y. 2000-10-31 15:11:38 +00:00
Peter Eisentraut 9cbcbf0fb3 Use $(filter ...), not $(findstring ...). 2000-10-31 14:37:25 +00:00
Philip Warner 44954fae08 Added long-standing transaction when restoring BLOBS (uses commit every BLOB_BATCH_SIZE)
Prevent dumping of languages from template1.
2000-10-31 14:20:30 +00:00
Peter Eisentraut 0babf31640 Change internal string representation of BitString node to include a
leading 'b', as it appears to be more convenient this way for the input
and node functions.
2000-10-31 13:59:53 +00:00
Peter Eisentraut 73874a06f0 Change the parser to convert SQL "position" and "substring" syntax to
position() and substring() functions, so that it works transparently for
bit types as well.  Alias the text functions appropriately.

Add position() for bit types.

Add new constant node T_BitString that represents literals of the form
B'1001 and pass those to zpbit type.
2000-10-31 10:22:13 +00:00
Peter Eisentraut d397c1c8a2 Disallow zero-length delimited identifier (per SQL). 2000-10-30 17:54:16 +00:00
Michael Meskes c7a3e0dfcb Sync preproc.y with gram.y. 2000-10-30 14:43:40 +00:00
Tatsuo Ishii 1acf6f9c8e Add support for code conversion between Unicode and other encodings.
Supported encodings are: EUC_JP, EUC_CN, EUC_KR, EUC_TW, Shift JIS,
Big5, ISO8859-[1-5].
TODO: testings! and documentations...
2000-10-30 10:41:05 +00:00
Tatsuo Ishii 0b10d35e2b Avoid dependency on backend's multibyte module as possible.
Now frontend/libpq has its own version of pg_encoding_to_char
and pg_char_to_encoding.
2000-10-30 10:31:46 +00:00
Tatsuo Ishii e5b6b0ebb9 Add new configure option "--enable-uniconv" that enables automatic
code conversion between Unicode and other encodings. Note that
this option requires --enable-multibyte also.
The reason why this is optional is that the feature requires huge
mapping tables and I don't think every user need the feature.
2000-10-30 07:17:31 +00:00
Tatsuo Ishii dd9dcd59cf include pg_wchar.h to import a fucntion prototype of pg_mbcliplen 2000-10-30 06:48:36 +00:00
Vadim B. Mikheev e3ba543525 WAL fixes. 2000-10-29 18:33:41 +00:00
Bruce Momjian 433cd770bc update flags. 2000-10-29 18:13:47 +00:00
Peter Eisentraut 30402ce74a Automatic dependency tracking for C++ (GCC only) 2000-10-29 16:13:28 +00:00
Peter Eisentraut 86f0812520 Remove special treatment of '|' operator, in the spirit of "sane" binary
operators.
2000-10-29 16:11:33 +00:00
Peter Eisentraut 525e1c4436 USE_POSIX_TIME replaced by HAVE_TM_ZONE || HAVE_INT_TIMEZONE, which are
equivalent.

In linux.h there were some #undef HAVE_INT_TIMEZONE, which are useless
because HAVE_TM_ZONE overrides it anyway, and messing with configure
results isn't cool.
2000-10-29 13:17:34 +00:00
Peter Eisentraut 8b04311293 Omit perl and python interfaces when making temporary installation. 2000-10-29 12:49:49 +00:00
Peter Eisentraut 2044bdcca0 Should be "test =", not "test ==". 2000-10-29 11:36:44 +00:00
Michael Meskes dfb12a9850 Removed multibyte stuff since client does not know about encoding in the backendFixed quoting bug reported by Sascha Demetrio (sd@b-comp.de). 2000-10-29 09:44:58 +00:00
Peter Eisentraut 4f82ab4c97 #define JMP_BUF has been unnecessary since the arrival of the sigsetjmp
test.
2000-10-28 23:53:01 +00:00
Peter Eisentraut 0c0a176370 As we don't use struct dirent, the #define SYSV_DIRENT is useless. If we
every do need it we'd better use AC_HEADER_DIRENT from Autoconf.

#define NO_EMPTY_STMTS is completely unused.
2000-10-28 22:53:17 +00:00
Peter Eisentraut 3280cba2ac Make initdb safe against using
a) mismatching backend program, by checking --version output
b) mismatching bki files, by putting a version-identifying comment atop
   those files.
2000-10-28 22:14:14 +00:00
Bruce Momjian c44323176e Back out change to gram.y for parens. 2000-10-28 19:41:00 +00:00
Bruce Momjian 88094f2e2b beos fixes from Cyril VELTER 2000-10-28 18:27:57 +00:00
Vadim B. Mikheev 5b0740d3fc WAL 2000-10-28 16:21:00 +00:00
Bruce Momjian 2f4c9d39fe Okay, here's my attempt at fixing the problems with parentheses in
subqueries.  It passes the normal 'runcheck' tests, and I've tried
a few simple things like
  select 1 as foo union (((((select 2))))) order by foo;

There are a few things that it doesn't do that have been talked
about here at least a little:

1) It doesn't allow things like "IN(((select 1)))" -- the select
here has to be at the top level.  This is not new.
2) It does NOT preserve the odd syntax I found when I started looking
at this, where a SELECT statement could begin with parentheses.  Thus,
  (SELECT a from foo) order by a;
fails.

I have preserved the ability, used in the regression tests, to
have a single select statement in what appears to be a RuleActionMulti
(but wasn't -- the parens were part of select_clause syntax).
In my version, this is a special form.

This may cause some discussion: I have differentiated the two kinds
of RuleActionMulti.  Perhaps nobody knew there were two kinds, because
I don't think the second form appears in the regression tests. This
one uses square brackets instead of parentheses, but originally was
otherwise the same as the one in parentheses.  In this version of
gram.y, the square bracket form treats SELECT statements the same
as the other allowed statements.  As discussed before on this list,
psql cannot make sense out of the results of such a thing, but an
application might.  And I have designs on just such an application.

++ kevin o'gorman
2000-10-28 15:44:04 +00:00
Peter Eisentraut 3eb9b73718 Remove compiler warnings (add missing include files). Only link against
-lm if it's actually there.
2000-10-28 15:10:36 +00:00
Peter Eisentraut 8df6b2b53f Add --version and --help options to "postgres". 2000-10-28 01:07:00 +00:00
Peter Eisentraut 6707ede813 Make use of system-specific linker option to embed shared library search
path into executables and shared libraries (-rpath or -R for most).  Can be
disabled with --disable-rpath, since some binary packaging standards do not
like this option.
2000-10-27 23:59:39 +00:00
Peter Eisentraut 26d008c62f Use compiler driver, not linker, to link shared libraries on Unixware. 2000-10-27 20:09:48 +00:00
Peter Eisentraut 7e77668e7a Make regression tests work with VPATH builds. 2000-10-27 20:00:22 +00:00
Tatsuo Ishii 29f6c8dff8 Fix for drop db message format changes 2000-10-27 02:25:34 +00:00
Tatsuo Ishii 2969c01d55 Remove gcc-only macro definition 2000-10-27 02:23:51 +00:00
Tom Lane 063c0f6bea Disallow bits beyond the mask length for CIDR values, per discussion
on pghackers.  Arrange for the sort ordering of general INET values
to be network part as major sort key, host part as minor sort key.
I did not force an initdb for this change, but anyone who's running
indexes on general INET values may need to recreate those indexes.
2000-10-27 01:55:23 +00:00
Tom Lane 2f35b4efdb Re-implement LIMIT/OFFSET as a plan node type, instead of a hack in
ExecutorRun.  This allows LIMIT to work in a view.  Also, LIMIT in a
cursor declaration will behave in a reasonable fashion, whereas before
it was overridden by the FETCH count.
2000-10-26 21:38:24 +00:00
Tom Lane 8cbda7cbd0 Fix breakage I introduced yesterday in MULTIBYTE compilations.
Sorry 'bout that, chief...
2000-10-26 17:31:35 +00:00
Tom Lane 62cc75c8fd Clean up gcc warnings in MULTIBYTE mode. 2000-10-26 17:04:12 +00:00
Tom Lane 6afa2ae4d2 Clean up broken test for whether to wait for input in SSL case.
Per discussion with Magnus Hagander.
2000-10-25 22:27:25 +00:00
Tom Lane 09a8912f73 Ensure clause_selectivity() behaves sanely when examining an uplevel Var
or a Var that references a subquery output.
2000-10-25 21:48:12 +00:00
Tom Lane 4ad9fe4ce5 Teach psql about new relkind for views. 2000-10-25 20:36:52 +00:00
Tom Lane 0a63b6d066 Support SET/SHOW/RESET client_encoding and server_encoding even when
MULTIBYTE support is not compiled (you just can't set them to anything
but SQL_ASCII).  This should reduce interoperability problems between
MB-enabled clients and non-MB-enabled servers.
2000-10-25 19:44:44 +00:00
Tom Lane 995ccad699 Minor cleanup. 2000-10-25 19:36:03 +00:00
Michael Meskes b111331d4b Synced preproc.y with gram.y. 2000-10-25 19:28:09 +00:00
Tom Lane f9453f468d Accept CREATE DATABASE WITH ENCODING 'SQL_ASCII' even when MULTIBYTE
support is not present.  This allows a non-MB server to load a pg_dumpall
script produced by an MB-enabled server, so long as only ASCII encoding
was used.
2000-10-25 18:56:16 +00:00
Peter Eisentraut 53f300d49e Rearrange handling of -L linker options so that they are always before all
the -l options.  (This was not the case when using the  OpenSSL or Kerberos
options.)  Also make sure that shared library links get to see all the -L
options.  Get Kerberos 5 support to compile on Redhat 7.0.  Add OpenSSL and
-lsocket (if used/found) to libpq link.
2000-10-25 16:13:52 +00:00
Thomas G. Lockhart c404d91c0b From Zoltan Kovacs back in April (sorry for the delay Zoltan!):
I modified the current ODBC driver for

* referential integrity error reporting,
* SELECT in transactions and
* disabling autocommit.

I tested these changes with Borland C++ Builder -> ODBCExpress ->
WinODBC driver (DLL) -> Postgres 7.0beta1 and Borland C++ Builder -> BDE ->
WinODBC driver (DLL) -> Postgres 7.0beta1. The patch is based on snapshot of
22th April (I don't think that someone has modified it since that: Byron
hasn't gave any sign of living for about a month and I didn't find any
comments about the ODBC driver on the list).
2000-10-25 14:15:49 +00:00
Philip Warner 48f0490809 Final (?) fix for tar (null block at end)
Dump template db in dumpall
2000-10-25 10:21:38 +00:00
Michael Meskes 03f9e5a5fc Added some more C constructs to the parser. 2000-10-25 07:00:33 +00:00
Vadim B. Mikheev 157ff4e108 WAL utils defs 2000-10-25 00:49:14 +00:00
Tom Lane 612f1b01f8 Check for SIGHUP and process config file updates just after waiting
for input, not just before.
2000-10-24 21:33:52 +00:00
Tom Lane 4cafef5c08 Do not execute fastpath function calls if in transaction ABORT state.
Just like queries, doing nothing is better than possibly getting weird
error messages.  Also, improve comments.
2000-10-24 20:59:35 +00:00
Peter Eisentraut b0c1c53a43 Integer binary operators, from Marko Kreen <marko@l-t.ee>. Renamed bitxor
operator to '#' for consistency.  Parser still needs work.
2000-10-24 20:16:48 +00:00
Tom Lane fa9357d0b7 Fix AbortOutOfAnyTransaction logic to avoid notice about
'AbortTransaction and not in in-progress state' when client disconnects
just after an error.  Notice seems pretty harmless, so I'm not going
to worry about back-patching this into 7.0.* ...
2000-10-24 20:06:39 +00:00
Tom Lane f9b2298bb3 Wups, messed up the comment markers on that last change. 2000-10-24 19:31:13 +00:00
Peter Eisentraut 7300a28a67 Ignore missing postmaster.opts.default file. 2000-10-24 19:11:15 +00:00
Peter Eisentraut 0f5169b4af New config.guess and config.sub with Darwin support (from official GNU
source).  Adjust resultmap accordingly and fix some other regexps.
2000-10-24 18:11:48 +00:00
Tom Lane 7ab8384543 Create empty file so that CVS sources compile (Vadim can fill in real
definition later...)
2000-10-24 18:05:14 +00:00
Tom Lane c5185e84e8 Update plperl README per suggestions from Edward Bridges. 2000-10-24 17:47:32 +00:00
Tom Lane 0fb5db60e6 Enable plperl to be built when --with-perl is selected. Dunno whether
latest fixes make it safe or not, but we won't find out if no one builds
it, eh?
2000-10-24 17:03:46 +00:00
Tom Lane 1318342b6e Eliminate POLLUTE=1 hack for cross-Perl-version compatibility by using
Devel::PPPort instead.  Thanks to Gilles Darold for doing the legwork.
2000-10-24 17:01:06 +00:00
Philip Warner 9cbb5fcd2b Various fixes to TAR header format
Fix for endian bug in TAR output
Nicer error messages in pg_dump
2000-10-24 13:24:30 +00:00
Vadim B. Mikheev db2faa943a WAL misc 2000-10-24 09:56:23 +00:00
Tom Lane 4b70629b92 Rejigger do_lo_list's query so that obj_description() is evaluated only
once per distinct LO, not once per pg_largeobject tuple.
2000-10-24 04:13:28 +00:00
Tom Lane a9b6b01ee8 Reconsider page size for large objects: rather than stuffing disk pages
as full as possible, seems better to use a tuple size around BLCKSZ/4
so that less space is wasted when a LO tuple is updated.  Also, this
lets us use a logical page size that's an exact power of two, avoiding
partial-page writes when client is sending us stuff in power-of-2
buffer chunks.
2000-10-24 03:34:53 +00:00
Tom Lane 711c9f30f8 Increase buffer size to improve performance of client-side lo_import. 2000-10-24 03:15:14 +00:00
Tom Lane 36298373c7 Remove arbitrary limit on number of simultaneously open large objects.
This used to make some sense under the old implementation, but now an
open LO is pretty darn cheap, so why restrict it?
2000-10-24 03:14:08 +00:00
Tom Lane 4f44aa04b5 Major overhaul of large-object implementation, by Denis Perchine with
kibitzing from Tom Lane.  Large objects are now all stored in a single
system relation "pg_largeobject" --- no more xinv or xinx files, no more
relkind 'l'.  This should offer substantial performance improvement for
large numbers of LOs, since there won't be directory bloat anymore.
It'll also fix problems like running out of locktable space when you
access thousands of LOs in one transaction.
Also clean up cruft in read/write routines.  LOs with "holes" in them
(never-written byte ranges) now work just like Unix files with holes do:
a hole reads as zeroes but doesn't occupy storage space.
INITDB forced!
2000-10-24 01:38:44 +00:00
Tom Lane d7186cfa9b Add some modicum of error detection... 2000-10-24 00:08:02 +00:00
Tom Lane 570ed46401 Remove testlo2.c --- there seems to be no difference between this and
testlo.c, except it's even skimpier on error checking :-(
2000-10-24 00:04:11 +00:00
Tom Lane dea7d54151 If a field is incompressible ('compressed' data is actually larger than
source, due to addition of header overhead), store it as plain data
rather than pseudo-compressed data.  This saves a few microseconds when
reading it out, but much more importantly guarantees that the toaster
won't actually expand tuples that contain incompressible data.  That's
essential to avoid 'Tuple too big' failures with large objects.
2000-10-23 23:42:04 +00:00
Peter Eisentraut 7b021ce17c Polish shared library build to reduce number of special hacks. In
particular, allow linking with arbitrary commands rather than only $(AR) or
$(LD), and treat C++ without hacks.

Add option to disable shared libraries.  This takes the place of the
BSD_SHLIB variable.  The regression test driver ignores the plpgsql test
if there are no shared libraries available.
2000-10-23 21:44:12 +00:00
Bruce Momjian 8111329b87 Back out xti.h portion of the patch. 2000-10-23 14:50:44 +00:00
Vadim B. Mikheev 4b65a2840b New relcache hash table with RelFileNode as key to be used
from bufmgr - it would be nice to have separate hash in smgr
for node <--> fd mappings, but for the moment it's easy to
add new hash to relcache.
Fixed small bug in xlog.c:ReadRecord.
2000-10-23 04:10:24 +00:00
Tom Lane 9ace03183c Some small polishing of Mark Hollomon's cleanup of DROP command: might
as well allow DROP multiple INDEX, RULE, TYPE as well.  Add missing
CommandCounterIncrement to DROP loop, which could cause trouble otherwise
with multiple DROP of items affecting same catalog entries.  Try to
bring a little consistency to various error messages using 'does not exist',
'nonexistent', etc --- I standardized on 'does not exist' since that's
what the vast majority of the existing uses seem to be.
2000-10-22 23:32:48 +00:00
Tom Lane ee28d8b3d5 plpgsql regress tests seem a tad out of date ... repair bit rot. 2000-10-22 23:25:11 +00:00
Philip Warner e91932eb5a Cleanup error messages in findLastBuiltinOid 2000-10-22 23:16:55 +00:00
Peter Eisentraut fba790ad58 Makeover for Unixware 7.1.1
* Makefile: Add more standard targets.  Improve shell redirection in GNU
make detection.
* src/backend/access/transam/rmgr.c: Fix incorrect(?) C.
* src/backend/libpq/pqcomm.c (StreamConnection): Work around accept() bug.
* src/include/port/unixware.h: ...with help from here.
* src/backend/nodes/print.c (plannode_type): Remove some "break"s after
"return"s.
* src/backend/tcop/dest.c (DestToFunction): ditto.
* src/backend/nodes/readfuncs.c: Add proper prototypes.
* src/backend/utils/adt/numutils.c (pg_atoi): Cope specially with strtol()
setting EINVAL. This saves us from creating an extra set of regression test
output for the affected systems.
* src/include/storage/s_lock.h (tas): Correct prototype.
* src/interfaces/libpq/fe-connect.c (parseServiceInfo): Don't use variable
as dimension in array definition.
* src/makefiles/Makefile.unixware: Add support for GCC.
* src/template/unixware: same here
* src/test/regress/expected/abstime-solaris-1947.out: Adjust whitespace.
* src/test/regress/expected/horology-solaris-1947.out: Part of this file
was evidently missing.
* src/test/regress/pg_regress.sh: Fix shell.  mkdir -p returns non-zero if
the directory exists.
* src/test/regress/resultmap: Add entries for Unixware.
2000-10-22 22:15:13 +00:00
Tom Lane 3c5d000749 Fix incorrect logic for clearing BufferDirtiedByMe in ReleaseRelationBuffers
and DropBuffers.  Formerly we cleared the flag for each buffer currently
belonging to the target rel or database, but that's completely wrong!
Must look at BufferTagLastDirtied to see whether the BufferDirtiedByMe
flag is relevant to target rel or not; this is *independent* of the
current contents of the buffer.  Vadim spotted this problem, but his
fix was only partially correct...
2000-10-22 20:20:49 +00:00
Tom Lane 5aeec4bbbc Patch VACUUM problem with moving chain of update tuples when source
and destination of a tuple lie on the same page.
(Previously fixed in REL7_0 branch, now apply to current.)
2000-10-22 19:49:43 +00:00
Tom Lane e51d0b3c37 datlastsysoid is an Oid, not an int4 ... 2000-10-22 18:29:58 +00:00
Philip Warner 3cf6e94844 Use new datlastsysoid field in pg_database + some cleanups & fixes 2000-10-22 18:13:09 +00:00
Philip Warner 4ac174213f Add new datlastsysoid to pg_database.
This field stores the last allocated OID after the database was created.
Used by pg_dump in deciding what is user-defined vs. system-defined.
2000-10-22 17:55:49 +00:00
Michael Meskes 7e02371e0f Fixed mixing of two enum datatypes. 2000-10-22 13:36:19 +00:00
Bruce Momjian aa23c70522 BACKED OUT.
> Regression tests opr_sanity and sanity_check are now failing.

Um, Bruce, I've said several times that I didn't think Perchine's large
object changes should be applied until someone had actually reviewed
them.
2000-10-22 05:27:23 +00:00
Bruce Momjian 4ed04855b0 Crash on NULL again in system table check. 2000-10-22 05:14:01 +00:00
Peter Eisentraut f8ff1ee5aa Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template to
Makefile.port, since they are of no use to configure and much of the
library magic happens in Makefile.port anyway.

Use __alpha, not __alpha__, since the former is universally available.
Remove -DNOFIXADE from the compile command line and put it in the port
include file.
2000-10-21 22:36:14 +00:00
Bruce Momjian 0968601b1b First a core dump which can be relieved by:
Patrick Welche
2000-10-21 18:41:51 +00:00
Peter Eisentraut ec195b991f This file isn't used anywhere. 2000-10-21 17:09:18 +00:00
Bruce Momjian 02132c4a05 Remove CC and CXX. 2000-10-21 17:07:31 +00:00
Bruce Momjian 293d1e5f2c here it is as requested by Bruce.
I tested it restoring my database with > 100000 BLOBS, and dumping it out.
But unfortunatly I can not restore it back due to problems in pg_dump.

--
Sincerely Yours,
Denis Perchine
2000-10-21 15:55:29 +00:00
Bruce Momjian 33581195d5 Per my ongoing discussion with PeterE, here is the patch I applied to
src/template/unixware:

Larry Rosenman
2000-10-21 15:50:32 +00:00
Vadim B. Mikheev a7fcadd10a WAL 2000-10-21 15:43:36 +00:00
Peter Eisentraut 12e7558c76 Add check for GNU or not GNU ld, needed to pick the right export_dynamic
flags for Solaris.  The test itself is straight from libtool.
2000-10-20 23:57:34 +00:00
Peter Eisentraut 805e431a38 Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
2000-10-20 21:04:27 +00:00
Vadim B. Mikheev 27bc34be55 WAL need in overwrite mode - restored in new way
(without PageManagetSetMode -:))
Safe shuffle mode behaviour retained.
2000-10-20 11:28:39 +00:00
Vadim B. Mikheev b58c0411ba redo/undo support functions and cleanups. 2000-10-20 11:01:21 +00:00
Tom Lane e18a862d46 Remove 'override' keyword, which breaks the build on HPUX, and probably
anywhere else that Makefile.shlib needs to modify CFLAGS to produce
valid code for a shared library.  I'm not real clear on *why* the use
of override causes make to ignore the later attempt to assign
CFLAGS		+=
but it indubitably does --- at least on gmake 3.79.1.  gmake bug?
2000-10-20 03:45:35 +00:00
Tom Lane 70df64840b Clean up gcc warnings. 2000-10-20 02:53:10 +00:00
Tom Lane 8b53eaf90c Improve comments. 2000-10-19 23:06:24 +00:00
Tom Lane ee0bcb8c5e Fix missing CommandCounterIncrement in DROP USER. 2000-10-19 03:55:51 +00:00
Bruce Momjian 73677dd92f The following patch was sent to the patches list:
This patch forces the use of 'DROP VIEW' to destroy views.

It also changes the syntax of DROP VIEW to
DROP VIEW v1, v2, ...
to match the syntax of DROP TABLE.

Some error messages were changed so this patch also includes changes to the
appropriate expected/*.out files.

Doc changes for 'DROP TABLE" and 'DROP VIEW' are included.


--
Mark Hollomon
2000-10-18 16:16:18 +00:00
Vadim B. Mikheev 2e6358172f I had to change buffer tag: now RelFileNode is used instead of
LockRelId - ie physical information, not logical. It's required
for WAL. Regression tests passed.
2000-10-18 05:50:16 +00:00
Tom Lane 8b6b414a5e Update pltcl regress test to exercise return_null; also make use of
the fact that CREATE FUNCTION and CREATE AGGREGATE now allow array
types to be named like int4[] rather than _int4.
2000-10-17 21:23:09 +00:00
Peter Eisentraut 179b8e5722 Locate the file pg_service.conf in the directory configured as --syconfdir
(i.e., /usr/local/pgsql/etc by default).
2000-10-17 17:43:13 +00:00
Michael Meskes adeedf9047 Fixed some bugs in C language parsing. 2000-10-17 15:38:26 +00:00
Peter Eisentraut 0db3cb253d * doc/src/sgml/regress.sgml: Update for new driver script.
* doc/src/sgml/installation.sgml: ditto.

* src/test/regress/README: Regenerate.

* doc/src/sgml/docguide.sgml: Explain how it was done.  Explain how
INSTALL and HISTORY are (now) generated.

* doc/src/sgml/Makefile: Implement HISTORY generation to be analoguous
to INSTALL.
2000-10-17 15:26:40 +00:00
Peter Mount f7b89ac5d9 Some more getTimestamp() fixes 2000-10-17 14:52:01 +00:00
Michael Meskes 0a97c4a047 Simplified parsing of connect rule. 2000-10-17 06:15:29 +00:00
Bruce Momjian f2ef4df4a3 TNS:
I prepared and tested a patch vs. 7.0.2, and it works fine. I've added
another option which allows users to have their own service file in
~/.pg_service.conf, which might come handy sometimes.

Mario Weilguni
2000-10-17 01:00:58 +00:00
Bruce Momjian 1333f07ff1 I wasn't too sure where to mail this.
I have noticed that there are some identical files in
postgresql-7.0.2/src/test/regress/expected/

> diff float8-cygwin.out float8-small-is-zero.out #I recommend deleting
float8-cygwin.out
> diff geometry-cygwin-precision.out geometry-solaris-precision.out #I
recommend deleting geometry-cygwin-precision.out

below is the diff of postgresql-7.0.2/src/test/regress/resultmap
that has the above files deleted plus the addition of an alpha regression
test built with alphaev56-dec-osf4.0e/2.95.2/ . The alpha geometry
regression file is attached

11c11
< float8/i.86-pc-cygwin*=float8-cygwin
---
> float8/i.86-pc-cygwin*=float8-small-is-zero
18c18
< geometry/i.86-pc-cygwin*=geometry-cygwin-precision
---
> geometry/i.86-pc-cygwin*=geometry-solaris-precision
21a22
> geometry/alpha.*-dec-osf=geometry-alpha-precision



Ricardo Muggli
Systems Manager
Information and Technology Services
Minnesota State University, Mankato
2000-10-16 22:37:37 +00:00
Michael Meskes 3615a6a84d Fixed handling of variables in connect rule. 2000-10-16 19:53:04 +00:00
Bruce Momjian 85f1950a6f Remove NO_SECURITY define. 2000-10-16 17:08:11 +00:00
Bruce Momjian 17e3e4702d Fix typo in code. 2000-10-16 16:19:14 +00:00
Bruce Momjian 78d4ca03d4 Something changed, that now shows that there is a dependency missing in
Makefile .aix

Please apply to current, to fix shared lib build from single .o files.
Thanks
Andreas
2000-10-16 15:00:15 +00:00
Vadim B. Mikheev 2c7de17b07 New file naming. Database OID is used as "tablespace" id and
relation OID is used as file node on creation but may be changed later
if required. Regression Tests Approved (c) -:)))
2000-10-16 14:52:28 +00:00
Bruce Momjian 07a55ebf64 I submitted three patches to pgsql-patches@postgresql.org on Oct 13.
Only two have shown up on the web site.  Even the mbox is missing the
second.

The missing patch is a one-liner, so here it is.  I can resend the
whole bug report if wanted.

Pete Forman
2000-10-16 14:34:08 +00:00
Philip Warner a6c09e3563 Fix prototype declaration based on patch from David Reid 2000-10-15 00:34:54 +00:00
Bruce Momjian 0f07d644a3 The configure script fails to find <netinet/tcp.h>.
As a result, backend/libpq/pqcomm.c and interfaces/libpq/fe-connect.c
fail to compile.

The <netinet/tcp.h> header needs to be preceded by <netinet/in.h>, at
least on IRIX, Solaris and AIX.  The simple configure test fails.
(That header on Linux is idempotent.)

The basic problem is that <netinet/tcp.h> is a BSD header.  The
correct header for TCP internals such as TCP_NODELAY on a UNIX system
is <xti.h>.  By UNIX I mean UNIX95 (aka XPG4v2 or SUSv1) or later.
The current UNIX standard (UNIX98 aka SUSv2) is available online at
<http://www.opengroup.org/onlinepubs/7908799/>.

The fix is to add header support for <xti.h> into configure.in and
config.h.in.

The 2 files which conditionally include <netinet/tcp.h> need also to
conditionally include <xti.h>.

Pete Forman
2000-10-14 23:56:59 +00:00
Bruce Momjian d3902198b4 Here is a patch for resultmap and the results file.
I have counted 9 differences in the least significant digit compared
with geometry-positive-zeros.out.  It would be wise for someone else
to double check.

Pete Forman
2000-10-14 23:55:58 +00:00
Vadim B. Mikheev b33428d20c Various utils for WAL 2000-10-13 12:06:40 +00:00
Vadim B. Mikheev deee783052 WAL 2000-10-13 12:05:22 +00:00
Philip Warner 14f214de59 Minor buglet in dumping functions onlt 2000-10-13 03:11:06 +00:00
Vadim B. Mikheev 25a26a7ab8 WAL 2000-10-13 02:03:02 +00:00
Philip Warner 1b1dbb861d Fix bug in sequence dumping using new setval function 2000-10-13 00:43:31 +00:00
Philip Warner 8fb04f8f98 Make setval(text,int32,bool) visible 2000-10-13 00:33:47 +00:00
Michael Meskes 965a0a40e1 Replace constants by C variables wherever possible. 2000-10-12 18:25:36 +00:00
Peter Mount f41dcbe4d8 Major update part I involving delayed patches, reworked Makefile, and how
the versioning works. There's also a new utils directory used by Makefile
2000-10-12 08:55:28 +00:00
Tatsuo Ishii f20d2a87fb Add more files from backend 2000-10-12 07:38:13 +00:00
Tatsuo Ishii 40184eecd5 Disable elog when linked with frontend. 2000-10-12 07:36:51 +00:00
Tatsuo Ishii f48b9f9ec7 Support for automatic code conversion between UNICODE and other
encodings
2000-10-12 06:08:28 +00:00
Tatsuo Ishii de53ce8131 Support for conversion between UNICODE and other encodings
currently ISO8859-[1-5] and EUC_JP are supported.
support for other encodings will be coming soon.
2000-10-12 06:06:50 +00:00
Bruce Momjian f41f8eebe7 Fix temp relation handling for indexes, cleanup 2000-10-11 21:28:19 +00:00
Bruce Momjian 3d45543698 Oops, back out my unintended changes. 2000-10-11 17:58:01 +00:00
Bruce Momjian 5e38665f8a Update make_mkid 2000-10-11 17:55:34 +00:00
Philip Warner 6fec21609b Added new SQL function setval(seq,val,bool) to restore is_called as well as value
(will be used in a future pg_dump).
2000-10-11 15:31:34 +00:00
Michael Meskes 8e72a8782c Synced preproc.y with gram.y 2000-10-11 14:56:37 +00:00
Bruce Momjian 78f69862af Rename pg-config to pg_config to be consistent with other pg commands. 2000-10-10 22:01:55 +00:00
Peter Eisentraut 4d76a801c6 Unify solaris_i386 and solaris_sparc templates. They were almost identical
anyway, the rest being due to them not being kept in sync.  Add configure
test for lorder and use it (on Solaris) when found.
2000-10-10 21:22:29 +00:00
Peter Eisentraut cbe5f73aa0 Some dynloader files missed the template rename a while back. 2000-10-10 21:08:04 +00:00
Bruce Momjian e7b069ced1 This is a stupid garden variety bug and I'm not sure why I didn't catch
it previously.  The patch included is against fairly current sources, but
it may apply cleanly against 7.0.2 as well.

On Fri, 6 Oct 2000, Vilson farias wrote:

> I found a irregular behavior with constraints.
>
> I can only set a referencial integrity between these tables when there are
> no data, even if there are no change to referential integrity violation.
2000-10-10 17:13:30 +00:00
Philip Warner f350481134 - Be more paranoid when getting views
- Support for 'isstrict' procedure attribute.
- Disable --blobs and --table
(replaced prior to attempting to fix sequence dump problems)
2000-10-10 13:55:28 +00:00
Bruce Momjian 87db3b88e0 Remove override of CFLAGS. 2000-10-10 13:04:46 +00:00
Bruce Momjian a4e3943b3f Back out Gunnar R|nning jdbc changes. 2000-10-09 16:48:19 +00:00
Peter Eisentraut c4ccc6146b Cosmetic cleanups of Beos port 2000-10-09 16:42:55 +00:00
Peter Eisentraut 984b0b4df8 Append "/postgresql" to (certain) installation subdirectories when
installing into a shared location.  Also Makefile.global organizational
cleanup.
2000-10-08 21:13:27 +00:00
Bruce Momjian 5383b5d8ed Okay, I have some new code in place that hopefully should work better. I
couldn't produce a full patch using cvs diff -c this time since I have
created new files and anonymous cvs usage doesn't allow you to
adds. I'm supplying the modified src/interfaces/jdbc as a tarball at :
http://www.candleweb.no/~gunnar/projects/pgsql/postgres-jdbc-2000-10-05.tgz

The new files that should be added are :

? org/postgresql/PGStatement.java
? org/postgresql/ObjectPool.java
? org/postgresql/ObjectPoolFactory.java

There is now a global static pool of free byte arrays and used byte arrays
connected to a statement object. This is the role of the new PGStatement
class. Access to the global free array is synchronized, while we rely on
the PG_Stream synchronization for the used array.

My measurements show that the perfomance boost on this code is not quite as
big as my last shot, but it is still an improvement. Maybe some of the
difference is due to the new synchronization on the global array. I think I
will look into choosing between on a connection level and global level.

I have also started experimented with improving the performance of the
various conversions. The problem here is ofcourse related handle the
various encodings. One thing I found to speed up ResultSet.getInt() a lot
was to do custom conversion on the byte array into int instead of going
through the getString() to do the conversion. But I'm unsure if this is
portable, can we assume that a digit never can be represented by more than
one byte ? It works fine in my iso-latin-8859-1 environment, but what about
other environments ? Maybe we could provide different ResultSet
implementations depending on the encoding used or delegate some methods of
the result set to an "converter class".

Check the org/postgresql/jdbc2/FastResultSet.java in the tarball above to
see the modified getInt() method.

Regards,

        Gunnar
2000-10-08 19:37:56 +00:00
Bruce Momjian ed059eca88 This removes the LDFLAGS from the template and adds an autoconf check
for the library.  not sure if this will cause problems on other
platforms, but if it does it can be easily fixed.  Also remove the
references to the GeekGadgets includes as the majority of users don't
have them installed and they foul the build process.  We can document
that adding them if you have them installed is a good idea.

David Reid
2000-10-08 13:49:47 +00:00
Tatsuo Ishii 2af8b963f1 Add runtime configuration option "silent_mode".
This is equivalent to postmaster's -S option.
2000-10-08 09:25:38 +00:00
Bruce Momjian be58282516 Tom Lane wrote:
> > For a while I though it might be because we are using an alpha TAS in
> > the spinlock rather than the old semaphore. I replaced our spinlock
> > with the standard one and it made no difference. We have been running
> > with our spinlock implementation for nearly 2 months on a production
> > database now without a hitch, so I think it is ok. Did I ever submit
> > any patches for the Alpha spinlock?
>
> Not that I recall.  We did get some advice from some Alpha gurus at DEC
> who seemed to think the existing TAS code is OK.  What was it that you
> felt needed to be improved?

The current code uses semaphores, which has the advantage that it works
well even on multi-processor machines, but the disadvantage that it is not
the fastest way possible. Writing a spinlock on Alpha for SMP machines is
very difficult, as you need to deal with memory barriers. A real mess. But
then one of the people at Compaq pointed out to us that there is a
ready-made routine on Alpha. We implemented it with the two patches below.
I ran tests with lots of parallel back-ends and got around a 10% speed
increase. I include the two patches. Perhaps some of the other people
running Tru64 can have a look at these as well.

Cheers,

Adriaan Joubert
2000-10-08 04:38:21 +00:00
Bruce Momjian e5e5de8e8c Back out:
> this is patch v 0.4 to support transactions with BLOBs.
> All BLOBs are in one table. You need to make initdb.
>
> --
> Sincerely Yours,
> Denis Perchine
2000-10-08 03:53:15 +00:00
Bruce Momjian cf5a950c10 Hello,
this is patch v 0.4 to support transactions with BLOBs.
All BLOBs are in one table. You need to make initdb.

--
Sincerely Yours,
Denis Perchine
2000-10-08 03:18:57 +00:00
Tom Lane d8e582e236 Revert rules.out to non-broken state. I will with difficulty hold my
tongue about the sloppiness of (a) submitting and (b) committing this
file.
2000-10-08 02:51:50 +00:00
Peter Eisentraut 9d2f3000f2 To create a temporary installation, the regression test driver should use
the make program that was used to build itself.  This seems more correct
than guessing around for some gmake.
2000-10-07 20:23:03 +00:00
Bruce Momjian 969e28d878 Thanks for the patch
It builds and run nicely now

        it seem that the resultmap file have not been updated.

Cyril VELTER
2000-10-07 19:48:27 +00:00
Peter Eisentraut 8650454640 Remove stuff that shouldn't be here. 2000-10-07 18:59:12 +00:00
Peter Eisentraut a3578c13e6 Separate -Wl,-E or equivalent into separate make variable, since it's only
necessary for the postgres/postmaster link, not every link.
2000-10-07 18:43:23 +00:00
Bruce Momjian 8e469b4ffc Beos regression patch. 2000-10-07 14:55:16 +00:00
Bruce Momjian 7ea8403c8a The beos port in the source tree doesn't even compile. and even
after that dynamic loading isn't working and shared memory handling is
broken.

        Attached with this message, there is a Zip file which contain :

        * beos.diff = patch file generated with difforig
        * beos = folder with beos support files which need to be moved in /
src/backend/port
        * expected = foler with three file for message and precision
difference in regression test
        * regression.diff = rule problem (need to kill the backend manualy)
        * dynloader = dynloader files (they are also in the pacth files,
but there is so much modification that I have join full files)

        Everything works except a problem in 'rules' Is there some problems
with rules in the current tree ? It used to works with last week tree.

Cyril VELTER
2000-10-07 14:39:21 +00:00
Bruce Momjian a759460178 New beos files. FAQ cleanup. 2000-10-07 14:16:02 +00:00
Tom Lane 949529481e Second thoughts about where to put DeferredTriggerEndQuery() call. 2000-10-07 04:00:41 +00:00
Tom Lane fbd26d6984 Arrange that no database accesses are attempted during parser() --- this
took some rejiggering of typename and ACL parsing, as well as moving
parse_analyze call out of parser().  Restructure postgres.c processing
so that parse analysis and rewrite are skipped when in abort-transaction
state.  Only COMMIT and ABORT statements will be processed beyond the raw
parser() phase.  This addresses problem of parser failing with database access
errors while in aborted state (see pghackers discussions around 7/28/00).
Also fix some bugs with COMMIT/ABORT statements appearing in the middle of
a single query input string.
Function, operator, and aggregate arguments/results can now use full
TypeName production, in particular foo[] for array types.
DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators.
Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
2000-10-07 00:58:23 +00:00
Tom Lane 4837270be9 Fix silly typo that led to 'tleIsArrayAssign: I'm confused' message.
Indeed it was.
2000-10-05 21:52:08 +00:00
Tom Lane a4566a7a7a Clean up gcc warning, fix inappropriate choice of configuration symbol. 2000-10-05 20:18:33 +00:00
Tom Lane 32616129cd Suppress gcc warnings. 2000-10-05 20:10:20 +00:00
Bruce Momjian b32685a999 Add proofreader's changes to docs.
Fix misspelling of disbursion to dispersion.
2000-10-05 19:48:34 +00:00
Tom Lane 05e3d0ee86 Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet the
SQL92 semantics, including support for ALL option.  All three can be used
in subqueries and views.  DISTINCT and ORDER BY work now in views, too.
This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT
where the SELECT yields different datatypes than the INSERT needs.  I did
that by making UNION subqueries and SELECT in INSERT be treated like
subselects-in-FROM, thereby allowing an extra level of targetlist where the
datatype conversions can be inserted safely.
INITDB NEEDED!
2000-10-05 19:11:39 +00:00
Michael Meskes 2d5ff2f9a0 Added patch by Cristof for catching yet another NOTICE. 2000-10-04 12:39:45 +00:00
Michael Meskes 136a4aebb6 removed binary file
CV: ----------------------------------------------------------------------
2000-10-04 10:11:33 +00:00
Vadim B. Mikheev 5800c6b9aa Btree WAL logging. 2000-10-04 00:04:43 +00:00
Peter Eisentraut 831e78e0c4 Better coding of readline tests 2000-10-03 19:50:21 +00:00
Peter Eisentraut 1b7332fbab Fix to make output format identical on echo -n and echo \c platforms. This
had caused the test counts to be wrong on the latter group.
2000-10-03 19:37:39 +00:00
Peter Eisentraut 7c5a444f53 Treat empty connection parameters as is, in particular to enable overriding
environment variables with "nothing".  Empty host parameter indicates
Unix socket.
2000-10-03 19:16:17 +00:00
Bruce Momjian 2737974085 Cleanup of fe-connect ifdef platform problem added with beos. 2000-10-03 03:39:46 +00:00
Bruce Momjian 87c0e623ba New diff that now covers the entire tree. Applying this gets postgresql
working on the VERY latest version of BeOS.  I'm sure there will be
alot of comments, but then if there weren't I'd be disappointed!

Thanks for your continuing efforts to get this into your tree.

Haven't bothered with the new files as they haven't changed.

BTW Peter, the compiler is "broken" about the bool define and so on.
I'm filing a bug report to try and get it addressed.  Hopefully then we
can tidy up the code a bit.

I await the replies with interest :)

David Reid
2000-10-03 03:11:26 +00:00
Peter Eisentraut 65577dc83e Mop up from caddr_t -> Datum conversion to make things extra type safe 2000-10-02 21:45:33 +00:00
Peter Eisentraut 416bbbffa3 Banish caddr_t (mostly), use Datum where appropriate. 2000-10-02 19:42:56 +00:00
Bruce Momjian 7a7e0240ea Here is the first batch of files and diffs for the BeOS port. I've run into
problems with some bits of it, but when all the patches are in it'll build
and we can fix it from there :)  I've got a version that builds and runs and
that is the basis for these patches.

The first file has the new additional files that are required,
    template/beos
    backend/port/dynloader/beos.c
    backend/port/dynloader/beos.h
    include/port/beos.h
    makefiles/Makefile.beos

The second is a tarball of diffs against a few files.  I've added sys/ipc.h
to configure and config.h via configure.in and config.h.in and then started
adding the check as this file isn't needed on BeOS and having loads of
#ifdef BEOS isn't as obvious as #ifdef HAVE_SYS_IPC_H and isn't as
autconf'ish :)
Files touched are
    include/c.h
    configure.in
    include/config.h.in
    include/storage/ipc.h
    include/utils/int8.h

Let me know how these go.  I'll await a response before submitting any more.

Any problems just get in touch.

David Reid
2000-10-02 17:16:01 +00:00
Bruce Momjian 89f6443ca3 In the meaning of bug-fix, the patch is not needed. Because you
have already modified "next_insert()" in 7.0-ecpglib.  However
in the meaning of speed-up, the patch will be needed.
--
Regards,
SAKAIDA Masaaki  -- Osaka, Japan
2000-10-02 16:15:53 +00:00
Peter Eisentraut e05f15483b Communicate PGPORT and PGHOST via environment, not command line 2000-10-02 11:47:30 +00:00
Tom Lane 5ba666b848 Honor $(SHELL) when invoking pg_regress. 2000-10-02 06:07:25 +00:00
Tom Lane fc7c1fe2f1 Fix silly typo that prevented resultmap from being honored by
pg_regress.
2000-10-02 06:03:25 +00:00
Tom Lane 7215f74b89 Make default ACL be consistent --- ie, starting point for ChangeAcl
is the same as the access permissions granted when a relation's relacl
field is NULL, ie, owner=all rights, world=no rights.
2000-10-02 04:49:28 +00:00
Bruce Momjian 439643a668 Add missing python files. 2000-10-02 03:46:24 +00:00
Bruce Momjian f36e7ff092 Update for PyGreSQL 3.0, from D'Arcy J.M. Cain 2000-10-02 03:27:33 +00:00
Peter Eisentraut 0bd84442f5 Fix quoting bug 2000-10-01 22:23:14 +00:00
Peter Eisentraut 61234c14fc Fix test order 2000-10-01 21:19:09 +00:00
Tom Lane 36786a8150 Fix nasty TRUNCATE bug reported by Darrin Ladd. RelationTruncateIndexes
would close and then re-open rel being truncated.  Depending on the
luck of the draw, the re-opened relcache entry might or might not be
at the same physical location as before.  Unfortunately, if it wasn't
then heap_truncate would crash and burn, because it still had a pointer
at the old location.  Fix is to open and then close rel in
RelationTruncateIndexes, so that rel's refcount never goes to zero
until heap_truncate is done.
2000-09-30 18:28:53 +00:00
Bruce Momjian 469ebeefd6 Please apply the following patch to fix problems with the AIX port
and the fmgr redesign.

It makes the homebrewn dl*() functions for more recent Versions of AIX
obsolete
by using the system dl*() functions instead.

It also fixes the expected file for the horology regression test.
Please regenerate configure from configure.in, I don't have the
environment/time.

Andreas
2000-09-29 22:00:49 +00:00
Tom Lane 3a94e789f5 Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.
(Don't forget that an alias is required.)  Views reimplemented as expanding
to subselect-in-FROM.  Grouping, aggregates, DISTINCT in views actually
work now (he says optimistically).  No UNION support in subselects/views
yet, but I have some ideas about that.  Rule-related permissions checking
moved out of rewriter and into executor.
INITDB REQUIRED!
2000-09-29 18:21:41 +00:00
Peter Eisentraut 6f64c2e54a New unified regression test driver, test/regress makefile cleanup,
add "check" and "installcheck" targets, straighten out make variable naming
of host_os, host_cpu, etc.
2000-09-29 17:17:41 +00:00
Peter Eisentraut 2a7da3f564 Standardize on __CYGWIN__ rather than __CYGWIN32__ macro. Doesn't matter
either way (although the former is preferred by the Cygwin folks
themselves), but using only one seems nicer.
2000-09-29 13:53:35 +00:00
Peter Eisentraut 30826ce8e3 Enable initdb to create several levels of directories for PGDATA, if
`mkdir -p' works.
2000-09-29 13:38:02 +00:00
Peter Eisentraut 1e2eb210bc Linking with -lc or -lm crashes on Cygwin; filter out those libraries from
the LIBS variable.
2000-09-29 13:36:50 +00:00
Peter Eisentraut 52dda5ec05 Cygwin uses _sys_nerr for sys_nerr 2000-09-29 13:35:26 +00:00
Hiroshi Inoue 5f18e2183e BufferAlloc() doesn't allocate write error buffers.
Remove compiler waring(my fault).
2000-09-29 03:55:45 +00:00
Hiroshi Inoue 77df055c54 avoid database-wide restart on write error 2000-09-29 01:23:47 +00:00
Peter Eisentraut 49e75453bd Cygwin doesn't have DST before 1970 either 2000-09-28 08:53:32 +00:00
Peter Eisentraut 664ce79dd8 Fixes for Cygwin, with help from Pete Forman <gsez020@kryten.bedford.waii.com>.
Update the installation instructions (formerly misnamed "FAQ"), add configure
checks for some headers rather than having users copy stubs manually (ugh!).
Use Autoconf check for exe extension.  This also avoids inheriting the value
of $(X) from the environment.
2000-09-27 15:17:57 +00:00
Peter Eisentraut 64610a82f2 Reset current user id to session user id during transaction abort 2000-09-27 10:41:55 +00:00
Michael Meskes 76f286b2ce - Synced preproc.y with gram.y.
- Synced keyword.c.
- Added patch by Christof Petig <christof.petig@wtal.de> to fix NOT
  FOUND problem on update/insert/delete.
2000-09-26 11:41:45 +00:00
Tatsuo Ishii e9da3dc673 Fix compile error in ecpg when enable-multibyte is on. This is due to
illegal call to pg_mbclipen() that is for backend only.  However I
have not remove the entire part of the problem, rather mark it with
#ifdef MULTIBYTE_NOTUSED since we should come back with a long range
solution someday.
2000-09-26 05:42:15 +00:00
Peter Eisentraut c0cba9efe7 When the RI triggers lock the PK table, temporarily switch the current user
id to the owner of the PK table, to avoid permission problems.
2000-09-25 22:34:20 +00:00
Peter Eisentraut f428d053ce Revise Tcl/Tk configuration. Make missing Tcl after --with-tcl an error,
add --without-tk option to disable Tk.  We don't need the AC_PATH_XTRA
test because tkConfig.sh already contains all the information about how to
compile and link with X.  Also make sure that libpq is up to date for
libpgtcl.  Remove executable bits from pgaccess.sh, but add it to pgaccess.
2000-09-25 22:23:01 +00:00
Tom Lane e353e73768 Correct error in grammar for subselect-in-FROM: SQL spec does not allow
omission of alias_clause for a subselect.
2000-09-25 18:38:39 +00:00
Tom Lane 8bdc2bf030 Use variable aliases, if supplied, rather than real column names in
complaints about ungrouped variables.  This is for consistency with
behavior elsewhere, notably the fact that the relname is reported as
an alias in these same complaints.  Also, it'll work with subselect-
in-FROM where old code didn't.
2000-09-25 18:14:55 +00:00
Tom Lane 164caa3951 System neglected to complain about ungrouped variables passed to
sublinks when outer query contained aggregates but no GROUP clause.
2000-09-25 18:09:28 +00:00
Tom Lane 74f0b61bf4 Karel missed an ichar->chr ... 2000-09-25 16:36:36 +00:00
Bruce Momjian fa1c31eab6 Change // to /*. 2000-09-25 14:40:27 +00:00
Bruce Momjian ebdfac3bb1 the patch include:
- rename ichar() to chr() (discussed with Tom)

        - add docs for oracle compatible routines:

                btrim()
                ascii()
                chr()
                repeat()

        - fix bug with timezone in to_char()

        - all to_char() variants return NULL instead textin("")
          if it's needful.

 The contrib/odbc is without changes and contains same routines as main
tree ... because I not sure how plans are Thomas with this :-)

                                        Karel
---------------------------------------------------------------------------

This effectively one line patch should fix the fact that
foreign key definitions in create table were erroring if
a primary key was defined.  I was using the columns
list to get the columns of the table for comparison, but
it got reused as a temporary list inside the primary key
stuff.

Stephan Szabo
2000-09-25 12:58:47 +00:00
Bruce Momjian 516aac42f9 disable plperl again. 2000-09-25 12:43:24 +00:00
Tom Lane a8405cfc4d Acquire read lock on a buffer while writing it out, to prevent
concurrent modifications to the page by other backends.
2000-09-25 04:11:09 +00:00
Tom Lane 384d94efdd Tweak resultmap so that geometry regress test selects the right comparison
file on LinuxPPC, which is identified by config.guess as
powerpc-unknown-linux-gnu (not ...-gnulibc1).
2000-09-24 04:07:11 +00:00
Tom Lane acbbeffc29 Clean up some ugly coding (hardwired constants) in index_formtuple. 2000-09-23 22:40:12 +00:00
Peter Eisentraut 27777b6645 Don't free() the result of getpwuid().
Discovered by Jason Tishler <Jason.Tishler@dothill.com>.
2000-09-22 23:02:00 +00:00
Tom Lane 920c5062d2 SetPGVariable() crashed on SET DateStyle TO DEFAULT and related cases. 2000-09-22 15:34:31 +00:00
Tom Lane d35437069a Add check of 'SET DateStyle TO DEFAULT'. 2000-09-22 15:33:31 +00:00
Peter Eisentraut 353371874f Replace brain-dead Autoconf macros AC_ARG_{ENABLE,WITH} with something
that's actually useful, robust, consistent.

Better plan to generate aclocal.m4 as well: use m4 include directives,
rather than cat.
2000-09-21 20:17:43 +00:00
Michael Meskes b4c8d47ab0 *** empty log message *** 2000-09-21 11:56:08 +00:00
Tom Lane eab8ee9524 Fix coredump in copyCommentStmt(). 2000-09-20 15:28:01 +00:00
Michael Meskes 339a5bbfb1 *** empty log message *** 2000-09-20 13:25:52 +00:00
Tom Lane 95563e7bbf Make sure that FlushRelationBuffers() is invoked by all paths through
vacuum.c.  This is needed to make the world safe for pg_upgrade.
2000-09-19 19:30:03 +00:00
Tom Lane ba2ea6e0f5 Fix GEQO optimizer to work correctly with new outer-join-capable
query representation.  Note that GEQO_RELS setting is now interpreted
as the number of top-level items in the FROM list, not necessarily the
number of relations in the query.  This seems appropriate since we are
only doing join-path searching over the top-level items.
2000-09-19 18:42:34 +00:00
Peter Eisentraut 457ac0331c Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.
There is still no effective difference but it will kick in once setuid
functions exist (not included here).  Make old getpgusername() alias for
current_user.
2000-09-19 18:18:04 +00:00
Michael Meskes e9c3f0255f *** empty log message *** 2000-09-19 11:47:16 +00:00
Tom Lane a5a290cab9 Make rule lister use aliases from FROM clause when a table column has
been given an alias.  Otherwise, results are incorrect.
2000-09-18 20:14:23 +00:00
Peter Eisentraut 2acdef186d Move contrib/odbc/odbc.sql together with odbc driver, remove old files;
revise ODBC "installation instructions"; update some other outdated
documentation; update contrib documentation
2000-09-18 20:11:37 +00:00
Philip Warner 7cce011178 Only retrieve view definition if relation is a view (case statement) 2000-09-18 06:47:46 +00:00
Philip Warner 565afb889d Uses column select expressions to get object object owners and tests for blank names 2000-09-18 03:24:03 +00:00
Tom Lane aef7a0c8ea Parse JOIN/ON conditions with the proper visibility of input columns,
ie, consider only the columns coming from the JOIN clause's sub-clauses.
Also detect attempts to reference columns belonging to other tables
(which would still be possible using an explicitly-qualified name).
I'm not sure this implements the spec's semantics 100% accurately, but
at least it gives plausible behavior.
2000-09-17 22:21:27 +00:00
Peter Eisentraut 239f74d28d psql forgot to close connection before re-issuing password prompt.
([BUGS] psql can crash the backend on login, 2000-09-03)
2000-09-17 20:33:45 +00:00
Tom Lane b5d609a300 Improve error message for dumpRules() failure 2000-09-17 20:01:28 +00:00
Peter Eisentraut 335248c9b7 Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 13:02:52 +00:00
Tom Lane 8d48d89dc7 Variant horology resultfiles are inconsistent with the test, again. 2000-09-15 19:37:49 +00:00
Tom Lane 8ae9ad1cb8 Reimplement LIKE/ESCAPE as operators so that indexscan optimization
can still work, per recent discussion on pghackers.  Correct some bugs
in ILIKE implementation.
2000-09-15 18:45:31 +00:00
Tatsuo Ishii 148f905f41 Allow PL/pgSQL accept non ascii identifiers 2000-09-15 11:59:40 +00:00
Philip Warner 6ead466e10 Minor code cleanup (cast away const-ness) 2000-09-15 04:57:09 +00:00
Philip Warner c74257e9e0 - Support for relkind = RELKIND_VIEW.
- Use symbols for tests on relkind (ie. use RELKIND_VIEW, not 'v')
- Fix bug in support for -b option (== --blobs).
- Dump views as views (using 'create view').
- Remove 'isViewRule' since we check the relkind when getting tables.
- Now uses temp table 'pgdump_oid' rather than 'pg_dump_oid' (errors otherwise).
- Added extra param for specifying handling of OID=0 and which typename to output.
- Fixed bug in SQL scanner when SQL contained braces. (in rules)
- Use format_type function wherever possible
2000-09-15 04:35:16 +00:00
Thomas G. Lockhart 6d9299e1fc Move a few specific tests to isolate homogenous type tests into
regression tests for specific types, and move a few others to the
 cross-type "horology" test.
Rearrange the test order slightly, and move the abstime test to the
 "parallel safe" area.
Hand-patch the results for "1947" and for "solaris", so those may not
 be exactly correct.
2000-09-14 15:55:07 +00:00
Tom Lane ed5003c584 First cut at full support for OUTER JOINs. There are still a few loose
ends to clean up (see my message of same date to pghackers), but mostly
it works.  INITDB REQUIRED!
2000-09-12 21:07:18 +00:00
Tom Lane 39ee0f55d7 Fix relation-to-view conversion so that it doesn't try to convert a plain
relation to a view when you create an ON INSERT/UPDATE/DELETE rule ...
2000-09-12 20:38:09 +00:00
Tom Lane 367bc8f1af Update expected/horology-no-DST-before-1970.out for new horology test.
There are still two out-of-date variants for horology; shame shame.
2000-09-12 20:11:23 +00:00
Tom Lane 3bfbe6991a Clean up compiler warning. 2000-09-12 19:41:40 +00:00
Tom Lane d49a73bbc2 Suppress compile warnings caused by failure to use PG_RETURN macro. 2000-09-12 19:39:42 +00:00
Bruce Momjian 339ce34b87 As if my JDBC patch hasn't already caused enough grief, there is now a
one-line change necessary. Due to the Mark Holloman "New Relkind for
Views" patch, my support for views in the driver will need to be updated
to match. The change to DatabaseMetaData.getTableTypes[][] is as
follows:

-    {"VIEW",           "(relkind='r' and relhasrules='t' and relname !~
'^pg_' and relname !~ '^xinv')"},
+    {"VIEW",           "(relkind='v' and relname !~ '^pg_' and relname
!~ '^xinv')"},

Christopher Cain
2000-09-12 18:56:04 +00:00
Tom Lane cdc7170ebe Remove incorrect extra heap_close when deleting a builtin function. 2000-09-12 16:48:55 +00:00
Vadim B. Mikheev 8e95321476 Btree WAL records. 2000-09-12 06:07:52 +00:00
Thomas G. Lockhart 0d93504c40 Add regression tests for date, time, and time with time zone types.
Modify date->timestamp conversion to use mktime().
 This should do better than before around Daylight Savings Time
 transitions.
2000-09-12 05:42:20 +00:00
Thomas G. Lockhart 4d745dadc9 Modify date->timestamp conversion to use mktime().
This should do better than before around Daylight Savings Time
 transitions.
2000-09-12 05:41:37 +00:00
Bruce Momjian aebfaf7861 Attached is a patch that prevents a NullPointerException in the JDBC
driver if the translations files have not been properly installed.  (We
carefully avoided installing the translations file in a controlled
environment here specifically to test for such a bug. :-)

See attached description for more details.

William
--
William Webber                               william@peopleweb.net.au
2000-09-12 05:18:25 +00:00
Bruce Momjian 7f171b599a This patch implements the following command:
ALTER TABLE <tablename> OWNER TO <username>

Only a superuser may execute the command.

--
Mark Hollomon
mhh@mindspring.com
2000-09-12 05:09:57 +00:00
Bruce Momjian 65edb54186 Attached are a patch to allow the charset encoding used by the JDBC
driver to be set, and a description of said patch.  Please refer to
the latter for more information.

William
--
William Webber                               william@peopleweb.net.au
2000-09-12 04:58:50 +00:00
Bruce Momjian 4f5cdadf03 Applied to jdbc1 and jdbc2.
This is a patch which lets the DatabaseMetaData return the object type
when getTables(....) is called.  It does not really fix any bug, but it
fills in some functionality that should be there anyway.  The diff
included here is off of the CVS as of just now :)

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------
2000-09-12 04:51:43 +00:00
Bruce Momjian 264c068207 This patch implements a different "relkind"
for views. Views are now have a "relkind" of
RELKIND_VIEW instead of RELKIND_RELATION.

Also, views no longer have actual heap storage
files.

The following changes were made

1. CREATE VIEW sets the new relkind

2. The executor complains if a DELETE or
        INSERT references a view.

3. DROP RULE complains if an attempt is made
        to delete a view SELECT rule.

4. CREATE RULE "_RETmytable" AS ON SELECT TO mytable DO INSTEAD ...
        1. checks to make sure mytable is empty.
        2. sets the relkind to RELKIND_VIEW.
        3. deletes the heap storage files.
5. LOCK myview is not allowed. :)


6. the regression test type_sanity was changed to
        account for the new relkind value.

7. CREATE INDEX ON myview ... is not allowed.

8. VACUUM myview is not allowed.
        VACUUM automatically skips views when do the entire
        database.

9. TRUNCATE myview is not allowed.


THINGS LEFT TO THINK ABOUT

o pg_views

o pg_dump

o pgsql (\d \dv)
o Do we really want to be able to inherit from views?

o Is 'DROP TABLE myview' OK?

--
Mark Hollomon
2000-09-12 04:49:17 +00:00
Bruce Momjian 1da2feea83 Previous patch backed out.
Here is a patch against CVS (without my earlier patch)
to disallow

LOCK x

if x is a view.

It does not use the SPI interface.

--
Mark Hollomon
2000-09-12 04:33:18 +00:00
Bruce Momjian 7361e91ab7 This patch is for the TODO item
* Disallow LOCK on view

src/backend/commands/command.c is the only affected file

--
Mark Hollomon
2000-09-12 04:30:08 +00:00
Bruce Momjian 5c6fa5ee32 This patch, when applied in src/pl will unbreak plperl in
7.0.2 release. Sorry, if that's fixed ages ago - I don't track
development versions of PostgreSQL.

Patch is just a little bit tested (some valid functions created and
successfully run as well as some erroneous ones created and emitted proper
error messages when used).

My platform is FreeBSD 5.0-CURRENT (with perl 5.6.0 provided in the
base system).

Alex Kapranoff
2000-09-12 04:28:30 +00:00
Bruce Momjian 879639b5be This patch for the 7.0.2 JDBC interface addresses four issues I
encountered while getting my reporting tool up and running with the
driver. All changes are in the DatabaseMetaData class.

Problem: The getDatabaseProductVersion() method was returning "6.5.2"
Resolution: Changed it to return "7.0.2"

Problem: A call to getTables() with an unsupported table type (in the
String array) resulted in a malformed SQL statement and subsequent
parsing error
Resolution: Unsupported table types are now ignored without error

Problem: In a getTables() call, tables and views were both returned by
the "TABLE" table type, and the "VIEW" table type was unsupported
Resolution: Changed the "TABLE" type to return only physical tables and
added support for the "VIEW" table type (returning only views)

Problem: The getIdentifierQuoteString() method was returning null
Resolution: This method now returns a double-quote

Christopher Cain
2000-09-12 04:16:59 +00:00
Bruce Momjian 0ba0e32172 O.K. -
Here's the multibyte aware version of my patch to fix the truncation
of the rulename autogenerated during a CREATE VIEW. I've modified all
the places in the backend that want to construct the rulename to use
the MakeRetrieveViewRuleName(), where I put the #ifdef MULTIBYTE, so
that's the only place that knows how to construct a view rulename. Except
pg_dump, where I replicated the code, since it's a standalone binary.

The only effect the enduser will see is that views with names len(name)
> NAMEDATALEN-4 will fail to be created, if the derived rulename clases
with an existing rule: i.e. the user is trying to create two views with
long names whose first difference is past NAMEDATALEN-4 (but before
NAMEDATALEN: that'll error out after the viewname truncation.) In no
case will the user get left with a table without a view rule, as the
current code does.

Ross Reedstrom
2000-09-12 04:15:58 +00:00
Bruce Momjian b1777d5f99 Irix fix:
The regression tests abstime, horology, int2, int4, and tinterval fail
by default.  They will pass if comparison is made to one of the
variant expected/*.out files.

(A related problem is that the geometry test fails.  This seems to be
just a matter of FP precision but more rigorous inspection is needed.
No existing expected/geometry-*.out variant matches.)


Pete Forman
2000-09-12 04:12:47 +00:00
Vadim B. Mikheev b09bd214aa This is temporal place holder for Relation File Node till
reloid.version/unique_id file naming is not implemented
2000-09-10 00:06:52 +00:00
Peter Eisentraut da06bc1d40 Make building scripts kind of consistent in look and feel, kind of immune
to parallel make, kind of resistent to corruption due to incomplete builds.
2000-09-08 18:29:28 +00:00
Vadim B. Mikheev f2bfe8a24c Heap redo/undo (except for tuple moving used by vacuum). 2000-09-07 09:58:38 +00:00
Tatsuo Ishii c18c321365 Fix psql crash. If MULTIBYTE is enabled, \l+ dumps core due to
SQL buffer in listAllDbs is just too small.
2000-09-07 04:55:27 +00:00
Peter Eisentraut ffd9aaa0a9 A bit of cleanup after SSL patch. Add it to config file, improve
documentation.
2000-09-06 19:54:52 +00:00
Peter Eisentraut 6dc249610a Code cleanup of user name and user id handling in the backend. The current
user is now defined in terms of the user id, the user name is only computed
upon request (for display purposes). This is kind of the opposite of the
previous state, which would maintain the user name and compute the user id
for permission checks.

Besides perhaps saving a few cycles (integer vs string), this now creates a
single point of attack for changing the user id during a connection, for
purposes of "setuid" functions, etc.
2000-09-06 14:15:31 +00:00
Jan Wieck daf1e3a702 Added functions
quote_ident(text) returns text
    quote_literal(text) returns text

These are handy to build up properly quoted query strings
for the new PL/pgSQL EXECUTE functionality to submit
dynamic DDL statements.

Jan
2000-09-05 20:25:14 +00:00
Jan Wieck c59077dd7b GET DIAGNOSTICS statement to PL/pgSQL to access SPI_processed
and SPI_return values. Patch from Philip Warner.

Jan
2000-09-05 09:02:18 +00:00
Peter Eisentraut 4bfb75aece Change initdb to not delete PGDATA directory unless it was created by
initdb itself. Refuse to run on existing but non-empty PGDATA directory.
2000-09-01 13:15:27 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Jan Wieck d4266620e1 Added EXECUTE command to PL/pgSQL for execution of
dynamic SQL and utility statements.

Jan
2000-08-31 13:26:16 +00:00
Tom Lane 16dc9bafb7 AbortOutOfAnyTransaction() just before backend exit, to ensure that
resources are cleaned up if the user disconnected mid-transaction.
Great thanks to Hiroshi for pointing out what should have been obvious...
2000-08-30 20:30:06 +00:00
Bruce Momjian 7bc654bb16 SSL patch from Magnus 2000-08-30 14:54:24 +00:00
Hiroshi Inoue 3498ea8308 Improve the following.
=# create table t (id int4 unique);
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 't_id_key' for table 't'
 =# begin;
 query: drop table t;
NOTICE:  Caution: DROP TABLE cannot be rolled back, so don't abort now
NOTICE:  Caution: DROP INDEX cannot be rolled back, so don't abort now
 =# rollback;
 =# drop table t;
NOTICE:  mdopen: couldn't open t: No such file or directory
NOTICE:  RelationIdBuildRelation: smgropen(t): No such file or directory
NOTICE:  mdopen: couldn't open t: No such file or directory
NOTICE:  mdopen: couldn't open t: No such file or directory
NOTICE:  mdopen: couldn't open t_id_key: No such file or directory
NOTICE:  RelationIdBuildRelation: smgropen(t_id_key): No such file or directory
NOTICE:  mdopen: couldn't open t: No such file or directory
NOTICE:  RelationIdBuildRelation: smgropen(t): No such file or directory
NOTICE:  mdopen: couldn't open t: No such file or directory
ERROR:  cannot open relation t
2000-08-30 08:48:55 +00:00
Tom Lane 883d1cc1cc Include kernel error message in failed-to-open file reports. 2000-08-29 16:40:19 +00:00
Peter Eisentraut ef6164de1d Revert removal of signed, volatile, and signal handler arg type tests. 2000-08-29 09:36:51 +00:00
Bruce Momjian dffd8cac3d * to_char:
- full support for IW (ISO week) and vice versa conversion for IW too
    (the to_char 'week' support is now complete and I hope correct).

  Thomas, I use for IW code from timestamp.c, for this I create separate
  function date2isoweek() from original 'case DTK_WEEK:' code in the
  timestamp_part(). I mean will better use one code for same feature in
  date_part() and in to_char(). The isoweek2date() is added to timestamp.c
  too. Right?

  IMHO in 7.1 will all to_char's features complete. It is cca 41 templates
  for date/time and cca 21 for numbers.

 * to_ascii:

   - gcc, is it correct now? :-)


  In the patch is documentation for to_char's IW and for to_ascii().

                                                        Karel
2000-08-29 04:41:48 +00:00
Bruce Momjian d4f626507c This is mostly the same as an earlier patch I
didn't hear anything about, but which would
have broken with the function manager changes
anyway.

Well, this patch checks that a unique constraint
of some form (unique or pk) is on the referenced
columns of an FK constraint and that the columns
in the referencing table exist at creation time.
The former is to move closer to SQL compatibility
and the latter is in answer to a bug report.
I also added a basic check of this functionality
to the alter table and foreign key regression
tests.

Stephan Szabo
sszabo@bigpanda.com
2000-08-29 04:20:47 +00:00
Tom Lane 46426b6d01 Update obsolete comments. 2000-08-29 02:00:38 +00:00
Tom Lane fdc02f8fc2 Remove bogus use of int4out(). 2000-08-29 00:57:21 +00:00
Peter Eisentraut 3ce5c6f4d8 Maybe "shared_buffers" is a slightly better name than "shmem_buffers" for -B. 2000-08-28 11:57:41 +00:00
Peter Eisentraut f03fc94e7d New configure test for flex, which recognizes only flex but does so in all
incarnations (I hope). When an acceptable flex version is not found, print
instructive error messages from both configure and the makefiles, so that
users can continue building anyway.
2000-08-28 11:53:23 +00:00
Tom Lane 4c8d2f7f7b Clean up callers of AllocateFile and BasicOpenFile to ensure that
a reasonable error message (including the kernel errno message)
is reported on any file open failure.
2000-08-27 21:50:18 +00:00
Tom Lane 5ba9d8c2d4 Change ReleaseLruFile() usage so that if we cannot release any more
virtual FDs, we just return the ENFILE/EMFILE error to the caller,
rather than immediate elog().  This allows more robust behavior in
the postmaster, which uses AllocateFile() but does not want elog().
2000-08-27 21:48:00 +00:00
Peter Eisentraut 79abd73eee Remove configure tests for `signed', `volatile', and signal handler args;
the harm potential outweighs the possible benefits.
2000-08-27 19:00:41 +00:00
Tatsuo Ishii bfdd6a716d Change pg_mblen and pg_encoding_mblen return types from void
to int so that they return the number of whcars.
2000-08-27 10:40:48 +00:00
Tom Lane 196d6f4e35 Tired of seeing these warnings ... 2000-08-26 21:56:23 +00:00
Tom Lane d70bf0dd35 Rename BITSPERBYTE to BITS_PER_BYTE to avoid conflict with <values.h>
on some platforms.
2000-08-26 21:53:44 +00:00
Tom Lane c42f82d428 This file seems not to have been updated for the most
recent change to geometry.sql.
2000-08-26 19:47:41 +00:00
Peter Eisentraut 9314141116 Add pg-config utility that stores some configuration parameters other
packages can use to configure their build.

E.g.,
$ pg-config --libdir
/usr/local/pgsql/lib

`pg-config --configure' stores the configure command line.
2000-08-26 13:08:16 +00:00
Tom Lane 40549e9cb5 Tweak btree insertion to avoid O(N^2) slowdown with large numbers of
equal keys.  See discussion of today's date in pghackers list.
2000-08-25 23:13:33 +00:00
Tom Lane 3d3ca010aa Avoid creating a TOAST table if we can prove that the maximum tuple
length is < TOAST_TUPLE_THRESHOLD, even with toastable column types
present.  For example, CREATE TABLE foo (f1 int, f2 varchar(100))
does not require a toast table, even though varchar is a toastable
type.
2000-08-25 18:05:54 +00:00
Tatsuo Ishii 8cca25728b Change return type of:
pg_mb2wchar(const unsigned char *, pg_wchar *);
       pg_mb2wchar_with_len(const unsigned char *, pg_wchar *, int);
from void to int. Now they return the number of
wide chars.
2000-08-25 14:24:09 +00:00
Peter Eisentraut 996832caee Make the location of the Kerberos server key file run time configurable
(rather than compile time). For libpq, even when Kerberos support is
compiled in, the default user name should still fall back to geteuid()
if it can't be determined via the Kerberos system.

A couple of fixes for string type configuration parameters, now that there
is one.
2000-08-25 10:00:35 +00:00
Tom Lane 481487b964 GetAttributeByName and GetAttributeByNum should be declared to return
Datum, not char*, for portability's sake.
2000-08-24 23:34:11 +00:00
Tom Lane d9eb7d8fa1 Update funcs tutorial for new function manager. 2000-08-24 23:32:43 +00:00
Tom Lane 782c16c6a1 SQL-language functions are now callable in ordinary fmgr contexts ...
for example, an SQL function can be used in a functional index.  (I make
no promises about speed, but it'll work ;-).)  Clean up and simplify
handling of functions returning sets.
2000-08-24 03:29:15 +00:00
Thomas G. Lockhart 8a35cbe1db Add functions to convert to and from text, and to truncate to MAC OUI.
Remove hardcoded macaddr_manuf(), which had really old, obsolete info.
 Replace this with some contrib/mac/ code to maniag OUI info from IEEE.
2000-08-23 06:04:49 +00:00
Tom Lane f9b2f9bb76 Fix plpgsql lexer to accept Windows-style and Mac-style newlines as
newlines.
2000-08-22 14:59:28 +00:00
Tatsuo Ishii 84d0865d03 Make scanner multibyte aware. Currently it may produce an incorrect
multibyte sequence while truncating identifiers.
2000-08-22 13:01:20 +00:00
Tatsuo Ishii bc2cf76a59 Make makeObjectName multibyte aware. Currently, it may produce
incorrect multibyte sequence while truncating too long names.
2000-08-22 12:59:04 +00:00
Tatsuo Ishii 88d7b4a250 Add multibyte support for both LIKE and ILIKE
Eliminate up-to-4-times memory allocation problem
2000-08-22 06:33:57 +00:00
Tom Lane 0147b1934f Fix a many-legged critter reported by chifungfan@yahoo.com: under the
right circumstances a hash join executed as a DECLARE CURSOR/FETCH
query would crash the backend.  Problem as seen in current sources was
that the hash tables were stored in a context that was a child of
TransactionCommandContext, which got zapped at completion of the FETCH
command --- but cursor cleanup executed at COMMIT expected the tables
to still be valid.  I haven't chased down the details as seen in 7.0.*
but I'm sure it's the same general problem.
2000-08-22 04:06:22 +00:00
Tom Lane 94e90d9a86 Add some more Assert checks. 2000-08-22 04:00:10 +00:00
Tom Lane 7893462e44 Move pg_checkretval out of the planner (where it never belonged) into
pg_proc.c (where it's actually used).  Fix it to correctly handle tlists
that contain resjunk target items, and improve error messages.  This
addresses bug reported by Krupnikov 6-July-00.
2000-08-21 20:55:31 +00:00
Tom Lane 469673f966 Fix format_type() to display correct lengths for BIT/BIT VARYING.
Also, make it depend on type OIDs rather than type names for more
consistency with rest of backend.
2000-08-21 18:23:18 +00:00
Tom Lane e67ff6b670 fmgr interface mopup work. Use new DatumGetBool and BoolGetDatum
macros where appropriate (the code used to have several different ways
of doing that, including Int32, Int8, UInt8, ...).  Remove last few
references to float32 and float64 typedefs --- it's all float4/float8
now.  The typedefs themselves should probably stay in c.h for a release
or two, though, to avoid breaking user-written C functions.
2000-08-21 17:22:36 +00:00
Tom Lane b503cbe319 First pass at integrating BIT and BIT VARYING code from Adriaan Joubert.
Update functions to new-style fmgr, make BIT and VARBIT be binary-
equivalent, add entries to allow these types to be btree indexed,
correct a few bugs.  BIT/VARBIT are now toastable, too.
NOTE: initdb forced due to catalog updates.
2000-08-21 04:48:57 +00:00
Tom Lane d594eecde2 Standardize on just one spelling of BITSPERBYTE. 2000-08-20 19:31:37 +00:00
Peter Eisentraut a67343d67d Substitute libdir into createlang as last resort so one doesn't have to set
PGLIB or use any option anymore.
2000-08-20 11:56:29 +00:00
Peter Eisentraut 9b3d66ecbd Introduce HAVE_UNIX_SOCKETS symbol to replace repeatedly listing all the
unsupported platforms.
2000-08-20 10:55:35 +00:00
Tom Lane 4b8f1bcb9c Make functional indexes accept binary-compatible functions, for example
CREATE INDEX fooi ON foo (lower(f1)) where f1 is varchar rather than text.
2000-08-20 00:44:19 +00:00
Tom Lane 37168b8da4 Clean up handling of variable-free qual clauses. System now does the
right thing with variable-free clauses that contain noncachable functions,
such as 'WHERE random() < 0.5' --- these are evaluated once per
potential output tuple.  Expressions that contain only Params are
now candidates to be indexscan quals --- for example, 'var = ($1 + 1)'
can now be indexed.  Cope with RelabelType nodes atop potential indexscan
variables --- this oversight prevents 7.0.* from recognizing some
potentially indexscanable situations.
2000-08-13 02:50:35 +00:00
Tom Lane 766fb7f707 Mop-up for removal of ':' and ';' operators ... like, say, actually
take 'em out of pg_operator.  Also remove from scan.l's set of legal
operator characters.  Update documentation.
2000-08-12 05:15:24 +00:00
Tom Lane 134fdf34d6 Fix ruleutils to produce correct output for array assignment, such
as UPDATE foo SET arr[3] = 42.
2000-08-12 04:04:53 +00:00
Tom Lane c333d2b329 Update comments for some parse node types. 2000-08-11 23:46:54 +00:00
Tom Lane 4951a8826d copyObject() and equal() now know about all parse-time node types,
including utility statements.  Still can't copy or compare executor
state, but at present that doesn't seem to be necessary.  This makes
it possible to execute most (all?) utility statements in plpgsql.
Had to change parsetree representation of CreateTrigStmt so that it
contained only legal Nodes, and not bare string constants.
2000-08-11 23:45:35 +00:00
Tom Lane 66fd8f854f Remove debugging Assert that should never have been committed in the
first place :-(
2000-08-11 18:35:50 +00:00
Tom Lane 7090c3e858 Make debug_assertions default to ON, when compiled in at all, for
backwards compatibility with old behavior.
2000-08-11 18:31:10 +00:00
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
Peter Eisentraut 9533de72bf didn't compile 2000-07-14 16:40:40 +00:00
Peter Eisentraut e7545748b5 Remove references to symbols that no longer get defined 2000-07-14 16:39:35 +00:00
Thomas G. Lockhart be703cd9e8 Implement nested block comments in the backend and in psql.
Include updates for the comment.sql regression test.
Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel.
Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT
 and SET AutoCommit in the parser only.
 Need to add code to actually do something.
Implement WITHOUT TIME ZONE type qualifier.
Define SCHEMA keyword, along with stubbed-out grammar.
Implement "[IN|INOUT|OUT] [varname] type" function arguments
 in parser only; INOUT and OUT throws an elog(ERROR).
Add PATH as a type-specific token, since PATH is in SQL99
 to support schema resource search and resolution.
2000-07-14 15:43:57 +00:00
Thomas G. Lockhart 1e901bbe84 Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel. 2000-07-14 15:35:44 +00:00
Thomas G. Lockhart 2016898b6a Fix indenting in prototype declarations. No functional changes. 2000-07-14 15:33:33 +00:00
Thomas G. Lockhart a4d92053d8 Include rule to build include/parser/parse.h since nothing else can
build in this directory otherwise :(
2000-07-14 15:32:04 +00:00
Thomas G. Lockhart b4a3b6476c Change order of builds to get parser before commands.
This will ensure building parse.h for commands, though this is also
 covered with other build rules.
2000-07-14 15:30:56 +00:00
Peter Eisentraut b0f52abe36 Fix typo, from Keith Parks 2000-07-13 16:08:01 +00:00
Peter Eisentraut 8a3cbc84ef Repair parallel make in backend tree (and make it really parallel).
Make Gen_fmgrtab.sh reasonably robust against concurrent invocation.
2000-07-13 16:07:14 +00:00
Tom Lane 9191d684a7 Planner did the wrong thing with index-scan-backward plans: generated
them, but forgot to attach relevant restriction clauses, so that the
plan represented a scan over the whole table with restrictions applied
as qpquals not indexquals.  Another day, another bug...
2000-07-13 05:47:29 +00:00
Peter Eisentraut cb292206c5 Remove a bunch of unused configure tests, in particular cases where
* the result is not recorded anywhere
* the result is not used anywhere
* the result is only used in some places, whereas others have been getting away with it
* the result is used improperly

Also make command line options handling a little better (e.g., --disable-locale,
while redundant, should really still *dis*able).
2000-07-12 22:59:15 +00:00
Bruce Momjian dce43d22f0 Can you please apply the following patch to current CVS
to make AIX'ers happy with the changes to the version.o ?

Together with the patch I sent Tom, AIX now regresses ok.

Thanx
Andreas
2000-07-12 18:04:47 +00:00
Peter Eisentraut 648677c3a2 Add assert checking to GUC ("debug_assertions")
Rename settings net_server to tcpip_socket, max_backends to max_connections
Add --help and --version to postmaster, reformat help output
2000-07-12 17:38:53 +00:00
Tom Lane cbdaa27f97 Repair missing MEMORY_CONTEXT_CHECKING logic for realloc().
Doesn't anyone around here run regression tests before submitting
patches, or before committing them?
2000-07-12 05:15:20 +00:00
Tom Lane badce86a2c First stage of reclaiming memory in executor by resetting short-term
memory contexts.  Currently, only leaks in expressions executed as
quals or projections are handled.  Clean up some old dead cruft in
executor while at it --- unused fields in state nodes, that sort of thing.
2000-07-12 02:37:39 +00:00
Bruce Momjian 46fb9c29e2 Here is the patch with memory leak checker. This checker allow detect
in-chunk leaks, overwrite-next-chunk leaks and overwrite block-freeptr leaks.

A in-chunk leak --- if something overwrite space after wanted (via palloc()
size, but it is still inside chunk. For example

        x = palloc(12);         /* create 16b chunk */
        memset(x, '#', 13);

this leak is in the current source total invisible, because chunk is 16b and
leak is in the "align space".

 For this feature I add data_size to StandardChunk, and all memory which go
from AllocSetAlloc() is marked as 0x7F.

 The MemoryContextCheck() is compiled '#ifdef USE_ASSERT_CHECKING'.

I add this checking to 'tcop/postgres.c' and is active after each backend
query, but it is probably not sufficient, because some MemoryContext exist
only during memory processing --- will good if someone who known where
it is needful (Tom:-) add it for others contexts;
 A problem in the current source is that we have still some malloc()
allocation that is not needful and this allocation is total invisible for
all context routines. For example Dllist in backend (pretty dirty it is in
catcache where values in Dllist are palloc-ed, but list is malloc-ed).
--- and BTW. this Dllist design stand in the way for query cache :-)

 Tom, if you agree I start replace some mallocs.

 BTW. --- Tom, have you idea for across transaction presistent allocation for
          SQL functions? (like regex - now it is via malloc)


 I almost forget. I add one if() to AllocSetAlloc(), for 'size' that are
greater than ALLOC_BIGCHUNK_LIMIT is not needful check AllocSetFreeIndex(),
because 'fidx' is always 'ALLOCSET_NUM_FREELISTS - 1'. It a little brisk up
allocation for very large chunks. Right?

                                                Karel
2000-07-11 14:30:37 +00:00
Bruce Momjian 0d32cdc38e Done. In backend/commands/define.c unused field is set to '-' for the
moment.

A patch for CVS is attached, and I have amended my BLOB dumping version
appropriately.

Philip Warner
2000-07-11 13:07:17 +00:00
Jan Wieck 793704d71e Some security checks that we've found an external value completely
when fetching toasted values.

Jan
2000-07-11 12:32:03 +00:00
Tom Lane f3e5d8620c Prevent creating a boatload of empty segments when md.c is asked to
access a ridiculously large block number within a relation.
2000-07-10 04:32:00 +00:00
Peter Eisentraut b54faa1b15 oidvectortypes: use SQL type names and separate by commas
psql \df: use format_type and oidvectortypes
map type REAL to float4, not float8
psql \dd :work around UNION bug
2000-07-09 21:30:21 +00:00
Peter Eisentraut f90771236d typo 2000-07-09 13:48:45 +00:00
Peter Eisentraut 2bbf34111f Fix handling of pre-existing LD_LIBRARY_PATH, from Keith Parks 2000-07-09 13:19:24 +00:00
Peter Eisentraut a746653493 Fix sed invocation, from Keith Parks 2000-07-09 13:16:12 +00:00
Peter Eisentraut 74618e2b82 Another round of those unportable config/build changes :-/
* Add option to build with OpenSSL out of the box. Fix thusly exposed
  bit rot. Although it compiles now, getting this to do something
  useful is left as an exercise.

* Fix Kerberos options to defer checking for required libraries until
  all the other libraries are checked for.

* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.

* Install work around for Autoconf's install-sh relative path anomaly.
  Get rid of old INSTL_*_OPTS variables, now that we don't need them
  anymore.

* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.

* Look for only one of readline.h or readline/readline.h, not both.

* Make check for PS_STRINGS cacheable. Don't test for the header files
  separately.

* Disable fcntl(F_SETLK) test on Linux.

* Substitute the standard GCC warnings set into CFLAGS in configure,
  don't add it on in Makefile.global.

* Sweep through contrib tree to teach makefiles standard semantics.

... and in completely unrelated news:

* Make postmaster.opts arbitrary options-aware. I still think we need to
  save the environment as well.
2000-07-09 13:14:19 +00:00
Tom Lane b59c03f842 Make view/rule permission checking behave properly with
subqueries in the rule.
2000-07-09 04:56:32 +00:00
Tom Lane 7c578904d7 Fix bogus DatumGetInt32 coercion. 2000-07-09 04:17:53 +00:00
Tom Lane 0552f8dfe7 Seems we need <errno.h> to be included explicitly now... 2000-07-08 05:30:33 +00:00
Tom Lane ba62fe32c3 Remove long-dead support for invoking queries from dynamically loaded
backend functions via backend PQexec().  The SPI interface has long
been our only documented way to do this, and the backend pqexec/portal
code is unused and suffering bit-rot.  I'm putting it out of its misery.
2000-07-08 03:04:41 +00:00
Tom Lane a98eaa0191 Put back separate install-bin target ... I was using that,
thank you ...
2000-07-08 02:40:27 +00:00
Tom Lane 65da0d66b4 Fix misuse of StrNCpy to copy and add null to non-null-terminated data.
Does not work since it fetches one byte beyond the source data, and when
the phase of the moon is wrong, the source data is smack up against the
end of backend memory and you get SIGSEGV.  Don't laugh, this is a fix
for an actual user bug report.
2000-07-07 21:12:53 +00:00
Peter Eisentraut de85dd1d51 - format_type function, in use by psql
- added bigint as synonym of int8
- set typelem of varlen non-array types to 0
2000-07-07 19:24:43 +00:00
Bruce Momjian 364985542b Rename cash_words_out to cash_words. 2000-07-07 18:49:56 +00:00
Bruce Momjian 16e948781c |> The Makefile.shlib changes will have to be discussed with other Linux
|> developers so we are sure it will work on all platforms.

The problem with the current settings is that the linker is called
directly.  This is wrong, it should always be called through the
compiler
driver (the only exception is `ld -r').  This will make sure that the
necessary libraries like libgcc are linked in.

But there is still a different problem with the setting of LDFLAGS_ODBC.
The psqlodbc module defines the functions _init and _fini which are
reserved for the shared library initialisation.  These should be changed
to constructor functions.  Then LDFLAGS_ODBC can be changed to be just
`-lm'.  Btw, why does it use -Bsymbolic?

Andreas Schwab
2000-07-07 01:23:44 +00:00
Tom Lane 9f442cbf13 Correct unsafe use of strcmp(). See rant of same date posted to pghackers. 2000-07-06 23:03:37 +00:00
Peter Eisentraut f0b4ae697f Backend makefile cleanup. make maintainer-clean is now completely
functional.

Handle include file installation in src/include/Makefile

genbki.sh improvements: Don't substitute anything by config.status,
instead pass in AWK and CPP through environment. Change calling
convention to support named output files, so we get to see error
messages on stderr.

Rename bootstrap template files and install them into PREFIX/share.
Update initdb to that effect and other readability improvements
in initdb.
2000-07-06 21:33:45 +00:00
Jan Wieck b027ad9a7a Added comments about the compression algorithm as requested by Tom
Jan
2000-07-06 21:02:07 +00:00
Jan Wieck 43f6ab8654 Please find attached a patch for the pg_dump directory which addresses:
- The problems Jan reported

- incompatibility with configure (now uses HAVE_LIBZ instead of HAVE_ZLIB)

- a problem in auto-detecting archive file format on piped archives

Philip Warner
2000-07-06 18:39:39 +00:00
Jan Wieck 2a225ebf18 Bugfix. If toasted tuple containted NULLs, DataFill() was handed
a wrong pointer causing the bitmap overwriting the tuple header.

Jan
2000-07-06 18:22:45 +00:00
Tom Lane 8ecac94bb2 Functions on 'text' type updated to new fmgr style. 'text' is
now TOAST-able.
2000-07-06 05:48:31 +00:00
Tom Lane 40f64064ff Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
2000-07-05 23:12:09 +00:00
Tom Lane 282713a836 Make the regression tests safe for TOAST. 2000-07-05 23:02:37 +00:00
Tom Lane 6d1ae0c91b Fix typo (extraneous semicolon) in fd.c patch to avoid excess seeks.
Now it skips useless SEEK_CUR 0 calls too, as intended.
2000-07-05 21:10:05 +00:00
Jan Wieck 98fe670360 Enable pg_rewrite to be toasted (unlimited size of views and rules).
Jan
2000-07-05 19:51:03 +00:00
Marc G. Fournier 8bef689043 add check for libz compression library for pg_dump 2000-07-05 17:44:29 +00:00
Jan Wieck 6534444d19 Changed TOAST relations to have relkind RELKIND_TOASTVALUE.
Special handling of TOAST relations during VACUUM. TOAST relations
are vacuumed while the lock on the master table is still active.
The ANALYZE flag doesn't propagate to their vacuuming because the
toaster access routines allways use index access ignoring stats, so
why compute them at all.

Protection of TOAST relations against normal INSERT/UPDATE/DELETE
while offering SELECT for debugging purposes.

Jan
2000-07-05 16:17:43 +00:00
Bruce Momjian 411cf2da3f attached to this mail is a patch from a colleague that makes
PostgreSQL-7.0.2 run on Linux for the Intel-IA64 architecture. It also
fixes a bug in the configure scripts that caused configure to fail on
the fcntl(F_SETLK) test.

This fix triggered a bug in the fcntl(F_SETLK) code of the Linux
kernel when used on unix domain sockets resulting in postmaster to
segfault immediately after startup. There is a fix available and
included in the kernel that will be on SuSE Linux 7.0, but kernels <=
2.2.16 still have this bug.

Reinhard Max
2000-07-05 16:09:31 +00:00
Jan Wieck 972604ec60 Small fix for ALTER TABLE xxx* ADD COLUMN ...
Inherited child tables must not be open during creation of TOAST table

Jan
2000-07-05 13:50:59 +00:00
Jan Wieck 93e1f5de0b Automatically create toast tables on ALTER TABLE ... ADD COLUMN
and SELECT ... INTO ... too.

Jan
2000-07-05 13:22:25 +00:00
Jan Wieck 030962da26 Bugfix in ALTER TABLE CREATE TOAST TABLE
Automatically create toast table at CREATE TABLE if new table
has toastable attributes.

Jan
2000-07-05 12:45:31 +00:00
Jan Wieck f2dfd5616c Fixed lztextlen() bug in MULTIBYTE, still thinking that lztext
does compression itself the old way.

Jan
2000-07-05 10:09:53 +00:00
Bruce Momjian 0971d894b9 New resultmap for Alpha, from Ryan Kirkpatrick 2000-07-05 04:28:19 +00:00
Peter Eisentraut b5e2dafd39 Fix broken pg_dump makefile 2000-07-04 19:52:00 +00:00
Jan Wieck d819f5fe83 Moving toaster out of NO ELOG area in heap_update().
Jan
2000-07-04 17:11:40 +00:00
Bruce Momjian 651e98b17f make TEMP -> TEMPORARY 2000-07-04 16:57:49 +00:00
Bruce Momjian edbe00a720 Make pgdump_oid a temp table. Rename to pg_dump_oid. 2000-07-04 16:57:18 +00:00
Peter Eisentraut 554e56e628 Expand secondary password file feature, so that you can use these
files to restrict the set of users that can connect to a database
but can still use the pg_shadow password. (You just leave off the
password field in the secondary file.)
2000-07-04 16:32:01 +00:00
Peter Eisentraut 1c2f735aa7 Fix thinko in my last pg_dumpall change 2000-07-04 16:29:59 +00:00
Bruce Momjian 500b62b057 pg_dump patch from Philip Warner 2000-07-04 14:25:28 +00:00
Tom Lane cdeca5f590 Make toast-table creation and deletion work somewhat reliably.
Don't go through pg_exec_query_dest(), but directly to the execution
routines.  Also, extend parameter lists so that there's no need to
change the global setting of allowSystemTableMods, a hack that was
certain to cause trouble in the event of any error.
2000-07-04 06:11:54 +00:00
Tom Lane 3b61ba6d5c DataFill() has no business resetting xact status bits
in the infomask of the provided tuple.
2000-07-04 02:40:56 +00:00
Vadim B. Mikheev d0273c07ac misc 2000-07-04 01:49:44 +00:00
Vadim B. Mikheev e1a118e5e6 unlock buffer before releasing in heap_insert
+unlock buffer in heap_fetch under !ItemIdIsUsed().
2000-07-04 01:39:24 +00:00
Tom Lane 13647ad6aa tuptoaster.h should surely not #include postgres.h. 2000-07-04 00:04:03 +00:00
Tom Lane e81fe1e8a0 Add missing #include for TOAST. 2000-07-03 23:58:32 +00:00
Jan Wieck 2f12c9f182 TOAST changes to catalog
Jan
2000-07-03 23:19:04 +00:00
Jan Wieck 57d8080a40 TOAST
WARNING: This is actually broken - we have self-deadlocks
	         due to concurrent changes in buffer management.
			 Vadim and me are working on it.

Jan
2000-07-03 23:10:14 +00:00
Peter Eisentraut ef5bea51e1 Move global internal files to PGDATA/global. 2000-07-03 20:48:46 +00:00
Peter Eisentraut e2d3932e0e Move PGPORT envar handling to ResetAllOptions(). Improve long options
parsing to not clobber the optarg string -- so that we can bring
SetOptsFile() up to speed.
2000-07-03 20:46:10 +00:00
Peter Eisentraut 51afb9305c Have pg_dumpall write CREATE USER and CREATE GROUP commands instead of raw
COPYs of pg_shadow and pg_group.

It also turns out that pg_dumpall was all but broken for multiple servers
running at non-standard port numbers. You might get the users and groups
from one server and the databases from another. Fixed that.

A little user interface and code cleanup along with that. This also takes
care of the portability bug discussed in "[BUGS] pg_dumpall" in March 2000.
2000-07-03 16:35:39 +00:00
Bruce Momjian efcff3da16 In the attache is new (correct) version. I add TZ (timezone) support
for
to_char() too.

Karel
2000-07-03 16:01:33 +00:00
Hiroshi Inoue 61768d8cac Add a check of HEAP_MARKED_FOR_UPDATE in HeapTupleSatisfiesDirty().
This enables unique constraint check in case of SELECT FOR UPDATEd.
2000-07-03 04:45:09 +00:00
Tom Lane c4f9eaa608 Clean up memory-context stuff, other minor infelicities. 2000-07-03 03:57:03 +00:00
Tom Lane 6ac19b165d Remove unused variable. (Hey Peter, you use gcc, why didn't you
notice this warning?)
2000-07-03 03:27:31 +00:00
Vadim B. Mikheev 1b67fe17b8 heap' logging 2000-07-03 02:54:21 +00:00
Bruce Momjian 80c646958a Attached is a new patch which addresses this problem. (oids in
regression tests).

Chris Bitmead
2000-07-02 22:01:27 +00:00
Peter Eisentraut 6fb9d2e347 Version number now set in configure, available through Makefile.global
and config.h. Adjusted all referring code.

Scrapped pg_version and changed initdb accordingly. Integrated
src/utils/version.c into src/backend/utils/init/miscinit.c. Changed all
callers.

Set version number to `7.1devel'. (Non-numeric version suffixes now allowed.)
2000-07-02 15:21:27 +00:00
Tom Lane 07dfe97731 Don't run in CacheMemoryContext more than necessary. 2000-07-02 05:38:40 +00:00
Tom Lane d003213225 Don't run in CacheMemoryContext longer than necessary. 2000-07-02 04:46:09 +00:00
Tom Lane 72164e86a6 Remove memory leak from VACUUM parsing. 2000-07-02 04:04:09 +00:00
Tom Lane 57eeb0d315 New memmgr logic in xact.c failed if AbortTransaction() is called when
there is no open transaction.
2000-07-02 02:28:38 +00:00
Bruce Momjian e225260440 Back out Karels to_char changes. 2000-07-01 21:27:14 +00:00
Peter Eisentraut b150906b89 We don't need config.status substituting anything into Gen_fmgrtab.sh, we
just pass in CPP and AWK via the environment from the Makefile.
2000-07-01 21:16:44 +00:00
Peter Eisentraut 191870388d A little bit of clean-up/bug fix in Tcl build. Handle gracefully cases
where someone wants to build these but hasn't configured for Tcl.
2000-07-01 15:02:31 +00:00
Bruce Momjian 99212a4847 In the attache is new to_date()/to_timestamp() version.
Now the to_timestamp() support WW,W,J,SSSS,DDD conversion from strings and
the am/pm bug is fixed, the to_char() use week-of-year (WW) full compatible
with Oracle.

 This patch update relevant regress-tests and docs too.

                                        Karel
~
~
2000-07-01 14:10:32 +00:00
Bruce Momjian 2f131ca588 Fix select '1--2'; for PEter. 2000-06-30 18:03:40 +00:00
Peter Eisentraut 385470f8c6 Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com>
Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define the
replacement function in the header file. Use -KPIC, not -K PIC.
Use CC to link C++ libraries, not ld/ar.

Eliminate file not found warnings in tcl build code.
2000-06-30 16:11:02 +00:00
Tom Lane 3513f4d162 RemoveView was doing things the hard way... 2000-06-30 07:06:05 +00:00
Tom Lane b41f4ab8c4 Use a private memory context to store rule information in each relcache
entry that has rules.  This allows us to release the rule parsetrees
on relcache flush without needing a working freeObject() routine.
Formerly, the rule trees were leaked permanently at relcache flush.
Also, clean up handling of rule creation and deletion --- there was
not sufficient locking of the relation being modified, and there was
no reliable notification of other backends that a relcache reload
was needed.  Also, clean up relcache.c code so that scans of system
tables needed to load a relcache entry are done in the caller's
memory context, not in CacheMemoryContext.  This prevents any
un-pfreed memory from those scans from becoming a permanent memory
leak.
2000-06-30 07:04:23 +00:00
Bruce Momjian c9ec78a6b8 Fix quotes in /* */ comments in psql. 2000-06-29 16:27:57 +00:00
Tom Lane 43ba1b4420 Add test code to copy all parse/plan trees. Repair essential omissions
in copyfuncs and equalfuncs exposed by regression tests.  We still have
some work to do: these modules really ought to handle most or all of
the utility statement node types.  But it's better than it was.
2000-06-29 07:35:57 +00:00
Tom Lane 6a7b40d909 Rearrange config.h entries into a more sensible order, and add some
documentation.  Let's try to keep this file a bit neater in future,
hmm?  Also (to get back to the original point) update info about
FUNC_MAX_ARGS, and add additional config symbols for debugging
new memory management changes.
2000-06-29 05:50:29 +00:00
Tom Lane d1080d19b1 Remove freefuncs.c, which hasn't been used in a long time and is not
worth the effort to continue to maintain.  Since freeObject() is not
capable of coping with cases like multiple links to a node, it's
unlikely that it ever will be useful again.  We now have memory
context management that offers a faster and more reliable way of
getting rid of arbitrary node trees (at the cost of having to know
in advance of building the tree that you'll want to get rid of it).
2000-06-29 02:26:23 +00:00
Tom Lane feb48f41af Add SIGFPE to list of signals never to block. #ifdef all signals in
that list to cope with platforms that don't have them all.
2000-06-29 02:17:42 +00:00
Bruce Momjian 932d1e5f9e Add #ifdef for LC_MESSAGES, because it is not ANSI C standard, and BSDI
does not have it.
2000-06-29 01:19:36 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Tom Lane 5ac1eac2a6 Suppress memory leak in COPY WITH OIDS TO wherever. 2000-06-28 06:05:36 +00:00
Tom Lane 13612a97b9 Repair incorrect assumption that all versions of 'install' know
how to install multiple files in one invocation.
2000-06-28 05:09:37 +00:00
Tom Lane 1aebc3618a First phase of memory management rewrite (see backend/utils/mmgr/README
for details).  It doesn't really do that much yet, since there are no
short-term memory contexts in the executor, but the infrastructure is
in place and long-term contexts are handled reasonably.  A few long-
standing bugs have been fixed, such as 'VACUUM; anything' in a single
query string crashing.  Also, out-of-memory is now considered a
recoverable ERROR, not FATAL.
Eliminate a large amount of crufty, now-dead code in and around
memory management.
Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
backend startup.
2000-06-28 03:33:33 +00:00
Bruce Momjian b601c8d882 Tamotsu Nakagawa has posted a fix for this to a local mail list in
Japan. Can someone comment on this? According to him, with the patch
now only the geometry test fails.

 Tatsuo Ishii
2000-06-27 18:08:49 +00:00
Peter Eisentraut 5bb8b62983 Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
2000-06-27 00:32:06 +00:00
Bruce Momjian ecef326850 Fix \pset null to use ', not ". 2000-06-26 14:16:34 +00:00
Peter Eisentraut c4e63f70fa Added new commands and intelligence to psql tab completion. 2000-06-25 14:25:51 +00:00
Peter Eisentraut c7558b3bae Relaxed pickiness about user and group commands in transaction blocks. 2000-06-25 14:24:59 +00:00
Peter Eisentraut c446509565 Second pass over run-time configuration system. Adjust priorities on some
option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering
here, so make explicit checks. Add comments explaining all of this.
Removed permissions check on SHOW command.

Add examine_subclass to the game, rename to SQL_inheritance to fit the
official data model better. Adjust documentation.

Standalone backend needs to reset all options before it starts. To
facilitate that, have IsUnderPostmaster be set by the postmaster itself,
don't wait for the magic -p switch.

Also make sure that all environment variables and argv's survive
init_ps_display(). Use strdup where necessary.

Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode
0600 -- having configuration files is no fun if you can't edit them.
2000-06-22 22:31:24 +00:00
Peter Eisentraut bfdb695b85 Cleaned up PL/pgSQL build. Fixed a couple of copyandpaste'os in the
interfaces and interfaces/odbc make files. Adjusted regression test
driver to start building and installing in the top level directory.
2000-06-20 16:40:19 +00:00
Tom Lane 9f1a223046 Make renaming a temp table behave sensibly. We don't need to touch
the underlying table at all, just change the mapping entry ... but
that logic was missing.
2000-06-20 06:41:13 +00:00
Tom Lane 38db5fab29 Make inheritance planning logic a little simpler and clearer,
hopefully even a little faster.
2000-06-20 04:22:21 +00:00
Tom Lane 996659f255 Fix handling of type tuple associated with a temp relation. We have
to apply the tempname->realname mapping to type name lookup as well
as relation name lookup, else the type tuple will not be found when
wanted.  This fixes bugs like this one:
create temp table foo (f1 int);
select foo.f2 from foo;
ERROR:  Unable to locate type name 'foo' in catalog
2000-06-20 01:41:22 +00:00
Tom Lane a1dfaef6c6 Modify index-opening code to guarantee that the indexes of a relation
are opened in a consistent order by different backends (I ordered them
by index OID because that's easy, but any other consistent order would
do as well).  This avoids potential deadlock for index types that we
acquire exclusive locks on ... ie, rtree.
2000-06-19 23:40:48 +00:00
Tom Lane 1f75cdd5ed Ensure that kernel error code is included in smgr-level error reports.
Tweak mdcreate a little bit so that it returns the right errno.
2000-06-19 23:37:08 +00:00
Peter Eisentraut 81b30f2cb4 Integrated ODBC driver into regular build. No more standalone business,
which didn't work anyway. Had to back out unixodbc related patch which
broke the regular ODBC build.
2000-06-19 16:58:48 +00:00
Bruce Momjian b5d4d234cb Rename HAVE_SQLGETPRIVATEPROFILESTRING to something resonable in length
and readability.
2000-06-19 13:39:03 +00:00
Bruce Momjian 14f6587650 fix HAVE_SQLGETPRIVATEPROFILESTRING define 2000-06-19 13:35:30 +00:00
Tom Lane c590273fef Clean up bogosities in pg_opclass, pg_amop, pg_amproc. There are amproc
entries now for int8 and network hash indexes.  int24_ops and int42_ops
are gone.  pg_opclass no longer contains multiple entries claiming to be
the default opclass for the same datatype.  opr_sanity regress test
extended to catch errors like these in the future.
2000-06-19 03:55:01 +00:00
Bruce Momjian a53dc5ee61 Linux/alpha patch. 2000-06-19 00:51:23 +00:00
Tom Lane 1ee26b7764 Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the
materialized tupleset is small enough) instead of a temporary relation.
This was something I was thinking of doing anyway for performance, and Jan
says he needs it for TOAST because he doesn't want to cope with toasting
noname relations.  With this change, the 'noname table' support in heap.c
is dead code, and I have accordingly removed it.  Also clean up 'noname'
plan handling in planner --- nonames are either sort or materialize plans,
and it seems less confusing to handle them separately under those names.
2000-06-18 22:44:35 +00:00
Tom Lane b4e906f191 Reinstate BufFileTell(). 2000-06-18 03:11:40 +00:00
Tom Lane edf0b5f0db Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of
passing the index-is-unique flag to index build routines (duh! ...
why wasn't it done this way to begin with?).  Aside from eliminating
an eyesore, this should save a few milliseconds in btree index creation
because a full scan of pg_index is not needed any more.
2000-06-17 23:41:51 +00:00
Tom Lane d03a933ec5 Fix performance problems with pg_index lookups (see, for example,
discussion of 5/19/00).  pg_index is now searched for indexes of a
relation using an indexscan.  Moreover, this is done once and cached
in the relcache entry for the relation, in the form of a list of OIDs
for the indexes.  This list is used by the parser and executor to drive
lookups in the pg_index syscache when they want to know the properties
of the indexes.  Net result: index information will be fully cached
for repetitive operations such as inserts.
2000-06-17 21:49:04 +00:00
Tom Lane 9cf80f2f55 Clean out another pocket of functions called via nonspecific function
pointers, namely the catcache tuple fetch routines.  Also get rid of
the unused and possibly confusing 'size' field in struct cachedesc.
Since it doesn't allow for variable-length fields, anyone who
actually trusted it would likely be making a mistake...
2000-06-17 04:56:39 +00:00
Peter Eisentraut 1652d43358 Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberos
support; no more editing of make files.
2000-06-17 00:10:40 +00:00
Tom Lane 648029ec2e Repair unforgivably brain-dead representation of CaseExpr nodes in
stored rules.  Bump catversion to reflect incompatibility.
2000-06-16 05:27:03 +00:00
Bruce Momjian f7f177d372 /contrib patch from Karel. 2000-06-15 18:55:34 +00:00
Tom Lane a62d8393ef Repair Large Object bugs demonstrated by Ian Grant's example. inv_write
was inappropriately relying on rel->rd_nblocks to tell if the LO is
empty (apparently a hack to get around a long-dead index bug), causing
misbehavior on a written-but-never-vacuumed LO.  Also, inv_read failed
to cope gracefully with 'holes' (unwritten regions) in the object.
2000-06-15 06:07:34 +00:00
Bruce Momjian 946e80c435 Final #include cleanup. 2000-06-15 04:10:30 +00:00
Bruce Momjian df43800fc8 Clean up #include's. 2000-06-15 03:33:12 +00:00
Bruce Momjian e362d4e1ea #include cleanups 2000-06-15 00:52:26 +00:00
Bruce Momjian d540a9a6bd Update include cleaning scripts. 2000-06-14 22:33:06 +00:00
Bruce Momjian 8e6697fcd9 Update include scripts 2000-06-14 22:28:16 +00:00
Bruce Momjian 7fe8722295 Add () around define -1. 2000-06-14 18:59:42 +00:00
Peter Eisentraut 44d1abebb4 Big warnings cleanup for Solaris/GCC. Down to about 40 now, but
we'll get there one day.

Use `cat' to create aclocal.m4, not `aclocal'. Some people don't
have automake installed.

Only run the autoconf rule in the top-level GNUmakefile if the
invoker specified `make configure', don't run it automatically
because of CVS timestamp skew.
2000-06-14 18:18:01 +00:00
Bruce Momjian e9ca59fdbc Back out libpgtcl tcl/tksh includes. 2000-06-14 17:07:31 +00:00
Bruce Momjian 2635bef524 Remove -O0 linux ppc flag 2000-06-14 17:01:35 +00:00
Tom Lane ff7b9f5541 I had overlooked the fact that some fmgr-callable functions return void
--- ie, they're only called for side-effects.  Add a PG_RETURN_VOID()
macro and use it where appropriate.  This probably doesn't change the
machine code by a single bit ... it's just for documentation.
2000-06-14 05:24:50 +00:00
Bruce Momjian 69cd08d9f7 Fix for memory leak from Denis Perchine 2000-06-14 04:53:44 +00:00
Bruce Momjian a194574dde > If read or write fails. Position will left the same. This
> situation is already tracked in File routines, but a little bit
> incorrectly.

> After small survey in Linux kernel code, I am not sure about
> it.  New patch set pos to unknown in the case of read/write
> fails. And do lseek again.

> Here is the full patch for this. This patch reduce amount of
> lseek call ten ti mes for update statement and twenty times for
> select statement. I tested joined up date and count(*) select
> for table with rows > 170000 and 10 indices.  I think this is
> worse of trying. Before lseek calls account for more than 5% o
> f time.  Now they are 0.89 and 0.15 respectevly.
>
> Due to only one file modification patch should be applied in
> src/backedn/stora ge/file/ dir.

-- Sincerely Yours,
Denis Perchine
2000-06-14 03:19:24 +00:00
Bruce Momjian d1b90bfd45 OK, I have tidied up todays (13th) snapshot with the attached patch, I
have'nt r un autoconf to create a new configure, I guess that's done by
the smapshot process, I had to remove a line from interface/odbc/
GNUMakefile to get it to build, it was a autoconf variable that looks to
not be used anymore, I am assuming that this is  ok.

Nick Gorham
Easysoft Ltd
2000-06-14 02:43:46 +00:00
Bruce Momjian a13b3f8cb6 add missing files 2000-06-13 12:49:33 +00:00
Bruce Momjian 81fa9e0e56 in the Directory src/bin/pgtclsh there is a good mechanism to integrate
the
tcl-spec in the Makefile.
The patch in the attachemant does this in the src/interfaces/libpgtcl
too

Thank you
 Rudolf Weber
2000-06-13 09:16:39 +00:00
Tom Lane f2d1205322 Another batch of fmgr updates. I think I have gotten all old-style
functions that take pass-by-value datatypes.  Should be ready for
port testing ...
2000-06-13 07:35:40 +00:00
Bruce Momjian 6cb6d05456 Brand 7.1 release. Also update jdbc version in release branch. 2000-06-12 22:36:19 +00:00
Bruce Momjian 332f0f5fc0 Rename rule CURRENT to OLD in source tree. Add mapping for backward
compatiblity with old rules.
2000-06-12 19:40:58 +00:00
Bruce Momjian b45ea42234 Back out old unixodbc patches and apply new ones. Nick Gorham 2000-06-12 17:58:20 +00:00
Bruce Momjian b0929c82ac Put back old Makefiles, in pgsql and pgsql/src. 2000-06-12 16:37:22 +00:00
Bruce Momjian 36c926875a Add makefile to warn about not using gmake. 2000-06-12 03:54:03 +00:00
Bruce Momjian 3357e1d29e Back out pg_shadow changes to allow create table and locking permissions. 2000-06-12 03:41:03 +00:00
Bruce Momjian 64948dbe15 >> What happened to the patch I sent regarding the bug in the TCL
>> Makefile where the make bombs if "." is not in the builder's path?
>> The last I checked, it wasn't applied and the fix is very easy
>> (explicitly use "./" to call the script).

 SL Baur
2000-06-12 02:23:52 +00:00
Tom Lane 3477957b44 Update sequence-related functions to new fmgr style. Remove downcasing,
quote-stripping, and acl-checking tasks for these functions from the
parser, and do them at function execution time instead.  This fixes
the failure of pg_dump to produce correct output for nextval(Foo)
used in a rule, and also eliminates the restriction that the argument
of these functions must be a parse-time constant.
2000-06-11 20:08:01 +00:00
Peter Eisentraut 06cd0f1a32 Substituted new configure test for types of accept()
Interfaced a lot of the custom tests to the config.cache, in the process
made them separate macros and grouped them out into files. Made naming
adjustments.

Removed a couple of useless/unused configure tests.

Disabled C++ by default. C++ is no more special than Perl, Python, and Tcl.
And it breaks equally often. :(
2000-06-11 11:40:09 +00:00
Peter Eisentraut 6de89c9ab7 Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.

Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.

Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.

Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
2000-06-10 18:02:12 +00:00
Tom Lane 2ae20ef98a Update regression tests for ONLY and other recent changes. 2000-06-10 05:19:26 +00:00
Tom Lane 936900074d Update rule dumper for the brave new world of ONLY. 2000-06-10 05:17:23 +00:00
Tom Lane 6bdbd41f2d nodeAppend tried to deal with multiple result relations, but apparently it never
really worked.  Until now.
2000-06-10 05:16:38 +00:00
Tom Lane 6307b01b53 Fix some more gratuitous breakage ... also throw in a couple of
fflush(stderr)'s for good luck.
2000-06-10 03:53:59 +00:00
Bruce Momjian 7bd58b4712 Fix initdb spaces problem. 2000-06-09 23:50:24 +00:00
Bruce Momjian d3ef753686 This patch fixes the 0-based/1-based result set indexing problem for
absolute.  It also makes it more compliant with the interface
specification in Sun's documentation;

1. absolute(0) should throw an exception.
2. absolute(>num-records) should set the current row to after the last
record in addition to returning false.
3. absolute(<num-records) should set the current row to before the first
record in addition to returning false.

These operations in the existing code just return false and don't change
current_row.

These changes required a minor change to relative(int) since it calls
absolute(int)

The attached patch is against the cvs repository tree as of this morning.

Also, who is in charge of maintaining the jdbc driver?  I'm working on
getArray for the jdbc2 driver, but it's going to require three more
classes to be added to the driver, and thus three more source files
in the repository.  Is there someone I can contact directly to ask about
this?

Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
2000-06-09 17:27:57 +00:00
Bruce Momjian 3fe3acb844 I have made the couple of mods required to make the odbc driver with
postgres build and use unixODBC (http://www.unixodbc.org)

This patch was applied against the postgresql-7.0beta1 build

Any problems let me know.

Nick Gorham
2000-06-09 16:03:09 +00:00
Bruce Momjian 85add42a57 I have large database and with this DB work more users and I very need
more restriction for fretful users. The current PG allow define only
NO-CREATE-DB and NO-CREATE-USER restriction, but for some users I need
NO-CREATE-TABLE and NO-LOCK-TABLE.

This patch add to current code NOCREATETABLE and NOLOCKTABLE feature:

CREATE USER username
    [ WITH
     [ SYSID uid ]
     [ PASSWORD 'password' ] ]
    [ CREATEDB   | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
->  [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ]
    ...etc.

 If CREATETABLE or LOCKTABLE is not specific in CREATE USER command,
as default is set CREATETABLE or LOCKTABLE (true).

 A user with NOCREATETABLE restriction can't call CREATE TABLE or
SELECT INTO commands, only create temp table is allow for him.

                                                Karel
2000-06-09 15:51:02 +00:00
Bruce Momjian a672e9650a Prompt username/password on stderr so:
pg_dump -o -u some_db >dump_file

works.
2000-06-09 12:33:42 +00:00
Bruce Momjian 1c33289fd9 Clean up regression for new 1st/9th/3rd fixes. 2000-06-09 11:40:03 +00:00
Bruce Momjian 4e859c3c8c Add inherit regression files. 2000-06-09 11:12:38 +00:00
Bruce Momjian dbf2fd2e0f The enclosed patch changes the behaviour of the "ordinal" ('TH') format for
to_char.  I don't know about the rest of the world, but the "standard" in
Australia is the following:

        1st, 2nd, 3rd, 4th - 9th
        10th - 19th
        21st, 22nd, 23rd, 24th - 29th (similarly for 30s - 90s)
        110th - 119th (and for all "teens")
        121st, 122nd, 123rd, 124th - 129th

I think you see the trend.  The current code works fine except that it
produces:

        111st, 112nd, 113rd, 114th - 119th
        211st, 212nd, 213rd, 214th - 219th ... and so on.

Without knowing anything about what's supported (and what isn't) in the usual
I18N libraries, should this type of behaviour be defined within the locales?

Daniel Baldoni
2000-06-09 03:18:34 +00:00
Tom Lane ce7746201b Cause inheritance patch to meet minimum coding standards (no gcc
warnings).
2000-06-09 03:17:13 +00:00
Tom Lane 7fca3f0379 Cleanup to ensure good state of derived files in tarballs. 2000-06-09 02:38:36 +00:00
Bruce Momjian 8c1d09d591 Inheritance overhaul by Chris Bitmead <chris@bitmead.com> 2000-06-09 01:44:34 +00:00
Tom Lane ae526b4070 Another round of updates for new fmgr, mostly in the datetime code. 2000-06-09 01:11:16 +00:00
Bruce Momjian 20ad43b576 Mark functions as static and ifdef NOT_USED as appropriate. 2000-06-08 22:38:00 +00:00
Bruce Momjian 5690933d6c Mark ImmediateSharedRelationCacheInvalidate as NOT_USED. 2000-06-08 19:51:06 +00:00
Bruce Momjian c709f56475 More odbc include cleanups 2000-06-08 17:08:54 +00:00
Bruce Momjian e1eee4cf06 Update odbc include 2000-06-08 17:07:34 +00:00
Bruce Momjian f7d979bc58 Fix ODBC for new binary fopen/open params 2000-06-08 16:40:51 +00:00
Bruce Momjian d42f9b59e9 Here is a patch for interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
It addresses three issues:

1. The problem with ResultSet's interface specifying 1-based indexing was
not quite fixed in 7.0.2.  absolute would stop the user form moving to the
first record (record 0 internally).

2. Absolute did not set current_row

3. For field.mod=-1, GetObject would try to return numeric values with a
precision of around 65000.  Now GetObject detects when field.mod==-1, and
passes that as the scale to getBigDecimal.  getBigDecimal detects when a
-1 is passed and simply does not scale the value returned.  You still get
the correct value back, it simply does not tweak the precision.

I'm working off of a source tree I just checked out from the
repository.  The diff is based on what was in the repository about ten
minutes ago.

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------
2000-06-07 20:01:20 +00:00
Peter Eisentraut e3059fc0f5 Gen_fmgrtab.sh is strange: it is a platform dependent way (because it uses
CPP) to create platform independent files. Unfortunately, that means that
every config.status (or configure) run invariably causes a relink of the
postmaster and also that we can't put these files in the distribution
(usefully). So we make it a little smarter: when the output files already
exist and it notices that it would recreate them in identical form, it
doesn't touch them. In order to avoid re-running the make rule all the time
we update a timestamp file instead.

Update release_prep accordingly. Also make Gen_fmgrtab.sh use the awk that
is detected at configure time, not necessarily named `awk' and have it check
for exit statuses a little better.

In other news... Remove USE_LOCALE from the templates, it was set to `no'
everywhere anyway. Also remove YACC and YFLAGS from the templates, configure
is smart enough to find bison or yacc itself. Use AC_PROG_YACC for that
instead of the hand-crafted code. Do not set YFLAGS to `-d'. The make rules
that need this flag should explicitly invoke it. YFLAGS should be a user
variable. Update the makefiles to that effect.
2000-06-07 16:27:00 +00:00
Bruce Momjian 7d301947e5 Re-order pg_listener index so it can later be used in an index scan. 2000-06-07 04:09:44 +00:00
Bruce Momjian 75b950f668 New system index, initdb everyone. 2000-06-07 03:02:08 +00:00
Bruce Momjian 4bd5006812 Add index on pg_index.indrelid for Tom Lane. 2000-06-07 02:44:40 +00:00
Peter Eisentraut 5b9d0d9a5c Moved configure script from src/ to the top level directory. Moved
configuration helper things into config/ dir. Adjusted some relative paths
in makefiles.
2000-06-06 22:01:15 +00:00
Tom Lane 42ad25fcd1 init_fcache was being careless about using SearchSysCacheTuple result
over multiple lookups --- it should use SearchSysCacheTupleCopy instead.
This accounts for rare failures like 'init_fcache: null probin for procedure 481'
when running concurrently with a VACUUM.
2000-06-06 17:44:25 +00:00
Tom Lane e57e991e80 Improve comments for SearchSysCacheTuple and SearchSysCacheTupleCopy. 2000-06-06 17:02:38 +00:00
Tom Lane 05cd91a582 typeTypeName() must return a pstrdup'd copy of the type name, not a
direct pointer into the syscache entry for the type.  In some cases
the syscache entry might get flushed before we are done using the
returned type name.  This bug accounts for difficult-to-repeat
failures seen when INSERTs into columns of certain data types are
run in parallel with VACUUMs of system tables.  There may be related
problems elsewhere --- we need to take a harder look at uses of
syscache data.
2000-06-06 16:50:37 +00:00
Peter Eisentraut 4032a515d2 PGPORT envar was erroneously ignored by the backend 2000-06-06 16:04:32 +00:00
Peter Mount e3cc370d15 Added org/postgresql/DriverClass.java to the list of files removed by make clean (it's dynamically built)
Fixed Statement, so that the update count is valid when an SQL DELETE operation is done.
While fixing the update count, made it easier to get the OID of the last insert as well. Example is in example/basic.java
2000-06-06 11:06:09 +00:00
Peter Mount 0e38f0a1d1 Added some missing org.'s that prevented the use of the geometric types 2000-06-06 07:45:07 +00:00
Peter Mount d7dbba2659 Removed hardwired 8k limit on queries 2000-06-06 07:24:06 +00:00
Bruce Momjian 552d59353f Update for 7.0.2. 2000-06-05 17:07:56 +00:00
Tom Lane 48165ec226 Latest round of fmgr updates. All functions with bool,char, or int2
inputs have been converted to newstyle.  This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters.  Still
more to do for the Alpha port however.
2000-06-05 07:29:25 +00:00
Tom Lane c61db5ba2d Simplify build/install process for bki and description files. There's
no reason for them to be copied into src/backend rather than being
installed straight from the catalog subdirectory.  This also avoids
some peculiar behavior (bugs?) present in at least gmake 3.78.1: it
won't always update the bki files in backend/ even when the ones in
backend/catalog/ are newer.
2000-06-05 07:16:13 +00:00
Tom Lane 4863829c12 If user re-DECLAREs an existing cursor name, close the old cursor of
that name and issue a NOTICE to the effect that we did.  Previously,
code would try to assign the new cursor declaration to the old portal,
but this didn't work reliably since new parsetree is still sitting in
blank portal and is likely to get clobbered.
2000-06-04 22:08:53 +00:00
Tom Lane 9b5410aa03 Disallow CLOSE of reserved system portal names. 2000-06-04 22:04:32 +00:00
Tom Lane 2190cf2926 Repair bug reported by ldm@apartia.com: Append nodes, which don't
actually use their targetlist, are given a targetlist that is just a
pointer to the first appended plan's targetlist.  This is OK, but what
is not OK is that any sub-select expressions in said tlist were being
entered in the subPlan lists of both the Append and the first appended
plan.  That led to two startup and two shutdown calls for the same
plan node at exec time, which led to crashes.  Fix is to not generate
a list of subPlans for an Append node.  Same problem and fix apply
to other node types that don't have a real, functioning targetlist:
Material, Sort, Unique, Hash.
2000-06-04 20:50:50 +00:00
Bruce Momjian 54bce381a7 Remove FROM warning by fixing query. 2000-06-04 17:52:54 +00:00
Peter Eisentraut 0a54de8faf Removed ELOG_TIMESTAMPS #define in favor of two run-time
configuration options `Log_timestamp' and `Log_pid'.
2000-06-04 15:06:34 +00:00
Peter Eisentraut 209aa77d98 New ps display code, works on more platforms.
Install a default configuration file.

Clean up some funny business in the config file code.
2000-06-04 01:44:38 +00:00
Bruce Momjian 2ea370a3ce New warning code about auto-created range table entries. 2000-06-03 04:41:34 +00:00
Bruce Momjian 58785757dd More cleanup of c.h binary macros 2000-06-02 16:40:09 +00:00
Bruce Momjian a305c7d675 Reverse PG_BINARY defines 2000-06-02 16:33:17 +00:00
Bruce Momjian cc2b5e5815 Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
2000-06-02 15:57:44 +00:00
Vadim B. Mikheev bf1c8f2b3b heap' xlog records 2000-06-02 10:20:27 +00:00
Tom Lane 664dd614d9 If create/drop database are going to call closeAllVfds(), they ought
to do it at the last moment before calling system() ... not at some
randomly-chosen earlier point in the routine ...
2000-06-02 04:04:54 +00:00
Tom Lane b659ab07a2 Create an fd.c entry point that is just like plain open(2) except that
it will close VFDs if necessary to surmount ENFILE or EMFILE failures.
Make use of this in md.c, xlog.c, and user.c routines that were
formerly vulnerable to these failures.  In particular, this should
handle failures of mdblindwrt() that have been observed under heavy
load conditions.  (By golly, every other process on the system may
crash after Postgres eats up all the kernel FDs, but Postgres will
keep going!)
2000-06-02 03:58:34 +00:00
Tom Lane bff5dce993 Correct portability problem introduced by yours truly --- I used a
conditional expression x?y:z in an awk program.  Seems old versions
of awk don't have that ...
2000-06-02 02:00:28 +00:00
Tom Lane a82471f9e4 Keep CVS quiet about derived file guc-file.c. 2000-06-02 00:04:26 +00:00
Tom Lane 0672a3c081 Lexer defended us against overlength plain identifiers, but not against
overlength quoted identifiers.  Death and destruction ensue...
2000-06-01 22:21:05 +00:00
Bruce Momjian bb8bda3918 The definition for "ProcessConfigFile()" in guc-file.l does not match
the prototype in guc.h.  The following patch corrects that.

Billy G. Allie
2000-06-01 16:46:50 +00:00
Tom Lane 64b4a48ddc Simplify overly-clever Make rule, which evidently confuses at least
some versions of gmake (mine didn't do the right thing, anyway).
2000-06-01 14:52:25 +00:00
Peter Mount 228a5e708c Removed timezone in ResultSet.getTimestamp() 2000-06-01 06:33:01 +00:00
Bruce Momjian b965c90365 More perl cleanup 2000-06-01 03:07:33 +00:00
Bruce Momjian 0cfe2374a7 Rename perl example eg directory to examples. 2000-06-01 03:05:24 +00:00
Bruce Momjian 726926a523 Update pgcvslog 2000-06-01 01:34:02 +00:00
Tom Lane cbf503180f Tweak recognition of range-clause pairs so that 'var > $1 AND var < $2'
(ie, parameters instead of consts) will be treated as a range query.
We do not know the actual selectivities involved, but it seems like
a good idea to use a smaller estimate than we would use for two unrelated
inequalities.
2000-05-31 15:38:53 +00:00
Peter Eisentraut 6a68f42648 The heralded `Grand Unified Configuration scheme' (GUC)
That means you can now set your options in either or all of $PGDATA/configuration,
some postmaster option (--enable-fsync=off), or set a SET command. The list of
options is in backend/utils/misc/guc.c, documentation will be written post haste.

pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
-Q, and -T options (no longer applicable, although -d0 does the same as -Q).

Added to configure an --enable-syslog option.

changed all callers from TPRINTF to elog(DEBUG)
2000-05-31 00:28:42 +00:00
Bruce Momjian 8a437bf523 Update pg_hba.conf with more examples 2000-05-30 17:39:56 +00:00
Bruce Momjian bb74b18dd0 Update pg_hba.conf.sample with better examples and descriptions 2000-05-30 17:18:25 +00:00
Bruce Momjian 2f52eee2d1 Copy pg_ident.conf.sample into /lib directory. Rename USERAUTH to
AUTHTYPE in config file.  Patch both branches.
2000-05-30 16:36:15 +00:00
Tom Lane aea9b6e20f Ooops, looks like I broke fastpath in last changes... 2000-05-30 07:09:23 +00:00
Hiroshi Inoue a3cd0654db Added header files required for ALTER TABLE DROP COLUMN
trial implementation.
2000-05-30 06:22:44 +00:00
Tom Lane 0f1e39643d Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls.  Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...
2000-05-30 04:25:00 +00:00
Bruce Momjian a12a23f0d0 Remove unused include files. Do not touch /port or includes used by defines. 2000-05-30 00:49:57 +00:00
Bruce Momjian 2937505a3e More <> cleanup 2000-05-29 21:26:04 +00:00
Bruce Momjian 6c944bf3cc Cleanup of <> and "" 2000-05-29 21:25:07 +00:00
Tom Lane 6ed00fee53 Convert array_map to use new fmgr interface. 2000-05-29 21:02:32 +00:00
Tom Lane 747527e545 Neglected to add fmgr.h to set of installed headers... 2000-05-29 20:51:35 +00:00
Tom Lane a030113197 Tweak fmgrtab generation so that the F_XXX macros that give OIDs for
built-in procedures are named after the prosrc field of pg_proc (ie,
the actual C function name), not the proname field.  This did not use
to make a difference back when the two were always the same, but in the
presence of overloaded proname values we'd best try to use the C name
instead.  AFAICT this change affects no existing code, but it is
necessary to be able to get at some built-in functions that no macro
was being generated for before.
2000-05-29 20:18:30 +00:00
Tom Lane 22a517a40c Repair problems with overrun of timezone name length. Increase MAXTZLEN
to 10, and be consistent about whether it counts the trailing null (it
does not).  Also increase MAXDATELEN to be sure no buffer overflows are
caused by the longer MAXTZLEN.
2000-05-29 19:16:57 +00:00
Bruce Momjian f089c36419 Add analyze.c file for split. 2000-05-29 17:44:17 +00:00
Bruce Momjian 35096b568e Split vacuum and analyze into separate files 2000-05-29 17:40:45 +00:00
Bruce Momjian 3d669b50ed Update messages. 2000-05-29 17:11:58 +00:00
Bruce Momjian 84a30b4c41 Make analyze do vacuum/analyze in one step. 2000-05-29 17:07:57 +00:00
Bruce Momjian 6d5cba7c31 More vacuum cleanup 2000-05-29 17:06:15 +00:00
Bruce Momjian d950c19747 more cleanup 2000-05-29 16:21:05 +00:00
Bruce Momjian ac4de0cc94 Add analyze log messages for verbose mode. 2000-05-29 16:06:37 +00:00
Bruce Momjian c3647c3d06 cleanup 2000-05-29 15:48:47 +00:00
Bruce Momjian 659f79be7a Allow vacuum to perform analyze with shared lock. Update cvs manual. 2000-05-29 15:44:55 +00:00
Tom Lane 091126fa28 Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
2000-05-29 05:45:56 +00:00
Tom Lane 18952f6744 Second round of fmgr changes: triggers are now invoked in new style,
CurrentTriggerData is history.
2000-05-29 01:59:17 +00:00
Bruce Momjian 147ccf5c80 More vacuum cleanups 2000-05-29 01:55:07 +00:00
Bruce Momjian f3650653c6 More vacuum renaming. 2000-05-29 01:46:00 +00:00
Tom Lane 80648891cc Miscellaneous cleanups of places that needed to account for new
pg_language entries.
2000-05-28 20:34:52 +00:00
Tom Lane ab843085f1 Constant-expression simplifier now knows how to simplify strict functions
that have at least one constant-NULL input, even if other inputs are
not constants.
2000-05-28 20:33:28 +00:00
Tom Lane 305d3ce576 Install fmgr rewrite doc as README file.
Need to update user docs still ...
2000-05-28 18:06:55 +00:00
Tom Lane 0a7fb4e918 First round of changes for new fmgr interface. fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
2000-05-28 17:56:29 +00:00
Tom Lane 67ad9a18c0 define YY_NEVER_INTERACTIVE for flex, to persuade flex that it's not
necessary to call isatty() for each and every received query.  That's
one less kernel call per query cycle ...
2000-05-27 05:13:38 +00:00
Bruce Momjian d45f7dfdca Update kerberos patch 2000-05-27 04:13:05 +00:00
Bruce Momjian 632a7ed759 Back out kerberos changes. Causes compile problems. 2000-05-27 03:58:20 +00:00
Bruce Momjian 9500b35f17 Patch for Kerberos V.
Most (nearly all) of the work was done by David Wragg <dpw@doc.ic.ac.uk>

He patched 6.5.3. I've updated it for 7.0RC5.

It works for MIT kerberos 1.1.1 (and previously for 1.0.6 as well).

I've got the patch against 6.5.3, plus kerberized RPMS.

Mike Wyer <mw@doc.ic.ac.uk>     ||         "Woof?"
2000-05-27 03:39:33 +00:00
Bruce Momjian ddae527c96 Remove // comments from ODBC. 2000-05-27 03:35:14 +00:00
Bruce Momjian c328e75a6f Remove pgaccess dll's from the distribution. 2000-05-27 03:14:10 +00:00
Bruce Momjian 82e2fe9cbc Clean up pg_hba.conf 2000-05-27 02:19:44 +00:00
Bruce Momjian ba1578aa8f Improve pg_hba.conf examples 2000-05-27 01:32:01 +00:00
Tom Lane b71761d280 Reduce eqsel()'s fudge-factor for estimating the frequency of values
other than the most common value in a column.  We had had 0.5, make it
0.1 to make it more likely that an indexscan will be chosen.  Really
need better statistics instead, but this should stem the bleeding
meanwhile ...
2000-05-26 17:19:15 +00:00
Bruce Momjian be6e7717db Fix \h SELECT to not show SELECT INTO. 2000-05-26 15:47:18 +00:00
Tatsuo Ishii 23b0387a94 Fix too long syslog message problem 2000-05-26 12:17:48 +00:00
Tom Lane 8bba4b4e0e Generate a reasonable error message when an aggregate function is applied
to an undecorated relation name (cf. example from Ed Loehr, 5/25/00).
2000-05-26 03:56:40 +00:00
Bruce Momjian cf169e0088 Spell fix 2000-05-26 03:15:18 +00:00
Tom Lane d4e27596cf More paranoia about global variables containing references to long-
since-closed file descriptors...
2000-05-26 01:38:08 +00:00
Tom Lane 2af53f3762 After closing frontend socket, set MyProcPort->sock = -1 to ensure that
subsequent I/O attempts fail cleanly.  I'm speculating about failure
scenarios in which we do pq_close, then something in a proc_exit routine
opens a file (re-using that kernel FD number), then something else
fails and tries to write an elog message to the frontend ... message
ends up in opened file, oops.  No known examples of this but it seems
like a potential hole.
2000-05-26 01:26:19 +00:00
Tom Lane 39725e56e8 Add some elog(DEBUG)'s to help diagnose mdblindwrt failures. 2000-05-25 23:30:20 +00:00
Tom Lane 92286bd576 Clean up sloppy coding of _outAExpr(). 2000-05-25 22:43:12 +00:00
Tom Lane ff566b2241 Modify raw parsetree representation returned by gram.y for SubLinks:
the oper field should be a valid Node structure so it can be dumped by
outfuncs.c without risk of coredump.  (We had been using a raw pointer
to character string, which surely is NOT a valid Node.)  This doesn't
cause any backwards compatibility problems for stored rules, since
raw unanalyzed parsetrees are never stored.
2000-05-25 22:42:19 +00:00
Tom Lane 610abfd57b Do table renaming in a sane order: physical file rename must happen
*last*, after all updating of system catalogs.  In old code, an error
detected during TypeRename left the relation hosed.  Also, add a call
to flush the relation's relcache entry, rather than trusting to shared
cache invalidation to flush it for us.
2000-05-25 21:30:20 +00:00
Tom Lane 445f1acf7a heap_drop() should flush the relcache entry for the
relation being dropped.
2000-05-25 21:25:32 +00:00
Tom Lane 69cc16f47e Quote database name so that not-all-lowercase names are handled safely. 2000-05-25 20:18:15 +00:00
Bruce Momjian 61f5e13c43 ! * Users doing non-blocking connections need to handle the reset
!        * themselves, they'll need to check the connection status if we
!        * return an error.

Alfred Perlstein
2000-05-25 19:09:55 +00:00
Tatsuo Ishii 07d4d36aae On solaris, createdb/dropdb fails because of strange behavior of system().
(it returns error with errno ECHILD upon successful completion of commands).
This fix ignores an error from system() if errno == ECHILD.
2000-05-25 06:53:43 +00:00
Tom Lane c439756ffd Make the world safe for QNX's busted shell ... 2000-05-24 22:43:59 +00:00
Tom Lane ae8a2c3589 Make the world safe for QNX's busted shell ... 2000-05-24 22:32:59 +00:00
Marc G. Fournier 69b323f4bc add a --with-setproctitle switch to configure that leaves the use of setproctitle()
disabled by default ...
2000-05-24 14:58:21 +00:00
Bruce Momjian f19ae14612 Update so init displays status with setproctitle too, like the rest of them. 2000-05-24 00:24:17 +00:00
Bruce Momjian a267c88d3b Make setproctitle update for every query. 2000-05-24 00:14:26 +00:00
Bruce Momjian 962c258027 Comment out no-op ps updates for setproctitle(), until we figure out
what to do.
2000-05-23 22:50:55 +00:00
Bruce Momjian d264fb4157 comment cleanup 2000-05-23 22:16:27 +00:00
Tom Lane 1c5b902018 Fix problem in which sloppily-coded test in ExecInitIndexScan would
think that both sides of indexqual look like index keys.  An example is
create table inside (f1 float8 primary key);
create table outside (g1 float8, g2 float8);
select * from inside,outside where f1 = atan2(g1+1, g2);
ERROR:  ExecInitIndexScan: both left and right ops are rel-vars
(note that failure is potentially platform-dependent).  Solution is a
cleanup I had had in mind to make anyway: functional index keys should
be represented as Var nodes in the fixed indexqual, just like regular
index keys.
2000-05-23 16:56:37 +00:00
Tom Lane 1c8244ec67 Twiddle C++ configuration checks so that we #include <string> (if
it exists) before testing 'using namespace std'.  This is necessary
on some C++ setups where the compiler won't take a 'using' until
you've included a header that mentions namespace std.  (Pretty braindead
if you ask me, but...)
2000-05-23 04:55:44 +00:00
Tom Lane ac6637485b Transmit -I switches selected by configure (particularly those from
--with-includes) to makefiles for pltcl and plperl, so that these
switches will be used even though we do not want other top-level
CFLAGS.  Ain't it fun trying to support multiple-compiler platforms?
2000-05-23 02:12:46 +00:00
Tom Lane aca5b34427 Cast parameters to ckfree to (char *) to suppress compiler warnings. 2000-05-23 01:59:05 +00:00
Bruce Momjian b1b9059427 Irix fixes from Murad Nayal 2000-05-22 23:56:44 +00:00
Bruce Momjian 569a1431ca Cleanup 2000-05-22 02:41:39 +00:00
Bruce Momjian 0460f0502b I am attempting to integrate postgres (v 7.0) with an open source
project I am working on (Recall - a distributed, fault-tolerant,
replicated, storage framework @ http://www.fault-tolerant.org).
Recall is written in C++.  I need to include the postgres headers and
there are some problems when including the headers w/C++.

Attached is a patch generated from postgres/src that fixes my problems.
I was hoping to get this into the main source.  It's very small (2k) and
3 files are changed: backend/utils/fmgr/fmgr.c,
backend/utils/Gen_fmgrtab.sh.in, and include/access/tupdesc.h.

In C++, you get a multiply defined symbol because the variable
(FmgrInfo *fmgr_pl_finfo) is defined in the header (the patch moves it
to the .c file).  The other problem in tupdesc.h is the use of typeid
is a problem in c++ (I renamed it to oidtypeid).

Thanks,
Neal Norwitz
2000-05-22 02:34:23 +00:00
Tom Lane 1f0aff03c0 Remove calls to getprotobyname(), which we now know leaks memory on
some platforms --- and I also see that it is documented as not thread-
safe on HPUX and possibly other platforms.  No good reason not to just
use IPPROTO_TCP constant from <netinet/in.h> instead.
2000-05-21 21:19:53 +00:00
Tom Lane 9dab9ab5e4 Repair memory leaks that caused CacheCxt to grow without bound. We
really ought to fix relcache entry construction so that it does not
do so much with CurrentMemoryContext = CacheCxt.  As is, relatively
harmless leaks in either sequential or index scanning translate to
permanent leaks if they occur when called from relcache build.
For the moment, however, the path of least resistance is to repair
all such leaks...
2000-05-21 02:28:55 +00:00
Tom Lane aa16179118 Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS is
defined then statistics about memory usage of all the global memory
contexts are printed after each commit.
2000-05-21 02:23:30 +00:00
Tom Lane 25a7a7f446 Clean up grotty references to CacheCxt (externs inside functions,
duplicate global declarations, no points for style at all!)
2000-05-20 23:11:29 +00:00
Tatsuo Ishii 1a6daef70d Enhance multibyte support.
SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
2000-05-20 13:12:26 +00:00
Tatsuo Ishii f1cb756c38 Add KEEPALIVE option to the socket of backend. This will automatically
terminate the backend that has no frontend anymore.
2000-05-20 13:10:54 +00:00
Tom Lane 8b5b3e0011 pg_dump barfs on negative values for index column numbers --- like, say,
an index on a table's OID column.  Mea maxima culpa ... but how'd we get
through beta with no one noticing this?
2000-05-19 23:00:00 +00:00
Tom Lane f923260ec8 Revise FlushRelationBuffers/ReleaseRelationBuffers per discussion with
Hiroshi.  ReleaseRelationBuffers now removes rel's buffers from pool,
instead of merely marking them nondirty.  The old code would leave valid
buffers for a deleted relation, which didn't cause any known problems
but can't possibly be a good idea.  There were several places which called
ReleaseRelationBuffers *and* FlushRelationBuffers, which is now
unnecessary; but there were others that did not.  FlushRelationBuffers
no longer emits a warning notice if it finds dirty buffers to flush,
because with the current bufmgr behavior that's not an unexpected
condition.  Also, FlushRelationBuffers will flush out all dirty buffers
for the relation regardless of block number.  This ensures that
pg_upgrade's expectations are met about tuple on-row status bits being
up-to-date on disk.  Lastly, tweak BufTableDelete() to clear the
buffer's tag so that no one can mistake it for being a still-valid
buffer for the page it once held.  Formerly, the buffer would not be
found by buffer hashtable searches after BufTableDelete(), but it would
still be thought to belong to its old relation by the routines that
sequentially scan the shared-buffer array.  Again I know of no bugs
caused by that, but it still can't be a good idea.
2000-05-19 03:22:31 +00:00
Tom Lane db90fdf9ab Correct busted syntax of CC invocation for tas.s. 2000-05-19 02:50:32 +00:00
Bruce Momjian e7be9d3303 Unset PGHOST 2000-05-18 16:11:39 +00:00
Bruce Momjian 6108a7ed6a Change remove function warning for built-ins. 2000-05-18 16:09:38 +00:00
Bruce Momjian 61f06bc2f1 Use postmaster -i only on certain platforms. 2000-05-18 15:58:43 +00:00
Bruce Momjian feaf1fc137 Throw NOTICE on built-in function removal 2000-05-18 15:45:00 +00:00
Bruce Momjian e17cfa8ff1 Add QNX localhost flag to regression tests 2000-05-18 15:37:56 +00:00
Bruce Momjian f63ba5cd6a Fix WARN->NOTICE in docs. Change libpgeasy connection parameters to use
PQconnectdb() style connections.
2000-05-18 14:24:38 +00:00
Tom Lane ba26aeebc1 Reduce COPY IN lock from AccessExclusive to a more reasonable
RowExclusive (my fault).  Also, install a check to prevent people
from trying COPY BINARY to stdout/from stdin.  No way that will
work unless we redesign the frontend COPY protocol ... which is
not worth the trouble in the near future ...
2000-05-18 01:52:45 +00:00
Bruce Momjian 362a0f68d9 The check of class string in configure (line 1732) fails because this class
is in <string> and not in <string.h> on QNX4/egcs-2.91.60.
Probably this can be changed for all platforms. The test in line 1705 uses
<string> as well. Because I am not sure, I havn't this included into the
patch.

doc/Makefile has to be sligthly  modified as it has been done for
src/backend/Makefile due to a QNX4 problem (patch attached)

Furthermore src/test/regress/run_check.sh needs to be patched as it has been
done for regress.sh (patch attached). Please note that in the patch the
postmaster is started always with the -i option.

run_check.sh reports the test "limit" as failed, but in reallity it is OK.
regress.sh reports it as OK.

Andreas Kardos
2000-05-17 16:57:41 +00:00
Bruce Momjian a8020a78ec Back out odbc changes until 7.1. 2000-05-17 15:36:37 +00:00
Michael Meskes e39a118694 *** empty log message *** 2000-05-17 06:03:14 +00:00
Bruce Momjian a47e20b049 Several compilation and run-time problems occur when building on SGI
IRIX systems using the native compilers.  A summary is:
- Various files use "//" as a comment delimiter in c files.
- Problems caused by assuming "char" is signed.
  cash.in: building -signed the rules regression test fails as described
    in FAQ_QNX4.  If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1.
  postmaster.c: random number regression test failed without this change.
- Some generic build issues and warning message cleanup.

David Kaelbling
2000-05-16 20:48:52 +00:00
Tom Lane 6dd06737ba Remove configure check for how to abbreviate 'tr A-Z a-z', and instead
just use the portable form,
tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
There were a bunch of places that weren't paying attention to configure's
result anyway (including configure itself!?); clean them up too.
2000-05-16 02:14:15 +00:00
Peter Mount 33bb1aee91 Fixed the message Makefile produces after compiling. It still said
about the old Driver class, not the new package. Spotted by
Joseph Shraibman <jks@p1.selectacast.net>
2000-05-15 21:32:51 +00:00
Bruce Momjian 6cb0fff31d cleanup 2000-05-15 16:20:45 +00:00
Bruce Momjian dcec5ae2cd cleanup 2000-05-15 16:16:23 +00:00
Bruce Momjian 52831da26c Fix createlang -l dbname so it works, update sgml. 2000-05-15 16:12:39 +00:00
Michael Meskes ce2a9f372d *** empty log message *** 2000-05-15 09:36:06 +00:00
Peter Eisentraut d64aa21570 That psql option should be --no-readline (as it used to be), not --noreadline. 2000-05-14 18:05:05 +00:00
Bruce Momjian bdeeb4fe8a Finally fix LISTEN problem. 2000-05-14 03:18:35 +00:00
Bruce Momjian 6dedc79b1e Fix create user for pgaccess. 2000-05-14 00:50:16 +00:00
Tom Lane e8e7b6305a Tweak selectivity for area-based operators. Still a crock... 2000-05-13 06:04:46 +00:00
Bruce Momjian 2cfb14e8ea Fix the off by one errors in ResultSet from 6.5.3, and more.
I'm including a diff of
postgresql-7.0/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java.
I've clearly marked all the fixes I did. Would *someone* who has access
to the cvs please put this in?

Joseph Shraibman
2000-05-12 20:54:22 +00:00
Bruce Momjian a28f117790 This is the second time I've answered this exact same problem in two
days.  It seems to be a FAQ, and I think I know why. When creating a 'c'
language function, CREATE FUNCTION is fed the shared object filename,
and seems to succeed. Only when trying to use the function is an error
thrown, by which time the coder thinks something's wrong with executing
the code, not with loading it.

I think I once saw it proposed to load shared objects at function creation
time, but that idea was shot down on the grounds of resident memory bloat,
ISTR. Here's a patch for a compromise: all it does is stat() the file,
just like the loader code does, so that the errors caused by non existent
files, and no directory 'x' permissions (the most common ones, it seems),
get caught while the developer is still thinking about code loading. It
doesn't catch all errors (like the code not being readable by the postgres
user) but seems to catch the most common, without actually opening the file.

What do you think?

Ross
2000-05-12 18:51:59 +00:00
Bruce Momjian 40c992c7dd Back out -\?. Didn't look good to Peter. 2000-05-12 16:28:31 +00:00
Peter Eisentraut 9d31e3a991 /home/peter/commit-msg 2000-05-12 16:13:44 +00:00
Tom Lane 475cb157b9 Squash some more CLUSTER bugs. Never has worked on multiple-column
indexes, apparently, nor on functional indexes with more than one input
column (force of natts = 1 was in the wrong branch of IF statement).
Coredumped if source relation contained any uncommitted tuples, due to
failure to test for success return from heap_fetch.  Fetched tuple
was passed directly to heap_insert, which clobbers the TID and commit
status in the tuple header it's given, which meant that the source
relation's tuples all got trashed as the copy proceeded.  Abort partway
through, and you're left with a lot of missing tuples.
I wonder what else is lurking here ...
2000-05-12 16:10:09 +00:00
Marc G. Fournier be4ae8f4b2 this fixes the bug where setting the entry in he process table no longer works
under FreeBSD ... basically, if setproctitle() exists, use it ...

the draw back right now is the PS_SET_STATUS stuff doesn't work, but am looking
into that one right now ... at lesat now you can see who is connecting where
and from where ...
2000-05-12 14:33:08 +00:00
Marc G. Fournier 3383e8b828 Add two checks ... one for setproctitle and one for -lutil ...
Don't do anything with them at this time, but am working on that ...
2000-05-12 13:58:25 +00:00
Tom Lane 01911c98db Repair list-vs-node confusion that resulted in failure for INNER JOIN ON.
Make it behave correctly when there are more than two tables being
joined, also.  Update regression test expected outputs.
2000-05-12 01:33:56 +00:00
Bruce Momjian 4624b84cf2 Small cleanup of file. 2000-05-12 00:54:53 +00:00
Bruce Momjian 7da0f5d7de More psql help cleanup 2000-05-11 18:41:00 +00:00
Bruce Momjian 8101d0c571 Makefile CFLAGS cleanups. 2000-05-11 17:46:35 +00:00
Bruce Momjian 992e7dd4e3 Oops, plpgsql didn't have the datetime->timestamp and timespan->interval
mappings.  In fact, it had them backward because it was using the 6.5.*
code.  Copied them from parser/gram.y, so it is fixed now.  Looks like
our first 7.0.1 fix.  Oops, seems Tom has beat me to it as I was typing
this.
2000-05-11 04:00:00 +00:00
Tom Lane 37c652f89b Fix CLUSTER ... or at least undo the bit-rot it's suffered since 6.5.
It's still pretty fundamentally bogus :-(.
Freebie side benefit: ALTER TABLE RENAME works on indexes now.
2000-05-11 03:54:18 +00:00
Bruce Momjian e10c5597b7 Display -? as -\? under unix for psql. 2000-05-11 03:14:19 +00:00
Bruce Momjian 0fbde5d928 Add options and cleanup psql \? and -? help displays 2000-05-11 01:37:54 +00:00
Bruce Momjian 5a75ad5573 Update psql \? to show file rather than "fname". 2000-05-09 19:08:36 +00:00
Tom Lane b45f3a6e5b Forgot that dumpall's output script should 'delete from pg_group' before
loading new data, for consistency with its handling of pg_shadow.
2000-05-05 17:50:38 +00:00
Peter Eisentraut 5e4d8be18b psql: suppress warnings about too many arguments if the command is not valid in the first place 2000-05-05 09:38:40 +00:00
Peter Eisentraut 8322072188 Spello SERIALIZED -> SERIALIZABLE in psql tab completion 2000-05-05 08:44:27 +00:00
Peter Mount 02faee5eaa ImageViewer transaction fixes 2000-05-05 07:35:29 +00:00
Tom Lane c0337ec2a9 Force initdb because of pg_group index fix. 2000-05-05 03:10:24 +00:00
Tom Lane 3bd03b3803 Make the indexes on pg_group be shared system relations. 2000-05-05 03:09:43 +00:00
Tom Lane 3a69c316cc Accept pg_group as well as pg_shadow data from dumpall script.
Rearrange handling of VACUUMs so that they are certain to be executed
as superuser not some random user; also, do not forget to vacuum
template1 itself.
2000-05-05 03:08:20 +00:00
Tom Lane 3d1461802e Dump contents of pg_group along with pg_shadow. 2000-05-05 03:04:00 +00:00
Tom Lane 570a58f427 Don't leak a file descriptor when updating pg_pwd file. Also, check for
failure of rename() call.
2000-05-04 20:06:07 +00:00
Tom Lane de13d88146 Do not try to build libpq++ if class 'string' is not defined in the
available C++ header files.
2000-05-03 18:30:17 +00:00
Peter Mount 86b8bd0748 Minor fixes ready for 7.0 2000-05-03 15:58:09 +00:00
Bruce Momjian 7ef29a26cb Update SCO FAQ. Billy G. Allie 2000-05-02 10:57:11 +00:00
Tatsuo Ishii 832877e95a Modify getdatabaseencoding(), pg_encoding_to_char()
pg_char_to_encoding() in multibyte disbaled case so that it does not
throw an error, rather return HARD CODED default value (currently SQL_ASCII).
This would solve the "non-mb backend vs. mb-enabled frontend" problem.
2000-05-02 08:13:08 +00:00
Tom Lane f6a3b87c7b Reset CurrentMemoryContext to TopMemoryContext at the beginning of error
cleanup, ie, as soon as we have caught the longjmp.  This ensures that
current context will be a valid context throughout error cleanup.  Before
it was possible that current context was pointing at a context that would
get deleted during cleanup, leaving any subsequent pallocs in deep
trouble.  I was able to provoke an Assert failure when compiled with
asserts + -DCLOBBER_FREED_MEMORY, if I did something that would cause
an error to be reported by the backend large-object code, because indeed
that code operates in a context that gets deleted partway through xact
abort --- and CurrentMemoryContext was still pointing at it!  Boo hiss.
2000-04-30 21:29:23 +00:00
Tom Lane e0095c6c42 Remove bogus 'xid loop detected' check, which actually wasn't detecting
loops, but just arbitrarily failing at 1000 locks.
2000-04-30 21:23:31 +00:00
Bruce Momjian 2f19d11fc8 Clean up ecpg test files. 2000-04-29 03:25:24 +00:00
Bruce Momjian 0ccf3c8877 Update pgeasy examples 2000-04-28 22:49:25 +00:00
Bruce Momjian 0e69b81d25 Update libpgeasy define. 2000-04-28 17:19:42 +00:00
Bruce Momjian 7aa443d01e Change libpgeasy to take dbname at end like all other interfaces. 2000-04-28 14:58:51 +00:00
Tom Lane a90dc572ed Setting statistic options from SET PG_OPTIONS caused a backend crash
because StatFp never got set in that case.  Set it immediately before
use to eliminate such problems.
2000-04-28 05:07:34 +00:00
Tom Lane 45cc0e9b27 plpgsql RAISE statement was careless about the possibility of a NULL
field value being displayed; produced coredump instead of the expected
<NULL> display.
2000-04-28 00:12:44 +00:00
Tom Lane f106779263 Except_Intersect_Rewrite() failed to ignore resjunk targetlist entries,
thus causing failure if one sub-select had resjunk entries that the other
did not (cf. bug report from Espinosa 4/27/00).
2000-04-27 20:32:41 +00:00
Bruce Momjian fb7318a632 Update libpgeasy e-mail address 2000-04-27 18:45:43 +00:00
Tom Lane d6eac08f11 Repair problem noted by Elphick: make_rels_by_joins failed to handle
cases where joinclauses were present but some joins have to be made
by cartesian-product join anyway.  An example is
SELECT * FROM a,b,c WHERE (a.f1 + b.f2 + c.f3) = 0;
Even though all the rels have joinclauses, we must join two of them
in cartesian style before we can use the join clause...
2000-04-27 18:35:04 +00:00
Tom Lane 85a5303877 -D switch to postmaster should override any PGDATA environment variable
that might be hanging about.  Now it does ... amazing nobody noticed
this before ...
2000-04-27 02:59:17 +00:00
Tom Lane 1b4f150541 Tweak outUnique to include uniqColIdx[] field in the printout. This does
not cause any compatibility problems because stored rules don't contain
plan nodes --- in fact, we don't even have a readfunc for Unique nodes.
2000-04-26 23:39:10 +00:00
Tom Lane 6a4fa7eccb On HPUX, shl_load should be called with options BIND_IMMEDIATE rather
than BIND_DEFERRED.  That way, if the loaded library has unresolved
references, shl_load fails cleanly.  As we had it, shl_load would
succeed and then the dynlinker would call abort() when we try to call
into the loaded library.  abort()ing a backend is uncool.
2000-04-26 23:35:34 +00:00
Bruce Momjian 00645eb1fd Fix include "" to <> 2000-04-26 22:51:14 +00:00
Bruce Momjian f839762e0b Remove DriverClass.java. It is generated by the compile. 2000-04-26 17:54:28 +00:00
Bruce Momjian 0b65e1436e Add res clear to example 2000-04-26 17:51:03 +00:00
Bruce Momjian 3c0685e423 Install Peter's Makefile. 2000-04-26 14:19:29 +00:00
Jan Wieck 9d56aff7bc Reinstalled revision 1.36 (looks Peter Mount installed
a new JDBC Makefile here by accident)

Jan
2000-04-26 09:03:10 +00:00
Peter Mount dbd8d38fa5 third attempt 2000-04-26 05:50:18 +00:00
Peter Mount 4fc3690238 Attempt III 2000-04-26 05:39:32 +00:00
Peter Mount 39116bfbfc Another attempt 2000-04-26 05:32:01 +00:00
Bruce Momjian 1b266fbcca Update libpgeasy readme. 2000-04-26 00:53:11 +00:00
Bruce Momjian a0551e8afa Make c++ examples return 0 from main(). 2000-04-25 21:00:29 +00:00
Bruce Momjian 1234981836 Fix libpq example return values 2000-04-25 16:39:07 +00:00
Hiroshi Inoue 56e09ddf0c change reindex ERROR/NOTICE message 2000-04-25 10:38:38 +00:00
Peter Eisentraut 282861ad75 initdb didn't always remove temp file 2000-04-25 08:29:02 +00:00
Tom Lane f46c1f1e33 Check that user-specified opclass in CREATE INDEX corresponds to operators
that will actually work on the column datatype.
2000-04-25 02:45:54 +00:00
Tatsuo Ishii e308786889 Update pg_ctl so that it does not redirect outputs from postmaster
to a temp file.
2000-04-25 01:07:23 +00:00
Bruce Momjian 297e7f3ef4 Fix \h to not go past array bounds 2000-04-24 22:41:43 +00:00
Bruce Momjian 11ae8ba7ea Add mention of int in variable. 2000-04-23 11:42:51 +00:00
Bruce Momjian bc4e6db44c Add mention of int for variable in examples 2000-04-23 11:39:08 +00:00
Tom Lane cfc0e015a1 Our test to see if we had permission to install into Perl5 install area
always failed if Perl makefile's INSTALLSITELIB variable was specified
in terms of another variable.  Fix by adding an echo-installdir target
to the Perl makefile, which the upper-level Makefile can invoke.
2000-04-23 04:26:32 +00:00
Tom Lane 97f0521d8e Produce an appropriate error message when opclass is not supported by
specified index access method.  Clean up wording of some existing error
messages, too.
2000-04-23 01:44:55 +00:00
Tom Lane 8994662a0b 7.0 buffer manager can support different backends running with different
fsync settings, so the -F option no longer needs to be treated as secure.
2000-04-23 00:13:16 +00:00
Tom Lane 290978fff0 Remove broken tracing code (which would be dangerous if it did work...)
libpq++.h contained copies of the class declarations in the other libpq++
include files, which was bogus enough, but the declarations were not
completely in step with the real declarations.  Remove these in favor
of including the headers with #include.  Make PgConnection destructor
virtual (not absolutely necessary, but seems like a real good idea
considering the number of subclasses derived from it).  Give all classes
declared private copy constructors and assignment operators, to prevent
compiler from thinking it can copy these objects safely.
2000-04-22 22:39:15 +00:00
Tom Lane 51c92941c6 Update example: PgLargeObject constructor now takes a conninfo string,
not a bare database name.
2000-04-22 22:15:48 +00:00
Tom Lane 3ddeba7403 pltcl didn't work well at all when Tcl had been built with a different
compiler than the one selected to build Postgres with.  It was trying
to feed Postgres-compiler switches to Tcl's compiler.  (Seen this before
with the perl5 interface...) Fix to use only CFLAGS taken from Tcl's
configure information, plus -I which is pretty universal.
2000-04-21 03:28:17 +00:00
Tom Lane ef6c33f3b9 Finally figured out that HP's cpp won't do ANSI preprocessing constructs
unless you feed it -Aa or -Ae switch.  Autoconf does not know about this,
but we can fix it in the hpux_cc template file.  I knew templates were
good for something ;-)
2000-04-21 03:07:51 +00:00
Tom Lane f084cc4939 Fix still more static-declaration-vs-nonstatic-definition glitches.
gcc doesn't think these are a problem, but somewhere out there is a
compiler that will spit up.
2000-04-21 03:01:54 +00:00
Tom Lane 87e701b8d5 Clean up const-vs-not-const compiler warning in MULTIBYTE code.
'Twas my fault, I think.
2000-04-20 22:40:18 +00:00
Bruce Momjian a2b5fac8ca Allow libpq++ compile failure to stop entire compile. 2000-04-20 17:21:46 +00:00
Tom Lane a95eec6792 Add a regress test case for SELECT count(*) FROM view, so that we'll
know if that case ever breaks again...
2000-04-20 00:32:57 +00:00
Tom Lane 7c22d2e5f0 Correct error in rewriter that caused SELECT count(*) FROM view
to give wrong results: it should be looking at inJoinSet not inFromCl.
Also, make 'modified' flag be local to ApplyRetrieveRule: we should
append a rule's quals to the query iff that particular rule applies,
not if we have fired any previously-considered rule for the query!
2000-04-20 00:31:49 +00:00
Bruce Momjian fe922de3f7 Security fix for plperl. 2000-04-18 15:04:02 +00:00
Tom Lane b90e3e4cbb linux_alpha pattern should allow for more-detailed machine type such
as 'alphaev5', cf report from Stepanov 13-Apr-00.
2000-04-18 05:57:45 +00:00
Tom Lane 32e192d712 Repair coredump seen when a view refers to an inheritance group
(SELECT FROM table*).  Cause was reference to 'eref' field of an RTE,
which is null in an RTE loaded from a stored rule parsetree.  There
wasn't any good reason to be touching the refname anyway...
2000-04-18 05:52:35 +00:00
Tom Lane 25442d8d2f Correct oversight in hashjoin cost estimation: nodeHash sizes its hash
table for an average of NTUP_PER_BUCKET tuples/bucket, but cost_hashjoin
was assuming a target load of one tuple/bucket.  This was causing a
noticeable underestimate of hashjoin costs.
2000-04-18 05:43:02 +00:00
Thomas G. Lockhart 24864d048e Include information for armv4l from Mark Knox <segfault@hardline.org>. 2000-04-18 05:35:38 +00:00
Tom Lane 609f93a436 Revert no-longer-needed relaxation of compiler errors. 2000-04-18 00:27:34 +00:00
Tom Lane 6216e84df6 Make ECPGraise's str parameter const to suppress warnings from gcc
and errors from pickier compilers.
2000-04-18 00:24:30 +00:00
Bruce Momjian 3b192c232d Add comment for -qhalt=w removal so it can be re-added later 2000-04-17 22:21:07 +00:00
Peter Mount 25dadc8514 Another attempt at 7.0 2000-04-17 20:07:56 +00:00
Bruce Momjian aafff4af16 Aix additions 2000-04-17 18:11:43 +00:00
Bruce Momjian ae16968051 Remove -qhalt=w flag from aix42. 2000-04-17 15:50:18 +00:00
Tom Lane 94728d1085 Add code to test for non-shared libperl and fail gracefully.
Not a big step forward, but it's something...
2000-04-17 00:49:58 +00:00
Peter Eisentraut 3d62fbc4eb squished \dS+ bug pointed out by Mike Mascari 2000-04-16 20:04:51 +00:00
Tom Lane ea46ddcfa6 Tweak create_help.pl so it will work under either perl 4.* or perl 5.*.
Remove knowledge of path to documentation source directory from perl
script, instead have Makefile pass it to script.
2000-04-16 18:07:22 +00:00
Peter Eisentraut aae70b2dca more psql bug squashing:
\copy without arguments failed
commands with too many arguments were too silent
2000-04-16 15:46:40 +00:00
Tom Lane 82849df6c6 Add new selectivity estimation functions for pattern-matching operators
(LIKE and regexp matches).  These are not yet referenced in pg_operator,
so by default the system will continue to use eqsel/neqsel.
Also, tweak convert_to_scalar() logic so that common prefixes of strings
are stripped off, allowing better accuracy when all strings in a table
share a common prefix.
2000-04-16 04:41:03 +00:00
Tom Lane 8c3b52e7b2 Allow COPY WITH OIDS to system OID values --- rely on unique indexes to
prevent duplicate OIDs from being added.  Clean up redundant error
messages.
2000-04-16 04:27:52 +00:00
Tom Lane a6acf1a06a Show failing OID in 'cache lookup failed' messages. 2000-04-16 04:25:42 +00:00
Tom Lane 215c60dc21 Show failing OID in 'cache lookup failed' messages;
print OIDs as %u not %d.
2000-04-16 04:19:41 +00:00
Tom Lane 1460dd0eff Show failing OID in 'cache lookup failed' messages. 2000-04-16 04:16:55 +00:00
Tatsuo Ishii 88a30e68f6 Change postmaster.opts.default.sample. remove -S option.
With the default option, pg_ctl can show messages from
postmaster upon its failure.
2000-04-16 03:50:00 +00:00
Tom Lane 8064a49f6f get_relattval() should treat a NULL constant as a non-constant expression,
since it has no way to indicate to its caller that the constant is
actually NULL.  This prevents coredump in cases like
  WHERE textfield < null::text;
2000-04-16 01:55:45 +00:00
Tom Lane 4ca7d148cb elog(NOTICE) during COPY incorrectly reset lineno to 0, causing any
subsequent elogs() in the same COPY operation to display the wrong
line number.  Fix is to clear lineno only when elog level is such
that we will not return to caller.
2000-04-15 19:13:08 +00:00
Peter Eisentraut ffc9812451 fixed another psql \e bug (handle newlines as whitespace)
repaired psql option scanning bug (special treatment to \g |pipe)
fixed ipcclean makefile
made configure look for Perl to handle psql help build gracefully
2000-04-14 23:43:44 +00:00
Thomas G. Lockhart 9edb0f7ec2 Fix spelling of "millennium".
Thanks to Mika Nystrom <mika@camembert.cs.caltech.edu> for spotting this.
2000-04-14 15:22:22 +00:00
Thomas G. Lockhart d221e149b4 Fix (well, add) support for ISO "week" in date_part(). Needed for ODBC.
Fix spelling of "millennium".
 Thanks to Mika Nystrom <mika@camembert.cs.caltech.edu> for spotting this.
2000-04-14 15:22:10 +00:00
Tom Lane 8eafe40571 Fix silly definition order in config.h --- we had prototypes like
extern int  inet_aton(const char *cp, struct in_addr * addr);
appearing before the optional #define for const, which was certain
to fail on a machine with neither const nor inet_aton().
2000-04-14 03:05:35 +00:00
Tom Lane 07d2c3e0a0 Another static-vs-not-static error. 2000-04-14 01:34:24 +00:00
Tom Lane a7f2dd347b Remove bogus extern for 'descriptors' variable, which is in fact static.
Some compilers object to seeing extern and later static ...
2000-04-14 01:26:49 +00:00
Tom Lane 87ca3bd294 #undef const, inline, signed, volatile, on the expectation that a C++
compiler will understand them.  configure may have #define'd them to
empty because the local C compiler doesn't understand them, but this
may very well cause a C++ compilation to fail, so don't do it in C++.
2000-04-14 01:00:16 +00:00
Tom Lane 07672d4e0a Skip setsockopt(SO_REUSEADDR) for the Unix-domain postmaster socket on
all platforms, not just SCO.  The operation is undefined for Unix-domain
sockets anyway.  It seems SCO is not the only platform that complains
instead of treating the call as a no-op.
2000-04-14 00:51:58 +00:00
Tom Lane bf00aec8d0 If configure finds that inet_aton() is not present on this platform,
include the version from backend/port into libpq.
There is a second-rate implementation of inet_aton() already present
in fe-connect.c, #ifdef'd WIN32.  That ought to be removed in favor
of using the better version from port/.  However, since I'm not in a
position to test the WIN32 code, I will leave well enough alone for
this release...
2000-04-14 00:42:06 +00:00
Tom Lane 977fad3f17 Revert inclusion of postgres_ext.h to use "..." instead of <...>, per
request from XEmacs people.
2000-04-14 00:24:52 +00:00
Tom Lane 9d91db4fde Repair bug reported by Wickstrom: backend would crash if WHERE clause
contained a sub-SELECT nested within an AND/OR tree that cnfify()
thought it should rearrange.  Same physical sub-SELECT node could
end up linked into multiple places in resulting expression tree.
This is harmless for most node types, but not for SubLink.
Repair bug by making physical copies of subexpressions that get
logically duplicated by cnfify().  Also, tweak the heuristic that
decides whether it's a good idea to do cnfify() --- we don't really
want that to happen when it would cause multiple copies of a subselect
to be generated, I think.
2000-04-14 00:19:17 +00:00
Jan Wieck 3e00c9db4a Fixed CREATE TYPE to recognize changed parsenodes
Jan
2000-04-13 11:51:07 +00:00
Bruce Momjian 97580f6993 A few more macro cleanups 2000-04-12 20:33:37 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Bruce Momjian db4518729d Reverse out macro fix for the time being. 2000-04-12 05:29:10 +00:00
Bruce Momjian 8758985c3a Prevent drop database failure from showing. 2000-04-12 05:24:51 +00:00
Bruce Momjian 37e7c7dfcb Fix assert with missing semicolon 2000-04-12 04:58:09 +00:00
Bruce Momjian 398bb1fcb6 Update pgindent 2000-04-12 01:01:49 +00:00
Bruce Momjian 83a57694d1 Update pgindent 2000-04-11 22:15:08 +00:00
Bruce Momjian 862d677682 Update pgindent for 7.0 release 2000-04-11 19:09:04 +00:00
Bruce Momjian b68a56a5e9 Thomas pointed out this bug in my non-blocking stuff.
Alfred Perlstein
2000-04-11 19:00:31 +00:00
Bruce Momjian ea81522034 Allow libpq++ compile to fail 2000-04-11 18:58:18 +00:00
Bruce Momjian b09a3b8cab disable plperl 2000-04-11 17:42:28 +00:00
Bruce Momjian 354a39bc44 Clean up temp files from \e. 2000-04-11 17:35:50 +00:00
Tom Lane 2692d329eb Tweak smgrblindwrt per advice from Vadim: add parameter indicating
whether to do fsync or not, and if so (which should be seldom) just
do the fsync immediately.  This way we need not build data structures
in md.c/fd.c for blind writes.
2000-04-10 23:41:52 +00:00
Bruce Momjian a447ae2221 The constant in backend/utils/misc/trace.c, line 32 limits the length of
logged queries to 1024, truncating longer queries.  That is about half of
the size I need (I have a union that is 2K long).  Can someone consider
bumping it to 4K or so?  Patch attached...

Regards,
Ed Loehr
2000-04-10 19:25:29 +00:00
Hiroshi Inoue 8a5851880e Fix an Assert bug(was my fault) pointed out by Tom Lane. 2000-04-10 00:45:42 +00:00
Tom Lane 1f6d8b90b8 Buffer manager modifications to keep a local buffer-dirtied bit as well
as a shared dirtybit for each shared buffer.  The shared dirtybit still
controls writing the buffer, but the local bit controls whether we need
to fsync the buffer's file.  This arrangement fixes a bug that allowed
some required fsyncs to be missed, and should improve performance as well.
For more info see my post of same date on pghackers.
2000-04-09 04:43:20 +00:00
Tom Lane 9c38a8d296 Further tweaking of indexscan cost estimates. 2000-04-09 04:31:37 +00:00
Bruce Momjian 9b7ba2002d Add new pg_options.sample file. 2000-04-08 19:38:00 +00:00
Tom Lane bb7e5dc2c0 Tweak TypeCategory to treat new BIT types as of STRING category, rather
than not knowing what they are at all.  Perhaps they should have their own
type category?  Hard to say.  In the meantime, doing it this way allows
SELECT 'unknown' || 'unknown' to continue being resolved as textcat,
instead of spitting out an ambiguous-operator error.
2000-04-08 19:29:40 +00:00
Tom Lane b64e768595 I think we want machine pattern i.86 not i386 --- looks like config.guess
could output several different high digits on most PC Unixen.
2000-04-08 19:20:10 +00:00
Bruce Momjian 949e8a662d Add colo to display at end of initdb. 2000-04-08 18:35:30 +00:00
Michael Meskes d78feff973 *** empty log message *** 2000-04-08 12:20:27 +00:00
Tom Lane ed845c7374 Fix relcache refcount leakage when inv_drop is applied
to a non-LO relation.
2000-04-08 04:37:07 +00:00
Thomas G. Lockhart 0337938fbf Add zpbit and varbit data types from Adrian Joubert
<a.joubert@albourne.com>.
2000-04-08 02:13:11 +00:00
Tom Lane 6a2d926933 Update for to_char change. 2000-04-08 02:02:26 +00:00
Tom Lane fd0df5058a Tweak parallel test script so that command line options for postmaster
can be set via environment variable PMOPTIONS.  Default is -o -F.
2000-04-08 01:54:47 +00:00
Tom Lane dc070fdea6 Add copyObject logic for TruncateStmt and a few other utility-statement
parse node types.  This allows these statements to be placed in a plpgsql
function.  Also, see to it that statement types not handled by the copy
logic will draw an appropriate elog(ERROR), instead of leaving a null
pointer that will cause coredump later on.  More utility statements could
be added if anyone felt like turning the crank.
2000-04-08 00:21:15 +00:00
Bruce Momjian 28fb1c196b Update create_rule manual page. 2000-04-07 19:17:51 +00:00
Marc G. Fournier dce53f0dd5 resultmap additions for solaris x86 ... 2000-04-07 19:00:44 +00:00
Tom Lane 8dce894870 Use initdb --noclean so that test database is available for examination
if initdb fails.
2000-04-07 17:51:13 +00:00
Thomas G. Lockhart a349733bbb Add transcendental math functions (sine, cosine, etc)
Add a random number generator and seed setter (random(), SET SEED)
Fix up the interval*float8 math to carry partial months
 into the time field.
Add float8*interval so we have symmetry in the available math.
Fix the parser and define.c to accept SQL92 types as field arguments.
Fix the parser to accept SQL92 types for CREATE TYPE, etc. This is
 necessary to allow...
Bit/varbit support in contrib/bit cleaned up to compile and load
 cleanly. Still needs some work before final release.
Implement the "SOME" keyword as a synonym for "ANY" per SQL92.
Implement ascii(text), ichar(int4), repeat(text,int4) to help
 support the ODBC driver.
Enable the TRUNCATE() function mapping in the ODBC driver.
2000-04-07 13:40:45 +00:00
Vadim B. Mikheev 71b4790b6d Commebts & one check in EndEvalPlanQual(). 2000-04-07 07:24:47 +00:00
Tom Lane e4d8d43c52 Fix (I hope) resource leakage in EvalPlanQual: open subplans must be
properly shut down in EndPlan, else we fail to free buffers and so forth
that they hold.
2000-04-07 00:59:17 +00:00
Tom Lane 891039c15f Partial fix for EvalPlanQual bugs reported by Magnus Hagander, 3-Apr.
Ensure that outer tuple link needed for inner indexscan qual evaluation
gets set in the EvalPlanQual case.  This stops coredump, but we still
have resource leaks due to failure to clean up EvalPlanQual properly...
2000-04-07 00:30:41 +00:00
Bruce Momjian a25a490718 Update initdb display of postmaster startup 2000-04-06 18:27:01 +00:00
Bruce Momjian 65ea4f677f Allow vacuum of temporary tables 2000-04-06 18:12:07 +00:00
Bruce Momjian 6929459279 Add POLLUTE to interfaces/Makefile 2000-04-06 03:34:55 +00:00
Tom Lane eace269b47 Repair assert failure in tuple-chain-moving logic (introduced by yours
truly, I'm afraid).
2000-04-06 00:29:51 +00:00
Michael Meskes a7b1ff6619 *** empty log message *** 2000-04-05 15:51:28 +00:00
Bruce Momjian 6995c5fbad Please forget all I said about gcc and AIX in my previous mail.
It does work with the following patch applied and gcc 2.95.2 .

Use --with-template=aix_gcc to compile the whole lot with gcc.

The geometry regression test produces different precision.
With optimization I run into regression failures starting at oidjoins,
thus no -O2. Anybody else try gcc 2.95.2 and -O2 on beta4 ?

This is an important patch, since recent versions of the IBM compiler
are not for free, and thus most questions I get concern gcc.

Andreas

PS.: I am testing with beta4
2000-04-05 14:47:21 +00:00
Peter Eisentraut 15942b823a Solaris geometry results were out of sync with the input file 2000-04-05 11:02:28 +00:00
Michael Meskes 9fb20f105f *** empty log message *** 2000-04-05 09:05:40 +00:00
Bruce Momjian 5f39ba8142 Rename geometry.*bsdi to geo.*bsd. for Freebsd. 2000-04-05 02:36:41 +00:00
Marc G. Fournier 059f448766 freebsd 4.0 is like bsdi for geometry test ... 2000-04-05 02:25:11 +00:00
Marc G. Fournier 97db19c91c freebsd has *-freebsd and *-freebsdelf ... float8 passes with this 2000-04-05 02:08:29 +00:00
Tom Lane 5240c76729 Actually, that still wasn't quite right. If we skip a query because of
xact abort state in pg_exec_query_dest, we should continue scanning the
querytree list, on the off chance that one of the later queries in the
string is COMMIT or ROLLBACK.
2000-04-04 23:52:50 +00:00
Tom Lane 708f82f191 Fix bug noted by Bruce: FETCH in an already-aborted transaction block
would crash, due to premature invocation of SetQuerySnapshot().  Clean
up problems with handling of multiple queries by splitting
pg_parse_and_plan into two routines.  The old code would not, for
example, do the right thing with END; SELECT... submitted in one query
string when it had been in transaction abort state, because it'd decide
to skip planning the SELECT before it had executed the END.  New
arrangement is simpler and doesn't force caller to plan if only
parse+rewrite is needed.
2000-04-04 21:44:40 +00:00
Bruce Momjian 0d26b45618 No ID file needed. 2000-04-04 13:51:38 +00:00
Bruce Momjian 9e7a4ccfd0 Update QNX FAQ 2000-04-04 13:49:30 +00:00
Tom Lane c84ba6638e Add a check to pg_dump to see whether backend is same version as pg_dump.
If not, abort by default.  Abort can be prevented by using -i or
--ignore-version switch.
2000-04-04 05:22:46 +00:00
Bruce Momjian edd4131e6e Update regression for bsdi. 2000-04-04 04:07:53 +00:00
Tom Lane 3f94bc19d6 Correct off-by-one error in strncat() usage. 2000-04-04 03:00:16 +00:00
Tom Lane 7fbf0af22b When rewriting an aggregate introduced into WHERE, allow agg argument to
be an expression not just a simple Var, so long as only one table is
referenced (so that code isn't really any more difficult than before).
This whole thing is still fundamentally bogus, but at least we can accept
a few more cases than before.
2000-04-04 02:30:52 +00:00
Tom Lane 2ae6e86302 For no good reason at all, libplpgsql was getting linked with libpq.
Since plpgsql is a backend extension, it doesn't need libpq...
2000-04-04 01:47:59 +00:00
Tom Lane 1c72a8a37a Fix extremely nasty little bug observed when a sub-SELECT appears in
WHERE in a place where it can be part of a nestloop inner indexqual.
As the code stood, it put the same physical sub-Plan node into both
indxqual and indxqualorig of the IndexScan plan node.  That confused
later processing in the optimizer (which expected that tracing the
subPlan list would visit each subplan node exactly once), and would
probably have blown up in the executor if the planner hadn't choked first.
Fix by making the 'fixed' indexqual be a complete deep copy of the
original indexqual, rather than trying to share nodes below the topmost
operator node.  This had further ramifications though, because we were
making the aforesaid list of sub-Plan nodes during SS_process_sublinks
which is run before construction of the 'fixed' indexqual, meaning that
the copy of the sub-Plan didn't show up in that list.  Fix by rearranging
logic so that the sub-Plan list is built by the final set_plan_references
pass, not in SS_process_sublinks.  This may sound like a mess, but it's
actually a good deal cleaner now than it was before, because we are no
longer dependent on the assumption that planning will never make a copy
of a sub-Plan node.
2000-04-04 01:21:48 +00:00
Thomas G. Lockhart 8cdabf0741 Augment the function call map logic with code from Tom Lane.
Should be more robust to overflows.
 Pass through an unmapped function unchanged, rather than rejecting it.
Add a few more functions, but comment out those which can go through as-is.
Can be used with contrib/odbc/ package, though that isn't committed yet.
2000-04-04 01:07:54 +00:00
Bruce Momjian 51cfdae50f Hi,
here is an updated version of the bit type with a bugfix and all the necessa
ry
SQL functions defined. This should replace what is currently in contrib. I'd
appreciate any comments on what is there.

Kind regards,

Adriaan
2000-04-03 20:56:40 +00:00
Michael Meskes 5454b37921 *** empty log message *** 2000-04-03 19:34:26 +00:00
Tom Lane c4ef93dbc6 Looks like Peter forgot to commit configure with configure.in. 2000-04-03 00:33:54 +00:00
Michael Meskes 4aefba9077 *** empty log message *** 2000-04-02 08:51:44 +00:00
Peter Eisentraut c1bfc9d7fa Adjusted for new (again!) config.guess output under QNX 2000-03-31 22:03:52 +00:00
Tom Lane 14bc951d30 Fix low-probability bug in relcache startup: write_irels wrote the
pg_internal.init file in-place, which meant that if another backend
started at about the same time, it might read the incomplete file.
init_irels tries to guard against that, but I have now seen a crash
due to reading bad data from a partly-written file.  (This may indicate
a kernel bug on my platform?  Not sure.)  Anyway, clearly the safest
course is to write the new pg_internal.init file under a unique temporary
filename, and rename it into place only after it's all written.
2000-03-31 19:39:22 +00:00
Bruce Momjian ac70c3547b I have tested the beta3 on WinNT and here are the results:
- I was unable to compile ecpg due to the ":=" instead of "=" in defining
LIBPQDIR and some other variables in Makefile.global.in
- pg_id (and also pg_encoding) executable was not removed during "make
clean" - there was no $(X) appended to the executable name for rm
- I have added result for int2, int4, float8 and geometry regression tests
        - int2, int2 - yet another message for too large numbers ;-)
        - float8 - it is problably a bug in the newlib C library - it has no
error message for numbers with exponent -400
        - geometry - differences in precision of float numbers
- I have added appropriate lines into resultmap file
- I have modified the script regress.sh to use "case" statement when testing
the hostname. For cygwin the script is called with "i686-pc-cygwin" (on my
machine) as a parameter and this was not catched with the "if" statement.
The check was done for PORTNAME (win) and not HOSTNAME (i.86-pc-cygwin*).

The patch for described modifications is included.

All this modifications can be applied to "current" tree too.
The compilation was done on CygwinB20.1 with gcc 2.95, cygipc library 1.05.
The binaries were able to run also on the newest development snapshot
(2000-03-25).

                        Dan
2000-03-31 14:14:36 +00:00
Bruce Momjian 51bacfd44b Fix pgaccess __wish__ thing. 2000-03-31 14:05:07 +00:00
Tatsuo Ishii 95a31a8fea Regenerate configure (for configure.in version 1.305) 2000-03-31 13:07:03 +00:00
Tatsuo Ishii 82e6e8c74e Fix configure.in. Remove SJIS, BIG5, WIN1250 from the selection list of
multibyte encodings. These cannot be used as a backend/database encoding
(OK to use as a client encoding).
2000-03-31 13:04:31 +00:00
Bruce Momjian 472c5196f4 Add new pgaccess languages. 2000-03-31 11:30:10 +00:00
Bruce Momjian a34ce62fdf Update pgaccess to 0.98.5 2000-03-31 11:22:36 +00:00
Tom Lane 418cf04987 Update from Andreas Kardos. 2000-03-31 05:36:54 +00:00
Tom Lane 0c90431d7b Add expected output for netbsd, per report from Patrick Welche. 2000-03-31 05:30:31 +00:00
Tom Lane 50f7b0b1b0 Add resultmap entries for datetime-related tests on alpha-dec-osf. 2000-03-31 05:13:39 +00:00
Tom Lane 220bf7880f Update horology-solaris-1947.out per results from SL Baur. These are
actually from an alpha-dec-osf machine, but as far as can be told the
two platforms have the same ideas about past DST rules.
2000-03-31 05:11:13 +00:00
Tom Lane fa02af8f8b Update alpha templates as suggested by SL Baur and Adriaan Joubert.
Make similar changes to hpux templates.  Might want to do the same for
other foo_cc and foo_gcc pairs, but will desist until I hear from
someone who uses those platforms.
2000-03-31 05:03:39 +00:00
Tom Lane fb75e39800 Use the CXXFLAGS exported by configure (amazingly, we weren't before!)
and do not arbitrarily pull in CFLAGS instead.  This caters to platforms
where the C++ compiler does not like all the same switches the C compiler
wants.
2000-03-31 05:00:36 +00:00
Tom Lane ca05ba2a9d Get rid of SetBufferWriteMode(), which was an accident waiting to happen.
In the event of an elog() while the mode was set to immediate write,
there was no way for it to be set back to the normal delayed write.
The mechanism was a waste of space and cycles anyway, since the only user
was varsup.c, which could perfectly well call FlushBuffer directly.
Now it does just that, and the notion of a write mode is gone.
2000-03-31 02:43:31 +00:00
Tom Lane 5717dcb8a7 New coding for SET provoked a 'var might be used uninitialized' warning
from gcc.  Which wasn't actually a code bug, but I don't like warnings.
2000-03-31 02:11:03 +00:00
Bruce Momjian be1d9fea15 Update make_mkid for mkid version 4.0. 2000-03-31 01:41:27 +00:00
Michael Meskes c9576ca1e0 *** empty log message *** 2000-03-30 11:41:46 +00:00
Tom Lane 92008a22c3 alpha-dec-osf host pattern must become alpha.*-dec-osf to match
newer Alpha platforms.
2000-03-30 07:49:39 +00:00
Tom Lane 007f812579 Update alternate float8 output files to match current float8.sql. 2000-03-30 07:46:00 +00:00
Tom Lane 738a9ca5e7 Update numeric_big regress test for 7.0. This has apparently been
broken almost since the word go ... I guess no one ever ran it ...
2000-03-30 07:13:20 +00:00
Thomas G. Lockhart 362575b782 Enable more flexible syntax for the SET command. Now allows single floats,
single integers, and lists of names, without surrounding them with quotes.
Remove all tokens which are defined as operators from ColID and ColLabel
 to avoid precedence confusion. Thanks to Tom Lane for catching this.
2000-03-30 06:02:36 +00:00
Tom Lane b68d9c4c41 Makefile should not pre-empt user's decision about whether
to use -g ... especially not when this can cause real problems on some
platforms ...
2000-03-30 05:57:30 +00:00
Tom Lane 0517c3204e Unixware fix for new config.guess output,
from Bill.Allie@mug.org.
2000-03-30 05:49:47 +00:00
Tom Lane 0a5a0b8dfd Make use of configure symbols for unportable constructs. Make
inclusions of system headers more consistent.
2000-03-30 05:30:42 +00:00
Tom Lane 67cee15367 Autoconf. 2000-03-30 05:29:44 +00:00
Tom Lane 0a1ed443f8 Add configure checks to see if 'using namespace std' and
'#include <string>' work in the local C++ compiler.
2000-03-30 05:29:21 +00:00
Tom Lane 835d78d589 Remove extraneous semicolon. 2000-03-30 02:59:14 +00:00
Tom Lane e55985d3be Tweak indexscan cost estimation: round estimated # of tuples visited up
to next integer.  Previously, if selectivity was small, we could compute
very tiny scan cost on the basis of estimating that only 0.001 tuple
would be fetched, which is silly.  This naturally led to some rather
silly plans...
2000-03-30 00:53:30 +00:00
Peter Eisentraut 341dc91820 Added latest config.guess and config.sub 2000-03-29 16:12:31 +00:00
Thomas G. Lockhart 1b113a23e5 Change rules for interpreting date/time input to disallow 1 and 3 character
years. Rejects dates like '0.085', which were accepted previously.
2000-03-29 03:57:18 +00:00
Tom Lane 1f7ba1ebaf Fix some bogosity in the tutorial examples. 2000-03-28 02:49:19 +00:00
Bruce Momjian 081cba45e6 Allow compile to finish even if plperl fails, which it does now. 2000-03-27 22:39:13 +00:00
Peter Eisentraut a9f37f16d2 Fixed bug with repeated \e in psql (failed to clear buffers correctly) 2000-03-27 21:11:37 +00:00
Thomas G. Lockhart 2dabd2cd1f Allow full type names in CREATE FUNCTION arguments and return type.
Move CREATE FUNCTION/WITH clause to end of statement to get around
 shift/reduce conflicts with type names containing "WITH".
Add lots of tokens as allowed ColId's and/or ColLabel's,
 so this should be a complete set for the v7.0 release.
2000-03-27 17:12:06 +00:00
Thomas G. Lockhart 2c8223f14b Fix up comments where had been uglified by the automated reformatter. 2000-03-27 17:07:48 +00:00
Thomas G. Lockhart 0b96c6f4ae Change form of query which used "DISTINCT ON" to help support primary keys.
We still have an internal limit in the ODBC code of 8 columns per key,
 but this should lay the groundwork for resolving that.
Includes reformulated query from Tom Lane.
2000-03-27 17:04:47 +00:00
Tatsuo Ishii a92ab528ef Enhance pg_ctl so that it prints error messages from postmaster
if it fails to start up it (this is only vaild if -w is given).
2000-03-27 02:12:03 +00:00
Tom Lane 0a27641c1a nodeAgg has always been willing to accept an aggregate with a finalFunc
and only one transition state, but the CREATE AGGREGATE code rejected
this combination.
2000-03-26 19:43:58 +00:00
Peter Eisentraut 4579e68db2 Updated user's guide to match new psql's output format
Fixed bug in createdb/alternative location
2000-03-26 18:32:30 +00:00
Tatsuo Ishii d7959b5c71 Change resultmap:
powerpc-unknown-linux-gnu --> powerpc-unknown-linux-gnulibc1
this is because for new config.guess.
2000-03-26 02:35:01 +00:00
Tatsuo Ishii f3160a6530 New platform specific geometry regression expected file for
powerpc-linux-gnulibc1.
2000-03-26 02:28:07 +00:00
Tatsuo Ishii 5363144d37 Remove some results from int4-not-representable.out
This is due to the changes made to int4.sql.

< SELECT dsqrt(float8 '64') AS eight;
<  eight
< -------
<      8
< (1 row)
<
< SELECT |/float8 '64' AS eight;
<  eight
< -------
<      8
< (1 row)
<
< SELECT ||/float8 '27' AS three;
<  three
< -------
<      3
< (1 row)
<
2000-03-26 02:25:34 +00:00
Tom Lane bccac99e97 Make configure --help produce slightly more useful and consistently-
formatted descriptions of --with options.
2000-03-26 01:29:25 +00:00
Bruce Momjian d2684ea712 Attached is the regression diff for geometry, RedHat 6.1 on a Pentium
200 MMX. I was going through my e-mail, cleaning out my 1000+ message
inbox, and found this one.  Sorry.

--
Lamar Owen
2000-03-26 00:18:57 +00:00
Tom Lane 0abebf0e7b Remove bogus complexity from build/install of plperl. This stuff was
apparently copied from the makefile for the perl5 interface module,
which needs it for reasons explained in src/interfaces/Makefile.
But none of those reasons apply to plperl.
2000-03-25 19:26:49 +00:00
Tom Lane e4739e7029 Old patch from Mark Hollomon to add plperl to createlang's repertoire.
Seems to have slipped through the cracks.
2000-03-25 19:10:27 +00:00
Tom Lane cfc0ba8c04 Another fix for old shells. 2000-03-25 19:01:48 +00:00
Tom Lane c446802b22 Fix syntax error reported by old shells ("if ! command..." is a
neologism, apparently).
2000-03-25 18:46:17 +00:00
Bruce Momjian 1aecb8d2ff More >&1 cleanups 2000-03-25 14:44:42 +00:00
Bruce Momjian 3df65f8499 More changes of >& to 2>&1 2000-03-25 14:36:58 +00:00
Bruce Momjian 6e801bd8db Remove >& and make it 2>&1 2000-03-25 14:32:50 +00:00
Bruce Momjian 0dd9558ed7 Add POLLUTE=1 to perl Makefile.PL creations. 2000-03-25 14:25:31 +00:00
Tom Lane 5c462baebc transformCreateStmt should put Ident nodes, not ColumnDef nodes, into
keys lists of Constraint nodes.  This eliminates a type pun that would
probably have caused trouble someday, and eliminates circular references
in the parsetree that were causing trouble now.
Also, change parser's uses of strcasecmp() to strcmp().  Since scan.l
has downcased any unquoted identifier, it is never correct to check an
identifier with strcasecmp() in the parser.  For example,
	CREATE TABLE FOO (f1 int, UNIQUE("F1"));
was accepted, which is wrong, and xlateSqlFunc did more than it should:
select datetime();
ERROR:  Function 'timestamp()' does not exist
(good)
select "DateTime"();
ERROR:  Function 'timestamp()' does not exist
(bad)
2000-03-24 23:34:19 +00:00
Tom Lane 8f50f7a291 Improve comment. 2000-03-24 23:26:45 +00:00
Tom Lane 8cbeb5f131 Save a few cycles in simple cases: no need to call cost_sort() when there
is no presorted path to compare with.
2000-03-24 21:40:43 +00:00
Bruce Momjian c07118b3b3 Remove -O2 for aix. 2000-03-24 14:39:07 +00:00
Tom Lane 39cd6e2e91 outfuncs.c was missing a print routine for Material plan nodes, leading
to trouble when trying to EXPLAIN VERBOSE a plan containing one.
2000-03-24 02:58:25 +00:00
Tom Lane eca02fee2c Rename bytea functions to not have upper-case letters in their names.
Clean up grotty coding in them, too.  AFAICS from the CVS logs, these
have been broken since Postgres95, so I'm not going to insist on an
initdb to fix them now...
2000-03-24 02:41:46 +00:00
Tom Lane 0edcee3459 Fold PQsetenv working state into PGconn, rather than trying to maintain
it in a separate object.  There's no value in keeping the state separate,
and it creates dangling-pointer problems.  Also, remove PQsetenv routines
from public API, until and unless they are redesigned to have a safer
interface.  Since they were never part of the documented API before 7.0,
it's unlikely that anyone is calling them.
2000-03-24 01:39:55 +00:00
Tom Lane 7177bbac29 A little further tweaking of the range-query selectivity logic:
to avoid undue sensitivity to roundoff error, believe that a zero
or slightly negative range estimate should represent a small
positive selectivity, rather than falling back on a generic default
estimate.
2000-03-23 23:35:47 +00:00
Bruce Momjian 6d79d6027c >> 5. empty define that results in an empty but terminated line ( ; )
easy (maybe dumb) fix for 5 in attachment define.patch

greetings, Andreas
2000-03-23 23:16:49 +00:00
Bruce Momjian f8645018bc Back out // compiler flag. 2000-03-23 22:25:36 +00:00
Bruce Momjian 4ddc50dffa Hmm, absolute pathnames for the copy makes sense. I'll whip up that
patch in a second. Should be sufficent to just make sure the first
character is a '/', right?

Ross J. Reedstrom
2000-03-23 21:38:58 +00:00
Bruce Momjian b2d867fb08 Some points for portability improvements:
1. C++ style comments in C source for ecpg ( // comment )
2. compiler finds wrong include file extern.h in ecpg/lib/descriptor.c
from
include path instead of workdir (rename it ?)
3. fe-connect getsockopt takes a socklen_t as fifth arg not int (use
SOCKET_SIZE_TYPE instead)
4. char vs unsigned char in psql calls to libpq
5. empty define that results in an empty but terminated line ( ; )

Now for all but point 3 I can supply changes to the
compiler flags, to make the compiler less pedantic.
Or is someone interested in the complications ?

in the meantime can someone apply the attached patch ?

Andreas
2000-03-23 17:27:36 +00:00
Bruce Momjian 2f839c58e2 Please apply the attached patch to interfaces/libpq/libpq-fe.h. This would
allow to write applications which do not have a link to postgres_ext.h in
their source directory.

Andreas Kardos
2000-03-23 15:00:11 +00:00
Michael Meskes ac3884e2a9 *** empty log message *** 2000-03-23 07:53:48 +00:00
Tom Lane 3097788f66 subselect regress test was kind of silly; it claimed to test correlation
cases but actually did no such thing.  Make it test some more cases than
before (including things that didn't work in 6.5).
2000-03-23 07:42:13 +00:00
Tom Lane 5c63975504 Float-to-int conversion functions should return NULL when given NULL
input, not throw a gratuitous elog().
2000-03-23 07:40:00 +00:00
Tom Lane 37ab088770 Remove no-longer-necessary restriction against uplevel correlation vars
outside WHERE clause.  Fix a couple of places that didn't handle uplevel
refs cleanly.
2000-03-23 07:38:30 +00:00
Tom Lane dadb14fa60 Hack parse_coerce so it won't try to constant-fold the dummy Const
nodes introduced by make_subplan().  It'd be better if we used a
different node type for subplan result placeholders, but for now...
2000-03-23 07:36:03 +00:00
Tom Lane 9da6d2c0e7 ExecSubPlan needs to be able to cope with RelabelType nodes atop the
Const placeholder nodes for subplan result values.
2000-03-23 07:32:58 +00:00
Bruce Momjian b508136d81 Update HISTORY file for 7.0. 2000-03-23 06:30:58 +00:00
Tom Lane 1afaa2557a If we cannot get a real estimate for the selectivity of a range query,
use a default value that's fairly small.  We were generating a result
of about 0.1, but I think 0.01 is probably better --- want to encourage
use of an indexscan in this situation.
2000-03-23 00:58:36 +00:00
Tom Lane cad764f349 Improve selectivity estimation involving string constants: pay attention
to more than one character, and try to do the right thing in non-ASCII
locales.
2000-03-23 00:55:42 +00:00
Tom Lane 1d5e7a6f46 Repair logic flaw in cost estimator: cost_nestloop() was estimating CPU
costs using the inner path's parent->rows count as the number of tuples
processed per inner scan iteration.  This is wrong when we are using an
inner indexscan with indexquals based on join clauses, because the rows
count in a Relation node reflects the selectivity of the restriction
clauses for that rel only.  Upshot was that if join clause was very
selective, we'd drastically overestimate the true cost of the join.
Fix is to calculate correct output-rows estimate for an inner indexscan
when the IndexPath node is created and save it in the path node.
Change of path node doesn't require initdb, since path nodes don't
appear in saved rules.
2000-03-22 22:08:35 +00:00
Bruce Momjian d825e55c13 Update pg_dumpall again. 2000-03-22 05:25:06 +00:00
Bruce Momjian 233a52eaff Fix pg_dumpall for new psql output. 2000-03-22 05:10:22 +00:00
Tom Lane e1a1f22f13 Forgot that odbc had its own copies of config.sub/config.guess.
Update those to latest Autoconf sources, too.
2000-03-21 06:35:22 +00:00
Thomas G. Lockhart b688f8f034 Fix query for primary keys to reflect new DISTINCT ON () syntax.
Reported by "Tibor Laszlo" <ltibor@mail.tiszanet.hu> and fix suggested by
 "Hiroshi Inoue" <Inoue@tpf.co.jp>.
2000-03-21 06:02:22 +00:00
Thomas G. Lockhart dcdcada7e9 Add syntax for BIT() and BIT VARYING(), but no underlying implementation
is available yet.
Remove redundant call to xlateSqlType() in the character
 type handling code.
2000-03-21 06:00:41 +00:00
Thomas G. Lockhart 3c7ca8d459 Update test for new ORDER BY clause from Tom Lane. 2000-03-21 05:59:14 +00:00
Tom Lane 3ee8f7e207 Restructure planning code so that preprocessing of targetlist and quals
to simplify constant expressions and expand SubLink nodes into SubPlans
is done in a separate routine subquery_planner() that calls union_planner().
We formerly did most of this work in query_planner(), but that's the
wrong place because it may never see the real targetlist.  Splitting
union_planner into two routines also allows us to avoid redundant work
when union_planner is invoked recursively for UNION and inheritance
cases.  Upshot is that it is now possible to do something like
select float8(count(*)) / (select count(*) from int4_tbl)  from int4_tbl
group by f1;
which has never worked before.
2000-03-21 05:12:12 +00:00
Tom Lane aafe86d995 Correct typo in error message. 2000-03-21 04:20:45 +00:00
Bruce Momjian 2216584bcf Reverse out BYTEA type coersion. 2000-03-20 15:42:47 +00:00
Vadim B. Mikheev df238b2c06 Turn XLOG off (do not create log file). 2000-03-20 07:25:39 +00:00
Tom Lane 3caa56fe5e Emit 'this operator is deprecated' warnings for ':' and ';'. 2000-03-20 05:20:34 +00:00
Tom Lane 72b4086711 Convert float8 regress test to use exp() and ln() instead of ':' and
';' operators.
2000-03-20 05:19:11 +00:00
Bruce Momjian 7f116a6b83 Update for BYTEAOID. 2000-03-20 04:26:01 +00:00
Bruce Momjian 0e1f485f5f Add compatiblity information for bytea. 2000-03-20 04:02:47 +00:00
Hiroshi Inoue fe8098ed0c Add FORCE keyword to ColID 2000-03-20 00:24:37 +00:00
Tom Lane 966b5337e9 Make use of pre-existing regexp match capability to eliminate redundant
entries in template selection rules.  Also, change alpha-dec-osf pattern
to cope with version info attached to the 'alpha' part.
2000-03-19 22:48:30 +00:00
Tom Lane 42ef928327 Autoconf run 2000-03-19 22:46:56 +00:00
Tom Lane 641c368ae9 Change configure.in to note that since we are using expr(1)'s regex match
command, the entries in template/.similar can really be regular
expressions.  This isn't a new feature, just an observation of what the
code already did.
2000-03-19 22:46:22 +00:00
Tom Lane b178865891 cash_words_out function truncated its output by 1 character due to
incorrect use of StrNCpy.
2000-03-19 22:10:52 +00:00
Tom Lane 58422dd0af Several calls to StrNCpy incorrectly subtracted 1 from the length arg,
leading to postmaster accepting args 1 shorter than it had room for.
2000-03-19 22:10:08 +00:00
Tom Lane 6a02746550 Change MemSet and StrNCpy to evaluate their arguments only once.
Fix inadequate parenthesization in several other macros.
2000-03-19 22:08:51 +00:00
Bruce Momjian 3e0321f6e9 Proper unpack de_DE.ISO-8859-1 2000-03-19 19:52:44 +00:00
Tom Lane d6429e552d Minor code rearrangement & doc improvement in eval_const_expressions(). 2000-03-19 18:20:38 +00:00
Michael Meskes cf6420dd94 *** empty log message *** 2000-03-19 10:04:47 +00:00
Tom Lane a73b75615f transformExpr() did the Wrong Thing if applied to a SubLink node that
had already been transformed.  This led to failure in examples like
UPDATE table SET fld = (SELECT ...).  Repair this, and revise the
comments to explain that transformExpr has to be robust against this
condition.  Someday we might want to fix the callers so that
transformExpr is never invoked on its own output, but that someday
is not today.
2000-03-19 07:13:58 +00:00
Bruce Momjian 52d0265736 it seems in the beta2 release DBUSERID in pg_dumpall is the _name_ of the
user, so it doesn't need to be translated from the number to the name.

also ``create database ...'' does not take numbers for the encoding, so
the ENCODING variable does not need to be translated to a number, but left
as the text representation.  a patch is supplied to make the changes i
have found to work.  i was successful dumping and reloading my database
after these changes.
-

John M. Flinchbaugh
2000-03-19 02:19:43 +00:00
Tom Lane cfa929f601 Fix incorrect implementation of log(x) for numeric, as well as
incorrect descriptions of a couple of log-related functions.
I will not force an initdb for this, but log() on a numeric won't
work until you do one...
2000-03-19 01:12:18 +00:00
Tom Lane 440b0fea3d Another go-round with resolution of ambiguous functions and operators.
In function parsing, try for an actual function of the given name and
input types before trying to interpret the function call as a type
coercion request, rather than after.  Before, a function that had the
same name as a type and operated on a binary-compatible type wouldn't
get invoked.  Also, cross-pollinate between func_select_candidates and
oper_select_candidates to ensure that they use as nearly the same
resolution rules as possible.  A few other minor code cleanups too.
2000-03-19 00:19:39 +00:00
Tom Lane f11d253e25 In can_coerce_type, verify that a possible type-coercion function
actually returns the type it is named for.
2000-03-19 00:15:39 +00:00
Peter Eisentraut 7d392f257b Fixed psql -c "\slashcmd" 2000-03-18 22:48:29 +00:00
Bruce Momjian f4d452c13c Update bytea type description 2000-03-18 20:50:10 +00:00
Tom Lane d63e05a638 Improve error message wording in unary_op_error() --- suggest that
problem could be lack of parentheses.  This addresses cases like
X UserOp UserOp Y, which will be parsed as (X UserOp) UserOp Y,
whereas what likely was wanted was X UserOp (UserOp Y).
2000-03-18 19:53:54 +00:00
Tom Lane f91dd7880f Clean up minor compiler warnings. 2000-03-18 18:57:16 +00:00
Tom Lane f945f46193 Modify lexing of multi-char operators per pghackers discussion around
16-Mar-00: trailing + or - is not part of the operator unless the operator
also contains characters not present in SQL92-defined operators.  This
solves the 'X=-Y' problem without unduly constraining users' choice of
operator names --- in particular, no existing Postgres operator names
become invalid.

Also, remove processing of // comments, as agreed in the same thread.
2000-03-18 18:03:12 +00:00
Tom Lane 2b23e86447 Repair typos: <xb> EOF rule should be <xh>, likewise <xq> to <xd> 2000-03-18 05:44:21 +00:00
Tom Lane 15115344f0 Just noticed that the grammar actually has no provision for '+' as a
prefix operator :-(.  Bad enough that we have no implementation of
unary plus, but at least with this fix the grammar will take it.
2000-03-18 04:32:35 +00:00
Bruce Momjian caa6fc1ba2 Add translation of timespan to interval. 2000-03-18 00:33:45 +00:00
Tom Lane 3faa9bab07 Patch possible portability problem: a few places had // style comments,
which is not ANSI C, even though some compilers will take it...
2000-03-17 23:26:36 +00:00
Tom Lane 64ef5c82de Typo correction (// -> /) 2000-03-17 23:17:23 +00:00
Tom Lane 0e314d747e Add safety check on expression nesting depth. Default value is set by
a config.h #define, and the runtime value can be controlled via SET.
2000-03-17 05:29:07 +00:00
Tom Lane 341b328b18 Fix a bunch of minor portability problems and maybe-bugs revealed by
running gcc and HP's cc with warnings cranked way up.  Signed vs unsigned
comparisons, routines declared static and then defined not-static,
that kind of thing.  Tedious, but perhaps useful...
2000-03-17 02:36:41 +00:00
Tom Lane bc1f117094 Update config.guess and config.sub to latest versions available from
the GNU Autoconf CVS server.
2000-03-16 20:41:17 +00:00
Tom Lane 6a4b7d83f3 Tweak horology regress test to ensure platform-independent ordering of
results in conversions tests.  Update horology-no-DST-before-1970.out.
2000-03-16 17:03:41 +00:00
Bruce Momjian a7e0ee9a0e Since it has been confirmed working on the bugs list, please apply the
attached patch.

Andreas Kardos
2000-03-16 15:35:34 +00:00
Bruce Momjian 3e4708c45c libpq++ Makefile uses -DDEBUG to turn on debugging trace to
/tmp/trace.out.
However, elog.h uses DEBUG as a log-level flag.  As a result, tracing is
turned on even if the libpq++.so is built with DEBUG commented out in
the Makefile.

This patch changes libpq++ to use DEBUGFILE instead (which is not
defined anywhere else).

Oliver Elphick
2000-03-16 15:34:36 +00:00
Thomas G. Lockhart 9e7166096e Support full POSIX-style time zone: EST+3, PST-3, etc.
We probably support a superset of the spec, but I don't have the spec
 to confirm this.
Update regression tests to include tests for this format.
2000-03-16 14:38:42 +00:00
Thomas G. Lockhart 90c4bab7ea Support full POSIX-style time zone: EST+3, PST-3, etc.
We probably support a superset of the spec, but I don't have the spec
 to confirm this.
Update regression tests to include tests for this format.
Update geometry.out with results from Linux RH 5.2 system
(for last decimal place).
2000-03-16 14:38:31 +00:00
Thomas G. Lockhart ff0a420c92 Support full POSIX-style time zone: EST+3, PST-3, etc.
We probably support a superset of the spec, but I don't have the spec
 to confirm this.
Update regression tests to include tests for this format.
Fix single-space typo in printed message in regress.sh.
2000-03-16 14:37:33 +00:00
Tatsuo Ishii 0e1043b760 Fixes for char_length() change. 2000-03-16 11:55:43 +00:00
Tatsuo Ishii 805e0c4589 Fixes for char_length() changes. 2000-03-16 11:53:16 +00:00
Tom Lane d14c8aab99 Turns out that Mazurkiewicz's gripe about 'function inheritance' is
actually a type-coercion problem.  If you have a function defined on
class A, and class B inherits from A, then the function ought to work
on class B as well --- but coerce_type didn't know that.  Now it does.
2000-03-16 06:35:07 +00:00
Tatsuo Ishii d4a2c86eaf Fix for char_length() changes 2000-03-16 05:07:21 +00:00
Tom Lane e64a331179 Fix some (more) problems with subselects in rules. Rewriter failed to
mark query as having subselects if a subselect was added from a rule
WHERE condition (as opposed to a rule action).  Also, fix adjustment
of varlevelsup so that it actually has some prospect of working when
inserting an expression containing a subselect into a subquery.
2000-03-16 03:23:18 +00:00
Bruce Momjian 4a3a1e2cf1 Hi,
small changes in formatting.c code (better memory usage ...etc.) and
better
to_char's cache (will fastly for more to_char()s in one query).

(It is probably end of to_char() development in 7.0 cycle.)

                                                Karel
2000-03-16 01:35:41 +00:00
Tom Lane 6358e654ca Update comment obsoleted by Thomas's latest fixes. 2000-03-15 23:42:14 +00:00
Tom Lane 1763a7c1ea Tweak GROUP BY so that it will still accept result-column names, but only
after trying to resolve the item as an input-column name.  This allows us
to be compliant with the SQL92 spec for queries that fall within the spec,
while still accepting the same out-of-spec queries as 6.5 did.  You'll only
lose if there is an output column name that is the same as an input
column name, but doesn't refer to the same value.  7.0 will interpret
such a GROUP BY spec differently than 6.5 did.  No way around that, because
6.5 was clearly not spec compliant.
2000-03-15 23:31:19 +00:00
Michael Meskes 8e0790519a *** empty log message *** 2000-03-15 19:09:10 +00:00
Tom Lane 77f4885393 Fix busted TRANSLATE() code --- it coredumped due to pfree()'ing the
wrong pointer.
2000-03-15 17:24:18 +00:00
Tom Lane 84b9507f78 Remove another incorrect UserAbortTransactionBlock() call. 2000-03-15 07:02:56 +00:00
Tom Lane fe189063b8 Remove gratuitous and incorrect begin/commit transaction calls in
CREATE DB/DROP DB.  If you didn't think they were wrong, try what
happens when you compile with -DCLOBBER_FREED_MEMORY --- database
name displayed in error messages is trashed, because transaction
abort freed it.  Also, remove trailing periods in error messages,
per our prevailing style.
2000-03-15 06:50:51 +00:00
Tom Lane c397e264db Fix a couple of missed changes in expected results. 2000-03-15 06:24:58 +00:00
Tom Lane ce3b489b97 Add 'datetime' -> 'timestamp' conversion to xlateSqlFunc() to ease
the pain of updating apps to 7.0.  Should we also translate some of
the 'datetime_foo' functions that exist in 6.* ?
2000-03-15 05:31:55 +00:00
Tom Lane a50f2fd76e Repair unintentional damage to MULTIBYTE code. 2000-03-14 23:59:23 +00:00
Tom Lane 34235a295b Cache fmgr lookup data for index's getnext() function in IndexScanDesc,
so that the fmgr lookup only has to happen once per index scan and not
once per tuple.  Seems to save 5% or so of CPU time for an indexscan.
2000-03-14 23:52:01 +00:00
Thomas G. Lockhart 6456810078 Implement column aliases on views "CREATE VIEW name (collist)".
Implement TIME WITH TIME ZONE type (timetz internal type).
Remap length() for character strings to CHAR_LENGTH() for SQL92
 and to remove the ambiguity with geometric length() functions.
Keep length() for character strings for backward compatibility.
Shrink stored views by removing internal column name list from visible rte.
Implement min(), max() for time and timetz data types.
Implement conversion of TIME to INTERVAL.
Implement abs(), mod(), fac() for the int8 data type.
Rename some math functions to generic names:
 round(), sqrt(), cbrt(), pow(), etc.
Rename NUMERIC power() function to pow().
Fix int2 factorial to calculate result in int4.
Enhance the Oracle compatibility function translate() to work with string
 arguments (from Edwin Ramirez).
Modify pg_proc system table to remove OID holes.
2000-03-14 23:06:59 +00:00
Tom Lane c40a0a1b52 Marginal performance improvement in LockBuffer --- calculate address
of BufferLocks[] entry just once.  Seems to save 10% or so of the
routine's runtime, which'd not be worth worrying about if it weren't
such a hotspot.
2000-03-14 22:46:27 +00:00
Bruce Momjian e02cde4b0a > I have improved the System V semaphore emulation of the QNX4 port.
Please
> apply the attached patch to
>
> backend/port/qnx4
>
> Andreas Kardos
>
2000-03-14 18:12:06 +00:00
Bruce Momjian e3fb902991 > To make PostgreSQL compilable on Digital Unix I had to modify the
alpha_cc
> template file. Patch attached.
>
> Andreas Kardos
>
2000-03-14 16:00:22 +00:00
Bruce Momjian 5e3eda41db > Here is an extension of the regression test suite for Digital Unix
(Alpha).
>
> Andreas Kardos
2000-03-14 15:59:39 +00:00
Bruce Momjian 27b3f7c4e0 > Here is an extension of the regression test suite for Digital Unix
(Alpha).
>
2000-03-14 15:55:54 +00:00
Bruce Momjian ab9b4d8086 > The snprintf stuff in interfaces/ecpg/preproc/Makefile.in is broken.
Please
> apply the attached patch.
>
> Andreas Kardos
>
>
2000-03-14 15:55:17 +00:00
Tatsuo Ishii 44a9639123 Detect postmaster being ready by calling psql -l rathern than
checking postmaster.pid. It's not enough to check the existence
of postmaster.pid since DB recovery might be running.
2000-03-14 08:34:47 +00:00
Tom Lane 6217a8c7ba Fix some bogosities in the code that deals with estimating the fraction
of tuples we are going to retrieve from a sub-SELECT.  Must have been
half asleep when I did this code the first time :-(
2000-03-14 02:23:15 +00:00
Peter Eisentraut a1642089bf Fixed deficiency where an unterminated (no semicolon) command at end of
psql script would be dropped silently.
2000-03-13 13:46:32 +00:00
Tom Lane e631df3c1b Extend numeric_round and numeric_trunc to accept negative scale inputs
(ie, allow rounding to occur at a digit position left of the decimal
point).  Apparently this is how Oracle handles it, and there are
precedents in other programming languages as well.
2000-03-13 02:31:13 +00:00
Tom Lane 57cf09591b Remove unnecessary limitations on lengths of bpchar and varchar constants.
Since we detect oversize tuples elsewhere, I see no reason not to allow
string constants that are 'too long' --- after all, they might never get
stored in a tuple at all.
2000-03-13 01:54:07 +00:00
Tom Lane a84c95634e Performance improvement for lexing long strings: increase flex's
YY_READ_BUF_SIZE, which turns out to have nothing to do with buffer size.
It's just a totally arbitrary upper limit on how much data myinput() is
asked for at one time.
2000-03-13 01:52:06 +00:00
Tom Lane 7cb253ed19 Somehow, the variant NATIONAL CHAR [ VARYING ] was missing from the
set of SQL-standard type names that we accept.
2000-03-12 20:09:41 +00:00
Tom Lane 1879175b18 Fix performance bug in constant-expression simplifier. After finding
that the inputs to a given operator can be recursively simplified to
constants, it was evaluating the operator using the op's *original*
(unsimplified) arg list, so that any subexpressions had to be evaluated
again.  A constant subexpression at depth N got evaluated N times.
Probably not very important in practical situations, but it made us look
real slow in MySQL's 'crashme' test...
2000-03-12 19:32:06 +00:00
Tom Lane ef3386affe Fix performance problem in fireRIRonSubselect: with nested subqueries,
fireRIRonSubselect was invoked twice at each subselect, leading to an
exponential amount of wasted effort.
2000-03-12 18:57:05 +00:00
Tom Lane 117fa25ae1 Clean up grammar's handling of NULL in expressions: a_expr_or_null is
gone, replaced by plain a_expr.  The few places where we needed to
distinguish NULL from a_expr are now handled by tests inside the actions
rather than by separate productions.  This allows us to accept queries
like 'SELECT 1 + NULL' without requiring parentheses around the NULL.
2000-03-12 00:39:52 +00:00
Tom Lane e8be8ffaf0 Further tweaking of logic that decides when to materialize an uncorrelated
subplan: do it if subplan has subplans itself, and always do it if the
subplan is an indexscan.  (I originally set it to materialize an indexscan
only if the indexqual is fairly selective, but I dunno what I was
thinking ... an unselective indexscan is still expensive ...)
2000-03-11 23:53:41 +00:00
Tom Lane bbe1ff7404 Make TypeCategory think that NAME is a member of type
category STRING.  Also, if UNKNOWNOID is passed in, return UNKNOWN_TYPE
not USER_TYPE.
2000-03-11 23:19:50 +00:00
Tom Lane c9f287e49b Further fixes for bogus list-slinging, scribbling on input, etc in type
coercion code.  I'm beginning to wonder why we have separate candidate
selection routines for functions, operators, and aggregates --- shouldn't
this code all be unified?  But meanwhile,
	SELECT 'a' LIKE 'a';
finally works; the code for dealing with unknown input types for operators
was pretty busted.
2000-03-11 23:17:47 +00:00
Peter Eisentraut 1d75298176 Karel Zakr's revised patch to fix psql prompt for local host connections. 2000-03-11 13:56:24 +00:00
Tom Lane 73f5b0847b exec_simple_check_plan() must not allow a plan having initPlans or
subPlans to be considered 'simple'.  This fixes reported problem with
'return exists (select 1 from foo);' in plpgsql function.
2000-03-11 06:19:00 +00:00
Tom Lane f3a9d75ebd Finish cleaning up backend's handling of /* ... */ and -- comments,
per pghackers discussion around 20-Feb.  Also add specific error messages
for unterminated comments and unterminated quoted strings.  These things
are nonissues for input coming from psql, but they do matter for input
coming from other front ends.
2000-03-11 05:14:06 +00:00
Tom Lane a71daab4b4 Change PQconndefaults() to return a malloc'd array, instead of a static
array.  This allows processing of conninfo strings to be made thread-safe,
at the cost of a small memory leak in applications that use
PQconndefaults() and are not updated to free the returned array via
the new PQconninfoFree() function.  But PQconndefaults() is probably not
used very much, so this seems like a good compromise.
2000-03-11 03:08:37 +00:00
Tom Lane 773e84f52a Update perl5's self-test for changed spelling of connection failure
error message.
2000-03-11 02:57:24 +00:00
Michael Meskes 37ae1c0467 *** empty log message *** 2000-03-10 06:48:46 +00:00
Bruce Momjian 2a55934926 Remove SHOW after datestyle reset. 2000-03-09 17:39:34 +00:00
Bruce Momjian de62329acd Fix for bsdi 4.1 shared libraries. 2000-03-09 17:07:32 +00:00
Michael Meskes 8e7764d9c2 *** empty log message *** 2000-03-09 09:17:16 +00:00
Tom Lane dad5bb01ba Redo permissions-checking code so that it does the right thing at APPEND
nodes.  The former version failed to check permissions of relations that
were referenced in second and later clauses of UNIONs, and it did not
check permissions of tables referenced via inheritance.
2000-03-09 05:15:33 +00:00
Hiroshi Inoue fd9ff86bd9 Trial implementation of ALTER DROP COLUMN.
They are #ifdef'd.
Add -D_DROP_COLUMN_HACK__ compile option
to evaluate it.
2000-03-09 05:00:26 +00:00
Tom Lane 6513946cbb Extend #ifdef CLOBBER_FREED_MEMORY debugging option so that memory
freed wholesale by AllocSetReset() is overwritten too.
2000-03-08 23:42:58 +00:00
Tom Lane 84a89e24ee Repair access-to-already-freed-memory error recently introduced into
VACUUM.
2000-03-08 23:41:00 +00:00
Tom Lane d261adf6db Fix ==-instead-of-= typo that gcc does its level best to point out.
Isn't anybody paying attention to warnings around here?
2000-03-08 22:03:12 +00:00
Tom Lane baeafa91f3 Clean up gmake warning caused by recent NetBSD patch. <grumble> 2000-03-08 22:00:19 +00:00
Bruce Momjian 791bc6838d Hi,
The regression test script runcheck.sh doesn't seem able to
handle the blank line on the end of the resultmap file.

Here's a patch to remove it!!

Keith.
2000-03-08 19:36:19 +00:00
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@stat.cmu.edu>
2000-03-08 01:58:46 +00:00
Bruce Momjian 26c953e373 Bruce and all:
Here's a patch to fix the " '.' not allowed in db path" problem I ran into.
I removed '.' from the set of illegial characters, but added backtick. I also
included an explicit test for attempting include a reference to a parent dir.

How that?

Ross
2000-03-08 01:46:47 +00:00
Bruce Momjian ab7fd11846 Reversed out inet patch. 2000-03-08 01:44:37 +00:00
Bruce Momjian 326e2155d9 Hi Peter,
I try change prompt in the psql, but it is set '.' (as '%m') for
non-TCP/IP
connection. This small patch try use uname() information for non-TCP/IP
instead '.'.

                                        Karel
2000-03-08 01:38:59 +00:00
Bruce Momjian eae5184d11 Hi,
the to_char() source code is large, here are regression tests for
numeric/timestamp/int8 part. It is probably enough test for formatting
code in the formatting.c module. The others (float4/float8/int4) types
share this formatting code and eventual bugs for these types aren't
few probable.

 Patch fix timestamp_to_char() for infinity/invalid timestamp too.


                                                Karel
2000-03-08 01:34:41 +00:00
Bruce Momjian 0c5422912e Protects you from coredumps if you do eg. str::int4 where str is a text
field. cf. Tom Lane's <19021.950544016@sss.pgh.pa.us> 14 Feb hackers
message.

Cheers,

Patrick Welche
2000-03-07 23:58:38 +00:00
Bruce Momjian 8fa8f80c1a I've recently written to pgsql-ports about a problem with PG7.0 on NT
(Subj: [PORTS] initdb problem on NT with 7.0).  Since nobody helped me,
I had to find out the reson.  The difference between NT and Linux (for
instance) is that "open( path, O_RDWR );" opens a file in text mode.  So
sometime less block can be read than required.

I suggest a following patch.  BTW the situation appeared before, see
hba.c, pqcomm.c and others.


Alexei Zakharov
2000-03-07 23:49:31 +00:00
Tom Lane 9606f36210 Someone (probably me) forgot about handling of typecasts applied to
parameters.
2000-03-07 23:30:53 +00:00
Bruce Momjian 91124a2f66 Fix problems with pg_upgrade found by Kardos, Dr. Andrea 2000-03-07 23:09:34 +00:00
Bruce Momjian 52d39d519a Sorting for the inet data type randomly returns the wrong result
when you have networks with the same prefix, but different netmasks.

This is due to the fact that occassionally there is random
(uninitialized?)
data in the extra bits past the point where the netmask cares about
them.

ie (real data from a real live database):

  10.0/10 == 00001010.00100000.00100000.00011000
  10.0/11 == 00001010.00000000.00000000.00000000
                        ^ Bad data, normally never seen

The v4bitncmp() function was only taking one bit length argument so
it would determine that the networks were different, even though
they really aren't (and the netmask test wouldn't be used).  This
ONLY happens if the tuple with the longer bit length is used as the
ip_bits() for the v4bitncmp call AND there happens to be junk data
in place in the shorter tuple.  Odd and random, but I saw it happen
a couple times so...


Ryan Mooney
2000-03-07 23:01:43 +00:00
Michael Meskes 5a197810c0 *** empty log message *** 2000-03-07 15:11:03 +00:00
Tatsuo Ishii ad3db67e53 Add SQL_ASCII encoding test case 2000-03-06 01:29:54 +00:00
Peter Eisentraut 3526017a59 Forgot to run autoconf.
(Configure shouldn't really be in CVS ...)
2000-03-05 14:14:15 +00:00
Peter Eisentraut 8de482a847 Added configure test for readline's filename_completion_function
Completed psql's \? help
2000-03-05 13:30:20 +00:00
Michael Meskes 3c71ed7e72 *** empty log message *** 2000-03-03 14:39:26 +00:00
Michael Meskes 1c7fad57d6 *** empty log message *** 2000-03-03 13:24:06 +00:00
Michael Meskes 3a81a1a462 *** empty log message *** 2000-03-03 09:56:03 +00:00
Michael Meskes 85b2875a3a *** empty log message *** 2000-03-02 19:33:59 +00:00
Michael Meskes 9309eac111 *** empty log message *** 2000-03-02 12:13:32 +00:00
Tom Lane 0eb5ab8250 Apply a MATERIAL node to the result of an uncorrelated subplan, if it
looks like it will save computation to do so.
2000-03-02 04:08:16 +00:00
Tom Lane 9f198423df Hmm, it seems nodeMaterial has been broken for a good long while;
closing a relcache entry more times than you open it is not cool.
2000-03-02 04:06:39 +00:00
Bruce Momjian bd2d0983d4 Patch for Irix from Mark Dalphin. 2000-03-02 02:01:01 +00:00
Peter Eisentraut c75adac757 More fixes for psql ^C handling, especially during copy. Still doesn't
cope so well with copy to but that will have to wait for the next release.

Also added -X option to prevent reading .psqlrc startup file.
2000-03-01 21:10:05 +00:00
Bruce Momjian 19c29f9236 New plperl Makefile. 2000-03-01 19:13:08 +00:00
Bruce Momjian 8daa31a21e Add QNX fixes from Kardos, Dr. Andreas 2000-03-01 19:11:12 +00:00
Tom Lane 1bd6f76ed6 equalAttr() had its strcmp test backwards :-( 2000-03-01 18:47:43 +00:00
Tom Lane 73dd716285 Small performance improvement in comparetup_heap. 2000-03-01 17:14:09 +00:00
Michael Meskes 8cb8da38b8 *** empty log message *** 2000-03-01 12:49:43 +00:00
Hiroshi Inoue a50aaa7289 Change reindex command to work properly with gist/hash/rtree 2000-03-01 05:39:24 +00:00
Tom Lane ab3dc66426 Simplify parsing of column constraints by treating constraint attributes
as independent clauses in the grammar.  analyze.c takes care of putting
the data where it belongs and complaining about invalid combinations.
Also, make TEMP (and TEMPORARY) non-reserved words.
2000-03-01 05:18:20 +00:00
Tatsuo Ishii ea8cadbf94 Remove using puts() to print messages. Instead use TPRINTF. 2000-03-01 02:39:46 +00:00
Jan Wieck b1e4b56144 Changed execution time of ON <event> RESTRICT referential
integrity triggers to after statement allways. Ignores
deferred state now, closer to SQL3 semantics.

Jan
2000-02-29 12:28:25 +00:00
Bruce Momjian f55624a96c autoconf 2000-02-28 23:32:43 +00:00
Bruce Momjian da8b899d6c Update ecpg to use snprintf 2000-02-28 23:28:41 +00:00
Bruce Momjian cf1d2165b3 Fix comment spacing. 2000-02-28 08:51:43 +00:00
Byron Nikolaidis 81704b9070 update to 6.40.0009 and provide WIN32 defines for auto-configured items
such as BLCKSZ and MAXPGPATHLEN?
2000-02-28 03:31:36 +00:00
Bruce Momjian dcba387636 remove extra include. 2000-02-28 02:21:17 +00:00
Byron Nikolaidis a7b1a008cd missing state transition 2000-02-28 00:23:18 +00:00
Tom Lane 18baa9790e Looks like I broke SET variable = DEFAULT awhile ago. Ooops. 2000-02-27 21:10:41 +00:00
Tom Lane 84ccfdf087 Avoid a little bit of unnecessary computation in canonicalize_qual. 2000-02-27 19:45:44 +00:00
Tom Lane 52a8d71203 Add lztext to TypeCategory so that lztext OP text cases will work
correctly (the lztext value will be promoted to text automatically).
2000-02-27 18:54:43 +00:00
Tom Lane 8d0f1dd179 Jan forgot to increment catversion when adding lztext. Naughty naughty. 2000-02-27 18:06:28 +00:00
Jan Wieck 75133d9a46 Reactivated LZTEXT data type and changed rule plan- and qual-strings
into lztext.

Jan
2000-02-27 12:02:34 +00:00
Tatsuo Ishii 97e38d32b8 Update expected files due to the psql format change 2000-02-27 10:21:16 +00:00
Tatsuo Ishii 570bb30d73 Suppress unneccesary message from createdb 2000-02-27 10:20:13 +00:00
Tatsuo Ishii c9ceab967c Add SQL_ASCII test case 2000-02-27 10:15:17 +00:00
Tatsuo Ishii 544cafb4d5 Fix multibyte regress results for EUC_CN, EUC_KR and EUC_TW 2000-02-27 10:14:33 +00:00
Tatsuo Ishii f30d5f9e6c Add LinuxPPC mappings 2000-02-27 10:13:22 +00:00
Tom Lane a065827554 Clean up badly-formatted error messages from pg_connect. 2000-02-27 07:44:22 +00:00
Tom Lane 750549db34 Add Assert() to check for trying to heap_close a relation when the
relcache entry's reference count is zero.
2000-02-27 07:31:00 +00:00
Tom Lane 1e091ad601 Add 'volatile' declarations to silence gcc warnings about longjmp.
Shouldn't create any portability problems, since we have a configure
test to #define away volatile if the compiler doesn't support it.
2000-02-27 07:18:29 +00:00
Tom Lane f884130241 Minor improvements in regprocout() and oidvectortypes(). 2000-02-27 03:30:27 +00:00
Tom Lane 66fe0fc87e Fix poorly worded error messages for unary operator type resolution
failures.  Fix some outright bugs too, including a reference to
uninitialized memory that would cause failures like this one:
select -('1234567890.1234567'::text);
ERROR:  Unable to locate type oid 2139062143 in catalog
2000-02-27 02:48:15 +00:00
Tom Lane ed0e292354 Clean up dependencies for version.o.
This avoids the useless rebuild of pg_version that used to happen on
each build or install pass.
2000-02-27 01:33:43 +00:00
Tom Lane 22cab26131 Clean up dependencies for version.o. 2000-02-27 01:26:12 +00:00
Tom Lane 22a9537ff3 Clean up dependencies for version.o. 2000-02-27 01:18:46 +00:00
Tom Lane 01eea27c4c Fix a couple of inconsistent usages of include <...> vs. include "...". 2000-02-27 01:10:31 +00:00
Tom Lane aff830a760 Add date and time datatype handling to convert_to_scalar. (I was waiting
for Thomas to do the datetime consolidation before touching this, but
it's done now...)
2000-02-26 23:03:12 +00:00
Tom Lane baeef0e172 Change rule dumper to produce reasonable output for casts that assign
a specific length or precision, such as foo::char(8).  Remove erroneous
removal of user-written casts at the top level of a SELECT target item.
2000-02-26 21:13:18 +00:00
Tom Lane 7173c485c8 Fix exprTypmod to recognize length-coercion function expressions,
such as bpchar(char_expression, N), and pull out the attrtypmod that
the function is coercing to.  This allows correct deduction of the
column type in examples such as
CREATE VIEW v AS SELECT f1::char(8) FROM tbl;
Formerly we labeled v's column as char-of-unknown-length not char(8).
Also, this change causes the parser not to insert a redundant length
coercion function if the user has explicitly casted an INSERT or UPDATE
expression to the right length.
2000-02-26 21:11:10 +00:00
Tom Lane cbf4c9671e psql's \d command wasn't doing the right things with 'char' (type 18)
fields, nor with bpchar and varchar fields that have typmod -1.  The
latter effectively have an unspecified length, so I made them display
as char() and varchar() rather than falsely equating them to char(1)
and varchar(1).
2000-02-26 18:31:25 +00:00
Tom Lane 6f11af0c62 I had managed to break acceptance of "char", which worked in 6.5 to
refer to the single-byte char type.  7.0 was taking it as bpchar(1).
2000-02-26 18:13:41 +00:00
Tom Lane 664908f564 Undo a couple of mistaken applications of NameStr() to StringInfos.
It worked, because they both have fields named 'data', but it's surely
trouble waiting to happen.  I wonder whether there are more ...
2000-02-26 06:36:44 +00:00
Tom Lane 08b1040374 Shared-memory hashtables have non-extensible directories, which means
it's a good idea to choose the directory size based on the expected
number of entries.  But ShmemInitHash was using a hard-wired constant.
Boo hiss.  This accounts for recent report of postmaster failure when
asking for 64K or more buffers.
2000-02-26 05:25:55 +00:00
Michael Meskes c05abfb1a8 *** empty log message *** 2000-02-25 15:26:12 +00:00
Michael Meskes 70130905d1 *** empty log message *** 2000-02-25 11:11:15 +00:00
Tom Lane 4926709563 Fix longstanding bug that kept functional indexes from working when you
defaulted the opclass.  This addresses TODO item
* Allow creation of functional indexes to use default types
(Does that make it a feature?  Oh dear...)
2000-02-25 02:58:48 +00:00
Peter Eisentraut 73348316e7 Enabled regression driver to run without PGLIB set. 2000-02-24 23:37:30 +00:00
Bruce Momjian 46ba3f839d Suppress timespan and datetime ops from being brought in via pg_dump
from previous release.
2000-02-24 16:34:21 +00:00
Bruce Momjian 5cdfaea899 Add missing files like foreign key regression tests and config.h.win32. 2000-02-24 16:02:28 +00:00
Bruce Momjian ce9f73c162 The following is required in order to make beta1 compile on the Win32
platform (psql and libpq):

The file "config.h.win32" in the include\ directory (from my patch from
2000-01-18) is missing from the tree. It needs to be put back :-)

The following patch has to be applied in the interfaces\libpq directory.


//Magnus
2000-02-24 15:53:12 +00:00
Tom Lane 58f481c4ff Tweak libpq so that if a backend ERROR message arrives while libpq
thinks the connection is idle, the error message is displayed as if
it were a NOTICE.  This seems better than dropping the message on
the floor ... particularly if the message is the backend telling us
why it's about to close the connection.  The previous behavior was
Backend message type 0x45 arrived while idle
pqReadData() -- backend closed the channel unexpectedly.
which is not real helpful.
2000-02-24 04:50:51 +00:00
Hiroshi Inoue f017d7eeee Check pending cancel request before waiting for lock 2000-02-24 04:36:01 +00:00
Hiroshi Inoue a5e944580f Add the check CommonSpecialPortal in use(my fault) 2000-02-24 04:34:38 +00:00
Tom Lane 9110b33f46 Add numeric <-> int8 and numeric <-> int2 conversion functions, as well
as a unary minus operator for numeric.  Now that long numeric constants
will get converted to NUMERIC in early parsing, it's essential to have
numeric->int8 conversion to avoid 'can't convert' errors on undecorated
int8 constants.  Threw in the rest for completeness while I was in the
area.
I did not force an initdb for this, since the system will still run
without the new pg_proc/pg_operator entries.  Possibly I should've.
2000-02-24 02:05:30 +00:00
Tom Lane 512669db9e Make make_const() check the size and precision of a T_Float Value,
and produce either FLOAT8 or NUMERIC output depending on whether the
value fits in a float8 or not.  This is almost back to the way the
code was before I changed T_Float, but there is a critical difference:
now, when a numeric constant doesn't fit in float8, it will be treated
as type NUMERIC instead of type UNKNOWN.
2000-02-24 01:59:17 +00:00
Tom Lane 399a570fe2 int8in failed to detect overflow; it really should. 2000-02-24 01:54:40 +00:00
Bruce Momjian f40c50627f Fix plpsql for bsdi. 2000-02-23 22:24:46 +00:00
Michael Meskes 9f74608f47 *** empty log message *** 2000-02-23 19:26:05 +00:00
Bruce Momjian c969e2662f 1. miscadmin.h needs to include sys/types.h for a definition of pid_t
2. Regression tests fail for types int2 and int4 (which can easily be
fixed by adding entries to resultmap) aswell as float8 and geometry,
where floating point numbers appear to be rounded a little differently
than in your expected results (besides that I also need the positive
zeros file). I'm including a patch for the first 2, but I don't know
whether the latter two are actually a bug in postgres or a bug in the
OS or even allowed difference. I'm including my results for reference.

Rolf Grossmann
2000-02-23 15:46:15 +00:00
Bruce Momjian 020be62dea Well, here's the first pass on regression
tests for the Foreign Key support in 7.0 which
was made against a CVS copy from this
afternoon.

This modifies
 src/test/regress/sql/run_check.tests
 src/test/regress/sql/alter_table.sql
 src/test/regress/expected/alter_table.out
 src/test/regress/sql/foreign_key.sql
 src/test/regress/expected/foreign_key.out

sszabo@bigpanda.co
2000-02-22 20:58:31 +00:00
Michael Meskes 991b9740ac *** empty log message *** 2000-02-22 19:57:12 +00:00
Hiroshi Inoue 5525297465 Change cancel while waiting-for-lock stuff. 2000-02-22 09:55:26 +00:00
Tom Lane e391c15ca5 First post-beta1 bug fix :-(. Silly typo in new coding for doNegate
failed to negate a negative value back to positive, so '- - 123.45'
did the wrong thing.
2000-02-22 00:05:04 +00:00
Tom Lane e1a95def8b Quick hack solution so that pg_dump of views works. Needs repair after
Thomas gets back, but better this than nonfunctional pg_dump in the beta.
2000-02-21 20:18:11 +00:00
Peter Eisentraut c8009959c9 Fixed psql's Control-C handling when COPY in progress 2000-02-21 19:40:42 +00:00
Tom Lane fc8e6c7746 Oops, commited a test version of this file by accident. Revert. 2000-02-21 18:49:54 +00:00
Tom Lane 393f313227 Change parse-time representation of float literals (which include oversize
integers) to be strings instead of 'double'.  We convert from string form
to internal representation only after type resolution has determined the
correct type for the constant.  This eliminates loss-of-precision worries
and gets rid of the change in behavior seen at 17 digits with the
previous kluge.
2000-02-21 18:47:12 +00:00
Tom Lane ee97d103cc To avoid confusion during early beta testing, commit the current rules
test output as expected output.  We'll probably want to change this again
after something's done about the verbosity of column alias display.
2000-02-21 18:42:35 +00:00
Tom Lane b04b55a9af Clean up temp file in 'make clean'. 2000-02-21 16:46:39 +00:00
Jan Wieck da9501bddb Avoid race conditions in detection of EINPROGRESS during connect().
Jan
2000-02-21 12:26:19 +00:00
Hiroshi Inoue 4b4dbf8cba Fix "Invalid XID in t_cmin" error in vacuum. 2000-02-21 07:49:40 +00:00
Tom Lane d8cedf67ad Clean up some really grotty coding in catcache.c, improve hashing
performance in catcache lookups.
2000-02-21 03:36:59 +00:00
Hiroshi Inoue a60c9e33e9 fix the TODO
* Allow PQrequestCancel() to terminate when in waiting-for-lock state
Changes are limited to BACKEND,however.
2000-02-21 02:42:37 +00:00
Tatsuo Ishii 320d3e06ee Fixes for \encoding command.
1) freeing null pointer
	2) invalid encoding info may be stored into psql variable
	3) fix indentation
2000-02-21 02:05:12 +00:00
Tom Lane be05edd812 Tweak planner to use OFFSET+LIMIT, not just LIMIT, as estimate of the
portion of the query result that will be retrieved.  As far as I could
tell, the consensus was that we should let the planner do the best it
can with a LIMIT query, and require the user to add ORDER BY if he
wants consistent results from different LIMIT values.
2000-02-21 01:13:04 +00:00
Tom Lane 07c495f5d8 Further cleanups for type coercion: treat the locution typename(argument)
as representing a type coercion request in more cases than we did before.
It will work now whenever no underlying function is required, ie if the
coercion is binary-compatible or if the argument is a previously untyped
string constant.  Otherwise, you still need a real function to exist.
2000-02-20 23:04:06 +00:00
Tom Lane 57b30e8e22 Create a new expression node type RelabelType, which exists solely to
represent the result of a binary-compatible type coercion.  At runtime
it just evaluates its argument --- but during type resolution, exprType
will pick up the output type of the RelabelType node instead of the type
of the argument.  This solves some longstanding problems with dropped
type coercions, an example being 'select now()::abstime::int4' which
used to produce date-formatted output, not an integer, because the
coercion to int4 was dropped on the floor.
2000-02-20 21:32:16 +00:00
Peter Eisentraut 718bb2cc9c Moved psql \eset and \eshow to \encoding
Improved psql's Ctrl-C handling
Fixed configure test for sigsetjmp that now even recognizes it if it's a macro
2000-02-20 14:28:28 +00:00
Tom Lane 5253c518ae Fix broken list-slinging logic in func_select_candidate and
agg_select_candidate, which could cause them to keep more candidates
than they should and thus fail to select a single match.  I had
previously fixed the identical bug in oper_select_candidate, but
didn't realize that the same error was repeated over here.
Also, repair func_select_candidate's curious notion that it could
scribble on the input type-OID vector.  That was causing failure to
apply necessary type coercion later on, leading to malfunction of
examples such as select date('now').
2000-02-20 06:35:08 +00:00
Tom Lane f4d108a257 Even after the great date/time consolidation, TypeCategory() was still
a few bricks shy of a load concerning knowing all the date/time types.
This is real bad because it interferes with func_select_candidate()'s
willingness to disambiguate functions --- func_select_candidate() will
punt unless all the available choices have the same type category.
I think this whole mechanism needs redesigned, but in the meantime
this is a needed patch.
2000-02-20 06:28:42 +00:00
Tom Lane 4467194b44 Reduce proc_exit(1) to proc_exit(0) for errors detected in backend
command line processing.  As it stood, a bogus PGOPTIONS value from
a client would force a database system restart.  Not bad as a denial-
of-service attack...
2000-02-20 04:26:35 +00:00
Tom Lane e79b2dd5e7 Fix missing \n in some psql_error calls. 2000-02-20 02:37:40 +00:00
Tom Lane bf023bd162 Add a simple regress test for SERIAL --- it's not much,
but it's better than no test at all...
2000-02-20 02:16:02 +00:00
Tom Lane 37a71f90b2 Fix SERIAL columns, which Thomas inadvertently broke parsing of.
Revised code probably accepts some silly combinations, but that's better
than not accepting valid ones.
2000-02-20 02:14:58 +00:00
Tom Lane 751a14e60c Repair longstanding violation of SQL92 semantics: GROUP BY would
interpret a column name as an output column alias (targetlist AS name),
ather than a real column name as it ought to.  According to the spec,
only ORDER BY should look at output column names.  I left in GROUP BY's
willingness to use an output column number ('GROUP BY 2'), even though
this is also contrary to the spec --- again, only ORDER BY is supposed
to accept that.  But there is no possible reason to want to GROUP BY
an integer constant, so keeping this old behavior won't break any
SQL-compliant queries.  DISTINCT ON will behave the same as GROUP BY.

Change numerology regress test, which depended on the incorrect
behavior.
2000-02-19 23:45:07 +00:00
Tom Lane b48f983ec3 Apply Keith Park's updates for expected/horology-solaris-1947.out. Fix
erroneous expected output for RESET DateStyle: should be ISO now.
Fix run_check.sh so that test postmaster is started with PGDATESTYLE=ISO,
else the horology test won't pass.
2000-02-19 22:13:37 +00:00
Tom Lane f46571165d Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.
variable, instead calling same code in variable.c that is used to parse
SET DATESTYLE.  Fix bug: although backend's startup datestyle had been
changed to ISO, 'RESET DATESTYLE' and 'SET DATESTYLE TO DEFAULT' didn't
know about it.  For consistency I have made the latter two reset to the
PGDATESTYLE-defined initial value, which may not be the same as the
compiled-in default of ISO.
2000-02-19 22:10:47 +00:00
Tom Lane bd43ae0ecd Accept the noise-word ALL in aggregate function invocations for SQL92
compliance.  Wish they were all that easy...
2000-02-19 19:37:21 +00:00
Tom Lane 63746a90c1 plperl's makefile tried to use perl's choice of compiler with
postgres's choice of compiler options.  Tres uncool.
2000-02-19 19:02:20 +00:00
Tom Lane fac4f9a698 HP's compiler objects (quite rightly too) to 'static void foo();'
followed by 'extern void foo() { ... }'.
2000-02-19 18:58:37 +00:00
Thomas G. Lockhart dfdff4e0f1 First workaround solution for Jan's column constraint attributes. 2000-02-19 08:25:49 +00:00
Tatsuo Ishii 4fec86f1f6 Fix nasty bug in setting client_encoding 2000-02-19 05:04:54 +00:00
Tatsuo Ishii eb089e7f76 Add new backslash command \eset and \eshow. 2000-02-19 05:01:16 +00:00
Tatsuo Ishii c239c11a63 Fix compiler warning 2000-02-19 04:59:30 +00:00
Tom Lane 3cfdd8fdf2 Clean up scan.l's handling of \r vs \n --- they are reliably treated as
equivalent now, which should make Windows and Mac clients happier.
Also fix failure to handle SQL comments between segments of a multiline
quoted literal.
2000-02-19 04:17:25 +00:00
Tom Lane 905404a246 Remove gcc warnings. The Postgres world isn't really safe
for 'const' qualifiers yet ...
2000-02-19 02:29:07 +00:00
Tom Lane 3cbcb78a3d Plug some more memory leaks in the planner. It still leaks like a sieve,
but this is as good as it'll get for this release...
2000-02-18 23:47:31 +00:00
Michael Meskes bc8a39beef *** empty log message *** 2000-02-18 16:02:49 +00:00
Michael Meskes ab0c8c691e *** empty log message *** 2000-02-18 14:34:12 +00:00
Hiroshi Inoue e3a97b370c Implement reindex command 2000-02-18 09:30:20 +00:00
Michael Meskes e3befe4a66 *** empty log message *** 2000-02-18 08:49:07 +00:00
Tom Lane 8cb624262a Replace inefficient _bt_invokestrat calls with direct calls to the
appropriate btree three-way comparison routine.  Not clear why the
three-way comparison routines were being used in some paths and not
others in btree --- incomplete changes by someone long ago, maybe?
Anyway, this makes for a nice speedup in CREATE INDEX.
2000-02-18 06:32:39 +00:00
Peter Eisentraut 49353692d1 Fixed handling of old --with-mb option using newly gained wisdom from
autoconf mailing list. ;)
2000-02-18 00:21:38 +00:00
Michael Meskes b3b35e98b6 *** empty log message *** 2000-02-17 19:48:58 +00:00
Hiroshi Inoue 3ca3bb7d8b Fix assert bug(was my fault) 2000-02-17 05:00:38 +00:00
Tom Lane 598ea2c359 Finish repairing 6.5's problems with r-tree indexes: create appropriate
selectivity functions and make the r-tree operators use them.  The
estimation functions themselves are just stubs, unfortunately, but
perhaps someday someone will make them compute realistic estimates.
Change pg_am so that the optimizer can reliably tell the difference
between ordered and unordered indexes --- before it would think that
an r-tree index can be scanned in '<<' order, which is not right AFAIK.
Repair broken negator links for network_sup and related ops.
Initdb forced.  This might be my last initdb force for 7.0 ... hope so
anyway ...
2000-02-17 03:40:02 +00:00
Tom Lane cf880a6160 Update expected/horology-no-DST-before-1970.out to match
new datetime regress test.  Someone needs to deal with fixing
expected/horology-solaris-1947.out too, assuming we still need it.
2000-02-17 02:20:59 +00:00
Bruce Momjian 0d9a0ed6d1 Package: postgresql
Version: 6.5.3-11
Severity: important

'char' is not a signed type by default on powerpc; therefore a character
can
never be equal to EOF (-1).  A patch is attached.

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
2000-02-16 23:07:31 +00:00
Bruce Momjian a52692213c README not needed anymore. 2000-02-16 21:26:00 +00:00
Thomas G. Lockhart bf566b202e All regression tests pass except for rules.sql (unrelated).
Implement "date/time grand unification".
 Transform datetime and timespan into timestamp and interval.
 Deprecate datetime and timespan, though translate to new types in gram.y.
 Transform all datetime and timespan catalog entries into new types.
 Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
 Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
  routines for all date/time types.
 date.{h,c} now deals with date, time types.
 timestamp.{h,c} now deals with timestamp, interval types.
 nabstime.{h,c} now deals with abstime, reltime, tinterval types.
Make NUMERIC a known native type for purposes of type coersion. Not tested.
2000-02-16 18:17:02 +00:00
Thomas G. Lockhart 8997675c4b All regression tests pass except for rules.sql (unrelated).
Implement "date/time grand unification".
 Transform datetime and timespan into timestamp and interval.
 Deprecate datetime and timespan, though translate to new types in gram.y.
 Transform all datetime and timespan catalog entries into new types.
 Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
 Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
  routines for all date/time types.
 date.{h,c} now deals with date, time types.
 timestamp.{h,c} now deals with timestamp, interval types.
 nabstime.{h,c} now deals with abstime, reltime, tinterval types.
Make NUMERIC a known native type for purposes of type coersion. Not tested.
2000-02-16 17:27:27 +00:00
Thomas G. Lockhart 41f1f5b76a Implement "date/time grand unification".
Transform datetime and timespan into timestamp and interval.
 Deprecate datetime and timespan, though translate to new types in gram.y.
 Transform all datetime and timespan catalog entries into new types.
 Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
 Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
  routines for all date/time types.
 date.{h,c} now deals with date, time types.
 timestamp.{h,c} now deals with timestamp, interval types.
 nabstime.{h,c} now deals with abstime, reltime, tinterval types.
Make NUMERIC a known native type for purposes of type coersion. Not tested.
2000-02-16 17:26:26 +00:00
Thomas G. Lockhart c97672b083 Make ISO date style (e.g. "2000-02-16 09:33") the default.
Implement "date/time grand unification".
 Transform datetime and timespan into timestamp and interval.
 Deprecate datetime and timespan, though translate to new types in gram.y.
 Transform all datetime and timespan catalog entries into new types.
 Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
 Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
  routines for all date/time types.
 date.{h,c} now deals with date, time types.
 timestamp.{h,c} now deals with timestamp, interval types.
 nabstime.{h,c} now deals with abstime, reltime, tinterval types.
Make NUMERIC a known native type for purposes of type coersion. Not tested.
2000-02-16 17:25:49 +00:00
Michael Meskes 35ba9de276 *** empty log message *** 2000-02-16 16:18:29 +00:00
Bruce Momjian 988d53e5ea include cleanup 2000-02-16 13:22:00 +00:00
Bruce Momjian 78693c89d7 Clean up include files use in psql. 2000-02-16 13:15:26 +00:00
Michael Meskes 5933f1857f *** empty log message *** 2000-02-16 11:52:25 +00:00
Tom Lane 68be513f8b If we don't have any stats for a boolean column, assume
the disbursion is 0.5, not something small.
2000-02-16 01:00:23 +00:00
Tom Lane deee4e1612 Make eqsel produce better results for boolean columns,
and make scalarltsel a little more forgiving at the boundaries of the
known range of a column value.
2000-02-16 00:59:27 +00:00
Tom Lane 47dde30222 Remove long-dead code. 2000-02-15 23:12:26 +00:00
Tom Lane 90e160beff Fix missing lfirst() in ListTableAsAttrs(). This code
doesn't seem to be used at the moment, but as long as I'm looking at it...
2000-02-15 23:09:08 +00:00
Tom Lane b1577a7c78 New cost model for planning, incorporating a penalty for random page
accesses versus sequential accesses, a (very crude) estimate of the
effects of caching on random page accesses, and cost to evaluate WHERE-
clause expressions.  Export critical parameters for this model as SET
variables.  Also, create SET variables for the planner's enable flags
(enable_seqscan, enable_indexscan, etc) so that these can be controlled
more conveniently than via PGOPTIONS.

Planner now estimates both startup cost (cost before retrieving
first tuple) and total cost of each path, so it can optimize queries
with LIMIT on a reasonable basis by interpolating between these costs.
Same facility is a win for EXISTS(...) subqueries and some other cases.

Redesign pathkey representation to achieve a major speedup in planning
(I saw as much as 5X on a 10-way join); also minor changes in planner
to reduce memory consumption by recycling discarded Path nodes and
not constructing unnecessary lists.

Minor cleanups to display more-plausible costs in some cases in
EXPLAIN output.

Initdb forced by change in interface to index cost estimation
functions.
2000-02-15 20:49:31 +00:00
Tom Lane 553b5da6a1 Change to report COPY line number in error messages affects
results of constraints regress test.
2000-02-15 19:45:31 +00:00
Michael Meskes 30f16e72a4 *** empty log message *** 2000-02-15 19:23:20 +00:00
Tom Lane 6124c674ce Silence gcc warning about uninitialized var. 2000-02-15 18:17:33 +00:00
Tom Lane 16620abe12 Removed unused var to silence gcc warning. 2000-02-15 18:15:12 +00:00
Michael Meskes 72786e04fd *** empty log message *** 2000-02-15 12:15:57 +00:00
Tom Lane 4c2071c8bf Repair bogus rule display of attr lists. 2000-02-15 08:24:12 +00:00
Tom Lane 1204c3e964 Remove some // comments, which are not ANSI C last I heard. 2000-02-15 07:47:37 +00:00
Thomas G. Lockhart a344a6e7b5 Carry column aliases from the parser frontend. Enables queries like
SELECT a FROM t1 tx (a);
Allow join syntax, including queries like
  SELECT * FROM t1 NATURAL JOIN t2;
Update RTE structure to hold column aliases in an Attr structure.
2000-02-15 03:38:29 +00:00
Thomas G. Lockhart 92c8437d8d Update "join syntax" test for new capabilities. 2000-02-15 03:31:33 +00:00
Thomas G. Lockhart ebd697a388 Add line to mention PST8PDT time zone. Seems useful, but maybe not? 2000-02-15 03:30:57 +00:00
Thomas G. Lockhart e0c192e4d7 Fix up error message to start with cap letter. 2000-02-15 03:30:06 +00:00
Thomas G. Lockhart a1e6a09a89 Fix up tabbing for _int8 entry. 2000-02-15 03:28:31 +00:00
Thomas G. Lockhart 5c4b2b23af Add "DEC" as synonym for "DECIMAL".
Add "SESSION_USER" as SQL92 keyword; equivalent to CURRENT_USER for now.
Implement column aliases (aka correlation names) and more join syntax.
Fix up indenting and tabbing.
2000-02-15 03:26:38 +00:00
Thomas G. Lockhart 929e50ece8 Recognize special case of POSIX time zone: "GMT+8" and "GMT-8".
Still needs to be done for the general case:
 "tz+/-#" where tz is a 3 char string.
This will probably involve moving code around to other places.
2000-02-15 03:17:09 +00:00
Thomas G. Lockhart 7c07006ad4 Fix up error and log messages. 2000-02-15 03:00:37 +00:00
Bruce Momjian f4ca323d21 I suspect that you are not the person to send this to, but I wasn't sure
where else to mail it. I am the maintainer of unixODBC, and we have a
set of code in our project that started life as the Postgres windows
ODBC driver, which has been ported back to unix. Anyway I have just
fixed a memory leak in the driver, and I cant see any mention of the fix
being done in the main Postgres code, so I thougth I would let you know.

Its in the statement.c module, after the COMMIT statement has been
executed in SC_Execute, the code was

Nick Gorham
2000-02-14 12:33:19 +00:00
Michael Meskes 08b999f1bd *** empty log message *** 2000-02-14 10:00:06 +00:00
Peter Eisentraut 9672d38f91 Adjusted psql echoing options (-a and -e) 2000-02-13 21:45:15 +00:00
Bruce Momjian a2226ad237 contrib-array.patch
this is an old patch which I have already submitted and never seen
        in the sources. It corrects the datatype oids used in some iterator
        functions. This bug has been reported to me by many other people.

contrib-datetime.patch

        some code contributed by Reiner Dassing <dassing@wettzell.ifag.de>

contrib-makefiles.patch

        fixes all my contrib makefiles which don't work with some compilers,
        as reported to me by another user.

contrib-miscutil.patch

        an old patch for one of my old contribs.

contrib-string.patch

        a small change to the c-like text output functions. Now the '{'
        is escaped only at the beginning of the string to distinguish it
        from arrays, and the '}' is no more escaped.

elog-lineno.patch

        adds the current lineno of CopyFrom to elog messages. This is very
        useful when you load a 1 million tuples table from an external file
        and there is a bad value somehere. Currently you get an error message
        but you can't know where is the bad data. The patch uses a variable
        which was declared static in copy.c. The variable is now exported
        and initialized to 0. It is always cleared at the end of the copy
        or at the first elog message or when the copy is canceled.
        I know this is very ugly but I can't find any better way of knowing
        where the copy fails and I have this problem quite often.

plperl-makefile.patch

        fixes a typo in a makefile, but the error must be elsewhere because
        it is a file generated automatically. Please have a look.

tprintf-timestamp.patch

        restores the original 2-digit year format, assuming that the two
        century digits don't carry much information and that '000202' is
        easier to read than 20000202. Being only a log file it shouldn't
        break anything.

Please apply the patches before the next scheduled code freeze.

I also noticed that some of the contribs don't compile correcly. Should we
ask people to fix their code or rename their makefiles so that they are
ignored by the top makefile?

--
Massimo Dal Zotto
2000-02-13 18:59:53 +00:00
Bruce Momjian 77d31cf3c1 2. trigger.c fails to compile due to a syntax error. It contains
a switch statement that has an empty default label.  A label of a
    switch statement must be followed by a statement (or a label which
    is followed by a statement (or a label which ...)).

3.  Files include stringinfo.h failed to compile.  The macro,
    'appendStringInfoCharMacro' is implemented with a '?:' operation
    that returns a void expression for the true part and a char expresion
    for the false part.  Both the true and false parts of the '?:' oper-
    ator must return the same type.

Billy G. Allie
2000-02-13 13:21:11 +00:00
Peter Eisentraut 2fb0ff0c5b Default argument for createdb
Changed EXIT_ON_ERROR to ON_ERROR_STOP in psql
2000-02-10 20:08:58 +00:00
Bruce Momjian 7528fd2d52 Add btree indexing of boolean values
Don Baccus
2000-02-10 19:51:52 +00:00
Bruce Momjian ede72c2826 Improve default compile ops. 2000-02-10 19:11:17 +00:00
Bruce Momjian 25fdc6bac6 Add no CVS to make_mkid. 2000-02-10 18:41:35 +00:00
Bruce Momjian ecef31ca61 Prevent tags files in cvs directory. 2000-02-10 18:34:26 +00:00
Bruce Momjian 566c05c31a Here is the patch to add plperl to droplang.
Mark Hollomon
2000-02-09 20:23:26 +00:00
Bruce Momjian ecd8537376 I checked the WinNT port yesterday (a few days old snapshot from CVS) and I
am including a patch to get it compile.

changes to psql:
- added less as default pager when compiling on Cygwin
- need to declare "filename_completion_function" because it is not exported
from readline -> added to include/port/win.h

changes to pg_id:
- include of <getopt.h>
- add .exe when installing

I think there is a problem with calling the regress tests on WinNT - it
should be called with PORTNAME not HOST as the parameter to regress.sh or
the check  when to add "-h localhost" to psql has to be changed. Now it is
checked against the PORTNAME.

The results of the regress tests were OK with expected failures ;-)

Daniel Horak
2000-02-09 16:23:44 +00:00
Hiroshi Inoue 3dec14197b Enable backward sequential scan even after reaching EOF. 2000-02-09 03:49:47 +00:00
Peter Eisentraut 9e34883565 Fixed broken initdb --show patch 2000-02-09 00:21:49 +00:00
Tom Lane 1960f4be14 Ooops ... 'char c' can hold a char, but it can't hold EOF ... 2000-02-09 00:10:11 +00:00
Bruce Momjian 1cc7e40c80 yesterday I had a problem with initdb. I set bad environment values
and initdb crashs (I set pglib path to PG 6.5.3 directory instead to
7.0 and initdb take this BKI old templates ... (initdb not check
BKI version and BKI files not has any version comments (TODO?))

 This patch add to the initdb --show option which show setting of all
initdb's values. It spare developers time if in setting is bug.

                                                Karel

----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-02-08 15:58:54 +00:00
Bruce Momjian 394af52795 I'm sending patch with new version of to_char numbers formatting.
The PostgreSQL's to_char() is very compatible with Oracle's to_char
 now. I hope that to_char's 3000 rows of source is without bugs, but
 will good if anyone test it, for me it works very well :-)


                                                        Karel

----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-02-08 15:57:01 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Bruce Momjian 4842ef8624 Mask removal of network_ops in 7.0. 2000-02-07 21:24:15 +00:00
Jan Wieck aef647a274 Enabled MATCH <unspecified>
Jan
2000-02-07 18:12:49 +00:00
Jan Wieck f59daf80f7 Added complete MATCH <unspecified> support contributed by Don Baccus.
Jan
2000-02-07 17:50:38 +00:00
Jan Wieck f1acd900ad Disable/reenable triggers for data only dump.
Jan
2000-02-07 16:30:58 +00:00
Tom Lane d8733ce674 Repair planning bugs caused by my misguided removal of restrictinfo link
fields in JoinPaths --- turns out that we do need that after all :-(.
Also, rearrange planner so that only one RelOptInfo is created for a
particular set of joined base relations, no matter how many different
subsets of relations it can be created from.  This saves memory and
processing time compared to the old method of making a bunch of RelOptInfos
and then removing the duplicates.  Clean up the jointree iteration logic;
not sure if it's better, but I sure find it more readable and plausible
now, particularly for the case of 'bushy plans'.
2000-02-07 04:41:04 +00:00
Tatsuo Ishii 2bda7a4406 change copyright year 1999->2000
Minor fix
2000-02-07 04:31:10 +00:00
Hiroshi Inoue 5b58de124e Allow SELECT .. FOR UPDATE in PL/pgSQL. 2000-02-07 03:39:13 +00:00
Hiroshi Inoue 7d738f9586 Remove ugly call ImmediateSharedRelationCacheInvalidate()
from md.c.
2000-02-07 02:38:18 +00:00
Jan Wieck 4acf890948 Removed special hack causing ON UPDATE NO ACTION trigger to
be suppressed.

Jan
2000-02-06 10:19:45 +00:00
Bruce Momjian a64d3bc433 Solaris has always had problems with 1947 in the
regression tests so I prepared a set of expected
files to make things look OK.

There's also a file to account for minor variations
in the geopmetry output and a resultmap patch to
pull them all together.

With these changes PostgreSQL, from CVS, builds and
regression tests (runcheck) cleanly.

Keith Parks.
2000-02-06 05:09:42 +00:00
Tom Lane 81fc1d5edb Rename same() to sameseti() to have a slightly less generic name. Move
nonoverlap_sets() and is_subset() to list.c, where they should have lived
to begin with, and rename to nonoverlap_setsi and is_subseti since they
only work on integer lists.
2000-02-06 03:27:35 +00:00
Tatsuo Ishii 418b270020 Fix a bug when specfying -D option.
fix suggested by Keith Parks.
2000-02-06 00:49:03 +00:00
Tom Lane 60be6da731 Replace nth() calls in inner loops with traversal of the list via
lnext, to eliminate O(N^2) behavior with lots of indexquals.
2000-02-05 23:19:44 +00:00
Tom Lane 78296c2797 Further cleanup for OR-of-AND WHERE-clauses. orindxpath can now handle
extracting from an AND subclause just those opclauses that are relevant
for a particular index.  For example, we can now consider using an index
on x to process WHERE (x = 1 AND y = 2) OR (x = 2 AND y = 4) OR ...
2000-02-05 18:26:09 +00:00
Tatsuo Ishii d4e62e5ded Change function name PQclientencoding to PQclientEncoding since
it seems more suitable for the naming convention in libpq.

New function PQsetClientEncoding added. It makes possible to change
the client encoding on the fly without setting PGCLIENTENCODING.
2000-02-05 12:33:22 +00:00
Tatsuo Ishii b304b4a90e Change function name PQclientencoding to PQclientEncoding since
it seems more suitable for the naming convention in libpq.
2000-02-05 12:27:56 +00:00
Jan Wieck ad15560573 Enabling automatic primary key detection for self-referencing
FOREIGN KEY constraint during CREATE TABLE. Tnx to Stephan.

Jan
2000-02-05 00:20:38 +00:00
Jan Wieck 582ec175c9 Small bugfix for DROP TABLE if table is self-referenced by
a FOREIGN KEY constraint.

Jan
2000-02-04 23:45:04 +00:00
Jan Wieck ddd596d386 Added ALTER TABLE ... ADD CONSTRAINT (provided by Stephan Szabo).
Added constraint dumping capability to pg_dump (also from Stephan)

Fixed DROP TABLE -> RelationBuildTriggers: 2 record(s) not found for rel
error.

Fixed little error in gram.y I made the last days.

Jan
2000-02-04 18:49:34 +00:00
Jan Wieck 74d53d7838 Made prototypes for yyerror() consistent with Bruce's last changes
Jan
2000-02-04 18:45:23 +00:00
Tom Lane b64826a47d Squash longstanding memory leak: when catcache.c copied a tuple into
the cache context, it didn't bother to free the tuple that
CatalogIndexFetchTuple had allocated in the transaction context.
Do enough cache lookups in the same xact, and you start to notice...
2000-02-04 03:16:03 +00:00
Tom Lane d24ef0d08f Make EXPLAIN results for Append, Group, Agg, Unique nodes more plausible.
Group and Unique use an arbitrary assumption that there will be about
10% as many groups as input tuples --- perhaps someday we can refine this.
2000-02-03 06:12:19 +00:00
Tom Lane 40055db1eb Repair relation refcount leakage caused by SELECT FOR UPDATE. 2000-02-03 00:02:58 +00:00
Jan Wieck 31a8996ba4 Inconsistency in CREATE CONSTRAINT TRIGGER with the
actions performed by analyse.c when creating table constraints.

Jan
2000-02-02 20:54:17 +00:00
Peter Eisentraut 2ea31fabe7 *** empty log message *** 2000-02-02 13:20:15 +00:00
Jan Wieck c823143f8a Fixed bug in NO ACTION trigger proc entries.
Jan
2000-01-31 14:02:27 +00:00
Tom Lane a152ebeec6 Fix problems seen in parallel regress tests when SI buffer overruns (causing
syscache and relcache flushes).  Relcache entry rebuild now preserves
original tupledesc, rewrite rules, and triggers if possible, so that pointers
to these things remain valid --- if these things change while relcache entry
has positive refcount, we elog(ERROR) to avoid later crash.  Arrange for
xact-local rels to be rebuilt when an SI inval message is seen for them,
so that they are updated by CommandCounterIncrement the same as regular rels.
(This is useful because of Hiroshi's recent changes to process our own SI
messages at CommandCounterIncrement time.)  This allows simplification of
some routines that previously hacked around the lack of an automatic update.
catcache now keeps its own copy of tupledesc for its relation, rather than
depending on the relcache's copy; this avoids needing to reinitialize catcache
during a cache flush, which saves some cycles and eliminates nasty circularity
problems that occur if a cache flush happens while trying to initialize a
catcache.
Eliminate a number of permanent memory leaks that used to happen during
catcache or relcache flush; not least of which was that catcache never
freed any cached tuples!  (Rule parsetree storage is still leaked, however;
will fix that separately.)
Nothing done yet about code that uses tuples retrieved by SearchSysCache
for longer than is safe.
2000-01-31 04:35:57 +00:00
Tom Lane ca0f1435ec Hmm, equalfuncs didn't know about SortClause or GroupClause
nodes...
2000-01-31 01:21:39 +00:00
Byron Nikolaidis 44035918bb Added numeric and int8 types.
Bug fix for LongVarBinary -- begin transaction
2000-01-30 21:14:25 +00:00
Tom Lane 3a1218dced Delete unused and long-dead header file. 2000-01-29 21:13:23 +00:00
Tom Lane 04103e00f1 Modify uses of RelationFlushRelation and RelationCacheInvalidate so that
we *always* rebuild, rather than deleting, an invalidated relcache entry
that has positive refcount.  Otherwise an SI cache overrun leads to
dangling Relation pointers all over the place!
2000-01-29 19:51:59 +00:00
Peter Eisentraut 2b84cbb60f A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
2000-01-29 16:58:54 +00:00
Bruce Momjian c5b02a7a26 Attached is a uuencoded tarball that contains
3 new files and two patches for the plperl subdir.

These changes add the ability for plperl functions
to call 'elog'. It also sets up the frame work to
allow me to add access to the SPI functions.


--
Mark Hollomon
2000-01-29 01:58:50 +00:00
Bruce Momjian 1380921e65 Patch from Hiroshi for overflow btree comparison. 2000-01-28 17:23:47 +00:00
Tom Lane 003dd965d2 Apply the heuristic proposed by Taral (see pgsql-general archives for
2-Oct-98 or TODO.detail/cnfify) to decide whether we want to reduce
WHERE clause to CNF form, DNF form, or neither.  This is a HUGE win.
The heuristic conditions could probably still use a little tweaking to
make sure we don't pick CNF when DNF would be better, or vice versa,
but the risk of exponential explosion in cnfify() is gone.  I was able
to run ten-thousand-AND-subclause queries through the planner in a
reasonable amount of time.
2000-01-28 03:22:36 +00:00
Michael Meskes b53955f38a *** empty log message *** 2000-01-27 19:01:35 +00:00
Tom Lane dd979f66be Redesign DISTINCT ON as discussed in pgsql-sql 1/25/00: syntax is now
SELECT DISTINCT ON (expr [, expr ...]) targetlist ...
and there is a check to make sure that the user didn't specify an ORDER BY
that's incompatible with the DISTINCT operation.
Reimplement nodeUnique and nodeGroup to use the proper datatype-specific
equality function for each column being compared --- they used to do
bitwise comparisons or convert the data to text strings and strcmp().
(To add insult to injury, they'd look up the conversion functions once
for each tuple...)  Parse/plan representation of DISTINCT is now a list
of SortClause nodes.
initdb forced by querytree change...
2000-01-27 18:11:50 +00:00
Bruce Momjian 3f0074e403 fix for compile. 2000-01-27 05:33:51 +00:00
Tom Lane 91250f3854 Remove duplicate extern declaration. 2000-01-26 23:48:05 +00:00
Bruce Momjian 2d5dd7557b Update files. 2000-01-26 16:10:01 +00:00
Bruce Momjian 02d83c4475 Add include for float.h. 2000-01-26 06:33:49 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Bruce Momjian b866d2e2d7 as attache of this mail is patch (to the main tree) with to_char's
family functions. Contain:

  conversion from a datetype to formatted text:

	to_char( datetime, 	text)
	to_char( timestamp,	text)
	to_char( int4,		text)
	to_char( int8,		text)
	to_char( float4,	text)
	to_char( float8,	text)
	to_char( numeric,	text)

  vice versa:

	to_date		( text, text)
	to_datetime	( text, text)
	to_timestamp	( text, text)
	to_number	( text, text)	   (convert to numeric)


  PostgreSQL to_char is very compatible with Oracle's to_char(), but not
total exactly (now). Small differentions are in number formating. It will
fix in next to_char() version.


! If will this patch aplly to the main tree, must be delete the current
  to_char version in contrib (directory "dateformat" and note in contrib's
  README), this patch not erase it (sorry Bruce).



The patch patching files:

	doc/src/sgml/func.sgml
                     ^^^^^^^^
   Hmm, I'm not sure if my English... :( Check it anyone (volunteer)?

   Thomas, it is right? SGML is not my primary lang  and compile
   the current PG docs tree is very happy job (hard variables setting in
   docs/sgml/Makefile --> HSTYLE= /home/users/t/thomas/....  :-)

   What add any definition to global configure.in and set Makefiles in docs
   tree via ./configure?

	src/backend/utils/adt/Makefile
	src/backend/utils/adt/formatting.c
	src/include/catalog/pg_proc.h
	src/include/utils/formatting.h
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-01-25 23:53:56 +00:00
Tatsuo Ishii 6f843e8dd8 Fix pg_euccn_mblen() so that it always returns 2 if data is not ascii.
(EUC_CN does have only code set 0 and 1)
2000-01-25 02:12:27 +00:00
Tom Lane a39c6ab4cb Forgot that expr assumes regexp is anchored-left; therefore need .*
in front of any platform name pattern that's not supposed to match
beginning at the start of the machine type name...
2000-01-25 01:59:27 +00:00
Peter Eisentraut 306ada82c2 Removed alter table drop column. 2000-01-24 23:40:35 +00:00
Peter Eisentraut bdb41ad0e7 Made abstime/reltime use int4 instead of time_t (TODO item)
Made type equivalency apply to aggregates (TODO item)
Fixed parsing bug in psql
Reverted some stupid options changes I made to pg_dump
2000-01-24 19:34:19 +00:00
Tom Lane 0dbffa704a First cut at making useful selectivity estimates for range queries
(ie, WHERE x > lowbound AND x < highbound).  It's not very bright yet
but it does something useful.  Also, rename intltsel/intgtsel to
scalarltsel/scalargtsel to reflect usage better.  Extend convert_to_scalar
to do something a little bit useful with string data types.  Still need
to make it do something with date/time datatypes, but I'll wait for
Thomas's datetime unification dust to settle first.  Eventually the
routine ought not have any type-specific knowledge at all; it ought to
be calling a type-dependent routine found via a pg_type column; but
that's a task for another day.
2000-01-24 07:16:52 +00:00
Bruce Momjian 8bcac56086 Update for index change. Semes it didn't work the first time. 2000-01-24 03:08:27 +00:00
Bruce Momjian da5aba105f Remove Ops parameter from STATRELID cache lookup, for Tom Lane and
optimizer.
2000-01-24 02:12:58 +00:00
Tatsuo Ishii b2ff7d08ad Change format of postmaster.opts.default.
Executable file name (postmaster) no more included in the file.
2000-01-23 08:20:24 +00:00
Tatsuo Ishii 2605ceb704 Fix error messages for the lack of multi-byte support.
Since --with-mb has been removed from configure, previous
messages were not appropriate.
2000-01-23 08:16:37 +00:00
Tatsuo Ishii cfe717714c char_length()/octet_length for char() type now returns length of
the charcter including trailing blanks.
2000-01-23 08:13:34 +00:00
Tom Lane 27fee810ff Replace SearchSysCacheGetAttribute with SysCacheGetAttr, which fetches
an attribute of a tuple previously fetched with SearchSysCacheTuple.
This avoids a lot of redundant cache lookups, particularly in selfuncs.c.
Also, remove SearchSysCacheStruct, which was unused and grotty.
2000-01-23 03:43:24 +00:00
Tom Lane 8449df8a67 First cut at unifying regular selectivity estimation with indexscan
selectivity estimation wasn't right.  This is better...
2000-01-23 02:07:00 +00:00
Peter Eisentraut 49581f9848 updated install file
updated date/time types doc
fixed small psql bug
removed libpq code that lower-cased db names
make notice when long identifier is truncated
2000-01-23 01:27:39 +00:00
Tom Lane 978d2385a8 Update regress tests for change of pg_am/pg_amop. 2000-01-22 23:51:20 +00:00
Tom Lane 71ed7eb494 Revise handling of index-type-specific indexscan cost estimation, per
pghackers discussion of 5-Jan-2000.  The amopselect and amopnpages
estimators are gone, and in their place is a per-AM amcostestimate
procedure (linked to from pg_am, not pg_amop).
2000-01-22 23:50:30 +00:00
Peter Eisentraut fa5400c0a4 added ALTER TABLE DROP COLUMN, early version 2000-01-22 14:20:56 +00:00
Tom Lane 5c33b3c658 Change a few routines into macros to improve speed of COPY IN inner loop. 2000-01-22 03:52:04 +00:00
Tom Lane d32cd1bb25 Forgot to handle column length defaults in ALTER TABLE ADD COLUMN. 2000-01-22 01:22:48 +00:00
Tom Lane 7cc0d6ae9d Fix tab-complete so it works with old versions of readline that don't
have the rl_completion_append_character variable.  The tab completion
behavior doesn't seem to be quite perfect in that situation, but it's
better than failing to build at all...
2000-01-21 23:32:36 +00:00
Tom Lane e33f550bc0 Fix handleCopyIn's response to EOF seen mid-line, that is, input file
does not end with a newline.  I don't think this explains the recent
complaints, since this bug existed in 6.5 (and probably long before).
But might as well fix it now that I see it.
2000-01-21 04:21:12 +00:00
Tom Lane de56d999cd Simplify match patterns a little. 2000-01-21 01:48:02 +00:00
Tom Lane 68ba9835cb Bruce, you forgot to rename these files... 2000-01-21 01:39:54 +00:00
Bruce Momjian 481a7439fb plperl Makefile cleanup. Doesn't work on BSDI yet. 2000-01-20 23:00:40 +00:00
Bruce Momjian 22e7c06506 Update plperl makefile. 2000-01-20 22:31:23 +00:00
Peter Eisentraut 13f8875017 Added new pg_id to fix initdb problems
New INSTALL file
Fixed a copyright notice
2000-01-20 21:51:09 +00:00
Bruce Momjian a959e3f7c0 Cleanup vacuum names. 2000-01-20 20:01:25 +00:00
Bruce Momjian e6ed9f2c75 Fix typo in \z. 2000-01-20 15:29:20 +00:00
Bruce Momjian 8792af75f6 I have noticed that the geometry test's output for hppa1 and hppa2 are in
fact the same, so I suggest they could be the same file say
geometry-positive-zeros.out, as the main difference seems to be not printing
eg. (0,-0). In src/test/regress/expected, I propose

rm int2-i386-netbsd.out int4-i386-netbsd.out
mv geometry-hppa1.1.out geometry-positive-zeros.out
rm geometry-hppa2.0.out geometry-i386-netbsd.out

and the following patch to resultmap. I have only tested the netbsd results
on i386, but think that in all probability the differences will be the same
for other ports. If it turns out not to be the case, at least we might find
out.

Patrick Welche
2000-01-20 15:21:23 +00:00
Bruce Momjian e474dd182a Bruce,
Attached is a small fix for a stupid mistake I made in comment.c
- an attempt to drop a non-existent comment would dump core :-(.
Sometimes, I'm as sharp as a marble.

Sorry,

Mike Mascari
2000-01-20 15:13:19 +00:00
Tom Lane 8cfb8c68ea Clean up longstanding warnings. I think the remaining
'defined but not used' warnings would go away if the scanner didn't use
YY_REJECT.
2000-01-20 05:44:34 +00:00
Tom Lane 3888c62d5d Clean up longstanding gcc warnings by adding missing extern
declarations.
2000-01-20 05:34:32 +00:00
Tom Lane 1c15186747 Clean up longstanding gcc warnings by adding missing extern
declarations.
2000-01-20 05:26:54 +00:00
Tom Lane b6fdd14765 ecpg shouldn't depend on parser/gramparse.h. Also, eliminate some
compiler warnings caused by lack of extern declarations in extern.h.
I believe the remaining gcc warnings here would go away if the ecpg
grammar could be tweaked so it doesn't use REJECT ...
2000-01-20 05:23:26 +00:00
Bruce Momjian c02f1ead48 Well, I finally solved the linking problem
that kept me from making perl secure.

Attached is uuencoded tarball to add PL/perl
to postgresql.

Things I know don't work.
-- triggers
-- SPI


The README file has a _VERY_ short tutorial.

Mark Hollomon
2000-01-20 05:08:58 +00:00
Tom Lane d242b64ba2 Tweak includes to avoid compiler warning on HPUX. 2000-01-20 04:11:52 +00:00
Tom Lane 7476e3718b Assign a typmod of -1 to unadorned CHAR and NUMERIC type specs. This
allows casts without specific length requirements to continue to work
as they did before; that is, x::char will not truncate the value of x,
whereas x::char(1) will.  Likewise for NUMERIC precision/scale.
The column length defaults of char(1) and numeric(30,6) are now inserted
in analyze.c's processing of CREATE TABLE.
2000-01-20 02:24:50 +00:00
Tom Lane 08195a43f3 Fix bugs in NUMERIC ceil() and floor() functions. ceil(0) returned 1,
and both would insert random junk digits if given an input that was an
exact multiple of 10.
2000-01-20 02:21:44 +00:00
Tom Lane 6d1efd76fb Fix handling of NULL constraint conditions: per SQL92 spec, a NULL result
from a constraint condition does not violate the constraint (cf. discussion
on pghackers 12/9/99).  Implemented by adding a parameter to ExecQual,
specifying whether to return TRUE or FALSE when the qual result is
really NULL in three-valued boolean logic.  Currently, ExecRelCheck is
the only caller that asks for TRUE, but if we find any other places that
have the wrong response to NULL, it'll be easy to fix them.
2000-01-19 23:55:03 +00:00
Bruce Momjian 08fb7375e3 Update vacuum comments. 2000-01-19 22:23:00 +00:00
Bruce Momjian 2317e714c8 Update pg_dumpall. 2000-01-19 20:10:27 +00:00
Peter Eisentraut 65e0051843 another round of user interface cleanups
removed pg_id
fixed a few bugs in the scripts
2000-01-19 20:08:36 +00:00
Bruce Momjian ea1f6e00e6 autoconf 2000-01-19 17:27:04 +00:00
Bruce Momjian 0679a2c30e Fix >& csh-ism 2000-01-19 17:18:12 +00:00
Bruce Momjian 560e196bdd The latest source does not compile on Solaris 7 due to
a missing include from a modified file.

Here is a patch to fix it:-

Keith Parks.
2000-01-19 14:01:25 +00:00
Peter Eisentraut 533d516629 Removed MBFLAGS from makefiles since it's now done in include/config.h. 2000-01-19 02:59:03 +00:00
Tatsuo Ishii d4aab2c000 Revert back Makefile.global
Add check for --with-mb. It is now obsoleted.
2000-01-19 01:42:12 +00:00
Tatsuo Ishii 8ff9f85bd5 Fix for multibyte support. Since some function declarations
moved to miscadmin.h, we have to include it now.
2000-01-19 01:33:16 +00:00
Peter Eisentraut f565cf41ab another set of cleanups 2000-01-18 23:30:24 +00:00
Bruce Momjian 80c5fea99d Since this patch is not big I send it here instead. I do not have the
complete source checked out so I cannot commit it myself.

Michael
2000-01-18 19:08:13 +00:00
Bruce Momjian 0cb6bc70ce Hi!
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
2000-01-18 19:05:31 +00:00
Bruce Momjian 2eebcddeaa Bruce,
Attached is a patch which patches cleanly against the Sunday afternoon
snapshot. It modifies pg_dump to dump COMMENT ON statements for
user-definable descriptions. In addition, it also modifies comment.c so
that the operator behavior is as Peter E. would like: a comment on an
operator is applied to the underlying function.

Thanks,

Mike Mascari
2000-01-18 18:09:02 +00:00
Tatsuo Ishii 6c25ea2342 Fix minor comple error 2000-01-18 13:46:10 +00:00
Tatsuo Ishii 716fb90bf6 Fix minor comping errors 2000-01-18 13:44:48 +00:00
Michael Meskes c80ba6a1b5 *** empty log message *** 2000-01-18 13:03:49 +00:00
Tom Lane 4cd086ce43 Fix quoting bugs and incorrect trigger argument printout. 2000-01-18 07:29:58 +00:00
Bruce Momjian e1cce4d5ea This corrects an error in current gram.y for ALTER TABLE ... ADD
CONSTRAINT

Oliver Elphick
2000-01-18 06:12:03 +00:00
Bruce Momjian 10d7287ab9 Libpq non-blocking mode, from Alfred Perlstein 2000-01-18 06:09:24 +00:00
Tatsuo Ishii b1e891dbd4 Remove compiler warnings 2000-01-18 05:14:24 +00:00
Tatsuo Ishii 449b4cc177 Show encoding name rather than encoding id in case of psql -l. 2000-01-18 05:11:38 +00:00
Tatsuo Ishii 5eb1d0deb1 Add builtin functions:
pg_char_to_encoding()
pg_encoding_to_char()
2000-01-18 05:10:29 +00:00
Tom Lane d58fa7611b numeric_in accepts exponents; numeric to int4 rounds; float4/8 to numeric
is considerably more robust and accurate than it used to be.
Also, get rid of numeric's private allocation freelist, which is no longer
a win since Jan rewrote palloc.
2000-01-18 03:44:41 +00:00
Tatsuo Ishii 8da316291f Fix multibyte support 2000-01-18 03:01:40 +00:00
Tatsuo Ishii beba98d14a Adopt for new psql 2000-01-18 03:00:37 +00:00
Peter Eisentraut 28125ed5e0 Updated user interfaces on initdb, initlocation, pg_dump, ipcclean to a GNU-compliant'ish state.
Made ipcclean work on Linux.
2000-01-18 00:03:37 +00:00
Tom Lane 9e0b463473 setheapoverride() is history. Uses replaced with CommandCounterIncrement()
where necessary --- several of them didn't really need it, though.
tqual-checking macros simplified accordingly.
2000-01-17 23:57:48 +00:00
Tom Lane fb0627d972 Correct minor typos. 2000-01-17 04:47:05 +00:00
Bruce Momjian e3354ab320 Update subquery error message. 2000-01-17 04:43:56 +00:00
Tom Lane 72cec86235 Add .cvsignore so cvs update doesn't complain about derived
files being left around.
2000-01-17 04:38:49 +00:00
Tom Lane 2fd4e7762c Modify libpq's pqexpbuffer to eliminate length restriction on how much
data can be formatted per call.  This requires relying on vsnprintf().
On machines that haven't got vsnprintf, link in the version from
backend/port/.
2000-01-17 02:59:46 +00:00
Tom Lane ac4878a060 Pass atttypmod to CoerceTargetExpr, so that it can pass it on to
coerce_type, so that the right things happen when coercing a previously-
unknown constant to a destination data type.
2000-01-17 02:04:16 +00:00
Tom Lane ceca03600e Hmm, numeric array type was missing too. Added.
Of the standard types, only 'timestamp' seems not to have an array type;
should it be added, or are we going to remove that type for 7.0 anyway?
2000-01-17 01:29:07 +00:00
Hiroshi Inoue 1500e262b5 Fix for TODO item * spinlock stuck problem when elog(FATAL)
and elog(ERROR) inside bufmgr.
2000-01-17 01:15:19 +00:00
Tom Lane 116ba5d814 Update unused_oids script so it works with non-GNU awk --- /* ... */
comment style apparently isn't portable to other awks.
2000-01-17 00:53:11 +00:00
Tom Lane 90b883425a Apparently, no one's ever used float4abs(), because it's got incorrect
data in its pg_proc entry.  abs() doesn't require two arguments, last
I heard.
2000-01-17 00:40:51 +00:00
Tom Lane 2d4a05d7df Update strings test to reflect the fact that casting to char() will
now truncate or pad to the specified length.
2000-01-17 00:16:41 +00:00
Tom Lane 49528361f5 Create a new parsetree node type, TypeCast, so that transformation of
SQL cast constructs can be performed during expression transformation
instead of during parsing.  This allows constructs like x::numeric(9,2)
and x::int2::float8 to behave as one would expect.
2000-01-17 00:14:49 +00:00
Tom Lane e0bd60171a Rearrange coding in COPY so that expansible string buffer for data being
read is reused for successive attributes, instead of being deleted and
recreated from scratch for each value read in.  This reduces palloc/pfree
overhead a lot.  COPY IN still seems to be noticeably slower than it was
in 6.5 --- we need to figure out why.  This change takes care of the only
major performance loss I can see in copy.c itself, so the performance
problem is at a lower level somewhere.
2000-01-16 21:37:50 +00:00
Tom Lane d00391e7ac Sigh, I'm an idiot ... I broke the async startup logic a couple days ago,
by creating a race condition.  It wasn't waiting for select() to say
write-ready immediately after connect, which meant that you might get
an unhelpful 'broken pipe' error message if connect failed, rather than
the intended error message.
2000-01-16 21:18:52 +00:00
Tom Lane fdc85f50a3 Put back change to 'connection failed' message formatting that someone
overwrote.
2000-01-16 20:34:54 +00:00
Peter Eisentraut bb61218c5f Removed lextest, because lex'ed files are now in the distribution. 2000-01-16 20:08:45 +00:00
Peter Eisentraut 759fba4873 Included all yacc and lex files into the distribution. 2000-01-16 20:05:00 +00:00
Tom Lane a4e1304ed1 Add check that inherited constraints and defaults work. 2000-01-16 19:57:48 +00:00
Tom Lane 47a895fe72 Repair breakage of inherited constraint expressions --- needed a
CommandCounterIncrement to make new relation visible before trying to
parse/deparse the expressions.  Also, eliminate unnecessary
setheapoverride calls in AddNewAttributeTuples.
2000-01-16 19:57:00 +00:00
Tom Lane 7d715ba063 Fix broken FOR UPDATE error message. 2000-01-16 08:21:59 +00:00
Bruce Momjian faff1b776b Fix passing of atttypmod that Tom found. 2000-01-16 05:18:19 +00:00
Tom Lane 97e82dc72c Clean up pg_dump coredumps caused by change of output formatting for
oidvector/int2vector.  pg_dump code was assuming that it would see
exactly FUNC_MAX_ARGS integers in the string returned by the backend.
That's no longer true.  (Perhaps that change wasn't such a good idea
after all --- will it break any other applications??)
2000-01-16 03:54:58 +00:00
Tom Lane b0b3187bb4 Add some examples to numeric regress test to verify that recently-fixed
problems are indeed fixed.
2000-01-15 23:44:17 +00:00
Tom Lane 3cb8c8da68 Clean up problems with rounding/overflow code in NUMERIC, particularly
the case wherein zero was rejected for a field like NUMERIC(4,4).
Miscellaneous other code beautification efforts.
2000-01-15 23:42:49 +00:00
Tom Lane 584e646ad8 Fix a passel of problems with incorrect calls to typinput and typoutput
functions, which would lead to trouble with datatypes that paid attention
to the typelem or typmod parameters to these functions.  In particular,
incorrect code in pg_aggregate.c explains the platform-specific failures
that have been reported in NUMERIC avg().
2000-01-15 22:43:25 +00:00
Tom Lane 5e6004135b Now that new psql is fflush()'ing properly, it emerges that several
regress test expected outputs were committed with NOTICEs appearing out
of order.  Update to correct results.
2000-01-15 19:18:24 +00:00
Tom Lane 6ce5e0abb6 Update arrays regress test to reflect fact that several things
work now that did not work in 6.5.
2000-01-15 19:11:40 +00:00
Peter Eisentraut 2a1bfbce24 - Allow array on int8
- Prevent permissions on indexes
- Instituted --enable-multibyte option and tweaked the MB build process where necessary
- initdb prompts for superuser password
2000-01-15 18:30:35 +00:00
Tatsuo Ishii bfbd58ce13 Adapt to the changes of libpq(eliminateing using putenv()). 2000-01-15 05:38:50 +00:00
Tatsuo Ishii 8fc386a2d8 Eliminate using putenv(). 2000-01-15 05:37:21 +00:00
Tatsuo Ishii 6095e36cca Prepare for new psql 2000-01-15 05:17:45 +00:00
Peter Eisentraut 1cd4c14116 Fixed all elog related warnings, as well as a few others. 2000-01-15 02:59:43 +00:00
Peter Eisentraut 7c9390caa1 Fixed psql variables vs array syntax, as well as minor psql enhancements 2000-01-14 22:18:03 +00:00
Peter Eisentraut 4ceb2d0cb6 * User management commands no longer user pg_exec_query_dest -> more robust
* Let unprivileged users change their own passwords.

* The password is now an Sconst in the parser, which better reflects its text datatype and also
forces users to quote them.

* If your password is NULL you won't be written to the password file, meaning you can't connect
until you have a password set up (if you use password authentication).

* When you drop a user that owns a database you get an error. The database is not gone.
2000-01-14 22:11:38 +00:00
Tom Lane 2af360ed1c Clean up some problems in new asynchronous-connection logic
in libpq --- mostly, poor response to error conditions.  You now actually
get to see the postmaster's 'The Data Base System is starting up' message,
which you didn't before.  I suspect the SSL code is still broken though.
2000-01-14 05:33:15 +00:00
Tom Lane 0e6d72db55 Make PSQLexec's behavior on loss of connection more reasonable;
report original error before attempting reset, not after.
2000-01-14 05:28:31 +00:00
Tom Lane 19ff2e4d55 Make connection-failed messages a little friendlier on
80-column displays...
2000-01-14 04:01:55 +00:00
Tom Lane 6256fcb927 Remove redundant and now-incorrect declaration of pstrdup. 2000-01-14 01:36:42 +00:00
Tom Lane 9b003129fe Bump catversion to ensure initdb. 2000-01-14 00:53:50 +00:00
Tom Lane 338fd40bfc Revise quoting conventions in outfuncs/readfuncs so that nodeRead doesn't
choke on relation or attribute names containing spaces, quotes, or other
special characters.  This fixes a TODO item.  It also forces initdb,
since stored rule strings change.
2000-01-14 00:53:21 +00:00
Peter Eisentraut 46a28f1b14 Fixed everything in and surrounding createdb and dropdb to make it more
error-proof. Rearranged some old code and removed dead sections.
2000-01-13 18:26:18 +00:00
Peter Eisentraut bfa3b59d25 initdb didn't load pg_description 2000-01-13 18:22:10 +00:00
Tatsuo Ishii 1f9d535aca Add UDC (User Defined Characters) support to SJIS/EUC_JP conversion
Update README so that it reflects all source file names
Add an entry to make sjistest (testing between SJIS/EUC_JP conversion)
2000-01-13 01:08:14 +00:00
Peter Eisentraut f6689a328f Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions. 2000-01-12 19:36:36 +00:00
Tatsuo Ishii 267c6c7f06 Multi-byte case fix by Oliver Elphick (olly@lfix.co.uk) 2000-01-12 13:08:55 +00:00
Tom Lane 0b14b0c87e Use fmgr_array_args() to avoid dependency on FUNC_MAX_ARGS. 2000-01-12 05:28:47 +00:00
Tom Lane 72ed6ff5ad In PQfn(), defend against too many args, and avoid dependency
on FUNC_MAX_ARGS by using an appropriate fmgr() call.
2000-01-12 05:27:20 +00:00
Tom Lane ef899c7f62 RemoveFunction didn't defend against too many args. 2000-01-12 05:25:09 +00:00
Tom Lane 488f315913 Defend against > INDEX_MAX_KEYS keys in an index. 2000-01-12 05:04:42 +00:00
Tom Lane 8acc568a6b CommentProc was careless about too many arguments. 2000-01-12 04:59:41 +00:00
Tom Lane 421d4f9bd7 Put back erroneously removed zeroing of sentinel elements
in indexkeys, classlist arrays.
2000-01-12 00:53:21 +00:00
Tom Lane b9d832f6ef Make FUNC_MAX_ARGS equal INDEX_MAX_KEYS, as it should.
Set default INDEX_MAX_KEYS to 16.  Document minimum safe value is 9.
2000-01-11 05:58:55 +00:00
Tom Lane f1e1634e72 oid8 => oidvector in alter_table regress test 2000-01-11 05:56:33 +00:00
Tom Lane 41f17e676f Another FUNC_MAX_ARGS tweak. 2000-01-11 05:41:49 +00:00
Tom Lane fa3aa5e1bb Wrong boundary condition on number-of-args check. 2000-01-11 05:22:25 +00:00
Tom Lane cc2e19ef9a Ah-hah, there are attribute size constants lurking here too. 2000-01-11 05:18:42 +00:00
Tom Lane 5c2fb2a1e2 Use symbolic INDEX_MAX_KEYS in pg_type entries for oidvector
and int2vector.
2000-01-11 04:02:28 +00:00
Tom Lane c2fa275d20 Correct hardwired type information in bootstrap. 2000-01-11 04:00:30 +00:00
Tom Lane 7bc1fbe100 Remove no-longer-used symbols. 2000-01-11 03:59:31 +00:00
Bruce Momjian bd52f4bffd More cleanups. Still doesn't work. 2000-01-11 03:33:14 +00:00
Bruce Momjian aadd14b8f2 More cleanups. 2000-01-11 02:46:48 +00:00
Bruce Momjian 401e6de7ee More fixes, but still need +1 for FUNC_MAX_ARGS 2000-01-11 02:30:06 +00:00
Tom Lane bf49f0849d Remove outdated comment about 8 arguments. 2000-01-11 01:42:08 +00:00
Bruce Momjian a97caacb5e Fix initdb so it works, but still only for 8. 2000-01-10 23:03:41 +00:00
Bruce Momjian 182162a388 Update type stuff. 2000-01-10 20:46:23 +00:00
Bruce Momjian dd8b0e67ec Cleanup for func args > 8. 2000-01-10 20:23:31 +00:00
Bruce Momjian 2d920dc717 More updates for function call interface > 8. 2000-01-10 18:27:41 +00:00
Bruce Momjian 0bdd0cdd98 Update fmgr to allow 32 arguments. 2000-01-10 18:18:30 +00:00
Bruce Momjian 8a093d0ae3 Make number of args to a function configurable. 2000-01-10 17:14:46 +00:00
Bruce Momjian 6456b17bc1 Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions. 2000-01-10 16:13:23 +00:00
Bruce Momjian 3f03f74f36 Update int28out and out8out and _in_ functions to handle trailing zeros
properly.
2000-01-10 15:41:34 +00:00
Hiroshi Inoue 0f2e7948e2 Improve cache invalidation handling. Eespecially
this would fix TODO
* elog() flushes cache, try invalidating just entries from
  current xact, perhaps using invalidation cache
2000-01-10 06:30:56 +00:00
Bruce Momjian 5770935965 Fix oid8in and int28in for spaces 2000-01-10 05:23:47 +00:00
Bruce Momjian a040281787 Move fixes for >8 indexed fields. 2000-01-10 05:20:26 +00:00
Bruce Momjian b99f300675 Move INDEX_MAX_KEYS to postgres.h, and make it configurable for users. 2000-01-10 04:36:37 +00:00
Tom Lane fcb7c14d02 Repair subtle VACUUM bug that led to 'HEAP_MOVED_IN was not expected'
errors.  VACUUM normally compacts the table back-to-front, and stops
as soon as it gets to a page that it has moved some tuples onto.
(This logic doesn't make for a complete packing of the table, but it
should be pretty close.)  But the way it was checking whether it had
got to a page with some moved-in tuples was to look at whether the
current page was the same as the last page of the list of pages that
have enough free space to be move-in targets.  And there was other
code that would remove pages from that list once they got full.
There was a kluge that prevented the last list entry from being
removed, but it didn't get the job done.  Fixed by keeping a separate
variable that contains the largest block number into which a tuple
has been moved.  There's no longer any need to protect the last element
of the fraged_pages list.
Also, fix NOTICE messages to describe elapsed user/system CPU time
correctly.
2000-01-10 04:09:50 +00:00
Tom Lane b86ca72f39 Update platform-specific-expected-file support so that platforms can be
specified by regular-expression patterns.  Add some more files.
2000-01-09 20:54:36 +00:00
Tom Lane 4f9d74f98b install_plpgsql is no longer a regress test (it's done via createlang);
remove the no-longer-used files.
2000-01-09 19:34:43 +00:00
Tatsuo Ishii 85b309ee8f Add SetPidFile() and friends. 2000-01-09 12:19:27 +00:00
Tatsuo Ishii ac0d141ead Do not start if postmaster is running. 2000-01-09 12:17:33 +00:00
Tatsuo Ishii 10283ee6a4 Move SetPidFile() and firends to utils/init/miscinit.c from
postmaster/postmaster.c so that
tcop/postgres.c can use them. Now we have an interlock between
postmaster and postgres.
2000-01-09 12:15:57 +00:00
Tatsuo Ishii 3f3421f905 Move SetPidFile() and firends to utils/init/miscinit.c so that
tcop/postgres.c can use them. Now we have an interlock between
postmaster and postgres.
2000-01-09 12:13:24 +00:00
Tatsuo Ishii 359652898b Add more portability to echo -n (code stolen from createlang)
Do not start postmaster if postgres is running
2000-01-09 12:06:52 +00:00
Tom Lane bd62e062aa New scheme for managing platform-specific regress test result files.
Instead of hard-wiring one result file per platform, there is a map file
'resultmap' that says which one to use --- a lot like template/.similar.
I have only created entries in resultmap for my own platform (HPUX) so
far; feel free to add lines for other platforms.
2000-01-09 07:54:00 +00:00
Tom Lane 2a19ac97a7 Remove obsolete platform-specific comparison files. 2000-01-09 06:34:46 +00:00
Tom Lane 8ba050698b First examples of multiplatform result comparison files. 2000-01-09 06:32:33 +00:00
Tom Lane 62cbd53bcd Remove obsolete platform-specific regress test comparison files.
Note: don't put any of these back till you've grokked the new code for
platform-specific comparisons that I'm about to commit...
2000-01-09 06:30:55 +00:00
Tom Lane fc0a46dc16 Remove CVS $Header lines from a couple of regress test files that had
them --- it is just *way* too painful to keep expected results in sync
when these are present.
2000-01-09 04:01:49 +00:00
Tom Lane f5b754a492 Update remaining tests for new psql, with the exception of 'arrays'. 2000-01-09 03:50:27 +00:00
Tom Lane 260b6afc79 Update remaining tests for new psql, with the exception of 'arrays',
which is broken in some weird way that I don't understand.  I think it
may be exposing a bug in the new psql --- for one thing, I get different
results when I run psql by hand than the regress script gets.  What
the heck???
2000-01-09 03:48:39 +00:00
Tom Lane 0e821fb771 Fix some missing substitutions of _OBJWD_ and _DLSUFFIX_. 2000-01-09 02:48:01 +00:00
Tom Lane 166b5c1def Another round of planner/optimizer work. This is just restructuring and
code cleanup; no major improvements yet.  However, EXPLAIN does produce
more intuitive outputs for nested loops with indexscans now...
2000-01-09 00:26:47 +00:00
Bruce Momjian 69d4299e3e This patch removes the initialization of ri in loop in
quote_postgres(...) in ecpglib.c.

The code in CVS reads:

quote_postgres(char *arg, int lineno)
{
 char    *res = (char *) ecpg_alloc(2 * strlen(arg) + 3, lineno);
 int   i,
    ri = 0;

 if (!res)
  return (res);

 res[ri++] = '\'';
 for (i = 0, ri=0; arg[i]; i++, ri++)
 {
  switch (arg[i])
  {
   case '\'':
    res[ri++] = '\'';
    break;
   case '\\':
    res[ri++] = '\\';
    break;
   default:
    ;
  }

The problem here is that ri is reset to 0, thus overwriting the initial
quote.

Stephen Birch
2000-01-08 22:58:03 +00:00
Tom Lane 2515882a0f Modify PageIsEmpty and PageGetMaxOffsetNumber macros to behave sanely
if presented an uninitialized (all zeroes) page.  The system no longer
crashes hard if an all-zeroes page is present in a relation.  There seem
to be some boundary conditions where a page will be appended to a relation
and zeroed, but its page header is never initialized; until we can track
down and fix all of those, robustness seems like a good idea.
Also, clean up some obsolete and downright wrong comments.
2000-01-08 21:59:55 +00:00
Tom Lane b79e75d66f Need defense against oversize index entries in btree CREATE INDEX,
as well as when inserting entries into an existing index.
2000-01-08 21:24:49 +00:00
Bruce Momjian 8da88a6f2b Sorry, that I send this letter/patch again, but previous sending is
still
without answer. I want continue with to_char(), but I need any answer
for this patch. Please.

Thank! (and sorry of my impatient :-)
                                                        Karel
2000-01-07 17:22:47 +00:00
Tatsuo Ishii 27fdbca749 Correct grammatical error 2000-01-07 09:28:03 +00:00
Michael Meskes 33d71e3037 *** empty log message *** 2000-01-07 08:01:18 +00:00
Bruce Momjian 5633e22e2c Update pg_dumpall for new psql format. 2000-01-06 21:16:18 +00:00
Jan Wieck b7b6d4bf53 Changed "triggered data change violation" detection code
in trigger manager.

Jan
2000-01-06 20:47:01 +00:00
Jan Wieck 88016a564a Fixed bug in targetlist expression replacement of
SET DEFAULT referential action triggers.

Jan
2000-01-06 16:30:43 +00:00
Thomas G. Lockhart d1e6368816 Clean up header for uniform appearance throughout tests. 2000-01-06 06:41:55 +00:00
Thomas G. Lockhart 67ac38085c Update for new psql formatting. 2000-01-06 06:40:54 +00:00
Thomas G. Lockhart 6e0cc2ac45 Freshen up the banner displayed when running the regression test. 2000-01-06 06:40:18 +00:00
Bruce Momjian b78769fda2 Fix it's and its to be correct. 2000-01-05 18:23:54 +00:00
Thomas G. Lockhart c0cab6f4fa Update format to add uniform headers on files. 2000-01-05 17:32:29 +00:00
Thomas G. Lockhart 69789bf33d Update format to add uniform headers on files.
Update output to new psql conventions.
2000-01-05 17:32:18 +00:00
Thomas G. Lockhart 9c1b29816e Update output to new psql conventions. 2000-01-05 17:31:08 +00:00
Thomas G. Lockhart 6033cfd429 Fix spaces in text message. 2000-01-05 17:30:05 +00:00
Thomas G. Lockhart 4c4e68dccc Clean up format of tests.
Remove older "::" type coersion syntax in favor of extended SQL92 style.
Include a few new tests for datetime/timespan arithmetic.
2000-01-05 06:07:58 +00:00
Thomas G. Lockhart d83105539a Verified output from new psql.
Include a few new tests for datetime/timespan arithmetic.
2000-01-05 06:06:23 +00:00
Thomas G. Lockhart 24e8ca6ef9 Move numeric test to be near other numeric data types like int4 and float8. 2000-01-05 06:04:56 +00:00
Thomas G. Lockhart 61ef6a1a3f Clean up syntax to use SQL92-ish type coersion
rather than the Postgres "::" notation.
All of these tests have been completely inspected and give correct results.
2000-01-04 16:21:02 +00:00
Thomas G. Lockhart f54668d617 Match results with format from new psql.
All of these tests have been completely inspected and give correct results.
2000-01-04 16:19:34 +00:00
Thomas G. Lockhart 3ec826f99a Repair two recently reported problems:
1) datetime_pl_span() added the seconds field before adding the months
 field.  This lead to erroneous results for e.g.
   select datetime '1999-11-30' + timespan '1 mon - 1 sec';
 Reverse the order of operations to add months first.
2) tm2timespan() did all intermediate math as integer, converting to double
 at the very end. This resulted in hidden overflows when given very large
 integer days, hours, etc. For example,
   select '74565 days'::timespan;
 produced the wrong result. Change code to ensure that doubles are used
 for intermediate calculations.
Thanks to Olivier PRENANT <ohp@pyrenet.fr> and
 Tulassay Zsolt <zsolt@tek.bke.hu> for problem reports and to Tom Lane for
 accurate analyses.
2000-01-04 07:53:27 +00:00
Bruce Momjian aae7b19077 Update DATEDEBUG removal. 2000-01-02 02:32:37 +00:00
Bruce Momjian a8587d02eb Update length of timestamp to 30. 2000-01-02 02:11:08 +00:00
Bruce Momjian 7a877dfd2d Remove DATEDEBUG because it didn't look Y2K safe, and fix timestamp elog
to be Y2K safe.
2000-01-02 01:37:28 +00:00
Bruce Momjian eb9bb3de33 Make psql \dT always show descriptions. There is room. 1999-12-31 21:06:19 +00:00
Tom Lane d8f3752133 Generate double-sided LIKE indexquals that work even in weird locales,
by continuing to increment the rightmost character until we get a string
that is demonstrably greater than the pattern prefix.
1999-12-31 05:38:25 +00:00
Tom Lane 5f68d5c38f Clean up loose end in LIKE optimization fix: parser's code would generate
<= and >= indexquals from a LIKE even if the index in question didn't
support those operators.  (As, for example, a hash index does not.)
1999-12-31 03:41:03 +00:00
Tom Lane 2784a5aedf Clean up datatypes and comments for op_class() routine. 1999-12-31 03:18:43 +00:00
Tom Lane f35e1c8c1f Revise init_sequence so that it doesn't leak memory if the requested
sequence doesn't exist.
1999-12-31 00:54:27 +00:00
Tom Lane 8a40400d40 elog() was set up to call abort() if it saw an ERROR or FATAL exit
during InitProcessingMode and the CurrentTransactionState was neither
TRANS_DEFAULT nor TRANS_DISABLED.  Unfortunately, after someone's recent
change to start the transaction manager earlier in startup than it used
to be started, that caused an abort() and consequent database system
reset on quite harmless errors (such as rejecting an invalid user name!).
As far as I can see, the test on CurrentTransactionState was completely
useless anyway, so I've removed it.
1999-12-30 23:03:40 +00:00
Tatsuo Ishii 0022f21dcb Allow --with-mb=SQL_ASCII 1999-12-30 08:33:49 +00:00
Tom Lane 9c95f8c9b2 Repair bugs discussed in pghackers thread of 15 May 1999: creation of a
relcache entry no longer leaks a small amount of memory.  index_endscan
now releases all the memory acquired by index_beginscan, so callers of it
should NOT pfree the scan descriptor anymore.
1999-12-30 05:05:13 +00:00
Bruce Momjian 649ffe1616 Improve subquery error message, now says "More than one tuple returned
by subselect used as expression."
1999-12-29 22:57:17 +00:00
Bruce Momjian e1b212ff3b Move ipc patch into README.NT. 1999-12-29 10:28:00 +00:00
Bruce Momjian 25f187d339 Add NT patch. 1999-12-29 10:24:16 +00:00
Bruce Momjian f63ff18153 Move NT patch into readme. 1999-12-29 10:18:04 +00:00
Bruce Momjian 2e2fb0a2a6 Update comment. 1999-12-29 10:13:20 +00:00
Bruce Momjian b21ee21455 Update comments. 1999-12-29 10:12:23 +00:00
Jan Wieck e3cec20ccd Removed LZTEXT datatype as discussed.
Jan
1999-12-28 13:40:53 +00:00
Bruce Momjian e9bfedc9bc Fix length limit, MikeA 1999-12-27 18:21:07 +00:00
Bruce Momjian 635498623d Hi, all,
This is the patch for the final bit.  Sorry that it's separate.

Cheers...


MikeA
1999-12-27 15:45:04 +00:00
Bruce Momjian 24a0f021ef Hi, all
I finally got around to schlepping through pg_dump, to finish what I started
about three months (or more) ago.  Attached is a gzipped diff file to apply
in the bin/pg_dump directory.  This should remove all string length
dependencies, except one, which I'm working on.  It has been through some
rudimentary unit testing, but that's about it, so if any of you would give
it a more strenuous run-through, I'd be grateful for the feedback.

Cheers...

 Ansley, Michael
1999-12-27 15:42:44 +00:00
Tom Lane bc036a063d Put back erroneously-removed definition of 'defines' variable. 1999-12-26 21:31:35 +00:00
Tom Lane a6a70315af It turns out that the item size limit for btree indexes is about BLCKSZ/3,
not BLCKSZ/2 as some of us thought.  Add check for oversize item so that
failure is detected before corrupting the index, not after.
1999-12-26 03:48:22 +00:00
Tom Lane 350cb386af Clean up handling of explicit NULL constants. Cases like
SELECT null::text;
	SELECT int4fac(null);
work as expected now.  In some cases a NULL must be surrounded by
parentheses:
	SELECT 2 + null;                 fails
	SELECT 2 + (null);               OK
This is a grammatical ambiguity that seems difficult to avoid.  Other
than that, NULLs seem to behave about like you'd expect.  The internal
implementation is that NULL constants are typed as UNKNOWN (like
untyped string constants) until the parser can deduce the right type.
1999-12-24 06:43:34 +00:00
Michael Meskes bd5ea42a8d *** empty log message *** 1999-12-23 12:33:19 +00:00
Tatsuo Ishii e80ade5e22 Fix minor bug. 1999-12-22 04:41:17 +00:00
Tatsuo Ishii e3736d2c3a Add installtion of postmaster.opts.default. 1999-12-22 04:23:31 +00:00
Tatsuo Ishii b680d5bec7 Add installation of pg_ctl
Locate path of postmaster in a portable way (stolen from initdb)
Add postmaster.opts.default.sample which should be copied into
$PGLIB in the installtion process. Also, it will be installed into
$PGDATA while initdb is running.
1999-12-22 04:12:55 +00:00
Hiroshi Inoue a3e2bc732d to live in a transaction before access to db
during backend startup.
1999-12-22 00:07:16 +00:00
Jan Wieck 3e99158548 update_pg_pwd() is an AR trigger. Corrected return type.
Jan
1999-12-21 22:39:02 +00:00
Bruce Momjian b57b0e0445 The first fix is to allow an input file with a relative path and without
a ".pgc " extension. The second patch fixes a coredump when there is
more than one input file (in that case, cur and types were not set to
NULL before processing the second f ile)

The patch below modifies the accepted grammar of ecpg to accept

 FETCH [direction] [amount] cursor name

i.e. the IN|FROM clause becomes optional (as in Oracle and Informix).
This removes the incompatibility mentioned in section "Porting From
Other RDBMS Packages" p169, PostgreSQL Programmer's Guide. The grammar
is modified in such a way as to avoid shift/reduce conflicts. It does
not accept the statement "EXEC SQL FETCH;" anymore, as the old grammar
did (this seems to be a bug of the old grammar anyway).

This patch cleans up the handling of space characters in the scanner;
some patte rns require \n to be in {space}, some do not. A second fix is
the handling of cpp continuati on lines; the old pattern did not match
these. The parser is patched to fix an off-by-one error in the #line
directives. The pa rser is also enhanced to report the correct location
of errors in declarations in the "E XEC SQL DECLARE SECTION". Finally,
some right recursions in the parser were replaced by  left-recursions.


This patch adds preprocessor directives to ecpg; in particular

EXEC SQL IFDEF, EXEC SQL IFNDEF, EXEC SQL ELSE, EXEC SQL ELIF and EXEC SQL ENDIF

"EXEC SQL IFDEF" is used with defines made with "EXEC SQL DEFINE" and
defines, specified on the command line with -D. Defines, specified on
the command line are persistent across multiple input files. Defines can
be nested up to a maximum level of 128 (see patch). There is a fair
amount of error checking to make sure directives are matched properly. I
need preprocessor directives for porting code, that is written for an
Informix database, to a PostgreSQL database, while maintaining
compatibility with the original code. I decided not to extend the
already large ecpg grammar. Everything is done in the scanner by adding
some states, e.g. to skip all input except newlines and directives. The
preprocessor commands are compatible with Informix. Oracle uses a cpp
replacement.

Rene Hogendoorn
1999-12-21 17:42:16 +00:00
Bruce Momjian bb50fb517f This patch will avoid SIGFPE on some geo functions , if PostgreSQL is compiled
with DEC C.

DEC C doesn't handle double values greater than DBL_MAX, but some
PostgreSQL geo functions assign greater than DBL_MAX values to some vars
in some special cases - that couses SIGFPE. I dunno if that is the only place
to fix to work well with DEC C.

Kirill Nosov.
1999-12-21 17:01:44 +00:00
Bruce Momjian 04c78e2eb4 autoconf 1999-12-21 16:56:42 +00:00
Bruce Momjian 6a554a07b4 Clean up qnx template finding. 1999-12-21 16:55:38 +00:00
Jan Wieck e2aef49694 Added empty TOASTER files and corrected some minor glitches
in regression tests.

Jan
1999-12-21 00:06:44 +00:00
Bruce Momjian 2c29c96ed6 tr cleanup 1999-12-20 14:41:55 +00:00
Jan Wieck 7c385f73e5 Required catalog changes for extended LONG attribute storage.
Jan
1999-12-20 10:40:43 +00:00
Bruce Momjian 665db209e5 Cleanup of effective username test. 1999-12-20 05:39:40 +00:00
Tom Lane f74b94db09 Finally found a platform which has finite() but nonetheless sets errno
rather than returning a NaN for bogus input to pow().  Namely, HPUX 10.20.
I think this is sufficient evidence for what I thought all along, which
is that the float.c code *must* look at errno whether finite() exists or
not.
1999-12-20 02:15:35 +00:00
Tom Lane 76b110c82a Clean up some minor gcc warnings. 1999-12-20 01:41:32 +00:00
Tom Lane ec806d72c0 Clean up some minor gcc warnings. 1999-12-20 01:34:19 +00:00
Tom Lane 80dc7e207a Clean up some minor gcc warnings. I'm not touching the
major one, though, which is the truly ugly stores into libpq private
storage.  Can't you find a better way to do this?
1999-12-20 01:31:26 +00:00
Tom Lane 939229904a Clean up some minor gcc warnings. 1999-12-20 01:23:04 +00:00
Tom Lane c16afb4e24 Whoever touched this code last doesn't seem to understand
what a header file is for :-(
1999-12-20 01:19:58 +00:00
Tom Lane 76898cd330 Avoid compiler warnings on systems that have snprintf and/or vsnprintf
but do not bother to declare them in <stdio.h>.  Seems to be a more
common omission than you'd think...
1999-12-20 00:51:25 +00:00
Bruce Momjian 095d83e129 Cleanup --alldb option handling. 1999-12-18 08:46:44 +00:00
Bruce Momjian d2cf8b4776 Cleanup vacuumdb 1999-12-18 08:39:12 +00:00
Bruce Momjian 1c2257648a > > It would be nice for new users; I think it would make it easier
> > for them to actually set out and do it.  Many new users are
> > of the not-so-knowledgable variety, and shell scripting isn't
> > something they want to undertake.
>
> Can someone modify the vacuumdb shell script to do that?
i tried it... it seems to work

neko@kredit.sth.sz
1999-12-18 08:34:50 +00:00
Bruce Momjian fd96e1754c Finally initdb.sh works. Was problem with assuming EUID was defined. 1999-12-18 04:04:24 +00:00
Bruce Momjian 12118301fd initdb cleanup 1999-12-18 03:31:14 +00:00
Bruce Momjian f08e8ae7cb initdb cleanup 1999-12-18 03:21:21 +00:00
Bruce Momjian a08eb45c52 More initdb cleanup 1999-12-18 02:56:01 +00:00
Bruce Momjian 24edd34da5 Cleanup of initdb.sh script to be portable, at least marginally. 1999-12-18 02:48:53 +00:00
Bruce Momjian 65f694f802 Add cvs. 1999-12-18 00:34:48 +00:00
Bruce Momjian 93ca944077 autoconf 1999-12-17 18:19:30 +00:00
Bruce Momjian 9f013a552a Lowercase $host for QNX. 1999-12-17 18:18:26 +00:00
Bruce Momjian 1520f60f0e Remove unused files. 1999-12-17 18:07:17 +00:00
Bruce Momjian 5c99f9cd84 Fix MULTIBYTE handling in string by using strcat. 1999-12-17 18:05:32 +00:00
Jan Wieck 219652d5f7 Okay, this is how it looks: Please apply the attached patch to the current
sources, otherwise this whole things fails anyway (fails to create the
views).

Peter Eisentraut

Manually applied - Jan
1999-12-17 16:53:11 +00:00
Thomas G. Lockhart aac9f5bee8 Re-enable makeAttr() if ENABLE_OUTER_JOINS is defined.
Somehow got bracketed with #ifdef NOT_USED instead.
1999-12-17 14:47:35 +00:00
Bruce Momjian 4f73187bb7 ANother initdb cleanup 1999-12-17 03:46:33 +00:00
Bruce Momjian 21992ed10a Reverse out nextval patch. 1999-12-17 01:25:25 +00:00
Bruce Momjian ac00256ceb initdb.sh fix from Peter. 1999-12-17 01:16:03 +00:00
Bruce Momjian 83bad7c063 This is my -- hopefully sufficiently portable -- attempt at cleaning out
initdb. No more obscure dependencies on environment variables or paths.
It
now finds the templates and the right postgres itself (with cmd line
options as fallback). It also no longer depends on $USER (su safe), and
doesn't advertise that --username allows you to install the db as a
different user, since that doesn't work anyway. Also, recovery and
cleanup
on all errors. Consistent options, clearer documentation.

Please take a look at this and adopt it if you feel it's safe enough. I
have simulated all the stupid circumstances I could think of, but you
never know with shell scripts.

Oh yeah, you can give the postgres user a default password now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-17 01:05:31 +00:00
Bruce Momjian 1b22a8cb03 Clear paren level flag on \r or any backslash command, rather than
keeping parenlevel unchanged.
1999-12-16 23:54:41 +00:00
Jan Wieck 397e9b32a3 Some changes to prepare for LONG attributes.
Jan
1999-12-16 22:20:03 +00:00
Bruce Momjian 5ca971a18a Hi,
I sending promised patch with:

        * getopt_long() - for pg_dump (portable)

        * and "Usage: " changes in scripts in src/bin/
          - this changes are cosmetic only, not change any
          feature ...etc.

 All PostgreSQL routines (scripts) support now long options and
help's output is alike for all scripts and all support -? or --help.

                                                Karel

Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
1999-12-16 20:10:02 +00:00
Bruce Momjian cf374febf5 >Turning nextval and currval into keywords is not an acceptable way to
>go about this.  That will risk breaking existing applications that use
>those names as column names.
>
>It should actually almost work to write sq.nextval as things stand,
>because Postgres has for a long time considered table.function and
>function(table) to be interchangeable notations for certain kinds of
>functions.  nextval doesn't seem to be one of that kind of function,
>at the moment.  I'd suggest leaving the grammar as it was, and taking a
>look at ParseFuncOrColumn in parse_func.c to see if you can't persuade
>it to accept the sequence functions in that style.

OK, good point. I tried to implement it somewhere else and ended up
extending transformAttr. Attached you'll find the patch.

Jeroen van Vianen
1999-12-16 20:07:41 +00:00
Bruce Momjian 99b8f84511 Here's the Create/Alter/Drop Group stuff that's been really overdue. I
didn't have time for documentation yet, but I'll write some. There are
still some things to work out what happens when you alter or drop users,
but the group stuff in and by itself is done.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-16 17:24:19 +00:00
Bruce Momjian 4cb1fb6f59 Update for QNX. 1999-12-16 16:52:53 +00:00
Bruce Momjian 8d49a6608a autoconf 1999-12-16 16:34:06 +00:00
Michael Meskes 50a5b4ab41 *** empty log message *** 1999-12-16 06:53:12 +00:00
Bruce Momjian d033e17530 Ethernet MAC addresses (macaddr type) are not compared correctly for
equality.  The lobits macro is wrong and extracts the wrong set of
bits out of the structure.

To exhibit the problem:

select '000000:000000'::macaddr = '000000:110000'::macaddr ;
?column?
--------
t
(1 row)

Daniel Boyd
1999-12-16 01:30:49 +00:00
Bruce Momjian 7585deb087 I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced since
they
have been adopted to the QNX4 needs.

Andreas Kardos
1999-12-16 01:25:23 +00:00
Bruce Momjian 9805abb0fb This patch solves a couple of memory leaks in ecpglib.c. The patch is
ok for both the
development tree (CVS) and for 6.5.3.

 Stephen Birch
1999-12-14 22:03:48 +00:00
Tom Lane 7431796b46 fix_parsetree_attnums was not nearly smart enough about walking parse
trees.  Also rewrite find_all_inheritors() in a more intelligible style.
1999-12-14 03:35:28 +00:00
Bruce Momjian 549a8ba59a > From what I gather, this should be a little cleaner because the
triggered
> function now returns the right datatype.

Oops, I got crossed up with Jan's improvements. Ignore this.

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
1999-12-14 00:17:33 +00:00
Bruce Momjian f5a613c0ed >From what I gather, this should be a little cleaner because the
triggered
function now returns the right datatype.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-14 00:12:06 +00:00
Bruce Momjian bcaabc5698 Depending on my interpreting (and programming) skills, this might solve
anywhere from zero to two TODO items.

* Allow flag to control COPY input/output of NULLs

I got this:
COPY table .... [ WITH NULL AS 'string' ]
which does what you'd expect. The default is \N, otherwise you can use
empty strings, etc. On Copy In this acts like a filter: every data item
that looks like 'string' becomes a NULL. Pretty straightforward.

This also seems to be related to

* Make postgres user have a password by default

If I recall this discussion correctly, the problem was actually that the
default password for the postgres (or any) user is in fact "\N", because
of the way copy is used. With this change, the file pg_pwd is copied out
with nulls as empty strings, so if someone doesn't have a password, the
password is just '', which one would expect from a new account. I don't
think anyone really wants a hard-coded default password.

Peter Eisentraut                  Sernanders väg 10:115
1999-12-14 00:08:21 +00:00
Bruce Momjian a82f9ffde6 New LDOUT makefile variable for QNX os. 1999-12-13 22:35:27 +00:00
Bruce Momjian 662371cc5d Prevent _deadcode from showing in ctags and mkid 1999-12-13 04:54:01 +00:00
Tom Lane a8ae19ec3d aggregate(DISTINCT ...) works, per SQL spec.
Note this forces initdb because of change of Aggref node in stored rules.
1999-12-13 01:27:21 +00:00
Tom Lane efb36d2be8 any_ordering_op()'s argument should be declared Oid not int. 1999-12-12 20:51:29 +00:00
Bruce Momjian cb00b7faa5 I'm in TODO mood today ...
* Document/trigger/rule so changes to pg_shadow recreate pg_pwd

I did it with a trigger and it seems to work like a charm. The function
that already updates the file for create and alter user has been made a
built-in "SQL" function and a trigger is created at initdb time.

Comments around the pg_pwd updating function seem to be worried about
this
routine being called concurrently, but I really don't see a reason to
worry about this. Verify for yourself. I guess we never had a system
trigger before, so treat this with care, and feel free to adjust the
nomenclature as well.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-12 05:57:36 +00:00
Bruce Momjian 11023eb1f5 Meanwhile, database names with single quotes in names don't work very well
at all, and because of shell quoting rules this can't be fixed, so I put
in error messages to that end.

Also, calling create or drop database in a transaction block is not so
good either, because the file system mysteriously refuses to roll back rm
calls on transaction aborts. :) So I put in checks to see if a transaction
is in progress and signal an error.

Also I put the whole call in a transaction of its own to be able to roll
back changes to pg_database in case the file system operations fail.

The alternative location issues I posted recently were untouched, awaiting
the outcome of that discussion. Other than that, this should be much more
fool-proof now.

The docs I cleaned up as well.

Peter Eisentraut                  Sernanders väg 10:115
1999-12-12 05:15:10 +00:00
Bruce Momjian 1ff0a475ee Fix for psql from Peter. 1999-12-11 21:35:49 +00:00
Bruce Momjian 298845a6f0 Allow ; in () in psql. 1999-12-11 01:03:36 +00:00
Bruce Momjian e639a1a6a8 This takes care of TODO item
* pg_dump should preserve primary key information

Also a couple of warnings removed.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-11 00:31:05 +00:00
Bruce Momjian 3c75d64f40 Remove old file. 1999-12-10 17:46:41 +00:00
Bruce Momjian c91e5a4465 Update drop.sql 1999-12-10 17:32:57 +00:00
Bruce Momjian c613e69f40 Rename destroy.sql to drop.sql. 1999-12-10 17:31:30 +00:00
Jan Wieck 62c42a05a2 Added global variable to have RI triggers override
time qualification of HeapTupleSatisfiesSnapshot()

Jan
1999-12-10 12:34:15 +00:00
Tatsuo Ishii d31ff14ed8 Fix memory overrun while setting ps status 1999-12-10 10:29:01 +00:00
Tom Lane 18c3000286 Teach grammar and parser about aggregate(DISTINCT ...). No implementation
yet, but at least we can give a better error message:
regression=> select count(distinct f1) from int4_tbl;
ERROR:  aggregate(DISTINCT ...) is not implemented yet
instead of 'parser: parse error at or near distinct'.
1999-12-10 07:37:35 +00:00
Bruce Momjian ecba5d308c Remove unneeded action. 1999-12-10 05:17:13 +00:00
Bruce Momjian cae01cd836 Fix LDREL. 1999-12-10 05:00:36 +00:00
Bruce Momjian 77a4729936 This should fix the \e (\p, \g, ...) behaviour on an empty query buffer.
Also, minor tweakage of tab completion, and I hope the output is flushed
on time now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-10 03:59:30 +00:00
Bruce Momjian 97dec77fab Rename several destroy* functions/tags to drop*. 1999-12-10 03:56:14 +00:00
Tom Lane f6baabcd0b Correct coredump in ALTER TABLE foo ADD(). Accept explicit NULL in
typecasts, eg 'NULL::text'.  Later parts of the parser don't like this
yet, but I'll work on that next.
1999-12-10 03:01:05 +00:00
Bruce Momjian f4db5c3c88 Update regression for new dropdb command. 1999-12-10 00:48:32 +00:00
Jan Wieck a27542c3a8 Added a fflush(stdout) to the \p command required for the
multisession test tool.

Jan
1999-12-10 00:26:35 +00:00
Bruce Momjian 3ffd3d82db Make LD -r as macros that can be changed for QNX. 1999-12-09 19:15:45 +00:00
Bruce Momjian cb0032cdcf Update for QNX from Kardos, Dr. Andrea 1999-12-09 15:56:16 +00:00
Tom Lane f7f41c7c8c Replace generic 'Illegal use of aggregates' error message with one that
shows the specific ungrouped variable being complained of.  Perhaps this
will reduce user confusion...
1999-12-09 05:58:56 +00:00
Bruce Momjian d65a27f950 Hi,
I was able to crash postgres 6.5.3 when I did an 'alter user' command.
After I started a debugger I found the problem in the timezone handling
of
datetime (my Linux box lost its timezone information, that's how the
problem occurred).

Only 7 bytes are reserved for the timezone, without checking for
boundaries.

Attached is a patch that fixes this problem and emits a NOTICE if a
timezone is encountered that is longer than MAXTZLEN bytes, like this:

Jeroen van Vianen
1999-12-09 05:02:24 +00:00
Bruce Momjian 469cf43fac Remove extra vacuum, from Peter. 1999-12-09 04:36:57 +00:00
Jan Wieck 0882951b0c Fixed concurrent visibility bug.
Jan
1999-12-08 20:41:22 +00:00
Bruce Momjian b7539d92f9 Fix indexing of cidr. 1999-12-08 11:37:38 +00:00
Bruce Momjian 2192a92f3c Cleanup 1999-12-08 11:17:20 +00:00
Bruce Momjian 0dec669a0f Change $< to $+ in scripts Makefile, and clean up pg_encoding if logic. 1999-12-08 10:29:55 +00:00
Michael Meskes 7cf0f634d5 *** empty log message *** 1999-12-08 09:52:29 +00:00
Bruce Momjian a010be7543 Peter's file removals. 1999-12-07 22:43:03 +00:00
Bruce Momjian a0aab48fcd Okay, that should put us back in sync. These two patches (src & doc) are
against the sources from one hour ago and contain all the portable and
up
to date stuff.

A few other CVS "householding" things you might want to take care of:

* Remove the src/bin/cleardbdir directory

* Remove the file src/bin/psql/sql_help.h from the repository, as it is
a derived file and is build by the release_prep.

Peter Eisentraut
1999-12-07 22:41:44 +00:00
Michael Meskes 54847b25d4 *** empty log message *** 1999-12-07 10:29:18 +00:00
Tom Lane 04fa5ca544 Clean up memory leakage in find_inheritors() by using pg_list lists
(which are palloc'd) instead of DLLists (which are malloc'd).  Not very
significant, since this routine seldom has anything useful to do, but
a leak is a leak...
1999-12-07 04:09:39 +00:00
Jan Wieck 5ad4034a4c Again updated INSIDE TODO
Jan
1999-12-07 00:13:41 +00:00
Jan Wieck 70dd9e81af Added SET DEFAULT action for ON DELETE/UPDATE
Jan
1999-12-07 00:11:35 +00:00
Jan Wieck 3327730bbd Corrected TODO in source
Jan
1999-12-06 19:52:36 +00:00
Jan Wieck 2eb53e684c Added ON DELETE/UPDATE SET NULL
Jan
1999-12-06 19:50:49 +00:00
Jan Wieck b8ef7e7f82 Completed FOREIGN KEY syntax.
Added functionality for automatic trigger creation during CREATE TABLE.

Added ON DELETE RESTRICT and some others.

Jan
1999-12-06 18:02:47 +00:00
Tatsuo Ishii 8ad4f99b73 Fix the case of -o given 1999-12-06 08:49:00 +00:00
Tatsuo Ishii 8231a7ab20 Fix minor bugs 1999-12-06 08:35:34 +00:00
Tatsuo Ishii 5b912b089c pg_ctl: a script to start/stop/restart and report status of postmaster. 1999-12-06 07:23:41 +00:00
Tatsuo Ishii 169051afc9 Fix bugs regarding pid file. 1999-12-06 07:21:12 +00:00
Tom Lane 1891f0e913 Update rules test for extra quoting in rule deparser. 1999-12-06 02:38:56 +00:00
Tom Lane 53311358c2 Rule deparser needs to quote identifiers that are spelled the same as
SQL keywords.
1999-12-06 02:37:17 +00:00
Bruce Momjian 81c0383295 Fix echo -n and read -r in scripts. 1999-12-05 20:52:54 +00:00
Bruce Momjian 60ae5ed037 Remove destroylang.sgml. 1999-12-05 20:29:18 +00:00
Bruce Momjian 66f8da0756 Update 1999-12-05 20:04:42 +00:00
Bruce Momjian ed62104ea9 I cleaned those out as well (the echo -n "bug" was in there ;) and moved
them into the scripts dir. I also added a --list option to show already
installed languages.

This whole moving and renaming totally confused CVS and my checked out
copy got completely fried last night. When you apply the source patch,
please make sure that all the directories src/bin/{create|destroy}* as
well as vacuumdb, cleardbdir are gone and that all the scripts (7) are
in
scripts/.

Meanwhile I am still puzzled about what happened with the docs patch.
Because I don't know what you got now, the second attachment contains
the
files

ref/allfiles.sgml
ref/commands.sgml
ref/createlang.sgml
ref/droplang.sgml
doc/src/sgml/Makefile

Peter Eisentraut                  Sernanders väg 10:115
1999-12-05 20:02:49 +00:00
Bruce Momjian 9eb69977fe This *should* fix the large object segfault problem. Note linewrap may
be interfering with last line of patch.

Vince.
1999-12-05 19:29:37 +00:00
Tatsuo Ishii d9f61cfa15 Unlink the pid file if it's bogus (no associated process exists) 1999-12-04 08:23:43 +00:00
Bruce Momjian 240e4c98f5 New scripts for create/drop user/db from Peter Eisentraut 1999-12-04 04:53:22 +00:00
Bruce Momjian 21b69148dc No distclean for pgaccess/Makefile. 1999-12-04 04:34:56 +00:00
Bruce Momjian 573553296b Replace examples .H to .h. 1999-12-03 18:28:32 +00:00
Bruce Momjian 5ada36c1e4 Rename libpq++.H to libpq++.h. 1999-12-03 17:35:05 +00:00
Jan Wieck 89ad160622 Arranged that plpgsql.so is used from new build, not installed
one in production PGLIB.

Jan
1999-12-03 12:47:43 +00:00
Tatsuo Ishii dde36bfb7c Create postmaster.pid and postmaster.opts under $PGDATA 1999-12-03 06:26:34 +00:00
Tom Lane 9de156f116 Type 'socklen_t' might be the right way to declare getsockopt()'s last
parameter in some flavor of Unix, but Linux, HPUX, and SunOS all say
it's int.  For now I'm just going to make it int so that I can compile.
If the other way is actually necessary on some Unix somewhere, I guess
we will need a configure test...
1999-12-02 00:26:15 +00:00
Bruce Momjian 8f9216313a Improve descriptions of date/time functions. 1999-12-01 18:03:26 +00:00
Bruce Momjian 4901ff77bd Mention index name when reporting corruption. 1999-12-01 00:29:54 +00:00
Bruce Momjian 1f64926953 Fix compile error on older patch. 1999-11-30 04:29:57 +00:00
Bruce Momjian eebfb9baa5 create/alter user extension
This one should work much better than the one I sent in previously. The
functionality is the same, but the patch was missing one file resulting
in
the compilation failing. The docs also received a minor fix.

Peter Eisentraut                  Sernanders väg 10:115
1999-11-30 03:57:29 +00:00
Bruce Momjian 3ab5b1f1e6 This patch (against the current CVS sources) adds to libpq the functions
PQconnectStart
PQconnectPoll
PQresetStart
PQresetPoll
PQsetenvStart
PQsetenvPoll
PQsetenvAbort

and brings into the published interface

PQsetenv.

The first four are asynchronous analogues of PQconnectdb and PQreset -
they allow an application to connect to the DB without blocking on
remote I/O.

The PQsetenv functions perform an environment negotiation with the
server.

Internal to libpq, pqReadReady and pqWriteReady have been made available
across the library (they were previously static functions inside
fe-misc.c).  A lot of internal rearrangement has been necessary to
support these changes.

The API documentation has been updated also.

Caveats:

  o  The Windows code does not default to using non-blocking sockets,
since I have no documentation: Define WIN32_NON_BLOCKING_CONNECTIONS to
do that.

  o  The SSL code still blocks.


Ewan Mellor.
1999-11-30 03:08:19 +00:00
Bruce Momjian d264b53d2f Rename readonly to onlyread in odbc. Use varargs properly. 1999-11-30 02:44:09 +00:00
Bruce Momjian 63d7df4003 Small patch which fixes the ODBC driver so it doesn't segfault if:
You have CommLog and Debug enabled
You encounter in error in any operation (SQLConnect/SQLExec).
Previously, the extra logging didn't check for NULL pointers
when trying to print some of the strings- the socket error
message could frequently be NULL by design (if there was no socket
error)
and Solaris does not handle NULLS passed to things like printf
("%s\n",string);
gracefully.
This basically duplicates the functionality found in Linux where passing
a null pointer
to printf prints "(NULL)". No very elegant, but the logging is for debug
only anyway.

Dirk Niggemann
1999-11-29 23:42:03 +00:00
Bruce Momjian 47e51683e6 I pulled this one out via CVS, I hope you can make use of it:
Peter.
1999-11-29 05:28:11 +00:00
Tom Lane d367f626f4 Add permissions check: now one must be the Postgres superuser or the
table owner in order to vacuum a table.  This is mainly to prevent
denial-of-service attacks via repeated vacuums.  Allow VACUUM to gather
statistics about system relations, except for pg_statistic itself ---
not clear that it's worth the trouble to make that case work cleanly.
Cope with possible tuple size overflow in pg_statistic tuples; I'm
surprised we never realized that could happen.  Hold a couple of locks
a little longer to try to prevent deadlocks between concurrent VACUUMs.
There still seem to be some problems in that last area though :-(
1999-11-29 04:43:15 +00:00
Tom Lane 8a7f31a7d8 Try to detect oversize tuple before corrupting relation, instead of
after...
1999-11-29 04:34:55 +00:00
Tom Lane 66dbcd47ed Fix "Unable to identify an operator =$" problem that occurred when pgsql
expressions were written without spaces between operators and operands.
Problem was that something like "if new.f1=new.f2 then" would be translated
to "if $1=$2 then", and the Postgres lexer would tokenize that the wrong
way.  Fix is to emit spaces around $paramno constructs to ensure they are
seen as separate tokens.
1999-11-28 22:02:17 +00:00
Tom Lane fb55fa0478 Remove obsolete note about pg_vlock lock file. 1999-11-28 02:17:43 +00:00
Tom Lane aa903cf07c Remove pg_vlock locking from VACUUM, allowing multiple VACUUMs to run in
parallel --- and, not incidentally, removing a common reason for needing
manual cleanup by the DB admin after a crash.  Remove initial global
delete of pg_statistics rows in VACUUM ANALYZE; this was not only bad
for performance of other backends that had to run without stats for a
while, but it was fundamentally broken because it was done outside any
transaction.  Surprising we didn't see more consequences of that.
Detect attempt to run VACUUM inside a transaction block.  Check for
query cancel request before starting vacuum of each table.  Clean up
vacuum's private portal storage if vacuum is aborted.
1999-11-28 02:10:01 +00:00
Tom Lane d2914c38b6 Delete pg_statistics rows for a relation during heap_destroy_with_catalog.
By dropping stats rows here, we eliminate the need for VACUUM to do a
wholesale remove of stats rows.  Before, pg_statistics was wiped clean
at the start of VACUUM, ensuring poor planning results for any backends
running in parallel until VACUUM got around to rebuilding the stats for
the relations they are accessing.
1999-11-28 02:03:04 +00:00
Tom Lane 0ffe17aec6 lmgr.c didn't check for failure return from LockAcquire(). Boo hiss. 1999-11-28 01:58:08 +00:00
Tom Lane b982c3b683 Add missing SpinRelease() to a couple of error exits --- bug found while
testing concurrent VACUUMs.
1999-11-28 01:56:48 +00:00
Tom Lane 4dded12faa COPY to a relation should keep write lock till transaction commit.
Thanks to Hiroshi for spotting the problem.
1999-11-27 21:52:53 +00:00
Tom Lane 37432f5a6c pg_statistic has an index now too... 1999-11-27 21:05:04 +00:00
Tom Lane adbf98a77f Fix references to backend/port files so that they actually work. 1999-11-27 19:43:20 +00:00
Tom Lane a4fec9ec34 Oops, forgot to commit this one last week. Part of patch to update
regress test expected outputs for change in 'Cannot insert a duplicate key'
error message wording.
1999-11-27 17:56:18 +00:00
Bruce Momjian a7f14616c6 Change // to /* */ 1999-11-26 17:26:38 +00:00
Bruce Momjian 09f185a040 Fix missing prototype psql warning. 1999-11-26 04:36:48 +00:00
Bruce Momjian 78bc83fedf * Includes tab completion. It's not magic, but it's very cool. At any
rate
  it's better than what used to be there.

* Does proper SQL "host variable" substitution as pointed out by Andreas
  Zeugwetter (thanks): select * from :foo; Also some changes in how ':'
  and ';' are treated (escape with \ to send to backend). This does
_not_
  affect the '::' cast operator, but perhaps others that contain : or ;
  (but there are none right now).

* To show description with a <something> listing, append '?' to command
  name, e.g., \df?. This seemed to be the convenient and logical
solution.
  Or append a '+' to see more useless information, e.g., \df+.

* Fixed fflush()'ing bug pointed out by Jan during the regression test
  discussion.

* Added LastOid variable. This ought to take care of TODO item "Add a
  function to return the last inserted oid, for use in psql scripts"
  (under CLIENTS)
  E.g.,
insert into foo values(...);
insert into bar values(..., :LastOid);
\echo $LastOid

* \d command shows constraints, rules, and triggers defined on the table
  (in addition to indices)

* Various fixes, optimizations, corrections

* Documentation update as well


Note: This now requires snprintf(), which, if necessary, is taken from
src/backend/port. This is certainly a little weird, but it should
suffice
until a source tree cleanup is done.

Enjoy.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-11-26 04:24:17 +00:00
Bruce Momjian c83b4d1cd8 Fix for bool casting. 1999-11-25 19:15:20 +00:00
Jan Wieck 4069d48aa7 Added another single byte oriented decompressor, useful for
comparision functions.

Added all lztext comparision functions, operators and a default
operator class for nbtree on lztext.

Jan
1999-11-25 01:28:07 +00:00
Bruce Momjian 4ae43c84c3 Add opid to selectivity function call. 1999-11-25 00:21:34 +00:00
Bruce Momjian 922e53e6ea Enable pg_statistic cache use. 1999-11-25 00:15:57 +00:00
Bruce Momjian 8f401e8042 Cleanup for pg_statistic commit. 1999-11-24 17:09:28 +00:00
Bruce Momjian 74f418eb9a Add pg_statistic index, add missing Hiroshi file. 1999-11-24 16:52:50 +00:00
Tatsuo Ishii 61a93ed2da Add multi-byte support to lztextlen() 1999-11-24 03:45:12 +00:00
Bruce Momjian 95997e159b Rename heap_replace to heap_update. 1999-11-24 00:58:48 +00:00
Bruce Momjian bb10bf319e Rename heap_replace to heap_update. 1999-11-24 00:44:37 +00:00
Bruce Momjian 6f9ff92cc0 Tid access method feature from Hiroshi Inoue, Inoue@tpf.co.jp 1999-11-23 20:07:06 +00:00
Bruce Momjian 54ffd4677a ecpg ECPGFree fix from Rene Hogendoorn. 1999-11-23 19:47:14 +00:00
Bruce Momjian 85bb91a319 Fix _cplusplus test in both trees. 1999-11-23 18:49:55 +00:00
Michael Meskes 36b0f67335 *** empty log message *** 1999-11-23 10:32:16 +00:00
Bruce Momjian 7e5e7ab71b Update opclass to be non-unique. 1999-11-23 04:47:39 +00:00
Tom Lane 838fb5c233 Update for change of 'duplicate key' message. 1999-11-23 04:19:39 +00:00
Tom Lane b04bdf1290 Reduce ReleaseLruFile failure from FATAL to ERROR grade; offhand I don't
see that this should be a worse way to fail to open a file than any other.
1999-11-23 01:08:36 +00:00
Tom Lane d831990167 verify_password() leaked a file descriptor if it failed to find the given
userid in the flat password file.  Do it enough times and the postmaster
panicked :-(
1999-11-23 01:04:38 +00:00
Bruce Momjian fc955b14ea Add system indexes to match all caches.
Make all system indexes unique.
Make all cache loads use system indexes.
Rename *rel to *relid in inheritance tables.
Rename cache names to be clearer.
1999-11-22 17:56:41 +00:00
Michael Meskes e30c2d67ef *** empty log message *** 1999-11-22 12:48:48 +00:00
Tom Lane 316c4c57e2 Clean up some problems in error recovery --- elog() was pretty broken
for the case of errors in backend startup, and proc_exit's method for
coping with errors during proc_exit was *completely* busted.  Fixed per
discussions on pghackers around 11/6/99.
1999-11-22 02:06:31 +00:00
Tom Lane bb203c75a9 Come to think of it, DropBuffers() could have the same problem as
ReleaseRelationBuffers --- need to wait if anyone is trying to flush
out that buffer.
1999-11-22 02:03:21 +00:00
Tom Lane 6b5d8e14b4 ReleaseRelationBuffers() failed to check for I/O in progress on a buffer
it wants to release.  This leads to a race condition: does the backend
that's trying to flush the buffer do so before the one that's deleting the
relation does so?  Usually no problem, I expect, but on occasion this could
lead to hard-to-reproduce complaints from md.c, especially mdblindwrt.
1999-11-22 01:19:42 +00:00
Tom Lane 610dfa6d55 Combine index_info and find_secondary_indexes into a single routine that
returns a list of RelOptInfos, eliminating the need for static state
in index_info.  That static state was a direct cause of coredumps; if
anything decided to elog(ERROR) partway through an index_info search of
pg_index, the next query would try to close a scan pointer that was
pointing at no-longer-valid memory.  Another example of the reasons to
avoid static state variables...
1999-11-21 23:25:47 +00:00
Tom Lane 40d3e92541 index_destroy() must grab exclusive access to the parent table
of the index it wants to destroy.  This ensures that no other backend is
actively scanning or updating that index.  Getting exclusive access on
the index alone is NOT sufficient, because the executor is rather
cavalier about getting locks on indexes --- see ExecOpenIndices().
It might be better to grab index locks in the executor, but I'm not
sure the extra lockmanager traffic is really worth it just to make
index_destroy cleaner.
1999-11-21 20:01:10 +00:00
Tom Lane 3047b444e8 Clean up comments. 1999-11-21 19:56:12 +00:00
Tom Lane d8ba3dfb0b Change backend-side COPY to write files with permissions 644 not 666
(whoever thought world-writable files were a good default????).  Modify
the pg_pwd code so that pg_pwd is created with 600 permissions.  Modify
initdb so that permissions on a pre-existing PGDATA directory are not
blindly accepted: if the dir is already there, it does chmod go-rwx
to be sure that the permissions are OK and the dir actually is owned
by postgres.
1999-11-21 04:16:17 +00:00
Tom Lane 76ccf73f2b Repair problem exposed by Jan's new parallel-regression-test scaffold:
inval.c thought it could safely use the catcache to look up the OIDs of
system relations.  Not good, considering that inval.c could be called
during catcache loading, if a shared-inval message arrives.  Rip out the
lookup logic and instead use the known OIDs from pg_class.h.
1999-11-21 01:58:22 +00:00
Tom Lane 9ba0172f41 Tweak run_check.sh so it prints the name of each test in a parallel group
as that test finishes --- helps to give the impression that something is
happening...
1999-11-21 01:53:39 +00:00
Tom Lane 79f39c4d34 My latest fixes to gram.y cause CREATE TABLE t (f1 bool default 1 < 2)
to be accepted, but constraints regress test was expecting it to fail.
1999-11-20 21:41:31 +00:00
Tom Lane ea4ae10849 Fix problems with CURRENT_DATE and related functions being used in
table defaults or rules: translate them to a function call so that
parse_coerce doesn't reduce them to a date or time constant immediately.
Also, eliminate a lot of redundancy in the expression grammar by
defining a new nonterminal com_expr, which contains all the productions
that can be shared by a_expr and b_expr.
1999-11-20 21:39:36 +00:00
Tom Lane 3267e2978f Fix a couple of portability problems in Jan's first-cut parallel test
script.  This is way cool...
1999-11-20 20:21:31 +00:00
Jan Wieck 43499af4ab New parallel regression test shell and related things.
Jan
1999-11-19 18:51:52 +00:00
Bruce Momjian 58d1eeaafe Fix for arm32 and fix for dbname with dash. 1999-11-18 21:47:41 +00:00
Jan Wieck 73bfcf6b22 Changed pg_rewrite attributes ev_qual and ev_action to the new
compressed lztext data type.

Jan
1999-11-18 13:56:30 +00:00
Bruce Momjian 1276aef2f5 Fix problem with temp tables shown in regression test by Jan. 1999-11-17 23:51:21 +00:00
Jan Wieck 211ed36635 Some minor corrections to the LZ compression. In fact I wanted to
HAVE the required OID's first.

Jan
1999-11-17 22:18:46 +00:00
Jan Wieck 79c3b71c1b The new LZ compression and an lztext data type based on it.
Jan
1999-11-17 21:21:51 +00:00
Bruce Momjian ddc335290c Fix lookup of temp table names that I missed yesterday. 1999-11-16 16:55:28 +00:00
Tom Lane e1492cc34c Modify elog() logic so that it won't try to longjmp(Warn_restart) before
Warn_restart has been set by the backend main loop.  This means that
elog(ERROR) or elog(FATAL) in the postmaster or during backend startup
now have well-defined behavior: proc_exit() rather than coredump.
In the case of elog() inside the postmaster, I think that proc_exit()
is probably not enough --- don't we want our child backends to be
forced to quit too?  But I don't understand Vadim's recent changes in
this area, so I'll leave it to him to look over and tweak if needed.
1999-11-16 06:13:36 +00:00
Bruce Momjian dc5c7713bc Commit to make clearer distinction for temp names and real names.
Thanks to Tom Lane for ideas.
1999-11-16 04:14:03 +00:00
Tatsuo Ishii bf5d51e7fe Tree dividing is not appropriate in Rtree.
This fix is reported by Hiroki Kataoka (kataoka@interwiz.koganei.tokyo.jp).
1999-11-15 09:59:00 +00:00
Tom Lane c8c3e07e58 Clean up possible memory leakage in nodeSubplan 1999-11-15 03:28:07 +00:00
Tom Lane f68e11f373 Implement subselects in target lists. Also, relax requirement that
subselects can only appear on the righthand side of a binary operator.
That's still true for quantified predicates like x = ANY (SELECT ...),
but a subselect that delivers a single result can now appear anywhere
in an expression.  This is implemented by changing EXPR_SUBLINK sublinks
to represent just the (SELECT ...) expression, without any 'left hand
side' or combining operator --- so they're now more like EXISTS_SUBLINK.
To handle the case of '(x, y, z) = (SELECT ...)', I added a new sublink
type MULTIEXPR_SUBLINK, which acts just like EXPR_SUBLINK used to.
But the grammar will only generate one for a multiple-left-hand-side
row expression.
1999-11-15 02:00:15 +00:00
Tom Lane 1ecb129d20 Update sanity_check regress test to pass now that pg_index
and pg_amop have indexes.
1999-11-15 01:48:41 +00:00
Tom Lane a5150dc658 Fix typo so it actually compiles... 1999-11-14 19:01:04 +00:00
Bruce Momjian 7a203a3f02 Add recreate index notice to vacuum error. 1999-11-14 17:27:01 +00:00
Tom Lane fb9448decc Tweak make rules for parse.h and fmgr.h to avoid bug in old
versions of gmake.
1999-11-14 17:12:42 +00:00
Bruce Momjian 103022c339 Add index recreation suggestion to end of world error message. 1999-11-14 16:22:59 +00:00
Bruce Momjian e61e4d460c Fix for psql control-d and .psqlrc that I broke. Fix for \dT with
descriptions enabled.
1999-11-13 19:16:47 +00:00
Bruce Momjian db12a63ef1 The \p\g fix didn't turn out to be so bad. It even works in other
circumstances:
=> select * from foo\x\t\pset border 0 \p\g\\select * from bar;

Also the release prep update so the sql_help.h is generated before
packaging.

Peter.
1999-11-13 02:04:54 +00:00
Tom Lane ac61a04a71 Fix ExecSubPlan to handle nulls per the SQL spec --- it didn't combine
nulls with non-nulls using proper three-valued boolean logic.  Also clean
up ExecQual to make it clearer that ExecQual *does* follow the SQL spec
for boolean nulls.  See '[BUGS] (null) != (null)' thread around 10/26/99
for more detail.
1999-11-12 06:39:34 +00:00
Bruce Momjian 2a24ec6f16 In the spirit of TODO item
* Add use of 'const' for varibles in source tree
(which is misspelled, btw.)
I went through the front-end libpq code and did so. This affects in
particular the various accessor functions (such as PQdb() and
PQgetvalue()) as well as, by necessity, the internal helpers they use.

I have been really thorough in that regard, perhaps some people will find
it annoying that things like
char * foo = PQgetvalue(res, 0, 0)
will generate a warning. On the other hand it _should_ generate one. This
is no real compatibility break, although a few clients will have to be
fixed to suppress warnings. (Which again would be in the spirit of the
above TODO.)

In addition I replaced some int's by size_t's and removed some warnings
(and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so it
actually honors the const!) and supplied a new function PQoidValue that
returns a proper Oid type. This is only front-end stuff, none of the
communicaton stuff was touched.


The psql patch also adds some new consts to honor the new libpq situation,
as well as fixes a fatal condition that resulted when using the -V
(--version) option and there is no database listening.


So, to summarize, the psql you should definitely put in (with or without
the libpq). If you think I went too far with the const-mania in libpq, let
me know and I'll make adjustments. If you approve it, I will also update
the docs.

        -Peter

--
Peter Eisentraut                  Sernanders vaeg 10:115
1999-11-11 00:10:14 +00:00
Bruce Momjian c6c60302ba Cleanup of psql \copyright 1999-11-10 01:22:37 +00:00
Bruce Momjian b2c55a02b1 psql makefile fix from Keith Parks 1999-11-08 15:59:59 +00:00
Bruce Momjian 86ef36c907 New NameStr macro to convert Name to Str. No need for var.data anymore.
Fewer calls to nameout.

Better use of RelationGetRelationName.
1999-11-07 23:08:36 +00:00
Bruce Momjian df723a8a8a exit recursion fix from Massimo 1999-11-06 19:46:57 +00:00
Bruce Momjian 17d819c093 Fix for recusive exit call from Massimo. 1999-11-06 17:01:29 +00:00
Bruce Momjian a9ade930da Sort help file names, from Peter Eisentraut 1999-11-06 16:49:06 +00:00
Bruce Momjian 0fe4a20891 Add Linux ARM. 1999-11-06 01:55:44 +00:00
Bruce Momjian 5e3189eaff Update psql banner 1999-11-05 18:21:09 +00:00
Bruce Momjian f793ac0a16 Update psql display. 1999-11-05 15:44:57 +00:00
Tom Lane 3b004b8e2e environment variable set by MULTIBYTE startup code should be
stored in malloc'd space, not in a static variable.  Otherwise environment
variable list is corrupted if libpq is dynamically unlinked...
1999-11-05 06:43:45 +00:00
Bruce Momjian 3d1db6ddc6 Update \? display. 1999-11-05 02:12:59 +00:00
Bruce Momjian 200e183254 Make pager on by default. 1999-11-05 01:38:58 +00:00
Bruce Momjian f0a45ccd0a Clean up \? psql display. 1999-11-05 01:25:39 +00:00
Bruce Momjian 754a4428a6 psql banner cleanup 1999-11-05 00:12:52 +00:00
Bruce Momjian 87a8c72a64 clean up startup banner 1999-11-05 00:10:03 +00:00
Bruce Momjian e6a0e4ed61 Fix EOF/control-D display in psql. 1999-11-04 23:26:02 +00:00
Bruce Momjian dc16399d8d Update to psql, run pgindent. 1999-11-04 23:17:33 +00:00
Bruce Momjian 0e6652e673 psql cleanup 1999-11-04 23:14:30 +00:00
Bruce Momjian 2323b63631 Update psql with man pages and new version of help. 1999-11-04 22:07:57 +00:00
Bruce Momjian a45195a191 Major psql overhaul by Peter Eisentraut. 1999-11-04 21:56:02 +00:00
Bruce Momjian 2ea3b6d63a autoconf 1999-11-04 21:48:36 +00:00
Bruce Momjian 7791e8c001 Improve getopt and readline support, from Peter Eisentraut. 1999-11-04 21:46:40 +00:00
Bruce Momjian 1696dd1121 Update bsdi for bsd/os 4.1 1999-11-04 16:22:23 +00:00
Hiroshi Inoue 2e2189a568 Make it possible to execute crashed CREATE/DROP commands again.
Now indexes of pg_class and pg_type are unique indexes
and guarantee the uniqueness of correponding attributes.
heap_create() was changed to take another boolean parameter
which allows to postpone the creation of disk file.
The name of rd_nonameunlinked was changed to rd_unlinked.
It is used generally(not only for noname relations) now.
Requires initdb.
1999-11-04 08:01:09 +00:00
Michael Meskes a2c834f709 *** empty log message *** 1999-11-02 19:03:34 +00:00
Michael Meskes 7ff8a18030 *** empty log message *** 1999-11-02 12:11:53 +00:00
Bruce Momjian d9e4966be1 update for pgaccess 1999-11-02 00:05:29 +00:00
Bruce Momjian bbdeaea5be autoconf 1999-11-01 23:59:45 +00:00
Bruce Momjian e1ade8d28a Update pgaccess 1999-11-01 23:55:00 +00:00
Bruce Momjian 85016a2b9c autoconf 1999-11-01 23:51:55 +00:00
Bruce Momjian 381e5b94e0 Update for pgaccess 0.98. 1999-11-01 23:48:27 +00:00
Tom Lane 15455e14b8 Eliminate RewritePreprocessQuery, which was taking an
unreasonable amount of time to clean up after a vanished parser problem.
Don't call fireRIRonSubselect when we know there are no subselects,
either.
1999-11-01 05:18:31 +00:00
Tom Lane c6f5f858a6 Eliminate some unbelievably cheesy code in _copyConst().
Apparently, back in the dim reaches of prehistory, the parser couldn't
be trusted to label Const nodes with the correct constbyval value ...
and someone preferred to patch around this in copyObject rather than
fix the problem at the source.  The problem is long gone, but the hack
lingered on.  Until now.
1999-11-01 05:15:13 +00:00
Tom Lane ee2ad1cf2e Inline check for full buffer in appendStringInfoChar. 1999-11-01 05:10:32 +00:00
Tom Lane e81ad79de0 Don't call ExecOpenIndices if pg_class relhasindex shows there are no
indexes to open.  Avoid unnecessary work in ExecCheckPerm, too.
1999-11-01 05:09:18 +00:00
Tom Lane d40dbb7387 Eliminate local inefficiencies in updateTargetListEntry, make_var, and
make_const --- don't repeat cache searches that aren't needed.
1999-11-01 05:06:21 +00:00
Bruce Momjian 249f6b40ab formatting cleanup 1999-11-01 04:00:57 +00:00
Bruce Momjian 87af721775 Update version for 7.0. 1999-11-01 02:33:32 +00:00
Bruce Momjian d16b706e7a Allow indexes on system catalogs for use in cache code.
Thanks to Hiroshi
1999-11-01 02:29:27 +00:00
Bruce Momjian 1973e90ce2 autoconf 1999-10-31 19:52:28 +00:00
Bruce Momjian 9dab728700 Update to pgaccess 0.98. 1999-10-31 19:50:48 +00:00
Tom Lane 987026c931 Rule dumper failed to affix '*' to inheritable RTEs. 1999-10-31 18:57:42 +00:00
Bruce Momjian 0887303a1b Update for 0.98 pgaccess 1999-10-31 12:33:44 +00:00
Bruce Momjian b531c55a9b Update for 0.98. 1999-10-31 12:23:41 +00:00
Bruce Momjian 8e28ce97e5 autoconf 1999-10-31 11:51:29 +00:00
Bruce Momjian b19013cfb7 Update pgaccess makefile for 0.98 1999-10-31 11:50:03 +00:00
Tom Lane 5b9d655ba7 Avoid duplicate ExecTypeFromTL() call in ExecInitJunkFilter() by passing
in the TupleDesc that the caller already has (for call from ExecMain) or
can make just as easily as ExecInitJunkFilter() can (for call from
ExecAppend).  Also, don't bother to build a junk filter for an INSERT
operation that doesn't actually need one, which is the normal case.
1999-10-30 23:13:30 +00:00
Tom Lane 4ce4d7f7d3 Rearrange heap_beginscan to eliminate extra call on
mdnblocks.  Bad enough it does an lseek, but to do it twice for no
reason...
1999-10-30 23:10:21 +00:00
Tom Lane 57ea208477 Skip invoking set_uppernode_references() for a RESULT node
that has no subplan --- saves a material amount of time for a simple
INSERT ... VALUES query.
1999-10-30 23:07:55 +00:00
Tom Lane e2a29eb52c Rewrite preprocess_targetlist() to reduce overhead for simple INSERTs.
In particular, don't bother to look up type information for attributes
where we're not actually going to use it, and avoid copying entire tlist
structure when it's not necessary.
1999-10-30 23:06:32 +00:00
Bruce Momjian 01523ce14a Update pgaccess for 0.98. 1999-10-30 21:21:50 +00:00
Tom Lane cf627ab41a Further performance improvements in sorting: reduce number of comparisons
during initial run formation by keeping both current run and next-run
tuples in the same heap (yup, Knuth is smarter than I am).  And, during
merge passes, make use of available sort memory to load multiple tuples
from any one input 'tape' at a time, thereby improving locality of
access to the temp file.
1999-10-30 17:27:15 +00:00
Bruce Momjian 2a5f3869a2 Add pgaccess Makefile. 1999-10-30 16:39:48 +00:00
Bruce Momjian e0852543e2 Add 0.98. 1999-10-30 16:18:54 +00:00
Bruce Momjian dbdb80baca Remove 0.96 for update to 0.98 1999-10-30 16:01:19 +00:00
Tom Lane c60ecd8f8c Ooops ... 6.5 coding wasn't quite right anymore. Should learn
never to commit without running regress tests...
1999-10-30 02:35:14 +00:00
Tom Lane b021e9a130 Put back code in nodeAgg to generate a dummy all-nulls input tuple
before calling execProject, when the outerPlan has returned zero tuples.
I took this out under the mistaken impression that the input tuple
couldn't be referenced by execProject if we weren't in GROUP BY mode.
But it can, if we're in an UPDATE or DELETE...
1999-10-30 01:18:16 +00:00
Bruce Momjian 60f3e6b3a5 Make USING in COPY optional. 1999-10-29 23:52:22 +00:00
Bruce Momjian ba1714b654 Fix wording. 1999-10-29 23:44:42 +00:00
Michael Meskes 969093b785 *** empty log message *** 1999-10-29 19:39:31 +00:00
Bruce Momjian d79d0a3c0f Fix psql quote missing. 1999-10-27 16:33:45 +00:00
Michael Meskes d3571c755e *** empty log message *** 1999-10-27 14:36:09 +00:00
Bruce Momjian d426869b89 Fix compile after COMMENT problem. 1999-10-26 16:32:46 +00:00
Bruce Momjian 724bf74693 These are two minor corrections to libpq's PQsetNoticeProcessor function.
One, it now returns the previous hook. That way people don't have to dig
around in libpq-int.h for that information anymore. It previously
returned void, so there should be no incompatibilities.

Second, you cannot set the callback to NULL anymore. (Of course you can
still call it with NULL just to get the current hook.) The way libpq uses
the callback pointer, having a NULL there wasn't very healthy.

Peter Eisentraut
1999-10-26 04:49:00 +00:00
Bruce Momjian 021146f375 improve manual page 1999-10-26 04:40:58 +00:00
Bruce Momjian b6d6cffa99 Add documentation for comment. 1999-10-26 03:48:58 +00:00
Bruce Momjian 577e21b34f Hello.
The following patch extends the COMMENT ON functionality to the
rest of the database objects beyond just tables, columns, and views. The
grammer of the COMMENT ON statement now looks like:

COMMENT ON [
  [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <objname>
|

  COLUMN <relation>.<attribute> |
  AGGREGATE <aggname> <aggtype> |
  FUNCTION <funcname> (arg1, arg2, ...) |
  OPERATOR <op> (leftoperand_typ rightoperand_typ) |
  TRIGGER <triggername> ON relname>

Mike Mascari
(mascarim@yahoo.com)
1999-10-26 03:12:39 +00:00
Tom Lane 51f62d505e Standardize on MAXPGPATH as the size of a file pathname buffer,
eliminating some wildly inconsistent coding in various parts of the
system.  I set MAXPGPATH = 1024 in config.h.in.  If anyone is really
convinced that there ought to be a configure-time test to set the
value, go right ahead ... but I think it's a waste of time.
1999-10-25 03:08:03 +00:00
Tom Lane 8a17ed6335 'extern char *pg_pathname' in these files fails to agree with
postgres.c's declaration of 'char pg_pathname[...]'.  I dunno when these
ports were last used, but they are sure broken now...
1999-10-25 02:31:47 +00:00
Byron Nikolaidis c4c8e812b4 bug fix for large objects (free) 1999-10-25 01:11:44 +00:00
Tom Lane eae456cd7f Add a notion of a 'catalog version number' that can indicate
when an initdb-forcing change has been applied within a development cycle.
PG_VERSION serves this purpose for official releases, but we can't bump
the PG_VERSION number every time we make a change to the catalogs during
development.  Instead, increase the catalog version number to warn other
developers that you've made an incompatible change.  See my mail to
pghackers for more info.
1999-10-24 20:42:27 +00:00
Tom Lane 9efee18a28 Add comment explaining that this table doesn't do what you
might think ... in fact doesn't do much of anything at the moment ...
1999-10-24 19:22:37 +00:00
Tom Lane 2dd82a67e5 Remove gratuitous redefinitions of BLCKSZ. 1999-10-23 03:28:58 +00:00
Tom Lane ecd0bfa81a Look Ma, no MAX_PARSE_BUFFER! (At least not in the backend.
pg_dump and interfaces/odbc still need some work.)
1999-10-23 03:13:33 +00:00
Bruce Momjian 627b5e9c20 Backup psql banner change. 1999-10-23 01:31:32 +00:00
Tom Lane 45c002460c Remove fixed-size literal buffer from ecpg's lexer (same
fix recently applied to backend's lexer).  I see that YY_USES_REJECT
still gets defined for this lexer, which means it's going to have trouble
parsing really long tokens.  Not sure if it's worth doing anything about
that or not; I don't have the interest right now to understand why
ecpg's additions to the syntax cause this problem...
1999-10-22 23:14:50 +00:00
Bruce Momjian abceb20a52 Remove libpq++ todo item. 1999-10-22 19:13:39 +00:00
Bruce Momjian 95d1f5fa6d This *should* fix the large binary object problem in libpq++ from the
TODO list.

Vince
1999-10-22 19:05:02 +00:00
Bruce Momjian 0e1bfe92c7 I have a patch for postgresql-snapshot(1999-10-22).
This patch fix a TODO list item.
* require SELECT DISTINCT target list to have all ORDER BY columns

example
ogawa=> select distinct x from t1 order by y;
ERROR:  ORDER BY columns must appear in SELECT DISTINCT target list

---
Atsushi Ogawa
1999-10-22 11:51:35 +00:00
Tom Lane a1b25fd155 Another day, another MAX_QUERY_SIZE dependency zapped. 1999-10-22 02:08:37 +00:00
Tom Lane 9a50485fb7 Bugfix for CREATE RULE invoked via SPI --- from Hiroshi,
23 Jul 99.  Not sure why this didn't get applied before...
1999-10-21 02:33:25 +00:00
Tom Lane 470039332f Remove fixed-size buffers in rule storage routine. 1999-10-21 01:46:24 +00:00
Bruce Momjian 918d9de886 change issue to information in banner 1999-10-21 01:24:53 +00:00
Bruce Momjian 4931dea619 Make psql startup banner cleaner. 1999-10-21 00:43:46 +00:00
Tom Lane 42b991fd1f BufFileSeek's behavior at segment boundaries wasn't what
logfile.c wanted ... seems easier to fix BufFileSeek.
1999-10-19 02:34:45 +00:00
Bruce Momjian d357c96789 Update \dT again. 1999-10-18 14:14:04 +00:00
Bruce Momjian 80254d4870 More \dT cleanup 1999-10-18 14:07:49 +00:00
Bruce Momjian 25036d4dee Clean up \dT display. 1999-10-18 13:44:24 +00:00
Bruce Momjian 7bf25f1281 Make bpchar == char() clearer in \dT display. 1999-10-18 11:36:45 +00:00
Tom Lane b7d49a4209 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...
1999-10-18 03:32:29 +00:00
Tom Lane 8e35bbd133 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.
1999-10-18 02:42:31 +00:00
Tom Lane 3d5079c174 Except_Intersect_Rewrite() forgot to move LIMIT info to new
topmost SELECT node after rearranging query tree.
1999-10-17 23:50:43 +00:00
Tom Lane e1c76c2533 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?
1999-10-17 23:09:02 +00:00
Tom Lane 887afac1f5 Remove now-dead sort modules. 1999-10-17 22:19:07 +00:00
Tom Lane 26c48b5e8c 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.
1999-10-17 22:15:09 +00:00
Tom Lane 59ed74e60b Actually, nodeMergejoin shouldn't include psort.h at all... 1999-10-17 18:00:29 +00:00
Tom Lane 3a2fd8492a nodeMergejoin was depending on an inclusion from psort.h... 1999-10-16 21:31:26 +00:00
Tom Lane 957146dcec 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.
1999-10-16 19:49:28 +00:00
Tatsuo Ishii 357231e68e Check RELSEG_SIZE when postmaster starting up.
this is neccesary to make sure that the backend and
the database uses same RELSEG_SIZE.
1999-10-16 09:32:23 +00:00
Michael Meskes 6fb3c3f78f *** empty log message *** 1999-10-15 19:02:08 +00:00
Bruce Momjian 06d95d9440 Fix typo in descriptions. 1999-10-15 16:19:40 +00:00
Bruce Momjian e16db38376 Clean up type descriptions. 1999-10-15 04:56:52 +00:00
Bruce Momjian 7acc237744 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.

Hope this makes the grade,

Mike Mascari
(mascarim@yahoo.com)
1999-10-15 01:49:49 +00:00
Bruce Momjian 2d12ee3f71 Update psql \? for \w. 1999-10-14 01:28:42 +00:00
Bruce Momjian c7dea3a6b7 Correctly return -1 on error to CmdTuples()
Vince.
1999-10-13 16:46:28 +00:00
Tom Lane db3c4c3a2d 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.
1999-10-13 15:02:32 +00:00
Bruce Momjian c3ac9f07b7 Hi,
I have changed a bit the makefiles for the win32 port - the *.def files
(created when building shared libraries) are now clean from
Makefile.shlib.

I have also removed "-g" from CFLAGS in the "cygwin32" template - it can
be
enabled when running configure.

                        Dan
1999-10-13 11:38:42 +00:00
Bruce Momjian 8ce829ea6a Update jdbc for release version #> 1999-10-13 11:08:57 +00:00
Bruce Momjian 7ee7ee1398 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.

Douglas Thomson <dougt@mugc.cc.monash.edu.au>
1999-10-13 02:26:37 +00:00
Bruce Momjian c6411605e1 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

                        Dan
1999-10-12 14:54:28 +00:00
Bruce Momjian c7e694c4f5 Remove pgeasy Makefile on distclean. 1999-10-12 14:46:26 +00:00
Bruce Momjian cd273043b9 autoconf 1999-10-12 14:42:04 +00:00
Bruce Momjian 3bd3dc541d autoconf 1999-10-12 14:31:22 +00:00
Bruce Momjian 3c44a132ea Update pgeasy for missing files. 1999-10-12 14:06:49 +00:00
Tatsuo Ishii 7adb1b0072 Add blcksz to struct ControlFileData to check BLCKSZ is same
as BLCKSZ which the backend was compiled in.
1999-10-12 10:21:56 +00:00
Bruce Momjian 433c213533 Update pgeasy. 1999-10-11 18:51:10 +00:00
Bruce Momjian bf919ed20a cleanup of pgeasy. 1999-10-11 18:16:06 +00:00
Bruce Momjian 05309c3cd2 Update again. 1999-10-11 18:05:39 +00:00
Bruce Momjian ad869fcb88 pgeasy update. 1999-10-11 18:03:04 +00:00
Bruce Momjian 0e839dbbdd Update pgeasy. 1999-10-11 17:51:27 +00:00
Bruce Momjian d3ba981b3c autoconf 1999-10-11 17:48:23 +00:00
Bruce Momjian 676404d5dc Add pginterface into main tree, called pgeasy. 1999-10-11 17:47:02 +00:00
Hiroshi Inoue 05d13cad28 The 1st step to implement new type of scan,TidScan.
Now WHERE restriction on ctid is allowed though it is
sequentially scanned.
1999-10-11 06:28:29 +00:00
Bruce Momjian 65a2c8f5b8 Improve pg_dump template1 error reports. 1999-10-10 17:00:26 +00:00
Bruce Momjian 5883563208 Re-add mention of FAQ's for shared memory/ipc errors. 1999-10-10 16:53:51 +00:00
Bruce Momjian 944dec1ff0 Improve pg_dump template1 error message. 1999-10-10 14:42:44 +00:00
Bruce Momjian b8c3226da2 Allow \r as whitespace. 1999-10-09 01:32:38 +00:00
Bruce Momjian ff77befb73 Move __alpha to port/alpha.h. 1999-10-09 01:30:23 +00:00
Bruce Momjian 440c913d42 Define __alpha__ for __alpha. 1999-10-08 17:14:46 +00:00
Jan Wieck 34eb4f0a32 First real FOREIGN KEY constraint trigger functionality.
Implemented now:

    FOREIGN KEY ... REFERENCES ... MATCH FULL
	FOREIGN KEY ... MATCH FULL ... ON DELETE CASCADE

Jan
1999-10-08 12:00:08 +00:00
Michael Meskes a4f59da146 *** empty log message *** 1999-10-08 11:05:05 +00:00
Bruce Momjian 7395d9ab4e Update display of debug levels. 1999-10-08 05:36:58 +00:00
Bruce Momjian 5d72657732 clean up debug flags. 1999-10-08 05:27:14 +00:00
Bruce Momjian b3c7ad5750 Comment cleanup. 1999-10-08 05:20:48 +00:00
Bruce Momjian fbe9d1a430 Fix for "--" comment and no trailing newline, as seen in Perl. 1999-10-08 05:03:14 +00:00
Bruce Momjian ae61ef34bd 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.
1999-10-08 04:28:57 +00:00
Tom Lane 5ce158c534 Remove a no-longer-needed kluge for degenerate aggregate cases,
and update some comments.
1999-10-08 03:49:55 +00:00
Vadim B. Mikheev c528c42ec2 More startup/shutdown log messages. 1999-10-08 02:16:22 +00:00
Bruce Momjian b1ec184d38 Use $(PERL) variable for perl compile. Now in Makefile.global. 1999-10-08 00:15:49 +00:00
Tom Lane 79cb5f76e9 Somehow missed this call to addRangeTableEntry() ... 1999-10-07 05:48:03 +00:00
Tom Lane 3eb1c82277 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.
1999-10-07 04:23:24 +00:00
Vadim B. Mikheev 4040fcfa78 Small cleanup. 1999-10-06 22:44:25 +00:00
Vadim B. Mikheev 4793740367 XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
First step in cleaning up backend initialization code.
Fix for FATAL: now FATAL is ERROR + exit.
1999-10-06 21:58:18 +00:00
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
Bruce Momjian 62045e67eb Emit warning on SELECT pg_language.* 1999-09-27 17:46:14 +00:00
Bruce Momjian 74a263ed34 Fix to give super user and createdb user proper update catalog rights. 1999-09-27 16:44:56 +00:00
Vadim B. Mikheev 30659d43eb Transaction log manager core code.
It doesn't work currently but also don't break anything -:)
1999-09-27 15:48:12 +00:00
Michael Meskes 66270c94e1 *** empty log message *** 1999-09-27 10:41:02 +00:00
Bruce Momjian 065a40f90c Add README.SSL 1999-09-27 03:16:09 +00:00
Bruce Momjian e0e7daef6d Lots of patches coming in from me today :-)
When drawing up a very simple "text-drawing" of how the negotiation is done,
I realised I had done this last part (fallback) in a very stupid way. Patch
#4 fixes this, and does it in a much better way.

Included is also the simple text-drawing of how the negotiation is done.

//Magnus
1999-09-27 03:13:16 +00:00
Bruce Momjian 3114f92122 Add bsdi sparc port. 1999-09-27 00:48:42 +00:00
Tom Lane be09bc9ff2 Modify nodeAgg.c so that no rows are returned for a GROUP BY
with no input rows, per pghackers discussions around 7/22/99.  Clean up
a bunch of ugly coding while at it; remove redundant re-lookup of
aggregate info at start of each new GROUP.  Arrange to pfree intermediate
values when they are pass-by-ref types, so that aggregates on pass-by-ref
types no longer eat memory.  This takes care of a couple of TODO items...
1999-09-26 21:21:15 +00:00
Tom Lane 40f6524161 Implement constant-expression simplification per Bernard
Frankpitt, plus some improvements from yours truly.  The simplifier depends
on the proiscachable field of pg_proc to tell it whether a function is
safe to pre-evaluate --- things like nextval() are not, for example.
Update pg_proc.h to contain reasonable cacheability information; as of
6.5.* hardly any functions were marked cacheable.  I may have erred too
far in the other direction; see recent mail to pghackers for more info.
This update does not force an initdb, exactly, but you won't see much
benefit from the simplifier until you do one.
1999-09-26 02:28:44 +00:00
Hiroshi Inoue 95d3d468ce This is a patch for cygipc library provided by Yutaka Tanida.
This is necessary to prevent freezing in cygwin port.
1999-09-24 05:58:48 +00:00
Tom Lane e812458b27 Several changes here, not very related but touching some of the same files.
* Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
* Add links to backend PROC structs to sinval's array of per-backend info,
and use these links for routines that need to check the state of all
backends (rather than the slow, complicated search of the ShmemIndex
hashtable that was used before).  Add databaseOID to PROC structs.
* Use this to implement an interlock that prevents DESTROY DATABASE of
a database containing running backends.  (It's a little tricky to prevent
a concurrently-starting backend from getting in there, since the new
backend is not able to lock anything at the time it tries to look up
its database in pg_database.  My solution is to recheck that the DB is
OK at the end of InitPostgres.  It may not be a 100% solution, but it's
a lot better than no interlock at all...)
* In ALTER TABLE RENAME, flush buffers for the relation before doing the
rename of the physical files, to ensure we don't get failures later from
mdblindwrt().
* Update TRUNCATE patch so that it actually compiles against current
sources :-(.
You should do "make clean all" after pulling these changes.
1999-09-24 00:25:33 +00:00
Bruce Momjian f66393514f One last missing quoting bug in pg_dump:
now that sequence names are properly quoted for field defaults, mixed
case sequence names are generated. These are properly quoted in the
CREATE SEQUENCE lines, but not in the SELECT nextval lines, as per
below:

CREATE SEQUENCE "Teams_TeamID_seq" start 10 increment 1 maxvalue
2147483647 minvalue 1  cache 1 ;
SELECT nextval ('Teams_TeamID_seq');

This needs to be:
SELECT nextval ('"Teams_TeamID_seq"');

Patch included below.
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
1999-09-23 19:11:09 +00:00
Bruce Momjian dabc3f31b5 Fix for netmask('x.x.x.x/0') is 255.255.255.255 instead of 0.0.0.0
This is because (-1) << 32 is -1 (Only intel arc. has been checked)

Oleg Sharoiko
1999-09-23 17:42:23 +00:00
Bruce Momjian 337ab803a2 TRUNCATE command from Mike Mascari<mascarim@yahoo.com> 1999-09-23 17:11:16 +00:00
Bruce Momjian e7cad7b0cb Add TRUNCATE command, with psql help and sgml additions. 1999-09-23 17:03:39 +00:00
Bruce Momjian 4b06f6f9c8 I found the following useful - just a way of using PQgetisnull from
libpq++.

Patrick Welche
1999-09-21 21:19:31 +00:00
Bruce Momjian 392f304cae gram.y cleanup 1999-09-21 21:10:37 +00:00
Bruce Momjian ad604ac372 values.h patch from Alex Howansky 1999-09-21 20:58:25 +00:00
Marc G. Fournier 196cbe4e1d last batch, I think... 1999-09-20 22:33:47 +00:00
Marc G. Fournier 3848b4648a fixing it more.. 1999-09-20 22:32:50 +00:00
Marc G. Fournier a00a1a5641 bring it all into -current again 1999-09-20 22:30:47 +00:00
Marc G. Fournier 25acbc510b try and fix things... 1999-09-20 22:29:12 +00:00
Marc G. Fournier 7737dfd35a bring in missing files ... this isn't very clean, but :( 1999-09-20 22:28:11 +00:00
Bruce Momjian 80751a72ee Make proper plpgsql non-externs. 1999-09-20 22:28:05 +00:00
Bruce Momjian 7559677551 Define plpgsql_yylineno as non-extern somewhere for bsdi. 1999-09-20 02:12:31 +00:00
Tom Lane fe2ab18ed9 Remove incorrect 'Assert(targetList != NULL)'. An
INSERT ... DEFAULT VALUES statement does indeed have a null targetlist,
at least during parse and rewrite stages.
1999-09-19 17:20:58 +00:00
Tom Lane e1a8b0f2ce Fix CASE bug identified by Keith Parks: CASE didn't reliably
treat a NULL condition result as FALSE.  Clean up some bogus comments
here and there, too.
1999-09-18 23:26:37 +00:00
Tom Lane f9f5dfbf10 Update regress test expected outputs for small changes in
error message wording, due to most cases of no-such-relation now being
detected in central heap_open code rather than on an ad-hoc basis.
1999-09-18 19:10:19 +00:00
Tom Lane bd272cace6 Mega-commit to make heap_open/heap_openr/heap_close take an
additional argument specifying the kind of lock to acquire/release (or
'NoLock' to do no lock processing).  Ensure that all relations are locked
with some appropriate lock level before being examined --- this ensures
that relevant shared-inval messages have been processed and should prevent
problems caused by concurrent VACUUM.  Fix several bugs having to do with
mismatched increment/decrement of relation ref count and mismatched
heap_open/close (which amounts to the same thing).  A bogus ref count on
a relation doesn't matter much *unless* a SI Inval message happens to
arrive at the wrong time, which is probably why we got away with this
sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
Recommend 'make clean all' after pulling this update; I modified the
Relation struct layout slightly.
Will post further discussion to pghackers list shortly.
1999-09-18 19:08:25 +00:00
Michael Meskes 231c5935a4 *** empty log message *** 1999-09-17 18:28:15 +00:00
Michael Meskes 68ee58ed43 *** empty log message *** 1999-09-17 09:48:25 +00:00
Tatsuo Ishii 2d0eee32c4 Changes made by Hiroshi Inoue and approved by Vadim.
See attached mail for more details.

-------------------------------------------------------------------
From: "Vadim Mikheev" <vadim@krs.ru>
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
References: <000201befa94$42fe04c0$2801007e@cadzone.tpf.co.jp>
Subject: Re: elog(ERROR) in vacuum
Date: Fri, 10 Sep 1999 10:27:10 +0900
Organization: OJSC Rostelecom (Krasnoyarsk)
Message-ID: <37D85E6E.5AFA126D@krs.ru>

Hiroshi Inoue wrote:
>
> Hello Vadim,
>
> I have a question about vacuum.
>
> VACUUM has a phase like commit which calls TransactionIdCommit().
> But if elog(ERROR) occured after that,the status of transaction is
> changed from XID_COMMIT to XID_ABORT.
>
> Seems to me this causes inconsistency.
> Shoudn't AbortTransaction() be changed not to call TransacionIdAbort()
> in case of vacuum.

You're right!
As usual -:)

Vadim
1999-09-16 09:08:56 +00:00
Peter Mount f2fa38ded5 jdbc2real rule was in there twice. One of them should have been jdbc1real 1999-09-15 21:56:16 +00:00
Peter Mount 8363e137aa Jens Glaser found that getPrimaryKeys() had a table called test hardwired
into it.
1999-09-15 21:12:34 +00:00
Peter Mount cd68ecfef6 Some late patches from Jens Glaser (jens@jens.de). These upgrade the protocol
to version 2, and fixes ResultSetMetaData.getColumnDisplaySize().
1999-09-15 20:40:02 +00:00
Michael Meskes 864e1e9d0e *** empty log message *** 1999-09-15 08:29:25 +00:00
Peter Mount 3f68139373 An abstract declaration for the close() method was missed out of the previous
commit to CVS.
1999-09-14 22:43:38 +00:00
Thomas G. Lockhart 2ee735ca21 Allow ISOLATION and LEVEL as column names. These are SQL92 reserved words
which do not need to be so for our parser. Apparently omitted earlier.
1999-09-14 06:06:31 +00:00
Peter Mount 24c82830cf Patches for 6.5.2 1999-09-14 05:50:44 +00:00
Thomas G. Lockhart f0f73b316d Allow CASE statement to contain *only* untyped result clauses or nulls.
Almost worked before, but forgot one place to check.
 Reported by Tatsuo Ishii.
Still does not do the right thing if inserting into a non-string target
 column. Should look for a type coersion later, but doesn't.
1999-09-13 04:14:56 +00:00
Tom Lane 3ec5232363 Patch to cure O(N^2) behavior in libpq when reading a long
message under a kernel that only returns one packet per recv() call.  This
didn't use to matter much, but it starts to get annoying with multi-megabyte
EXPLAIN VERBOSE responses...
1999-09-13 03:00:19 +00:00
Tom Lane 43d32d3683 First cut at doing something reasonable with OR-of-ANDs WHERE
conditions.  There are some pretty bogus heuristics in prepqual.c that
try to decide whether to output CNF or DNF format; they need to be replaced,
likely.  Right now the code is probably too willing to choose DNF form,
which might hurt performance in some cases that used to work OK.
But at least we have a foundation to build on.
1999-09-13 00:17:25 +00:00
Marc G. Fournier b705fa3909 Make sure both SRCH_INC and SRCH_LIB are checked for existances and added to
the CPPFLAGS/LDFLAGS variables...
1999-09-12 22:49:47 +00:00
Marc G. Fournier 2b7777bfa2 cygwin doesn't have an endian.h, but defines BYTE_ORDER in sys/param.h 1999-09-12 22:27:47 +00:00
Tom Lane 2119cc0670 Further improvements in cnfify: reduce amount of self-recursion
in or_normalize, remove detection of duplicate subexpressions (since it's
highly unlikely to be worth the amount of time it takes), and introduce
a dnfify() entry point so that unintelligible backwards logic in UNION
processing can be eliminated.  This is just an intermediate step ---
next thing is to look at not forcing the qual into CNF form when it would
be better off in DNF form.
1999-09-12 18:08:17 +00:00
Tom Lane 4644fc8071 Eliminate query length limitation imposed by pg_client_to_server
and pg_server_to_client.  Eliminate copy.c's restriction on the length
of a single attribute.
1999-09-11 22:28:11 +00:00
Tom Lane b65ab31910 Eliminate token length assumption in scanstr(). 1999-09-11 22:26:47 +00:00
Tom Lane b399805e22 Eliminate elog()'s hardwired limit on length of an error message.
This change seems necessary in conjunction with long queries, and it
cleans up some bogosity in connection with long EXPLAIN texts anyway.
Note that current libpq will accept any length error message (at least
until it runs out of memory); prior versions have a limit of 8K, but
will cleanly discard excess error text, so there shouldn't be any
big compatibility problems with old clients.
1999-09-11 19:06:42 +00:00
Bruce Momjian c1d5e88b41 Make pgindent gnu test better. 1999-09-09 19:39:06 +00:00
Tom Lane 5bc0d31ae8 Repair incorrect cleanup of heap memory allocation during
transaction abort --- before it only worked if there was exactly one level
of allocation context stacked in the blank portal.  Now it does the right
thing for any depth, including zero...
1999-09-09 16:25:35 +00:00
Tom Lane 8b8db01517 Minor improvement in SI overflow logic: try to delete
expired messages before concluding that we really have buffer overflow.
1999-09-09 14:56:06 +00:00
Tom Lane 9e713ddb99 Get rid of elog(DEBUG) in snprintf emulation ... it's just
cluttering the log file...
1999-09-09 03:13:22 +00:00
Tom Lane 51db6455ea Repair error noticed by Roberto Cornacchia: selectivity code
was rejecting negative attnums as bogus, which of course they are not.
Add code to get_attdisbursion to produce a useful value for OID attribute,
since VACUUM does not store stats for system attributes.
Also, repair bug that's been in eqjoinsel for a long time: it was taking
the max of the two columns' disbursions, whereas it should use the min.
1999-09-09 02:36:04 +00:00
Tom Lane 45500964f6 StreamConnection() mustn't call elog(). 1999-09-08 22:57:12 +00:00
Tom Lane b1134e369f Cope with versions of vsnprintf() written by people who
don't read man pages...
1999-09-08 16:31:38 +00:00
Tom Lane bee7cd2a36 Repair logic error in LIKE: should not return LIKE_ABORT
when reach end of pattern before end of text.  Improve code comments.
1999-09-07 19:09:46 +00:00
Tom Lane ea582ad7e7 Irix linking fix from Yu Cao <yucao@falcon.kla-tencor.com> 1999-09-07 18:10:49 +00:00
Tom Lane 8759f175db Performance improvements in cnfify(): get rid of exponential
space consumption in pull_args, and avoid doing the full CNF transform on
operands of operator clauses, where it's really not particularly helpful.
This answers the TODO item about large numbers of OR clauses, at least
partially.  I was able to do a ten-thousand-OR-clause query with about
20Mb memory consumption ... it took an obscenely long time, but it worked...
1999-09-07 03:47:06 +00:00
Tom Lane 85712da90d Mike Ansley's fixes for long queries. This change just
corrects flex myinput() routine so that it doesn't assume there is only
one bufferload of data.  We still have the issue of getting rid of
YY_USES_REJECT so that the scanner can cope with tokens larger than its
initial buffer size.
1999-09-07 00:13:27 +00:00
Tom Lane f1de4f9532 Additional long-query fixes from Mike Ansley and yours truly.
psql.c seems clean of query length restrictions now.
1999-09-06 23:30:53 +00:00
Tom Lane d2f7d1f346 Mark bpchareq not hashjoinable, since it strips trailing blanks
before comparison; if fields being joined are different widths then hashing
will yield wrong answer.  Also, remove hashjoinable mark from all uses of
array_eq, because array structures may have padding bytes between elements
and the pad bytes are of uncertain content.  This could be revisited if
array code is cleaned up.
Modify opr_sanity regress test to complain if array_eq operator is marked
hashjoinable.
1999-09-06 21:16:20 +00:00
Tom Lane 22fe3d4b04 I finally understood what sinvaladt.c is doing --- and it
offended my aesthestic sensibility that there was so much unreadable code
doing so little.  Rewritten code is about half the size, faster, and
(I hope) much more intelligible.
1999-09-06 19:37:38 +00:00
Tom Lane cc8b67a5c3 Fix relcache.c so that local relations (those created during
current transaction) are not flushed by shared-cache-inval reset message.
SI reset actually works now, for probably the first time in a long time.
I was able to run initdb and regression tests with a 16-element SI message
array, with a lot of NOTICE: cache state reset messages but no crashes.
1999-09-06 19:33:16 +00:00
Tom Lane c5092847e7 RelationCacheInvalidate thought there were 7 nailed-in-cache
system tables, but actually there are only 6 --- see RelationInitialize.
Kinda makes you wonder how long ago this code was last executed...
1999-09-06 18:13:02 +00:00
Bruce Momjian 7d0a5342a3 test 1999-09-06 15:15:07 +00:00
Tom Lane b9d01fe288 Per Tatsuo's recommendation, change mdopen so that it won't
automatically create the file, except during bootstrap mode where that
seems to be necessary.
1999-09-05 23:24:53 +00:00
Tom Lane 0041202b98 Disallow DROP TABLE/DROP INDEX inside a transaction block.
We can't support these properly, since once the relation's physical files
are unlinked, there's no way to roll back the transaction.  I suppose
we could postpone the unlink till transaction commit, but then what of
BEGIN; DROP TABLE foo; CREATE TABLE foo; ?
The code does allow dropping a table/index created in the current
transaction block, however, since the post-abort state would be that
the table doesn't exist anyway.
1999-09-05 17:43:47 +00:00
Tom Lane 6645a73863 IsTransactionBlock() should return true in TBLOCK_ABORT state. 1999-09-05 17:12:34 +00:00
Bruce Momjian 4fa1eeb826 remove elogs used for debugging. 1999-09-04 22:03:09 +00:00
Bruce Momjian 0e14dfe0fb Intercept temp table lookups further up to map temp names. 1999-09-04 22:00:30 +00:00
Tom Lane cb36c0f682 In RelationNameGetRelation(), replace temp table name by
real name before doing lookup.  We only want to index temp tables by their
real names in the relcache, to ensure there's not more than one relcache
entry for them.
1999-09-04 21:47:23 +00:00
Tom Lane 15dd167854 Avoid transaction overhead when there are no temp tables
to be deleted.
1999-09-04 21:45:48 +00:00
Tom Lane a24ebc3f7e Remove no-longer-needed code to update temprel's copy of
pg_class tuple during ALTER TABLE ADD COLUMN.
1999-09-04 21:19:33 +00:00
Bruce Momjian fb7548f4db Invalidate temp entries for aborted transactions. 1999-09-04 19:55:50 +00:00
Tom Lane b4a607c9e0 Modify RelationFlushRelation so that if the relcache entry
has positive refcount, it is rebuilt from pg_class data.  This ensures
that relcache entries will track changes made by other backends.  Formerly,
a shared inval report would just be ignored if it happened to arrive while
the relcache entry was in use.  Also, fix relcache to reset ref counts
to zero during transaction abort.  Finally, change LockRelation() so that
it checks for shared inval reports after obtaining the lock.  In this way,
once any kind of lock has been obtained on a rel, we can trust the relcache
entry to be up-to-date.
1999-09-04 18:42:15 +00:00
Tom Lane 8add6d71cf Modify sinval so that InvalidateSharedInvalid() does not hold
the SInval spinlock while it is calling the passed invalFunction or
resetFunction.  This is necessary to avoid deadlock with lmgr change;
InvalidateSharedInvalid can be called recursively now.  It should be
a good performance improvement anyway --- holding a spinlock for more
than a very short interval is a no-no.
1999-09-04 18:36:45 +00:00
Thomas G. Lockhart ae01c7f5bb Fix for perl5 on BSD/OS breaks most other platforms, so back it out.
istm that this would be a job for configure.
Most modern OSes actually use perl5 by default ;)
1999-09-03 13:46:33 +00:00
Byron Nikolaidis 283df996c6 driver v06-40-0007 1999-09-03 05:29:00 +00:00
Byron Nikolaidis 19f947e800 driver v06-40-0007 1999-09-03 04:41:45 +00:00
Tom Lane 51f62ea45c Rule deparser didn't handle unary operators correctly. 1999-09-02 03:04:04 +00:00
Tom Lane 68c323483c Repair a bunch of problems in md.c. This builds on Hiroshi's
insight that RelationFlushRelation ought to invoke smgrclose, and that the
way to make that work is to ensure that mdclose doesn't fail if the relation
is already closed (or unlinked, if we are looking at a DROP TABLE).  While
I was testing that, I was able to identify several problems that we had
with multiple-segment relations.  The system is now able to do initdb and
pass the regression tests with a very small segment size (I had it set to
64Kb per segment for testing).  I don't believe that ever worked before.
File descriptor leaks seem to be gone too.
I have partially addressed the concerns we had about mdtruncate(), too.
On a Win32 or NFS filesystem it is not possible to unlink a file that
another backend is holding open, so what md.c now does is to truncate
unwanted files to zero length before trying to unlink them.  The other
backends will be forced to close their open files by relation cache
invalidation --- but I think it would take considerable work to make
that happen before vacuum truncates the relation rather than after.
Leaving zero-length files lying around seems a usable compromise.
1999-09-02 02:57:50 +00:00
Bruce Momjian 4478d299e1 Document -x properly for pg_dump. 1999-09-01 23:05:20 +00:00
Tom Lane e25e6a6dc3 Commit the bulk of Mike Ansley's long-query changes in the
backend.  Still much left to do.
1999-08-31 04:26:40 +00:00
Tom Lane ab5cafa5d3 Update frontend libpq to remove limits on query lengths,
error/notice message lengths, and number of fields per tuple.  Add
pqexpbuffer.c/.h, a frontend version of backend's stringinfo module.
This is first step in applying Mike Ansley's long-query patches,
even though he didn't do any of these particular changes...
1999-08-31 01:37:37 +00:00
Tom Lane 130e372b5d Minor improvements to stringinfo package to make it more
robust, since it's about to get used much more heavily.
1999-08-31 01:28:37 +00:00
Tom Lane f4add18557 Fix quoting problems in mkMakefile.tcldefs.sh.in and
mkMakefile.tkdefs.sh.in.
1999-08-29 20:09:44 +00:00
Tom Lane 1f14a9de74 Correct broken entries for pg_proc OIDs 1364 (time(abstime))
and 1370 (timestamp(datetime)).  This does not force an initdb, exactly,
but you won't see the effects of the bug fix until you do one.
BTW, OID 1358 for timespan(time) is still broken:
select timespan('21:11:26'::time);
ERROR:  No such function 'time_timespan' with the specified attributes
But I couldn't figure out what it ought to be defined as, so I left it be.
1999-08-29 01:35:11 +00:00
Tom Lane 9202c4f798 Update rules test expected output to conform to slightly
more verbose results from ruleutils.c changes.
1999-08-28 04:00:41 +00:00
Tom Lane 958600156c Fix several problems in rule deparsing: didn't handle array
references or CASE expressions, didn't parenthesize complex expressions
properly.  Also, always output variable references as fully qualified
names to eliminate ambiguity bug recently reported.  (This could be
smarter, but reliability comes first.)
1999-08-28 03:59:05 +00:00
Tom Lane 37d20eb855 Clean up some mistakes in handling of uplevel Vars in planner.
Most parts of the planner should ignore, or indeed never even see, uplevel
Vars because they will be or have been replaced by Params.  There were a
couple of places that got it wrong though, probably my fault from recent
changes...
1999-08-26 05:09:06 +00:00
Tom Lane 5adebf83b6 Clean up some bugs in oper_select_candidate(), notably the
last loop which would return the *first* surviving-to-that-point candidate
regardless of which one actually passed the test.  This was producing
such curious results as 'oid % 2' getting translated to 'int2(oid) % 2'.
1999-08-26 04:59:15 +00:00
Tom Lane 42af56e1ea Revise implementation of SubLinks so that there is a consistent,
documented intepretation of the lefthand and oper fields.  Fix a number of
obscure problems while at it --- for example, the old code failed if the parser
decided to insert a type-coercion function just below the operator of a
SubLink.
CAUTION: this will break stored rules that contain subplans.  You may
need to initdb.
1999-08-25 23:21:43 +00:00
Tatsuo Ishii edda70c0de Fix vacuum's memory consumption 1999-08-25 12:20:57 +00:00
Tatsuo Ishii 770d0786c2 Add new vpl_num_allocated_pages member to VPageListData.
It will keep track the number of pages allocated so that
vacuum could allocate twice of the previous allocation.
This will greatly reduce the total memory consumption of
vacuum.
1999-08-25 12:18:31 +00:00
Tom Lane 2b67dc5387 Alter AllocSet routines so that requests larger than
ALLOC_BIGCHUNK_LIMIT are always allocated as separate malloc() blocks,
and are free()d immediately upon pfree().  Also, if such a chunk is enlarged
with repalloc(), translate the operation into a realloc() so as to
minimize memory usage.  Of course, these large chunks still get freed
automatically if the alloc set is reset.
I have set ALLOC_BIGCHUNK_LIMIT at 64K for now, but perhaps another
size would be better?
1999-08-24 20:11:19 +00:00
Tom Lane 1b81fd7793 coerce_type() failed to guard against trying to convert a NULL
constant to a different type.  Not sure that this could happen in ordinary
parser usage, but it can in some new code I'm working on...
1999-08-24 00:09:56 +00:00
Tom Lane a23faeee83 Remove bogus code in oper_exact --- if it didn't find an exact
match then it tried for a self-commutative operator with the reversed input
data types.  This is pretty silly; there could never be such an operator,
except maybe in binary-compatible-type scenarios, and we have oper_inexact
for that.  Besides which, the oprsanity regress test would complain about
such an operator.  Remove nonfunctional code and simplify routine calling
convention accordingly.
1999-08-23 23:48:39 +00:00
Tom Lane e8140adb10 Further sort-order twiddling in optimizer: be smart about
case where ORDER BY and GROUP BY request the same sort order.
1999-08-22 23:56:45 +00:00
Tom Lane c9d040d85e Un-break code generated by ECPGRelease production. 1999-08-22 20:37:24 +00:00
Tom Lane 78114cd4d4 Further planner/optimizer cleanups. Move all set_tlist_references
and fix_opids processing to a single recursive pass over the plan tree
executed at the very tail end of planning, rather than haphazardly here
and there at different places.  Now that tlist Vars do not get modified
until the very end, it's possible to get rid of the klugy var_equal and
match_varid partial-matching routines, and just use plain equal()
throughout the optimizer.  This is a step towards allowing merge and
hash joins to be done on expressions instead of only Vars ...
1999-08-22 20:15:04 +00:00
Tom Lane db436adf76 Major revision of sort-node handling: push knowledge of query
sort order down into planner, instead of handling it only at the very top
level of the planner.  This fixes many things.  An explicit sort is now
avoided if there is a cheaper alternative (typically an indexscan) not
only for ORDER BY, but also for the internal sort of GROUP BY.  It works
even when there is no other reason (such as a WHERE condition) to consider
the indexscan.  It works for indexes on functions.  It works for indexes
on functions, backwards.  It's just so cool...

CAUTION: I have changed the representation of SortClause nodes, therefore
THIS UPDATE BREAKS STORED RULES.  You will need to initdb.
1999-08-21 03:49:17 +00:00
Tom Lane 5588c559e6 Cleanups for int8: guard against null inputs in comparison
operators (and some other places), fix rangechecks in int8 to int4
conversion (same problem we recently figured out in pg_atoi).
1999-08-21 03:06:58 +00:00
Tom Lane d91baea025 Ooops ... I had left some test coding in selfuncs.c that
failed on 'field < textconstant' ...
1999-08-21 00:56:18 +00:00
Tatsuo Ishii 02efaa14e5 Old multi-byte bug. Forgot to rename #ifdef MB to #ifdef MULTIBYTE
Now SET NAMES working again...
1999-08-18 13:04:45 +00:00
Tom Lane abee4c299f Remove extraneous SeqScan node that make_noname was inserting
above a Sort or Materialize node.  As far as I can tell, the only place
that actually needed that was set_tlist_references, which was being lazy
about checking to see if it had a noname node to fix or not...
1999-08-18 04:15:16 +00:00
Tom Lane 6defe4949e Add script that runs the regression tests with all valid
combinations of query-plan-type backend options.  Good for testing
planner/optimizer.  Tedious, though.
1999-08-17 21:21:22 +00:00
Tom Lane ed3f69168f EXPLAIN didn't know about 'Materialize' plan nodes. 1999-08-16 23:47:23 +00:00
Tom Lane 91f82de48a Assign sort keys properly when there are duplicate entries in
pathkey list --- corrects misbehavior seen with multiple mergejoin clauses
mentioning same variable.
1999-08-16 23:07:20 +00:00
Bruce Momjian 972124091d I've sent 3 mails to pgsql-patches. There are two files, one for doc
and
for src/data directories, and one minor patch for doc/README.locale.
   Please apply.

Oleg.
1999-08-16 20:27:19 +00:00
Bruce Momjian c5d0a1bc42 Fix for perl5 on BSD/OS. 1999-08-16 20:12:12 +00:00
Bruce Momjian e69a997d02 Allow BSD yacc and bison to compile pl code. 1999-08-16 19:57:21 +00:00
Tom Lane e6381966c1 Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of
lists of PathKeyItem nodes, not just lists of lists of vars).  This was
a big win --- the code is smaller and IMHO more understandable than it
was, even though it handles more cases.  I believe the node changes will
not force an initdb for anyone; planner nodes don't show up in stored
rules.
1999-08-16 02:17:58 +00:00
Tom Lane 08320bfb22 Small updates to #include lists for pending optimizer checkin. 1999-08-16 02:10:13 +00:00
Tom Lane c9b128fcdb Move funcid_get_rettype() to lsyscache. 1999-08-16 02:08:59 +00:00
Tom Lane b1baf1ff60 Add get_func_rettype() to general-use lsyscache routines,
since it's now needed in both optimizer and parser.
1999-08-16 02:06:25 +00:00
Tatsuo Ishii bab13a70ff Fix for Win32 making problem with MB enabled.
Patches created by Hiroki Kataoka.
1999-08-16 02:04:05 +00:00
Thomas G. Lockhart 3cfd56fcf6 Repair the check for redundant UNIQUE and PRIMARY KEY indices.
Also, improve it so that it checks for multi-column constraints.
Thanks to Mark Dalphin <mdalphin@amgen.com> for reporting the problem.
1999-08-15 06:46:49 +00:00
Tom Lane 288373f5a4 LispUnion fix changes output ordering for inheritance tests. 1999-08-14 19:30:21 +00:00
Tom Lane 51e29a2be3 LispUnion routine didn't generate a proper union: anytime
l2 contained more than one entry, there would be duplicates in the output
list.  Miscellaneous code beautification in other routines, too.
1999-08-14 19:29:35 +00:00
Tom Lane 47f18ec702 Update comments about pathkeys. 1999-08-13 01:17:16 +00:00
Tom Lane 8f9f6e51a8 Clean up optimizer's handling of indexscan quals that need to be
commuted (ie, the index var appears on the right).  These are now handled
the same way as merge and hash join quals that need to be commuted: the
actual reversing of the clause only happens if we actually choose the path
and generate a plan from it.  Furthermore, the clause is only reversed in
the 'indexqual' field of the plan, not in the 'indxqualorig' field.  This
allows the clause to still be recognized and removed from qpquals of upper
level join plans.  Also, simplify and generalize match_clause_to_indexkey;
now it recognizes binary-compatible indexes for join as well as restriction
clauses.
1999-08-12 04:32:54 +00:00
Tom Lane aae034d28c Add commentary to show that even though ExecInitIndexScan()
contains much code that looks like it will handle indexquals with the index
key on either side of the operator, in fact indexquals must have the index
key on the left because of limitations of the ScanKey machinery.  Perhaps
someone will be motivated to fix that someday...
1999-08-12 00:42:43 +00:00
Tom Lane 2ae51c86c9 Minor cleanups and code beautification; eliminate some
routines that are now dead code.
1999-08-10 03:00:15 +00:00
Tom Lane 4a1c5cb953 Revise create_nestloop_node's handling of inner indexscan to
work under a wider range of scenarios than it did --- it formerly did not
handle a multi-pass inner scan, nor cases in which the inner scan's
indxqualorig or non-index qual contained outer var references.  I am not
sure that these limitations could be hit in the existing optimizer, but
they need to be fixed for future expansion.
1999-08-10 02:58:56 +00:00
Bruce Momjian 158fd5f1c4 > > Prevent sorting if result is already sorted
> >
> > was implemented by Jan Wieck.
> > His work is for ascending order cases.
> >
> > Here is a patch to prevent sorting also in descending
> > order cases.
> > Because I had already changed _bt_first() to position
> > backward correctly before v6.5,this patch would work.
> >
Hiroshi Inoue
Inoue@tpf.co.jp
1999-08-09 06:20:27 +00:00
Tom Lane 5efe31214a Clean up tlist.c tree-walking routines with
expression_tree_mutator.
1999-08-09 05:34:13 +00:00
Tom Lane 14f84cd821 Store -1 in attdisbursion to signal 'no duplicates in column'.
Centralize att_disbursion readout logic.
1999-08-09 03:16:47 +00:00
Tom Lane 5af4b04f31 Move get_attdisbursion to lsyscache. Clean up get_typdefault. 1999-08-09 03:13:31 +00:00
Tom Lane e9054829a2 Update comments about attdisbursion. NO code change. 1999-08-09 02:45:56 +00:00
Vadim B. Mikheev 1ecb43a40c Re-use free space on index pages with duplicates. 1999-08-09 01:39:19 +00:00
Tom Lane 10d6d411a8 Rewrite fix_indxqual_references, which was entirely bogus for
multi-scan indexscan plans; it tried to use the same table-to-index
attribute mapping for all the scans, even if they used different indexes.
It would klugily work as long as OR indexquals never used multikey indexes,
but that's not likely to hold up much longer...
1999-08-09 01:01:42 +00:00
Tom Lane ecef2caae9 Clean up routines in setrefs.c by replacing individual tree
walking logic with expression_tree_walker/mutator calls.
1999-08-09 00:56:05 +00:00
Tom Lane 6bc601b648 Create a standardized expression_tree_mutator support routine
to go along with expression_tree_walker.  (_walker is not suitable for
routines that need to alter the tree structure significantly.)  Other minor
cleanups in clauses.c.
1999-08-09 00:51:26 +00:00
Bruce Momjian f0b651ac6b replace #Include . 1999-08-09 00:08:52 +00:00
Tom Lane 4488b69b4c Fix nbtree's failure to clear BTScans list during xact abort.
Also, move responsibility for calling vc_abort into main xact.c list of
things-to-call-at-abort.  What in the world was it doing down inside of
TransactionIdAbort()?
1999-08-08 20:12:52 +00:00
Tom Lane fb491a5854 For a unique-key attribute (no duplicate values), vacuum analyze
was recording a disbursion of 0, not the correct value 1/numberOfRows.
1999-08-08 17:13:10 +00:00
Thomas G. Lockhart a76ad509fe Remove old man pages. All info is in new man pages or other docs. 1999-08-08 15:21:50 +00:00
Bruce Momjian 4cddd482c1 Fix so BSD yacc works on file. 1999-08-07 04:25:02 +00:00
Tom Lane e1fad50a5d Revise generation of hashjoin paths: generate one path per
hashjoinable clause, not one path for a randomly-chosen element of each
set of clauses with the same join operator.  That is, if you wrote
   SELECT ... WHERE t1.f1 = t2.f2 and t1.f3 = t2.f4,
and both '=' ops were the same opcode (say, all four fields are int4),
then the system would either consider hashing on f1=f2 or on f3=f4,
but it would *not* consider both possibilities.  Boo hiss.
Also, revise estimation of hashjoin costs to include a penalty when the
inner join var has a high disbursion --- ie, the most common value is
pretty common.  This tends to lead to badly skewed hash bucket occupancy
and way more comparisons than you'd expect on average.
I imagine that the cost calculation still needs tweaking, but at least
it generates a more reasonable plan than before on George Young's example.
1999-08-06 04:00:17 +00:00
Tom Lane b7883d7e3a parse_coerce fix allows early simplification of one
constant-coercion expression in the rules test.
1999-08-05 02:35:29 +00:00
Tom Lane fd19a350ea Revise parse_coerce() to handle coercion of int and float
constants, not only string constants, at parse time.  Get rid of
parser_typecast2(), which is bogus and redundant...
1999-08-05 02:33:54 +00:00
Tom Lane b15a7c9fbe Fix ELF test so it doesn't spit up on all non-ELF systems...
use Autoconf-approved method of testing for predefined symbols, and move
it down to where we know what compiler to run and how to run it.
1999-08-03 00:09:32 +00:00
Tom Lane b0984e6995 Add a VACUUM command in hopes of making pg_upgrade usable again
in MVCC environment.  I do not trust this until Vadim says it's OK...
1999-08-02 22:34:53 +00:00
Michael Meskes b2a2be4c5a *** empty log message *** 1999-08-02 04:59:18 +00:00
Tom Lane 8624ff7612 Further selectivity-estimation work. Speed up eqsel()
(it should just call the given operator, not look up an = operator).
Fix intltsel() so that all numeric data types are converted to double
before trying to estimate where the given comparison value is in the
known range of column values.  intltsel() still needs work, or replacement,
for non-numeric data types ... but for nonintegral numeric types it
should now be delivering reasonable estimates.
1999-08-02 02:05:41 +00:00
Bruce Momjian 9032d3f205 autoconf 1999-08-01 16:36:57 +00:00
Bruce Momjian b2a0a4e8f5 I didn't see any further discussion so here is, I hope, a clean fix to
configure.in to determine if a system is ELF or not.  Note that some
of the tests earlier may be redundant but I took the safest route.

D'Arcy J.M. Cain
1999-08-01 16:30:05 +00:00
Tom Lane 44878506d8 First step in fixing selectivity-estimation code. eqsel and
neqsel now behave as per my suggestions in pghackers a few days ago.
selectivity for < > <= >= should work OK for integral types as well, but
still need work for nonintegral types.  Since these routines have never
actually executed before :-(, this may result in some significant changes
in the optimizer's choices of execution plans.  Let me know if you see
any serious misbehavior.
CAUTION: THESE CHANGES REQUIRE INITDB.  pg_statistic table has changed.
1999-08-01 04:54:25 +00:00
Tom Lane f851c6b07d Add another ORDER BY to rules test; got tired of it 'failing'
every time I tweak the optimizer...
1999-08-01 04:41:32 +00:00
Tom Lane 970ef45c41 Re-enable pg_upgrade, after adding checks that the source
and target databases are of versions it knows about.
1999-07-31 22:06:44 +00:00
Tom Lane cf835f97fc Add comments for attdisbursion field --- NO code change. 1999-07-31 19:07:25 +00:00
Tom Lane 30da344cb1 Update comments about clause selectivity estimation. 1999-07-30 22:34:19 +00:00
Bruce Momjian 44763a2b23 Make usecatupd disabled for normal users, and allow normal users to
update temp tables with this setting.
1999-07-30 18:09:49 +00:00
Tom Lane 04578a9180 Further cleanups of indexqual processing: simplify control
logic in indxpath.c, avoid generation of redundant indexscan paths for the
same relation and index.
1999-07-30 04:07:25 +00:00
Marc G. Fournier f08baacfa5 just testing a script... 1999-07-30 03:45:57 +00:00
Bruce Momjian fca190e102 Remove extra #endif 1999-07-30 03:45:44 +00:00
Marc G. Fournier 5fb84df9b1 Nothing changed, just testing cvslog ... 1999-07-30 03:42:59 +00:00
Tom Lane 7d572886d6 Fix coredump seen when doing mergejoin between indexed tables,
for example in the regression test database, try
select * from tenk1 t1, tenk1 t2 where t1.unique1 = t2.unique2;
6.5 has this same bug ...
1999-07-30 00:56:17 +00:00
Tom Lane 161be69544 Update comments for create_indexscan_node(). 1999-07-30 00:44:23 +00:00
Bruce Momjian 12c51d9c6e Remove comment after optimization flag. 1999-07-29 15:39:05 +00:00
Tom Lane ecbfafbe0e Add support for Case exprs to fix_indxqual_references,
so that Case works in WHERE join clauses.  Temporary patch --- this routine
is one of many that ought to be changed to use centralized expression-tree-
walking logic.
1999-07-29 02:48:05 +00:00
Tom Lane 6b157f376a Add equal() funcs for Case nodes ... amazing we had not
detected this omission before.  Miscellaneous other cleanups.
1999-07-29 02:45:36 +00:00
Tom Lane 9682e8081b Allow a_expr not just AexprConst in the right-hand list of
IN and NOT IN operators.  Rewrite grotty implementation of IN-list
parsing ... look Ma, no global variable ...
1999-07-28 17:39:38 +00:00
Tom Lane b62fdc13f0 Correct bug in best_innerjoin(): it should check all the
rels that the inner path needs to join to, but it was only checking for
the first one.  Failure could only have been observed with an OR-clause
that mentions 3 or more tables, and then only if the bogus path was
actually selected as cheapest ...
1999-07-27 06:23:12 +00:00
Tom Lane 2f30d5a34a My recent optimizer changes caused a different plan to
be picked for one of the complex joins in rules test ... leading to
a different output ordering ...
1999-07-27 03:53:54 +00:00
Tom Lane 9e7e29e6c9 First cut at doing LIKE/regex indexing optimization in
optimizer rather than parser.  This has many advantages, such as not
getting fooled by chance uses of operator names ~ and ~~ (the operators
are identified by OID now), and not creating useless comparison operations
in contexts where the comparisons will not actually be used as indexquals.
The new code also recognizes exact-match LIKE and regex patterns, and
produces an = indexqual instead of >= and <=.

This change does NOT fix the problem with non-ASCII locales: the code
still doesn't know how to generate an upper bound indexqual for non-ASCII
collation order.  But it's no worse than before, just the same deficiency
in a different place...

Also, dike out loc_restrictinfo fields in Plan nodes.  These were doing
nothing useful in the absence of 'expensive functions' optimization,
and they took a considerable amount of processing to fill in.
1999-07-27 03:51:11 +00:00
Tom Lane 49ed4dd779 Further work on planning of indexscans. Cleaned up interfaces
to index_selectivity so that it can be handed an indexqual clause list
rather than a bunch of assorted derivative data.
1999-07-25 23:07:26 +00:00
Tom Lane 8ae29a1d40 Remove 'restrictinfojoinid' field from RestrictInfo nodes.
The only place it was being used was as temporary storage in indxpath.c,
and the logic was wrong: the same restrictinfo node could get chosen to
carry the info for two different joins.  Right fix is to return a second
list of unjoined-relids parallel to the list of clause groups.
1999-07-25 17:53:27 +00:00
Tom Lane ac4913a0dd Clean up messy clause-selectivity code in clausesel.c; repair bug
identified by Hiroshi (incorrect cost attributed to OR clauses
after multiple passes through set_rest_selec()).  I think the code
was trying to allow selectivities of OR subclauses to be passed in
from outside, but noplace was actually passing any useful data, and
set_rest_selec() was passing wrong data.

Restructure representation of "indexqual" in IndexPath nodes so that
it is the same as for indxqual in completed IndexScan nodes: namely,
a toplevel list with an entry for each pass of the index scan, having
sublists that are implicitly-ANDed index qual conditions for that pass.
You don't want to know what the old representation was :-(

Improve documentation of OR-clause indexscan functions.

Remove useless 'notclause' field from RestrictInfo nodes.  (This might
force an initdb for anyone who has stored rules containing RestrictInfos,
but I do not think that RestrictInfo ever appears in completed plans.)
1999-07-24 23:21:14 +00:00
Tom Lane 348bdbce79 Minor code beautification, extensive improvement of
comments.  This file was full of obsolete and just plain wrong
commentary...
1999-07-23 03:34:49 +00:00
Tom Lane baac6f981e Exit cleanups I made yesterday caused pq_close() to be
invoked during exit from a standalone backend, leading to core dump.
This is the cause of the recently reported initdb-time crash :-(.
Sorry folks...
1999-07-23 03:00:10 +00:00
Bruce Momjian 66f66343f6 Alpha spinlock fix from Uncle George <gatgul@voicenet.com> 1999-07-22 18:30:08 +00:00
Tom Lane 2aa64f79f5 Plug several holes in backend's ability to cope with
unexpected loss of connection to frontend.
1999-07-22 02:40:07 +00:00
Bruce Momjian f96babac12 While I was running some tests in psql, trying to figure out how to change
the query string to handle any length, I discovered that under certain
conditions, psql will core dump when handling long strings.  Thus, the
patch.  It was caused by a buffer overrun, probably not noticeable in a lot
of cases, but pretty noticeable in mine.

Problem was caused by the fact that the length check is only performed after
the check for a ; to get the end of the query and execute.

Cheers...

MikeA
1999-07-20 17:20:43 +00:00
Bruce Momjian c175de56dc Reverse out cache changes that are not ready yet. 1999-07-20 17:14:08 +00:00
Bruce Momjian 7944d501f4 Use -ieee alpha flag for gcc and egcs only. 1999-07-20 16:48:58 +00:00
Bruce Momjian 41b60ba7ad autoconf 1999-07-20 02:45:44 +00:00
Bruce Momjian 93fbd46ba5 Re-add Makefile. 1999-07-20 02:44:09 +00:00
Bruce Momjian e740c9b1d1 Move -ieee to adt Makefile, and add CPU Makefile variable. 1999-07-20 02:42:20 +00:00
Tom Lane 2908bd535f Complain about INSERT ... SELECT ... ORDER BY, which we do not
support, but which the grammar was accepting.  Also, fix several bugs
having to do with failure to copy fields up from a subselect to a select
or insert node.
1999-07-20 00:18:01 +00:00
Bruce Momjian d6ce220f04 psql fix. 1999-07-19 21:06:19 +00:00
Bruce Momjian e2f32054f4 linux/sparc cleanup 1999-07-19 18:19:40 +00:00
Bruce Momjian b653d1e263 Fix for linux/sparc. 1999-07-19 18:07:36 +00:00
Bruce Momjian 50644a2202 Cleanup of patch just applied. 1999-07-19 16:49:17 +00:00
Bruce Momjian 2b8c9e793d Set the application name, used for parsing readline's .inputrc -- dz
Massimo
1999-07-19 16:46:53 +00:00
Bruce Momjian be1851902a Fix #if if. 1999-07-19 14:30:52 +00:00
Michael Meskes 9f0ffa2241 *** empty log message *** 1999-07-19 12:37:48 +00:00
Bruce Momjian faf7d78174 Install new alignment code to use MAXALIGN rather than DOUBLEALIGN where
approproate.
1999-07-19 07:07:29 +00:00
Bruce Momjian e259780b13 Enable WIN32 compilation of libpq. 1999-07-19 06:25:40 +00:00
Bruce Momjian bf98a4656b Win32 cleanup 1999-07-19 02:45:43 +00:00
Bruce Momjian 9da390d348 autoconf 1999-07-19 02:32:55 +00:00
Bruce Momjian e44c931801 Re-add getopt.h check, remove NT-specific tests for it. 1999-07-19 02:27:16 +00:00
Tom Lane 677028177e Clean up gcc warning about unused static decl. 1999-07-19 02:06:15 +00:00
Bruce Momjian 435ed7aaa1 autoconf 1999-07-19 01:20:00 +00:00
Bruce Momjian c9acd2da12 Remove getopt configure check. 1999-07-19 01:18:05 +00:00
Tom Lane 44bc7ab2a6 Put back mistakenly removed configure test for HAVE_NETINET_IN_H. 1999-07-19 00:55:59 +00:00
Tom Lane 0c4929ff86 Parser no longer considers
SELECT a/2, a/2 FROM test_missing_target GROUP BY a/2;
to be ambiguous ... which I think is correct behavior.
1999-07-19 00:29:07 +00:00
Tom Lane 7f76eab140 Rewrite parser's handling of INSERT ... SELECT so that processing
of the SELECT part of the statement is just like a plain SELECT.  All
INSERT-specific processing happens after the SELECT parsing is done.
This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using
the wrong column labels.  Ensure that DEFAULT clauses are coerced to
the target column type, whether or not stored clause produces the right
type.  Substantial cleanup of parser's array support.
1999-07-19 00:26:20 +00:00
Bruce Momjian c981442772 Update ecpg compile. 1999-07-18 21:07:02 +00:00
Bruce Momjian b9b5f5d6ca autoconf 1999-07-18 21:05:17 +00:00
Bruce Momjian cb08547646 Add getopt test. 1999-07-18 21:02:56 +00:00
Bruce Momjian 0b976ec1d8 autoconf 1999-07-18 20:46:25 +00:00
Bruce Momjian 2798162038 cleanup 1999-07-18 20:43:33 +00:00
Bruce Momjian 7badb1e792 Fix configure problem. 1999-07-18 20:43:13 +00:00
Bruce Momjian b721c9e164 autoconf 1999-07-18 20:13:40 +00:00
Tom Lane fea7ab5298 Fix typo in _outArrayRef(). 1999-07-18 19:02:49 +00:00
Bruce Momjian d6f26e6451 Update for 6.6. 1999-07-18 18:06:42 +00:00
Bruce Momjian a927d6ea4e configure cleanup 1999-07-18 18:03:50 +00:00
Bruce Momjian d0634aca39 configure cleanup 1999-07-18 17:38:25 +00:00
Bruce Momjian ef9699d6da autoconf 1999-07-18 16:44:31 +00:00
Bruce Momjian 07262a2dfb Update configure include checks. 1999-07-18 16:42:16 +00:00
Bruce Momjian 0858b06f16 autoconf 1999-07-18 14:54:46 +00:00
Bruce Momjian 46355e94d4 Update includes from configure 1999-07-18 14:48:30 +00:00
Bruce Momjian 9c30bba810 autoconf 1999-07-18 14:38:47 +00:00
Bruce Momjian 1c0c607110 No check for string/strings.h. 1999-07-18 14:34:38 +00:00
Tom Lane 32664b4b4b Improve commentary about ArrayRef and ResTarget nodes. 1999-07-18 03:45:01 +00:00
Bruce Momjian 3406901a29 Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
Tom Lane c62b8a68bf Fix incorrect declaration of rtentry as 'ResTarget' where it
should be 'RangeTblEntry' ; explain.c had copied the erroneous code.
1999-07-17 19:01:21 +00:00
Bruce Momjian 33e826d167 Fix for multi-byte includes. 1999-07-17 16:25:28 +00:00
Tom Lane df454bd864 Fix silly typo in commentary... 1999-07-17 16:02:50 +00:00
Bruce Momjian 0e264fb464 Add c.h to exclusion list. 1999-07-17 15:37:30 +00:00
Bruce Momjian 9b4dac7f12 clean up comment on missing file. 1999-07-17 05:16:15 +00:00
Bruce Momjian 2d36471b82 Include check 1999-07-17 04:25:33 +00:00
Bruce Momjian 8f5561a0d9 More config.h cleanups. 1999-07-17 04:12:10 +00:00
Bruce Momjian fbe4ad2154 Add config.h as needed. 1999-07-17 04:00:31 +00:00
Tom Lane 8ee07b506d Tired of seeing that 'unused variable' warning... 1999-07-16 23:15:46 +00:00
Tom Lane 05933f4ec1 Add back improperly removed #include for utils/trace.h. 1999-07-16 23:12:39 +00:00
Tom Lane e1e110228f Add back improperly removed #include for config.h.
This probably ought to be kept in *all* the port files, but these two
are the only ones that generated compiler warnings for me ...
1999-07-16 23:09:45 +00:00
Tom Lane 1a6c5b96ad Add back improperly removed #include for utils/dynamic_loader.h. 1999-07-16 23:05:45 +00:00
Tom Lane 8753b23c8c Fix 'SO__MINOR_VERSION' typo for irix5; add AIX shlib support
from Andreas Z.; minor cosmetic cleanups.
1999-07-16 22:56:01 +00:00
Tom Lane 36ce6d439f Support subscripts on bare column names. 1999-07-16 22:32:25 +00:00
Tom Lane f9e2c7fae8 Allow bare column names to be subscripted as arrays. This
creates a reduce/reduce conflict, which I resolved by changing the
'AexprConst -> Typename Sconst' rule to 'AexprConst -> SimpleTypename Sconst'.
In other words, a subscripted type declaration can't be used in that
syntax any longer.  This seems a small price to pay for not having to
qualify subscripted columns anymore.
Other cleanups: rename res_target_list to update_target_list, and remove
productions for variants that are not legal in an UPDATE target list;
rename res_target_list2 to plain target_list; delete position_expr
in favor of using b_expr in that production; merge opt_indirection
into attr nonterminal, since there are no places where an unsubscripted
attr is wanted; fix typos in Param support; change case_arg so that
an arbitrary a_expr is allowed, not only a column name.
1999-07-16 22:29:42 +00:00
Tom Lane bc9236bc01 Revise _bt_binsrch() so that its binary search loop takes
care of equal-key cases, eliminating bt_firsteq().  The linear search
formerly done by bt_firsteq() took a lot of time in the case where many
equal keys appear on the same page.
1999-07-16 22:17:06 +00:00
Bruce Momjian 9679cb3910 More cleanup 1999-07-16 17:46:32 +00:00
Bruce Momjian 773088809d More cleanup 1999-07-16 17:07:40 +00:00
Bruce Momjian 7d5b08dec0 More cleanup 1999-07-16 05:41:19 +00:00
Bruce Momjian 69817665cb Final cleanup 1999-07-16 05:23:30 +00:00
Bruce Momjian a71802e12e Final cleanup. 1999-07-16 05:00:38 +00:00
Bruce Momjian 9b645d481c Update #include cleanups 1999-07-16 03:14:30 +00:00
Bruce Momjian a9591ce66a Change #include's to use <> and "" as appropriate. 1999-07-15 23:04:24 +00:00
Bruce Momjian 2e6b1e63a3 Remove unused #includes in *.c files. 1999-07-15 22:40:16 +00:00
Bruce Momjian 40a89e08b2 Cleanups. 1999-07-15 20:32:30 +00:00
Bruce Momjian fb38a5d8cf Remove un-needed #include's from *.c files. 1999-07-15 19:21:43 +00:00
Bruce Momjian 353eb3dadf Add updates. 1999-07-15 16:55:32 +00:00
Bruce Momjian 4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +00:00
Tom Lane 390e8354ce Add SHLIB_LINK setting for solaris_i386 and solaris_sparc ports,
per bug report from Daren Sefcik <daren@partnersdata.com>.
1999-07-15 02:03:00 +00:00
Tom Lane 8aea617c03 Several routines failed to cope with CASE expressions, and
indeed some of 'em were missing support for more node types than that...
1999-07-15 01:52:09 +00:00
Bruce Momjian 0cf1b79528 Cleanup of /include #include's, for 6.6 only. 1999-07-14 01:20:30 +00:00
Bruce Momjian ad4948862c Remove S*I comments from Stephan. 1999-07-13 21:17:45 +00:00
Bruce Momjian 050371fccd More cpu cleanups, only for 6.6. 1999-07-13 20:12:51 +00:00
Bruce Momjian 540c114225 Redefine cpu's as __cpu__. Only for 6.6 branch. 1999-07-13 20:00:37 +00:00
Bruce Momjian 30e27a9099 readd include for safety. 1999-07-12 13:32:38 +00:00
Tatsuo Ishii 8f02f2252d Fix some compiler warnings (Tomoaki Nishiyama), add WIN1250 support (Pavel Behal) 1999-07-11 22:47:21 +00:00
Tom Lane eeaeb1bda8 RewritePreprocessQuery tried to match resjunk targets against
result relation ... wrong ...
1999-07-11 17:54:30 +00:00
Tom Lane eeb3abe017 Ignore resjunk targetlist entries when matching arguments to
a SubLink with the subplan's targetlist.  This fixes a problem seen with,
for example, a subselect that uses GROUP BY.
1999-07-11 02:04:19 +00:00
Tom Lane 9cbd349bcd ExecReScanGroup() forgot to clear grpstate->grp_firstTuple,
thereby guaranteeing wrong results from a rescanned Group node.
1999-07-11 01:57:32 +00:00
Tom Lane ebc3cc7efa heapam.h uses type time_t, but didn't include <time.h>. 1999-07-10 22:06:26 +00:00
Tom Lane cc62dc2032 Fix tuplecmp() to ensure repeatable sort ordering of tuples
that contain null fields.  Old code would produce erratic sort results
because comparisons of tuples containing nulls could produce inconsistent
answers.
1999-07-10 18:21:59 +00:00
Bruce Momjian d62c25d452 cleanup of long long int atoi test. 1999-07-10 17:03:34 +00:00
Bruce Momjian 5a3fa95c39 Update stuff for 6.5.1 release. 1999-07-10 16:28:02 +00:00
Tatsuo Ishii 4fceee0e71 -mieee and # does not work for certain version of egcs 1999-07-10 12:33:10 +00:00
Tom Lane 73efd3867d Fix gcc complaint about long being passed to sprintf %d. 1999-07-09 22:53:40 +00:00
Bruce Momjian 863db45e86 Make ^ precidence greater than *. 1999-07-09 21:59:59 +00:00
Bruce Momjian cda192317a createlang now returns 2 for language already exists. 1999-07-09 17:57:46 +00:00
Bruce Momjian 103cf75651 Re-apply range check patch after fixing LIMIT_H test and defines. 1999-07-09 17:40:31 +00:00
Bruce Momjian cd5dfb65a9 Add mention block size <= 32k. 1999-07-09 16:56:44 +00:00
Tom Lane b9c0096d97 Another place that HAVE_LIMITS_H was misspelled. 1999-07-09 15:09:54 +00:00
Bruce Momjian 8aa780bdd3 cleanup 1999-07-09 04:51:27 +00:00
Bruce Momjian 296efd8065 Fix for ACL length problem on different platforms. 1999-07-09 03:28:53 +00:00
Bruce Momjian 46db8ac712 Backup pg_atoi patch for long checking. Caused initdb problems. 1999-07-09 03:27:20 +00:00
Bruce Momjian ffe0097519 Add linux_m68k template file. 1999-07-09 02:35:37 +00:00
Bruce Momjian 27ef825743 Rename tuturials for char2/char16 removal. 1999-07-08 15:28:51 +00:00
Bruce Momjian 1a7273bd5c Rename example temp to mytemp. 1999-07-08 15:27:01 +00:00
Bruce Momjian 3acb7d1634 Test Case:
----------
exec sql begin declare section;
   short s ;
   unsigned short us;
exec sql end   declare section;
exec sql create table test(s smallint, us smallint);
exec sql commit;
s = 1; us =32000;
exec sql insert into test values( :s, :us ) ;  <== error

Error Message: "i4toi2: '-600309759' causes int2 underflow"

Masaaki Sakaida
1999-07-08 03:32:57 +00:00
Bruce Momjian 0343024a5c Add CXXFLAGS += 1999-07-08 03:30:16 +00:00
Bruce Momjian 2cf2a4fe2b > In both datetime_trunc() and timespan_trunc() in dt.c,
> the DTK_MICROSEC case is just like the DTK_MILLISEC case.
> I think this is wrong and it ought to look like
>         fsec = rint(fsec * 1000000) / 1000000;
> no?

Tom Lane.
1999-07-08 03:22:46 +00:00
Bruce Momjian 70ce98b77a Rename pg_temp to pg_sorttemp so it does not conflict with temp table names. 1999-07-08 02:46:39 +00:00
Bruce Momjian 5035d7b985 pg_atoi() does range check on int4 data only if
"HAS_LONG_LONG" is defined based on the assumption that
strtol() would return ERANGE if a platform does not support
64-bit integers. In current PostgreSQL 6.5 (and 6.4.2)
distribution, "HAS_LONG_LONG" is defined only if platform
is "alpha". (See include/port/alpha.h) I think the int4
range check should apply to linux_alpha as well. (I have
not tested yet but I guess this might be applicable to
newer Linux/i386 distributions which includes new GCC which
implements long int as 64-bit int.)
1999-07-08 00:27:01 +00:00
Bruce Momjian a6c688d9cd Irix update from Mark Dalphin 1999-07-08 00:15:03 +00:00
Bruce Momjian 104d6c816e Add ^ precidence. 1999-07-08 00:00:43 +00:00
Bruce Momjian 38ff52c379 Allow port numbers 32k - 64k. 1999-07-07 17:17:50 +00:00
Bruce Momjian db15dc05ad Fix for \do and ceil()/float. 1999-07-07 16:09:33 +00:00
Bruce Momjian e9c977da7d Fix spelling of variable name. 1999-07-07 09:36:45 +00:00
Bruce Momjian 9f7ac20e57 Cleanup of min tuple size. 1999-07-07 09:27:28 +00:00
Bruce Momjian 1391098851 Fix misspelling. 1999-07-07 09:11:15 +00:00
Bruce Momjian 5babe7db45 Remove old readme file. 1999-07-05 21:48:21 +00:00
Bruce Momjian 137eacbe6a Align cleanup. 1999-07-04 05:47:06 +00:00
Bruce Momjian a0b4af3c85 More alignment 1999-07-04 05:44:56 +00:00
Bruce Momjian ede5a41829 Clean up maximum rewrite tuple length. 1999-07-04 05:16:05 +00:00
Bruce Momjian eba41848aa Clarify maximum tuple and max attribute lengths. 1999-07-04 04:56:02 +00:00
Tom Lane b31aa64f4a Make exec_simple_check_plan() check for a null plan, so
that it doesn't crash when processing a utility statement.
1999-07-04 01:03:01 +00:00
Bruce Momjian efb621278e Add abortcurrent trans to temp table fix. 1999-07-03 15:43:57 +00:00
Bruce Momjian ff8756dd1c More cleanup 1999-07-03 01:57:53 +00:00
Bruce Momjian b1444b0934 Update tuple size check. 1999-07-03 01:56:16 +00:00
Bruce Momjian 8dd3407bf5 Fix for insertion of tuple too large. 1999-07-03 01:47:02 +00:00
Bruce Momjian 97dfff832c Fix to prevent too large tuple from being created. 1999-07-03 00:33:04 +00:00
Bruce Momjian 954e466c27 Fix for removal of temp tables if last transaction was aborted. 1999-07-02 18:09:28 +00:00
Bruce Momjian d20abcd8c5 typo fix. 1999-07-02 03:21:37 +00:00
Bruce Momjian c9a0a232e2 #ifdef around true and false. 1999-07-01 19:47:25 +00:00
Tom Lane 0aa544eb41 make distclean missed a few symlinks created by configure. 1999-07-01 00:06:28 +00:00
Tom Lane fa179dde82 Make sure symlinks for sharedlib get removed by 'make clean'. 1999-06-30 23:57:31 +00:00
Tom Lane 7bf29f6b78 Generate a full set of version-numbered symlinks when building
a shared library, not just when installing it.
1999-06-30 23:54:18 +00:00
Michael Meskes 9b0e20574b *** empty log message *** 1999-06-29 09:25:25 +00:00
Vadim B. Mikheev 49f68a8584 Avoid disk writes for read-only transactions. 1999-06-29 04:54:49 +00:00
Bruce Momjian cffd0f9c89 Add time warning about bigtests. 1999-06-28 18:40:34 +00:00
Peter Mount e70b4831d7 Some minor bug fixes 1999-06-27 11:05:38 +00:00
Bruce Momjian fe90c54800 Add var defines for no testandset 1999-06-26 15:58:28 +00:00
Bruce Momjian ef15ed17a0 Remove -m486 on Openbsd. 1999-06-26 15:54:36 +00:00
Michael Meskes 19630e0cbc *** empty log message *** 1999-06-25 10:42:06 +00:00
Tom Lane b692c956ba Makefile.global failed to define $(LIBS), which is
unfortunate considering that several subdirectory makefiles were counting
on it to do so...
1999-06-25 00:13:45 +00:00
Michael Meskes d12561040c *** empty log message *** 1999-06-24 13:15:31 +00:00
Peter Mount dc88d74af3 Some fixes supplied by Jon Nielsen jonfn@image.dk 1999-06-23 05:56:20 +00:00
Tom Lane 1f2c6f4f48 Replace rewriter's checkQueryHasAggs and checkQueryHasSubLink
with expression_tree_walker-based code.  The former failed to cope with
expressions containing SubLinks, and the latter returned TRUE for both
SubLinks and Aggrefs (cut-and-paste bug?).  There is a lot more scope for
using expression_tree_walker in this module, but I'll restrain myself
until the 6.6 split occurs from touching not-demonstrably-broken code.
1999-06-21 01:26:56 +00:00
Tom Lane fd8e580bb7 Clean up problems with sublinks + grouping in planner. Not
sure if they are all fixed, because rewriter is now the stumbling block,
but at least some cases work that did not work before.
1999-06-21 01:20:57 +00:00
Tom Lane 974bdd94f9 On second thought, expression_tree_walker should handle bare
SubLink nodes after all ...
1999-06-21 01:18:02 +00:00
Bruce Momjian db4a6a2618 I have a small patch for 6.5.
aclchk.c: heap_close() is not called after calling heap_openr().

Atsushi Ogawa
1999-06-19 05:05:52 +00:00
Bruce Momjian 8d37132ec9 Rename to vararg_format(). 1999-06-19 05:00:30 +00:00
Bruce Momjian 326d8658ad Change form() to varargform() to prevent portability problems. 1999-06-19 04:54:23 +00:00
Tom Lane e786508600 My first chosen victim for expression_tree_walker conversion
is parse_aggs.c.  This fixes its failure to cope with (at least) CaseExpr
and ArrayRef nodes, which is the reason why both of these fail in 6.5:
select coalesce(f1,0) from int4_tbl group by f1;
ERROR:  Illegal use of aggregates or non-group column in target list
select sentence.words[0] from sentence group by sentence.words[0];
ERROR:  Illegal use of aggregates or non-group column in target list
The array case still fails, but at least it's not parse_agg's fault
anymore ... considering that we now support CASE officially, I think
it's important to fix the first example ...
1999-06-19 03:48:31 +00:00
Tom Lane 86f36719db Create a generic expression-tree-walker subroutine, which
will gradually replace all of the boilerplate tree-walk-recursion code that
currently exists in O(N) slightly different forms in N subroutines.
I've had it with adding missing cases to these subroutines...
1999-06-19 03:41:45 +00:00
Tom Lane d30c4b0562 Temporarily disable error checks for missing selectivity
functions, in order to work around oversight in 6.5 release: rtree
index functions haven't got any.  Mea culpa ...
1999-06-19 00:44:44 +00:00
Bruce Momjian 0591bbd558 Patch to allow vacuum on multi-segment tables, from Hiroshi Inoue 1999-06-18 16:47:23 +00:00
Thomas G. Lockhart 8c3a796328 Incorporate fixes from Date and Darwen, 1997.
Did not check the function declarations as carefully as the other parts,
 though all of the function names *do* match up with D&D.
1999-06-18 05:03:48 +00:00
Bruce Momjian 371a9d7ad8 linux_ppc now use -O0 to fix problem in optimization of fmgr calls. 1999-06-18 00:46:11 +00:00
Tom Lane 285610e9ea Explain didn't handle inheritance correctly (it didn't
manipulate rtable the same way executor does).
1999-06-17 23:45:32 +00:00
Tom Lane 5f74d499bf Defend against function calls with more than 8 arguments (code
used to overrun its fixed-size arrays before detecting error; not cool).
Also, replace uses of magic constant '8' with 'MAXFARGS'.
1999-06-17 22:21:41 +00:00
Bruce Momjian 4c65382596 Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGN
for Irix.
1999-06-17 15:16:09 +00:00
Thomas G. Lockhart 0c1ec67447 Add CLI required header and examples from SQL3/SQL98
August 1994 draft standard.
Use the ecpg support libraries to write the CLI interface?
Date and Darwen claim that CLI is a more modern and flexible approach...
1999-06-17 14:19:17 +00:00
Bruce Momjian 4b9ccbe3cf Make linux_ppc use only -O, not -O2. 1999-06-17 13:44:43 +00:00
Michael Meskes c6a6597862 *** empty log message *** 1999-06-16 18:35:51 +00:00
Michael Meskes c70db13265 *** empty log message *** 1999-06-16 18:25:50 +00:00
Bruce Momjian ad34847d4e Cleanup 1999-06-16 11:01:17 +00:00
Tom Lane 275a1d054e Undo Jan's typo that broke regress.sh's detection of system
type name.
1999-06-14 17:49:06 +00:00
Tatsuo Ishii de7c728d41 change #if defined(__mc68000__) to:
#if defined(__mc68000__) && defined(__linux__)
so that other m68k systems(such as NetBSD) will not be affected.
1999-06-13 00:07:43 +00:00
Tom Lane 642d21a59b Move default NBuffers setting into config.h, and rename it
to DEF_NBUFFERS for readability.  Make sure the default value is OK
according to postmaster.c's new sanity check for -B values.
1999-06-12 22:17:24 +00:00
Tom Lane d9e223d53c Fix critical error noticed by Massimo: copy.c used to have a
special hack to ensure it would close its output file even after failure
due to elog(ERROR) partway through the copy.  This is now unnecessary
because fd.c takes care of cleaning up open files at transaction abort;
worse, after fd.c closed the file copy.c would try to do so *again* at
the start of the next COPY command.  This would result in havoc in most
implementations of stdio library.
1999-06-12 20:41:25 +00:00
Tom Lane aaf2442472 Remove query_planner's overhasty rejection of cases where
tlist and qual are NULL.  It ought to handle these the same as the cases
where tlist contains only constant expressions, ie, be willing to generate
a Result-node plan.  This did not use to matter, but it does now because
union_planner will flatten the tlist when aggregates are present.  Thus,
'select count(1) from table' now causes query_planner to be given a null
tlist, and to duplicate 6.4's behavior we need it to give back a Result
plan rather than refusing the query.  6.4 was arguably doing the Wrong
Thing for this query, but I'm not going to open a semantics issue right
before 6.5 release ... can revisit that problem later.
1999-06-12 19:38:30 +00:00
Tom Lane acf242da97 Plug hole in dike: planner would coredump if query_planner
returned NULL, which it will do in some cases where an elog(ERROR) would
probably be more appropriate.  For the moment, generate a not-very-
informative error message rather than proceeding to certain coredump.
Probably ought to think about making query_planner elog instead of
returning NULL, but this is at least a safe change for now.
1999-06-12 19:27:41 +00:00
Tom Lane 1918a1d191 When targetlist is NULL, ExecTargetList was passing back a
pointer to palloc'd but uninitialized memory.  This is not cool; anyone looking
at the returned 'tuple' would at best coredump and at worst behave in a
bizarre and irreproducible way.  Fix it to return a predictable value,
namely a correctly-set-up palloc'd tuple containing zero attributes.
I believe this fix is both safe and critical.
1999-06-12 19:22:40 +00:00
Bruce Momjian 0c3281ce7c Reversed out Massimo patch. 1999-06-12 14:07:33 +00:00
Bruce Momjian 603e153bb8 I don't like last minute patches before the final freeze, but I believe that
this one could be useful for people experiencing out-of-memory crashes while
executing queries which retrieve or use a very large number of tuples.

The problem happens when storage is allocated for functions results used in
a large query, for example:

  select upper(name) from big_table;
  select big_table.array[1] from big_table;
  select count(upper(name)) from big_table;

This patch is a dirty hack that fixes the out-of-memory problem for the most
common cases, like the above ones. It is not the final solution for the
problem but it can work for some people, so I'm posting it.

The patch should be safe because all changes are under #ifdef. Furthermore
the feature can be enabled or disabled at runtime by the `free_tuple_memory'
options in the pg_options file. The option is disabled by default and must
be explicitly enabled at runtime to have any effect.

To enable the patch add the follwing line to Makefile.custom:

CUSTOM_COPT += -DFREE_TUPLE_MEMORY

To enable the option at runtime add the following line to pg_option:

free_tuple_memory=1

Massimo
1999-06-12 14:05:41 +00:00
Bruce Momjian bd470ba47e Hi,
please apply the included patch. It corrects the headers in src/win32 -
there are some missing #endif.

                        Dan
1999-06-11 15:01:29 +00:00
Bruce Momjian f4de72cc6b add m86 similar entries. 1999-06-11 14:34:02 +00:00
Vadim B. Mikheev ba740a0917 Change Assert(Ptp.t_data->t_xmax == tp.t_data->t_xmin) to :
/*
 * Read above about cases when !ItemIdIsUsed(Citemid)
 * (child item is removed)... Due to the fact that
 * at the moment we don't remove unuseful part of
 * update-chain, it's possible to get too old
 * parent row here. Like as in the case which
 * caused this problem, we stop shrinking here.
 * I could try to find real parent row but want
 * not to do it because of real solution will
 * be implemented anyway, latter, and we are too
 * close to 6.5 release.        - vadim 06/11/99
 */
if (Ptp.t_data->t_xmax != tp.t_data->t_xmin)
...
1999-06-11 09:35:08 +00:00
Vadim B. Mikheev 3b79cc0c55 Removed bad Assert(!buf->ri_lock) when unlocking exclusively
locked buffer.
1999-06-11 09:00:02 +00:00
Vadim B. Mikheev 4ca7b4d2e5 More about chained mode and isolation. 1999-06-11 05:40:18 +00:00
Bruce Momjian 3b9ef4d073 Change mdtruncate to truncate and not unlink.
Hiroshi Inoue
1999-06-11 02:39:43 +00:00
Bruce Momjian d852d31ea3 This patch should enable 6.5 to build on Motorola 68000 architecture.
It comes from Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>.
1999-06-10 22:59:22 +00:00
Michael Meskes 70dfc8c11e *** empty log message *** 1999-06-10 19:11:33 +00:00
Jan Wieck cc08d051d0 Added 2 regression tests for NUMERIC data type.
1. Using 100 digits after decimal point on the default
   make runtest.

2. Using 1000 digits after decimal point in a new target
   make bigtest.

At the end of 'make runtest', a hint about the new bigtest is
printed.

Jan
1999-06-10 17:49:32 +00:00
Vadim B. Mikheev 78f7ccc982 1. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!")
and possibly for other cases too:

   DO NOT cache status of transaction in unknown state
   (i.e. non-committed and non-aborted ones)

   Example:
   T1 reads row updated/inserted by running T2 and cache T2 status.
   T2 commits.
   Now T1 reads a row updated by T2 and with HEAP_XMAX_COMMITTED
   in t_infomask (so cached T2 status is not changed).
   Now T1 EvalPlanQual gets updated row version without HEAP_XMIN_COMMITTED
   -> TransactionIdDidCommit(t_xmin) and TransactionIdDidAbort(t_xmin)
   return FALSE and T2 decides that t_xmin is not committed and gets
   ERROR above.

   It's too late to find more smart way to handle such cases and so
   I just changed xact status caching and got rid TransactionIdFlushCache()
   from code.

   Changed: transam.c, xact.c, lmgr.c and transam.h - last three
   just because of TransactionIdFlushCache() is removed.

2. heapam.c:

   T1 marked a row for update. T2 waits for T1 commit/abort.
   T1 commits. T3 updates the row before T2 locks row page.
   Now T2 sees that new row t_xmax is different from xact id (T1)
   T2 was waiting for. Old code did Assert here. New one goes to
   HeapTupleSatisfiesUpdate. Obvious changes too.

3. Added Assert to vacuum.c
4. bufmgr.c: break
   Assert(buf->r_locks == 0 && !buf->ri_lock)
   into two Asserts.
1999-06-10 14:17:12 +00:00
Tom Lane c37ecaf8d5 Fix errors in SELECT ... GROUP BY ... UNION SELECT ...
ye proverbial one-line patch (not counting five lines of comment so's
maybe it won't happen again)
1999-06-10 06:55:40 +00:00
Bruce Momjian 0ac955540b Remove -O2 for linux/alpha, make -O. 1999-06-09 12:39:46 +00:00
Vadim B. Mikheev 51298bcfda Reset evaluation plan tuple table next free slot counter to 0
after ExecEndNode. It must be done! Or we'll be out of free
tuple slots very soon, though slots are freed by ExecEndNode
and ready for reusing.

We didn't see this problem before because of

int         nSlots = ExecCountSlotsNode(plan);
TupleTable  tupleTable = ExecCreateTupleTable(nSlots + 10);
    /* why add ten? - jolly */

code in InitPlan - i.e. extra 10 slots. Simple select uses
3 slots and so it was possible to re-use evaluation plan
3 additional times and didn't get

elog(NOTICE, "Plan requires more slots than are available");
elog(ERROR, "send mail to your local executor guru to fix this");

Changes are obvious and shouldn't be problems with them.
Though, I added Assert(epqstate->es_tupleTable->next == 0)
before EvalPlanQual():ExecInitNode and we'll notice if
something is still wrong. Is it better to change Assert
to elog(ERROR) ?
1999-06-09 12:23:42 +00:00
Vadim B. Mikheev 0e41fd57df MVCC updates. 1999-06-09 03:51:40 +00:00
Bruce Momjian ccdad51a73 Linux-alpha gets -O 1999-06-08 19:19:51 +00:00
Bruce Momjian 2544f2d0bb Remove optimization on linux/alpha. 1999-06-08 17:34:43 +00:00
Bruce Momjian 61882d4c37 Cleanup 1999-06-08 01:37:55 +00:00
Bruce Momjian f56483490b Disable pg_upgrade for 6.5. 1999-06-08 01:32:05 +00:00
Bruce Momjian 505b2ecdf4 I attach a patch for pg_upgrade. This does two things:
1. check whether the program is being executed in $PGDATA/..  This is
   necessary if the data tree is not in the standard place, as is the
   case with the Debian distribution (because of Debian policy).

2. give a clearer error message if the dumped data structure fails to
   be loaded.

Oliver Elphick
1999-06-07 22:58:31 +00:00
Bruce Momjian 094616ec83 On AIX 4.3.2 the third line in template/aix_42:
SHARED_LIB:

needs to be changed to:
SHARED_LIB:-lc

I think this was also needed on AIX 4.2. Comments Please !!

If nobody objects, I suggest to make this change, since it cannot
break AIX 4.2 and is necessary on AIX 4.3

Andreas
1999-06-07 17:20:24 +00:00
Vadim B. Mikheev 4c45832c39 Concurrency... Highest one...
DO NOT EVEN TRY TO DO PageGetMaxOffsetNumber BEFORE
LockBuffer!
-:)
1999-06-07 15:14:54 +00:00
Bruce Momjian 8864ee0b6b > Here is a small patch that should only affect win32 building
> (native win32, not cygnus).
> It does the following:
> Patches two win32.mak files to DEFINE HAVE_VSNPRINTF and
> HAVE_STRDUP. This is required to build at all.
> Bumps the version number on libpq.dll from 6.4 to 6.5.
> Required for install programs to work.
> Adds defintions for BLCKSZ and MAXIMUM_ALIGN to "win32.h" in
> the client-side libpiq directory.
>
> All these files are only used when building on native win32,
> so it should be safe I think.
>
> Again, really sorry to throw this in so late, but I would
> hate to do the same thing as with 6.4 (which required 6.4.1
> to at all compile on Win32).
>
> Thanks,
>
>   //Magnus
1999-06-07 14:29:20 +00:00
Tom Lane bad3b3068d Repair recently-introduced error in makeIndexable for LIKE:
a non-leading % would be put into the >=/<= patterns.  Also, repair
longstanding confusion about whether %% means a literal %%.  The SQL92
doesn't say any such thing, and textlike() knows that, but gram.y didn't.
1999-06-07 14:28:26 +00:00
Vadim B. Mikheev 43c135e351 Have to release meta page before reading root one!
< 6.5 versions were just not affected by this bug due to locking.
1999-06-07 14:28:22 +00:00
Vadim B. Mikheev 1b812d9358 1. xact.c: update comments about changing MyProc->xid and MyProc->xmin.
2. varsup.c:ReadNewTransactionId(): don't read nextXid from disk -
   this func doesn't allocate next xid, so ShmemVariableCache->nextXid
   may be used (but GetNewTransactionId() must be called first).
3. vacuum.c: change elog(ERROR, "Child item....") to elog(NOTICE) -
   this is not ERROR, proper handling is just not implemented, yet.
4. s_lock.c: increase S_MAX_BUSY by 2 times.
5. shmem.c:GetSnapshotData(): have to call ReadNewTransactionId()
   _after_ SpinAcquire(ShmemIndexLock).
1999-06-06 20:19:35 +00:00
Tom Lane 48c1887964 equal() needs a case for Aggref nodes, as shown by:
regression=> select sum(q1) from int8_tbl group by q2 order by sum(q1);
NOTICE:  equal: don't know whether nodes of type 107 are equal
1999-06-06 17:46:40 +00:00
Tom Lane dfaf9fbcb4 Add a regression test case to catch breakage of GROUP BY
and aggregate functions in queries that use inheritance.
1999-06-06 17:41:01 +00:00
Tom Lane b4210ae0f0 Fix problems with grouping/aggregation in queries that use
inheritance ... basically it was completely busted :-(
1999-06-06 17:38:11 +00:00
Vadim B. Mikheev 08abe0acb6 I used bad style of comments and ... commented out some code in
EvalPlanQualNext() when implemented it... -:)
Uncommented...
1999-06-06 15:14:40 +00:00
Tom Lane ca234c3f38 Instead of failing when the constructed name for a sequence,
index, etc is too long, truncate until it fits.
1999-06-05 20:22:30 +00:00
Tom Lane e7253d893c Remove redeclarations of default parameter values from
PgDatabase::DisplayTuples and PgDatabase::PrintTuples.  This is incorrect
according to strict interpretation of the C++ spec, and some compilers
will reject it.  Also silence g++ warning about unused parameter.
1999-06-05 18:05:17 +00:00
Tatsuo Ishii 7e6a9a60ff a fix for Win32 support provided by yutaka@marin.or.jp.
The patch will avoid to add .exe suffix to the pg_encoding
	binary.
1999-06-05 10:27:31 +00:00
Marc G. Fournier 93b57eb533 trace.patch (compilation error)
the gettimeofday doesn't compile under Linux with glibc2 because
        the DST_NONE constant is no more defined. It seems that this code
        (written by me) has always be wrong but for some reason working.

From: Massimo Dal Zotto <dz@cs.unitn.it>
1999-06-05 04:18:09 +00:00
Marc G. Fournier dbaab4a4d4 man.patch (make inconsistency)
the default target is 'install' instead of 'all'. So if you do a
        make without target you actually do a make install, which is not
        what one normally expects from a standard makefile.

From: Massimo Dal Zotto <dz@cs.unitn.it>
1999-06-05 04:15:09 +00:00
Marc G. Fournier 840306af04 ecpg.patch (wrong makefile expansion in some cases)
the ecpg Makefiles use a variable DESTDIR which is never defined
        except by debian/rules makefile, in which case the ecpg makefiles
        expand wrong pathnames. If we want to support a DESTDIR root it
        must be done consistently in all the makefiles, not just in ecpg.

From: Massimo Dal Zotto <dz@cs.unitn.it>
1999-06-05 04:13:21 +00:00
Tom Lane 857c079304 Suppress indexes on large objects from psql's \d listing;
they were confusing because the large object tables themselves are not
shown.  (Besides, if you've got hundreds or thousands of large objects,
you really don't want to see 'em at all.)
Also, suppress all indexes from the \z ACL listing, since indexes have
no meaningful protection information.
1999-06-04 21:21:13 +00:00
Tom Lane 8f19603d6c Add startup-time check that -B is not unreasonably small for
given number of backends (-N), per recent discussion in pghackers list.
1999-06-04 21:14:46 +00:00
Tom Lane 4cd4a54c80 Add configurable option controlling security checks in LO functions. 1999-06-04 21:13:38 +00:00
Tom Lane 1c3c080534 Turns out OIDNAMELEN wasn't really being used at all!
Get rid of it to make customization of NAMEDATALEN easier.
1999-06-04 21:12:07 +00:00
Bruce Momjian f0f416a2d3 Add mention of SHARE ROW EXCLUSIVE mode. 1999-06-04 04:28:54 +00:00
Bruce Momjian 8760d33abb man page cleanup for vadim. 1999-06-04 04:16:11 +00:00
Bruce Momjian 5a7547d3fc Add description for SET TRANSACTION. 1999-06-04 03:44:42 +00:00
Tom Lane 74e7b58b61 Fix for failure to clean SysCache entry when a relation is deleted
in the same transaction that created it.
1999-06-04 02:19:47 +00:00
Bruce Momjian a6ed4794a3 SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
                                ^^^^ required

Also note that SET TRANSACTION ISOLATION LEVEL change
isolevel for _current_ transaction, in accordance with
standard, not for session (ALTER SESSION is used in Oracle,
but it's not implemented currently).

And I would don't mention SET XACTISOLEVEL TO ...
form at all.

Please update set.sgml - I failed to understand all these

SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">

now.


for Vadim
1999-06-03 20:44:28 +00:00
Bruce Momjian 155b5808ca Thanks for this, but SET TRANSACTION ISOLATION LEVEL
should be described like SET TIME ZONE: TO is not allowed, as well
as DEFAULT option. There are only two forms:

for Vadim.
1999-06-03 20:42:18 +00:00
Bruce Momjian a4a5f56202 Add mention of FOR UPDATE and LIMIT/OFFSET> 1999-06-03 19:52:09 +00:00
Bruce Momjian e1ea7cc2e5 Update lock sgml/man/psql help pages. 1999-06-03 19:18:00 +00:00
Bruce Momjian 4a077caa60 Add SET TRANSACTION ISOLATION LEVEL and SET NAMES mention. 1999-06-03 18:38:00 +00:00
Bruce Momjian 7857241229 Update psql help so it looks better. 1999-06-03 18:25:27 +00:00
Bruce Momjian fa0ed6f047 Update SET commands for psql \h, man pages, and sgml. 1999-06-03 18:18:43 +00:00
Vadim B. Mikheev 5541abee0d 1. Additional fix against ERROR: Child itemid marked as unused
in CommitTransaction().
2. Changes in GetSnapshotData().
1999-06-03 13:33:13 +00:00
Vadim B. Mikheev f103501286 Unuseful tuple.t_data->t_infomask & HEAP_XMIN_COMMITTED in
vc_scanheap().
1999-06-03 13:25:54 +00:00
Vadim B. Mikheev 9680a71205 1. MyProc->xid assignment is moved to GetNewTransactionId so newer
transactions will not assume that MyProc transaction was committed
   before snapshot calculations. With old MyProc->xid assignment
   (in xact.c:StartTransaction()) there was ability to see the same
   row twice (I used gdb for this)!...
2. Assignments of InvalidTransactionId to MyProc->xid and MyProc->xmin
   are moved from xact.c:CommitTransaction() to
   xact.c:RecordTransactionCommit() - this invalidation must be done
   before releasing transaction locks or bad (too high) XmaxRecent value
   might be used by vacuum ("ERROR:  Child itemid marked as unused"
   reported by "Hiroshi Inoue" <Inoue@tpf.co.jp>; once again, gdb
   allowed me reproduce this error).
1999-06-03 04:41:41 +00:00
Tom Lane 58d8584eea pg_dump failed on any database containing large objects,
because it ignored the LOs themselves but failed to ignore the indexes
on the LOs.  How long has this been broken??
1999-06-03 04:01:16 +00:00
Tom Lane f463c44fc0 Ensure consistent results when FormSortKeys fails to find
all the expected keys (it was returning uninitialized memory).
1999-06-03 03:17:37 +00:00
Tom Lane 9b3e2dda16 Ooops ... dllist.c can't use Assert() when it is compiled into
libpq ...
1999-06-03 01:28:24 +00:00
Jan Wieck 98981a9f1c Changed "current." into "old." in rule string backparsing
Jan
1999-06-02 11:52:29 +00:00
Bruce Momjian e47b93d333 The INET and CIDR types mistakenly compared 198.68.123.0/24 and
198.68.123.0/27 the same when indexing them.

D'Arcy
1999-06-02 03:37:15 +00:00
Vadim B. Mikheev bbf37e9477 typedef struct LTAG
{
    Oid             relId;
    Oid             dbId;
    union
    {
        BlockNumber     blkno;
        TransactionId   xid;
    }               objId;
>
> Added:
>    /*
>     * offnum should be part of objId.tupleId above, but would increase
>     * sizeof(LOCKTAG) and so moved here; currently used by userlocks only.
>     */
>    OffsetNumber    offnum;
    uint16          lockmethod;     /* needed by userlocks */
} LOCKTAG;

gmake clean required...
User locks are ready for 6.5 release...
1999-06-01 09:35:39 +00:00
Bruce Momjian 42a02c441a forgot to attach the patch. :(
Vince.
1999-06-01 02:43:37 +00:00
Bruce Momjian d2ab04ca73 commented out PgConnection& references for now. May be using them
later.

Vince.
1999-06-01 02:37:33 +00:00
Tom Lane 185b427284 Fix some latent bugs in dllist.c (carelessness about setting
all fields that should be set).  Add a MoveToFront primitive to speed up
one of the hotspots in SearchSysCache.
1999-05-31 23:48:04 +00:00
Tom Lane 2a44383a2d Clean up memory leaks in LO operations by freeing LO's private
memory context at transaction commit or abort.
1999-05-31 22:53:59 +00:00
Tom Lane 81ced1e037 Generate a more specific error message when an operator used
in an index doesn't have a restriction selectivity estimator.
1999-05-31 19:32:47 +00:00
Tom Lane cc384fa240 Round up shmem size estimate to 1Kb boundary. 1999-05-31 18:28:52 +00:00
Tom Lane 86482e17bd Correct serious bug in hashtable expansion routine: under the
right circumstances it would leave old and new bucket headers pointing to
the same list of records.
1999-05-31 17:01:52 +00:00
Bruce Momjian 7f79496aa5 NT similar file update. 1999-05-31 16:18:53 +00:00
Vadim B. Mikheev 219bb76d61 Release XactLockTable share lock immediately after this lock is acquired
(no sense to hold it) or we'll be out of lock entries.
Great thanks to Hiroshi Inoue.
1999-05-31 01:48:13 +00:00
Tom Lane ca08ce28e8 Clean up uninitialized-variable warning from egcs.
(Curious that gcc doesn't complain about this code...).
1999-05-30 15:32:45 +00:00
Tom Lane 3257b0e592 egcs thinks omitting the return type in a function declaration
is poor coding style.  I agree.
1999-05-30 15:22:34 +00:00
Tom Lane d4d297af3c Replace static rcsid[] strings by IDENTIFICATION comments in
file headers, to conform to established Postgres coding style and avoid
warnings from gcc.
1999-05-30 15:17:58 +00:00
Tom Lane 6687bcb558 configure.in forgot to do AC_LANG_C to reselect C-based tests
after checking for presence of C++ compiler.  Odd we hadn't seen any
reports of problems before...
1999-05-30 00:06:44 +00:00
Tom Lane 6f979c1541 Turns out that configure's test for HPUXMATHLIB didn't work
when used with egcs --- now it does.
1999-05-29 16:26:42 +00:00
Vadim B. Mikheev df9e539ea2 1. Run all pg_dump queries in single serializable transaction.
2. Get rid of locking when updating statistics in vacuum.
3. Use QuerySnapshot in COPY TO and call SetQuerySnashot
   in main tcop loop before FETCH and COPY TO.
1999-05-29 10:25:33 +00:00
Vadim B. Mikheev bbbc211ed1 Fix xid table sizing. 1999-05-29 06:14:43 +00:00
Tom Lane dfefad7db0 Missing semicolons in non-HAS_TEST_AND_SET code paths :-( 1999-05-29 03:58:43 +00:00
Tom Lane 1bdd7c68c0 Avoid redundant SysCache searches in coerce_type, for another
few percent speedup in INSERT...
1999-05-29 03:17:20 +00:00
Tom Lane b325dab67a new_relation_targetlist used to cause about 8 separate (and
redundant) SearchSysCache searches per table column in an INSERT, which
accounted for a good percentage of the CPU time for INSERT ... VALUES().
Now it only does two searches in the typical case.
1999-05-29 01:48:06 +00:00
Tom Lane ce2586dbc9 Clean up inefficient and just plain bad code in some hot-spot
cache access routines.
1999-05-29 01:45:21 +00:00
Tom Lane dc6d404959 Repair performance problem in SI segment manipulations: iterating
through MAXBACKENDS array entries used to be fine when MAXBACKENDS = 64.
It's not so cool with MAXBACKENDS = 1024 (or more!), especially not in a
frequently-used routine like SIDelExpiredDataEntries.  Repair by making
procState array size be the soft MaxBackends limit rather than the hard
limit, and by converting SIGetProcStateLimit() to a macro.
1999-05-28 17:03:31 +00:00
Bruce Momjian b344b513c7 Update pygresql version stamp. 1999-05-28 04:54:34 +00:00
Tom Lane f0ae1e8d10 When closure of the backend connection is detected during pqFlush,
do the right thing: look for a NOTICE message from the backend before we
close our side of the socket.  6.4 libpq did not reliably print the backend's
hara-kiri message, 'The Postmaster has informed me ...', because it only
did the right thing if connection closure was detected during a read
attempt instead of a write attempt.
1999-05-28 01:54:53 +00:00
Bruce Momjian 615e77ede2 Make pg_dump dump ACL's by default, print warning on use of -z, and add
new -x option to skip acl dump.
1999-05-27 16:29:05 +00:00
Bruce Momjian 781a1eb99a I am not sure if libpq++ will compile with non g++ compilers,
but the Makefile does break non g++.

 <<mak.patch>>
Andreas
1999-05-27 14:28:40 +00:00
Bruce Momjian 0d5f7ce11c Fix for crypt memory leak, from James Thompson 1999-05-27 04:09:45 +00:00
Tom Lane 7c8beefd5e Patch from Andreas: when CREATE TABLE is followed by CREATE INDEX
before any tuples are loaded, preserve the default '1000 tuples' table
size estimate.
1999-05-26 22:57:39 +00:00
Tom Lane 8eb18d874e Fix pg_dump to use the same maximum-query-size constant as
the backend does.  Remove unnecessary limitation on field size in
dumpClasses_dumpData (ie, -d or -D case).
1999-05-26 21:51:13 +00:00
Bruce Momjian 26fb87d37e Fix compile of plpgsql by adding 'extern int yylineno.' 1999-05-26 20:55:06 +00:00
Bruce Momjian bf09f8aa43 Display numeric precision on \d. 1999-05-26 20:08:06 +00:00
Bruce Momjian e7528612d8 Allow GROUPs to be dumped properly. 1999-05-26 19:45:53 +00:00
Bruce Momjian fe2bcf854c Fix for NT from Horak Daniel 1999-05-26 16:19:48 +00:00
Bruce Momjian 9b35ec2615 Disable use of -o and -d pg_dump options together. Can't set oids in
inserts.  Change some variables to bool to be clearer.
1999-05-26 16:06:45 +00:00
Bruce Momjian 9c56b408c4 Add fix for 0x7fU constants to pgindent 1999-05-26 15:20:04 +00:00
Bruce Momjian eeadc5e87f Allow pg_dump -v display proper table/sequence count display. 1999-05-26 14:50:38 +00:00
Bruce Momjian 278bbf4572 Make functions static or NOT_USED as appropriate. 1999-05-26 12:57:23 +00:00
Marc G. Fournier 180186272a Give BEOS a chance ... 1999-05-26 01:22:24 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 4eadfe8754 Make 0x007f -> (unsigned)0x7f to make pgindent happy. 1999-05-25 22:04:56 +00:00
Vadim B. Mikheev 519cd36d06 Get rid of page-level locking in btree-s.
BT_READ/BT_WRITE are BUFFER_LOCK_SHARE/BUFFER_LOCK_EXCLUSIVE now.
Also get rid of #define BT_VERSION_1 - we use version 1 as default
for near two years now.
1999-05-25 18:31:28 +00:00
Vadim B. Mikheev 7d443a85af Get rid of page-level locking in btree-s.
LockBuffer is used to acquire read/write access
to index pages. Pages are released before leaving
index internals.
1999-05-25 18:20:31 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Michael Meskes 4b04b01aaa *** empty log message *** 1999-05-25 13:36:15 +00:00
Jan Wieck b122e16a1c Bugfix - Range table entries that are unused after rewriting should
not be marked inFromCl any longer. Otherwise the planner gets confused
and joins over them where in fact it does not have to.

Adjust hasSubLinks now with a recursive lookup - could be wrong in
multi action rules because parse state isn't reset correctly and all
actions in the rule are marked hasSubLinks if one of them has.

Jan
1999-05-25 13:16:10 +00:00
Jan Wieck f4fadbe4db Fixed bug in rules event qualification output.
Jan
1999-05-25 08:49:33 +00:00
Bruce Momjian 6bf0db7e07 FIx for 0.0.0.0/0 output as 00/0. 1999-05-25 05:29:38 +00:00
Tom Lane 9432b6dd64 Do not assign output columns to junk attributes created from
GROUP BY or ORDER BY expressions in INSERT ... SELECT.
1999-05-23 21:42:09 +00:00
Tom Lane 505b5185fc Detect case of invalid use of GROUP BY when there are no
aggregate functions, as in
	select a, b from foo group by a;
The ungrouped reference to b is not kosher, but formerly we neglected to
check this unless there was an aggregate function somewhere in the query.
1999-05-23 21:41:14 +00:00
Bruce Momjian 57455fc565 Remove more -B parameters not needed. 1999-05-23 19:01:18 +00:00
Bruce Momjian bd5cf46e0c Remove -B from wisconsin test. 1999-05-23 18:53:30 +00:00
Vadim B. Mikheev 7e14593d2e Fix tuple chain moving bug found by "Hiroshi Inoue" <Inoue@tpf.co.jp>. 1999-05-23 09:10:24 +00:00
Bruce Momjian b14c99d8d6 Here it is. Remove or rename the current interfaces/libpq++ and untar
this file in interfaces/

It will all need to be checked in.  I used the char *rcsid[] method for
cvs ids so it can be strings | grep'd to find version numbers.  The new
version for the library is 3.0.

Run configure from src/ to create the Makefile and it should be good to
go.

I did minimal documentation references in the README, I'll see if I can
get something to Tom Lockhart rather quickly.

Vince.
1999-05-23 01:04:07 +00:00
Tom Lane 795f6ca66a Update commentary in sample GEQO config file. 1999-05-22 23:59:59 +00:00
Tom Lane b2f14e11ec Reduce default GEQO 'effort' setting to MEDIUM always.
This agrees with the documentation and seems like a more useful default
anyhow ...
1999-05-22 23:27:19 +00:00
Tom Lane d52a91a5d8 Modify aset.c logic so that blocks requested from malloc get
bigger the more space is used in an allocset.  This reduces the malloc
overhead very substantially on queries that need lots of memory.
1999-05-22 23:19:37 +00:00
Tom Lane f9f90b21b2 Improve error message from failed LOAD command (include
kernel's error description when file is not accessible).
1999-05-22 19:49:42 +00:00
Tom Lane b21005fa7c Allow GEQO effort to be specified numerically, as well as
symbolic LOW/MEDIUM/HIGH values --- needed for experiments with other
effort levels ...
1999-05-22 19:29:01 +00:00
Tom Lane cf1478982c Modify backend switch parsing to prevent 'insecure' switches
from being accepted when they are passed from client connection request.
Get rid of a couple that no longer do anything (like -P).
1999-05-22 17:47:54 +00:00
Bruce Momjian e9edb3ef92 Fix for select 1;select 2 without trailing semi. 1999-05-22 05:06:43 +00:00
Bruce Momjian a8d2820e6d Fix for DEFAULT ''. 1999-05-22 04:12:29 +00:00
Bruce Momjian 9710995fc9 Make postgres prompt backend>, and remove PARSEDEBUG. 1999-05-22 02:55:58 +00:00
Bruce Momjian 85170aa9b6 Change perl Makefile test. 1999-05-21 19:03:48 +00:00
Bruce Momjian 167529f221 Disable fix. Didn't work. 1999-05-21 18:33:12 +00:00
Bruce Momjian c0d979614e Fix typo and attempt default fix. 1999-05-21 18:31:06 +00:00
Michael Meskes a7b06f20c5 *** empty log message *** 1999-05-21 16:36:27 +00:00
Bruce Momjian 96492290b5 Treat {} as special regex too. 1999-05-21 15:47:13 +00:00
Tatsuo Ishii 08bcc77a5c add retest, a regex testing program 1999-05-21 06:27:54 +00:00
Bruce Momjian 56b9a549c7 Fix problem with | in ~ comparison using index. 1999-05-21 04:40:04 +00:00
Tom Lane b3ad49850e Report strerror() rather than errno in low-level backend libpq
failure messages.
1999-05-21 01:25:06 +00:00
Tom Lane 5690b1a18f Minor updates to libpq documentation. 1999-05-21 00:36:46 +00:00
Jan Wieck 3de11d6526 Removed the automatic installation of built procedural languages
from initdb again.

Added two new commands, createlang and destroylang to bin. These
hopefully end this damned mklang.sql discussion.

Jan
1999-05-20 16:50:08 +00:00
Tom Lane 33773af95b Generate distinct error messages for trigger function not found
and trigger function found but returns wrong type.
1999-05-20 14:39:49 +00:00
Jan Wieck 443c08a110 Fixed shift/reduce conflict
SelectStmt and CursorStmt tried to parse FOR UPDATE ... / FOR READ ONLY.
Cursor now checks that it is read only by looking at forUpdate of Query.
SelectStmt handles FOR READ ONLY too.

Jan
1999-05-20 12:12:55 +00:00
Tatsuo Ishii 1f82f1de33 overwriting a large object now works 1999-05-20 09:30:36 +00:00
Tom Lane c3a4d8ed54 Very minor improvements in CREATE OPERATOR docs. 1999-05-20 03:22:01 +00:00
Tom Lane f9e497db7f Doco updates for change to handling of INTERNAL function
entries (prosrc is now name of C-level function).
1999-05-20 02:44:53 +00:00
Tom Lane 77d3355900 Minor improvements to postmaster/backend man pages. 1999-05-19 23:30:43 +00:00
Bruce Momjian 41543b0618 Dec ALpha patches 1999-05-19 18:06:43 +00:00
Bruce Momjian 8223f70e52 Dec alpha patches. 1999-05-19 18:04:51 +00:00
Bruce Momjian 6d08b6a7b8 Remove 4096 string limited key on block size 1999-05-19 17:53:12 +00:00
Bruce Momjian 0a8fb5a8f9 Upgrade to PyGreSQL (2.4) 1999-05-19 16:46:12 +00:00
Marc G. Fournier 9487ad8409 Bring python up to date ...
From: D'Arcy J.M. Cain <darcy@druid.net>
1999-05-19 14:46:54 +00:00
Tom Lane 77ebed09f5 Add Aggref and ArrayRef to the set of node types that transformExpr
will pass through rather than spitting up.  This is necessary to handle
cases where coerce_type causes a subexpression to be retransformed, as in
	SELECT count(*) + 1.0 FROM table
1999-05-18 23:40:05 +00:00
Peter Mount 2d7ec4785f Forgot the CHANGELOG 1999-05-18 23:22:08 +00:00
Peter Mount 4c63b257fd Internationalisation of error messages 1999-05-18 23:17:46 +00:00
Tom Lane c2f0d565f3 Now that hashjoin is reliable for large joins (knock on wood),
remove optimizer's arbitrary limit on how large a join it will use hashing
for.  (The limit was too large to prevent the problems we'd been seeing,
anyway...)
1999-05-18 21:36:10 +00:00
Tom Lane 353d36f979 Remove no-longer-used fields in Hash and HashJoin nodes. 1999-05-18 21:34:29 +00:00
Tom Lane 26069a58e8 Rewrite hash join to use simple linked lists instead of a
fixed-size hashtable.  This should prevent 'hashtable out of memory' errors,
unless you really do run out of memory.  Note: target size for hashtable
is now taken from -S postmaster switch, not -B, since it is local memory
in the backend rather than shared memory.
1999-05-18 21:33:06 +00:00
Peter Mount d261a5ec86 Transactions in ImageViewer 1999-05-18 06:07:25 +00:00
Michael Meskes 21e03211cf *** empty log message *** 1999-05-18 05:20:17 +00:00
Peter Mount 20f0cfc322 Fixed Internationalization of error messages. 1999-05-17 22:58:19 +00:00
Peter Mount 3f59cc0831 Minor bug fixes. Replaced DateStyle support with ISO. 1999-05-17 22:43:30 +00:00
Bruce Momjian c2b75c83f3 All works on linux now by my tests and regression(with patch below).
ALTER TABLE RENAME with extents.
Ole Gjerde
1999-05-17 18:24:48 +00:00
Bruce Momjian 19c4e862d4 Skip junk nodes when comparing UNION target list lengths. 1999-05-17 18:22:19 +00:00
Bruce Momjian 585c967720 Change resjunk to a boolean. 1999-05-17 17:03:51 +00:00
Jan Wieck fd1647706d Fixed latest regression diff's by omitting viewowner in SELECT from pg_views.
Jan
1999-05-17 09:03:26 +00:00
Bruce Momjian 184dd28d5c This is actually more of a fundamental problem with mdtruncate. It
looks
like someone just didn't add support for multiple segments for
truncation.

The following patch seems to do the right thing, for me at least.
It passed my tests, my data looks right(no data that shouldn't be in
there) and regression is ok.

Ole Gjerde
1999-05-17 06:38:41 +00:00
Bruce Momjian 1125c5e4c5 Add python 1999-05-17 06:27:07 +00:00
Bruce Momjian e55213a5a8 Re-add python. 1999-05-17 06:15:31 +00:00
Bruce Momjian 716b8e2dba Updates for 6.5. 1999-05-17 06:06:35 +00:00
Tom Lane fe0b8612d9 Prior patch added 2 more characters to string allocated
for SERIAL column's constraint, but forgot to increase space palloc'd...
1999-05-17 04:50:07 +00:00
Bruce Momjian b8b1ba53ea SELECT * error message fix. 1999-05-17 04:19:33 +00:00
Marc G. Fournier a0b7daa129 Apply freebsd specific patches dealign with ELF system from FreeBSD's
ports collection ...
1999-05-17 04:13:29 +00:00
Bruce Momjian 61f618e73e Move IN to proper place. 1999-05-17 01:01:06 +00:00
Bruce Momjian a341db91c5 Cleanup 1999-05-17 00:31:49 +00:00
Bruce Momjian e83265b32a Fix typo in change. 1999-05-17 00:27:45 +00:00
Tom Lane 0b8b1fe3aa Tighten coding in new_join_pathkey, which seems to be a hotspot
for GEQO ...
1999-05-17 00:26:33 +00:00
Tom Lane 1332c1e144 Change GEQO optimizer to release memory after each gene
is evaluated.  This bounds memory usage to something reasonable even
when many tables are being joined.
1999-05-17 00:25:34 +00:00
Bruce Momjian c686be8d56 Require IN in LOCK syntax. 1999-05-17 00:22:07 +00:00
Bruce Momjian 054cae8173 Change md* call to smgr*. 1999-05-17 00:19:12 +00:00
Tom Lane fecb2b0024 Minor code cleanup in optimizer. 1999-05-16 19:45:37 +00:00
Tom Lane f2ed835baf Fix some typos in geqo optimizer --- it now generates
reasonable plans again.  Still eats memory like there's no tomorrow,
however :-(.
1999-05-16 19:45:00 +00:00
Tom Lane bbf3748347 Change iostream to iostream.h, strstream to strstream.h
for compatibility with older C++ libraries.
1999-05-16 14:34:59 +00:00
Bruce Momjian 2132e062e1 I made it so it rolled over files at 1MB. My table ended up with 120
segments, and my indexes had 3(Yes, it DOES work!).
DROP TABLE removed ALL segments from the table, but only the main index
segment.

So it looks like removing the table itself is using mdunlink in md.c,
while removing indexes uses FileNameUnlink() which only unlinks 1 file.
As far as I can tell, calling FileNameUnlink() and mdunlink() is basically
the same, except mdunlink() deletes any extra segments.

I've done some testing and it seems to work.  It also passes regression
tests(except float8, geometry and rules, but that's normal).

If this patch is right, this fixes all known multi-segment problems on
Linux.

Ole Gjerde
1999-05-15 22:31:07 +00:00
Bruce Momjian de81fbd047 I've got 2 pretty small patches.
configtype.patch simply fixes a typo in config.h.in
pg_dump.c.patch Updates a bunch of error messages to include a reason
from
                the backend, and also removes a couple of unnecessary
if's

Ole Gjerde
1999-05-15 22:18:51 +00:00
Michael Meskes c8bd630af6 *** empty log message *** 1999-05-14 06:56:18 +00:00
Bruce Momjian 564842a617 Hi, Bruce!
These are my last changes to lmgr fixing deadlock handling.
Please apply them to cvs...

Vadim
1999-05-13 15:55:45 +00:00
Thomas G. Lockhart 9bbc1657a1 Add double quotes around the sequence name generated to support the
SERIAL data type DEFAULT clause.
This fixes a problem finding the sequence name when mixed case table names
 are involved.
1999-05-13 15:01:32 +00:00
Thomas G. Lockhart 81c83db3bb Surround a variable declaration with ENABLE_OUTER_JOINS to suppress
compiler warnings about an unused variable.
1999-05-13 14:59:05 +00:00
Tatsuo Ishii 0c1e2e493d set client_encoding to <nothing> crashes backend. 1999-05-13 10:28:26 +00:00
Tom Lane 507a0a2ab0 Rip out QueryTreeList structure, root and branch. Querytree
lists are now plain old garden-variety Lists, allocated with palloc,
rather than specialized expansible-array data allocated with malloc.
This substantially simplifies their handling and eliminates several
sources of memory leakage.
Several basic types of erroneous queries (syntax error, attempt to
insert a duplicate key into a unique index) now demonstrably leak
zero bytes per query.
1999-05-13 07:29:22 +00:00
Byron Nikolaidis f80642137c Update driver to 6-40-0006 1999-05-13 03:33:00 +00:00
Bruce Momjian 519ad246ae Here's a small patch to cause pg_dump to emit the
scale and precision for NUMERIC type column defs.

Keith Parks
1999-05-13 02:35:44 +00:00
Tom Lane 0b885e2397 Release allocated memory during AtAbort_Memory. 1999-05-13 00:34:57 +00:00
Tom Lane eb4d9f45ef Do not refer to stdin in static variable initializer ...
apparently some systems choke on that :-(.
1999-05-12 23:26:03 +00:00
Jan Wieck c8cc45b2f3 Fixed small bug in ruleutils and added output of pg_views and
pg_rules to rules regression test.

Jan
1999-05-12 17:59:32 +00:00
Jan Wieck b7a86e4046 Fixed wrong hasAggs when aggregate columns of view aren't
selected.

Disabled ability of defining DISTINCT or ORDER BY on views.

Jan
1999-05-12 17:04:47 +00:00
Jan Wieck 79c2576f77 Replaced targetlist entry in GroupClause by reference number
in Resdom and GroupClause so changing of resno's doesn't confuse
the grouping any more.

Jan
1999-05-12 15:02:39 +00:00
Bruce Momjian 1a87c14c9c I am sorry, I misinterpreted the still failing trigger regression test.
The
offending code
has been removed, the action is now always dependent :-)

I suggest the following patch, to finally make trigger regression happy
again:

 <<refint1.patch>>
After that you can remove the following from TODO:
Remove ERROR:  check_primary_key: even number of arguments should be
specified
Trigger regression test fails

Andreas
1999-05-12 12:47:24 +00:00
Jan Wieck ca00c902fb Added installation of created procedural languages to initdb
Jan
1999-05-12 10:35:44 +00:00
Thomas G. Lockhart 5dd715b592 Adjust elog NOTICE messages to surround table and column names with single
quotes.
1999-05-12 07:24:01 +00:00
Thomas G. Lockhart bcb5aac81d Add keywords to implement Vadim's transaction isolation
and lock syntax as fully parsed tokens.
Two keywords for isolation are non-reserved SQL92
 (COMMITTED, SERIALIZABLE).
All other new keywords are non-reserved Postgres (not SQL92)
 (ACCESS, EXCLUSIVE, MODE, SHARE).
Add syntax to allow CREATE [GLOBAL|LOCAL] TEMPORARY TABLE, throwing an
 error if GLOBAL is specified.
1999-05-12 07:22:52 +00:00
Thomas G. Lockhart 3ce054b57d Fix problem with multiple indices defined if using column- and table-
constraints. Reported by Tom Lane.
Now, check for duplicate indices and retain the one which is a primary-key.
Adjust elog NOTICE messages to surround table and column names with single
 quotes.
1999-05-12 07:17:18 +00:00
Thomas G. Lockhart 575c40a61f Handle conversion of floating point constants to internal strings. 1999-05-12 07:14:24 +00:00
Thomas G. Lockhart 8d21a6ef51 Keep long non-quoted numeric strings *as* untyped strings if they fail
the obvious conversion.
Define a new pattern "decimal" which is non-exponential floating point
 for use with numeric() and decimal() types.
1999-05-12 07:12:51 +00:00
Tom Lane a36a7a16eb Fix bogus assumption that MAXALIGN is at least sizeof(pointer). 1999-05-12 04:38:24 +00:00
Tom Lane 5085132c6d Fix configure to generate correct expansion of library directory
in pl/plpgsql/src/mklang.sql.
1999-05-11 22:57:50 +00:00
Bruce Momjian a9bd936066 Just a couple more files to untar in src/test/regress
(int2,int4,geometry).

Cheers,

Patrick Welche
1999-05-11 16:29:45 +00:00
Jan Wieck 5057010944 Changed debug options:
-d4 now prints compressed trees from nodeToString()
-d5 prints pretty trees via nodeDisplay()

new pg_options: pretty_plan, pretty_parse, pretty_rewritten

Jan
1999-05-11 09:06:35 +00:00
Bruce Momjian 1ba362f567 put back mklang.sql.in file. 1999-05-11 03:30:41 +00:00
Bruce Momjian 12f9de3fd4 clean up comments 1999-05-11 03:28:43 +00:00
Jan Wieck bb885dd1a1 Check for NUMERIC overflow a second time after rounding
Jan
1999-05-10 18:17:44 +00:00
Bruce Momjian 0d5c832363 Allow perl install as non-root, from Geoff Keating 1999-05-10 17:01:25 +00:00
Bruce Momjian 94bd4e3da7 Update to PyGreSQL 2.3. 1999-05-10 16:10:51 +00:00
Bruce Momjian 86dacdb74c libpq++ uses fe_setauthsvc which is deprecated and results in an error
on connection. This patch changes it to use PQconnectdb rather than
{fe_setauthsvc,PQsetdb}. This still isn't the complete solution, as
there
is no provision for user,password in class PgEnv, but it does get rid of
the error message. Tested with gcc version egcs-2.91.60 19981201
(egcs-1.1.1 release) under NetBSD-1.3K/i386.

Cheers,

Patrick Welche
1999-05-10 15:27:19 +00:00
Bruce Momjian d6e33c8b07 Rename MAP_FILE to USERMAP_FILE for Digital Unix. 1999-05-10 15:17:17 +00:00
Bruce Momjian f4213e6b23 Fix initdb problem introduced by recent patch. 1999-05-10 04:02:07 +00:00
Bruce Momjian 4853495e03 Change error messages to oids come out as %u and not %d. Change has no
real affect now.
1999-05-10 00:46:32 +00:00
Tom Lane b7332c9243 Correct type_sanity test so it doesn't spit up on new
definition of numeric_in.
1999-05-09 23:43:25 +00:00
Tom Lane 0b69d8a27c Rearrange top-level rewrite operations so that EXPLAIN works
on queries involving UNION, EXCEPT, INTERSECT.
1999-05-09 23:31:47 +00:00
Tatsuo Ishii 6458daa180 Running lo_read/lo_write under different memory context
cause troubles. See
Message-Id: <199905090312.MAA00466@ext16.sra.co.jp>
for more details.
1999-05-09 15:00:18 +00:00
Vadim B. Mikheev 202e523d10 Mistyping by me.
Fixed by Hiroshi.
1999-05-09 14:00:29 +00:00
Tom Lane 3c6491ff96 Repair incorrect pg_proc entry for numeric_in. 1999-05-09 02:22:16 +00:00
Tom Lane b5bcef683b Fix some miscellaneous places that were using raw open() or
fopen(), instead of going through fd.c ... naughty naughty.
1999-05-09 00:54:30 +00:00
Tom Lane 71d5d95376 Update hash and join routines to use fd.c's new temp-file
code, instead of not-very-bulletproof stuff they had before.
1999-05-09 00:53:22 +00:00
Tom Lane c1167a08ca Add 'temporary file' facility to fd.c, and arrange for temp
files to be closed automatically at transaction abort or commit, should
they still be open.  Also close any still-open stdio files allocated with
AllocateFile at abort/commit.  This should eliminate problems with leakage
of file descriptors after an error.  Also, put in some primitive buffered-IO
support so that psort.c can use virtual files without severe performance
penalties.
1999-05-09 00:52:08 +00:00
Bruce Momjian b0f1880a8e Add new netbsd file. 1999-05-08 19:28:20 +00:00
Michael Meskes e18c912acf *** empty log message *** 1999-05-07 18:03:37 +00:00
Bruce Momjian ef26ad2ebd Remove unused Netbsd files. 1999-05-07 02:46:24 +00:00
Bruce Momjian c22d35be4e Please apply the following patch for regress.sh to do something useful with
"SYSTEM", and unpack the files in the uuencoded .tar.gz file at the end in
src/test/regress so that the int2, int4 and geometry tests pass on NetBSD/i386.
They just fail on different wording of error messages and eg printing "0"
rather than "-0". At a guess the same will be true for the other NetBSD ports,
but I can't test them.

Cheers,

Patrick
1999-05-07 02:37:08 +00:00
Bruce Momjian 5a0b77aa44 Please apply the following patch for regress.sh to do something useful
with
"SYSTEM", Patrick Welche
1999-05-07 02:31:43 +00:00
Vadim B. Mikheev 122abf3af3 Fix LMGR for MVCC.
Get rid of Extend lock mode.
1999-05-07 01:23:11 +00:00
Tom Lane 86bc1da262 Update regress test for CASE to enable tests involving joins. 1999-05-06 23:09:30 +00:00
Tom Lane ec1f5f78b9 Fix oversights in flatten_tlistentry and replace_clause_joinvar_refs
that led to CASE expressions not working very well in joined queries.
1999-05-06 23:07:33 +00:00
Tom Lane 5729c3503d fix_indxqual_references didn't cope with ArrayRef nodes,
meaning that this failed:
select proname,typname,prosrc from pg_proc,pg_type
where proname = 'float8' and pg_proc.proargtypes[0] = pg_type.oid;
1999-05-06 01:30:58 +00:00
Tom Lane 9f82f9e459 Fix some nasty coredump bugs in hashjoin. This code was just
about certain to fail anytime it decided the relation to be hashed was
too big to fit in memory --- the code for 'batching' a series of hashjoins
had multiple errors.  I've fixed the easier problems.  A remaining big
problem is that you can get 'hashtable out of memory' if the code's
guesstimate about how much overflow space it will need turns out wrong.
That will require much more extensive revisions to fix, so I'm committing
these fixes now before I start on that problem.
1999-05-06 00:30:47 +00:00
Bruce Momjian 5d5cf912bc I have two patches for 6.5.0:
arrayfuncs.patch        fixes a small bug in my previous patches for
arrays

array-regress.patch     adds _bpchar and _varchar to regression tests

--
Massimo Dal Zotto
1999-05-05 21:38:40 +00:00
Bruce Momjian 81ff51615d small error message improvement from Dmitry Samersoff 1999-05-05 13:51:38 +00:00
Tom Lane 1afe0b3146 Repair incorrectly-figured snprintf length restriction. 1999-05-04 23:39:20 +00:00
Thomas G. Lockhart 84e832a802 Use sprintf() to convert float8 to a string during conversion to numeric.
Original code used float8out(), but the resulting exponential notation
 was not handled (e.g. '3E9' was decoded as '3').
1999-05-04 15:50:24 +00:00
Thomas G. Lockhart 54067db642 Allow -t tablename to preserve case if specified as "tablename". 1999-05-04 15:47:35 +00:00
Tom Lane 5da466c597 Make sure targetlist generated for subplan does not share
nodes with HAVING qualifier of upper plan.  Have not seen any failures,
just being a little bit paranoid...
1999-05-04 00:00:20 +00:00
Tom Lane b6c732e63c Correct declaration of array_map() so that it doesn't make
gcc quite so unhappy.
1999-05-03 23:48:26 +00:00
Bruce Momjian 210055ad61 here are some patches for 6.5.0 which I already submitted but have never
been applied. The patches are in the .tar.gz attachment at the end:

varchar-array.patch     this patch adds support for arrays of bpchar() and
                        varchar(), which where always missing from postgres.

                        These datatypes can be used to replace the _char4,
                        _char8, etc., which were dropped some time ago.

block-size.patch        this patch fixes many errors in the parser and other
                        program which happen with very large query statements
                        (> 8K) when using a page size larger than 8192.

                        This patch is needed if you want to submit queries
                        larger than 8K. Postgres supports tuples up to 32K
                        but you can't insert them because you can't submit
                        queries larger than 8K. My patch fixes this problem.

                        The patch also replaces all the occurrences of `8192'
                        and `1<<13' in the sources with the proper constants
                        defined in include files. You should now never find
                        8192 hardwired in C code, just to make code clearer.


--
Massimo Dal Zotto
1999-05-03 19:10:48 +00:00
Tom Lane da5f1dd722 Revise union_planner and associated routines to clean up breakage
from EXCEPT/HAVING patch.  Cases involving nontrivial GROUP BY expressions
now work again.  Also, the code is at least somewhat better documented...
1999-05-03 00:38:44 +00:00
Tom Lane 605d84941d Clean up cost_sort some more: most callers were double-counting
the cost of reading the source data.
1999-05-01 19:47:42 +00:00
Tom Lane 87d95ca04d Arrange for VACUUM to delete the init file that relcache.c uses
to save a little bit of backend startup time.  This way, the first
backend started after a VACUUM will rebuild the init file with up-to-date
statistics for the critical system indexes.
1999-05-01 19:09:46 +00:00
Tom Lane f7d25d2ab6 -T was omitted from getopt() call. 1999-05-01 17:16:25 +00:00
Tom Lane c422e1a93d Fix compile failures in dt.c --- line broken in middle of
an identifier :-(.  Sloppy transmission of a patch, likely.
1999-05-01 17:14:56 +00:00
Vadim B. Mikheev b4c7a5655d Patch from "Hiroshi Inoue" <Inoue@tpf.co.jp> for
FATAL 1:btree: BTP_CHAIN flag was expected
1999-05-01 16:09:45 +00:00
Vadim B. Mikheev 34a84addc7 Use page-level ExtendLock lock instead of table-level -
should be faster.
1999-05-01 15:04:46 +00:00
Bruce Momjian 099164039d cleanup 1999-04-30 17:03:04 +00:00
Bruce Momjian f4dcafc825 Clean up typo causing compile failure. 1999-04-30 16:22:46 +00:00
Tom Lane 17dbeebb5f Fill in reasonable-looking cost estimates in inserted nodes.
This makes no difference to the optimizer, which has already decided what
it's gonna do, but it makes the output of EXPLAIN much more plausible.
1999-04-30 04:04:27 +00:00
Tom Lane 7a7ba33536 Clean up some bogosities in path cost estimation, like
sometimes estimating an index scan of a table to be cheaper than a
sequential scan of the same tuples...
1999-04-30 04:01:44 +00:00
Tom Lane 11a0027e28 Fix nasty little typo that prevented get_cheapest_path_for_joinkeys
from ever returning a path.  This put a bit of a crimp in the system's
ability to generate intelligent merge-join plans...
1999-04-30 03:59:06 +00:00
Bruce Momjian 52f1b2f3b6 Prevent priority inversion in locking by checking for existing locks
before going into queue behind person with higher piority.
1999-04-30 02:04:51 +00:00
Jan Wieck 7d62e9c719 Bugfix (bug by me in 1.4) in backparsing INSERT ... SELECT
Jan
1999-04-29 15:52:01 +00:00
Tom Lane 99f61dac7e Defend against 'update oid'. Someday we might want to support
that, but it'd be a New Feature, wouldn't it ... in the meantime,
avoiding a backend crash seems worthwhile.
1999-04-29 03:01:50 +00:00
Tom Lane fd31563777 Aggregate functions didn't work on subscripted array references.
Things are better now.
1999-04-29 01:13:13 +00:00
Tom Lane 970583ab4f Several routines in setrefs.c would crash on array refs
due to lack of check for recursing into a null subexpression.
1999-04-29 00:20:27 +00:00
Tom Lane 89cf9303fd Fix stupid typo that broke empty-query response... odd that
this is not revealed by any of our regression tests...
1999-04-28 22:17:58 +00:00
Jan Wieck 26909a0797 Fixed DECIMAL data type to handle specified precision in atttypmod
Jan
1999-04-27 13:33:43 +00:00
Tatsuo Ishii 6e702210c2 Fix for _copyUnique() suggested by Hiroshi Inoue 1999-04-27 09:49:36 +00:00
Marc G. Fournier 1c1cafe72f These are no longer used ... 1999-04-26 13:37:14 +00:00
Marc G. Fournier a4041bce99 provides string to be used for expected/* files for system specific output... 1999-04-26 13:33:19 +00:00
Michael Meskes dd6b1aaa25 *** empty log message *** 1999-04-26 05:28:48 +00:00
Tatsuo Ishii 89c7369d0e Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support. 1999-04-26 04:42:49 +00:00
Tatsuo Ishii c84ea433d7 Fix from Yutaka Tanida <yutaka@marin.or.jp> 1999-04-26 04:40:17 +00:00
Tom Lane eb00bdf237 Insert a test for missing targetlist entry in replace_agg_clause. 1999-04-26 00:37:46 +00:00
Tom Lane 26db818710 It looks like the multibyte regress tests only work if both
the database encoding and the client encoding match the encoding expected
by the test.  So, force both of them to be set from the MULTIBYTE
environment var.  This allows regress tests to be run successfully in
multibyte environments other than the compiled-in default.
1999-04-25 23:30:31 +00:00
Tom Lane d69344c520 More multibyte tests with obsolete spelling of error message... 1999-04-25 23:16:23 +00:00
Tom Lane 22fe451c9d psql's recognition of comments didn't work right in MULTIBYTE
environments; it was being careless about character lengths.
1999-04-25 23:10:36 +00:00
Tom Lane 109cbc7217 Explicitly set PGCLIENTENCODING during regression tests,
since multibyte tests fail if it's different from database...
1999-04-25 21:56:19 +00:00
Tom Lane 122923c97f Still had a few MULTIBYTE problems when client encoding was
different from database's ...
1999-04-25 21:50:58 +00:00
Tom Lane 0d99c95388 Correct potential infinite loop in pg_utf2wchar_with_len;
it failed to cover the case where high bits of char are 100 or 101.
Not sure if fix is right, but it agrees with pg_utf_mblen ... and it
doesn't lock up ...
1999-04-25 20:35:51 +00:00
Tom Lane 2acfc4f6b4 Multibyte tests were all 'failing' because of change of
wording of 'relation does not exist' error message.  Update expected files
accordingly.
1999-04-25 19:34:44 +00:00
Tom Lane 40cad8b66f My first cut at libpq revision didn't handle MULTIBYTE correctly,
but I think it's OK now...
1999-04-25 19:27:47 +00:00
Tom Lane fad6f2925c Clean up gcc warning in MULTIBYTE code. 1999-04-25 18:16:47 +00:00
Tom Lane 6f668ee108 ifdef out some unused routines to suppress gcc warnings. 1999-04-25 18:09:54 +00:00
Tom Lane 187c58f275 Ooops, missed committing this one... 1999-04-25 03:27:15 +00:00
Tom Lane 95cc41b81d Revise backend libpq interfaces so that messages to the frontend
can be generated in a buffer and then sent to the frontend in a single
libpq call.  This solves problems with NOTICE and ERROR messages generated
in the middle of a data message or COPY OUT operation.
1999-04-25 03:19:27 +00:00
Bruce Momjian fc08814e00 Rename explain's "size" to "rows". 1999-04-23 21:23:49 +00:00
Bruce Momjian 35b168656b Add disk space message to "can not extend" message. 1999-04-23 19:37:42 +00:00
Thomas G. Lockhart c3a32d7595 Remove "Non-functional update" notices since that message has been
disabled (commented-out) in the code.
1999-04-23 15:55:32 +00:00
Tom Lane c42926f10b Repair missing heap_endscan() in OperatorUpd(). 1999-04-23 00:50:57 +00:00
Vadim B. Mikheev 3888b53a58 Fix duplicating ROOT page in concurrent updates. 1999-04-22 08:19:59 +00:00
Tom Lane 00fbb64bed Un-break CREATE TYPE. Fix some other inconsistencies in the
pg_proc entries for array I/O routines besides the one detected by the
original patcher.  Tighten type_sanity regress test accordingly.
1999-04-20 03:51:19 +00:00
Tom Lane 09c5e84072 Change elog(ERROR) to get back to main loop via a plain sigsetjmp,
instead of doing a kill(self, SIGQUIT) and expecting the signal handler
to do it.  Also, clean up inconsistent definitions of the sigjmp buffer
in the several files that already referenced it.
1999-04-20 02:19:59 +00:00
Tom Lane d30e2ac306 Portability patches for HPUX 11 and Unixware in configure
and related files.  Also remove float.c's gratuitous redeclaration of
isinf() ... looks like there are more decls in there that ought to be
in config.h, but I'll leave well enough alone for now ...
1999-04-20 00:26:32 +00:00
Bruce Momjian 6eccfbc727 Add temporary for temp. 1999-04-19 16:00:18 +00:00
Tatsuo Ishii f3a7addb03 Fix typo in multi-byte encodings (EHC_CN --> EUC_CN) 1999-04-19 08:46:34 +00:00
Tom Lane a58843b49a Fix problems seen when result of a subselect was used in an
expression context (ie, not at the top level of a WHERE clause).  Examples
like this one work now:
SELECT name, value FROM t1 as touter WHERE
(value/(SELECT AVG(value) FROM t1 WHERE name = touter.name)) > 0.75;
1999-04-19 04:17:11 +00:00
Tom Lane 4438b70b94 Repair some problems in planner's handling of HAVING clauses.
This fixes a few of the problems Hiroshi Inoue complained of, but
I have not touched the rewrite-related issues.
1999-04-19 01:43:12 +00:00
Tom Lane 2deef968f4 After transforming a CASE expr with a default argument,
delete the default argument from the node.  This prevents the executor
from spitting up on the untransformed argument expression.  Typical
failure was:
select (case f1 when 'val' then 'subst' else f1 end) from t1;
ERROR:  copyObject: don't know how to copy 704
1999-04-18 17:35:51 +00:00
Tom Lane 38405e1894 Update CREATE FUNCTION's on-line help in psql. 1999-04-18 03:01:49 +00:00
Tom Lane 4b82c6d940 Allow CREATE FUNCTION xyz AS '' LANGUAGE 'internal' to
work the way it used to (ie, assume xyz is the name of the builtin
function to call).  Complain if an unknown builtin function name is
referenced.
1999-04-18 02:57:22 +00:00
Bruce Momjian 00a4196139 Add res checking to libpq examples, from Dan Merillat. 1999-04-17 17:18:41 +00:00
Tom Lane 1b9f24c878 Add missing function prototypes to stifle gcc warnings. 1999-04-16 21:27:23 +00:00
Michael Meskes ad5a54d170 *** empty log message *** 1999-04-16 12:26:49 +00:00
Tatsuo Ishii 075dc252c7 Fix kill() call in elog() so that it gets its own pid by calling getpid().
MyProcPid global variable is set to 0 when postgres starts as a command
(not as a backend daemon). This leads issuing SIGQUIT to the process group,
not the process itself. As a result, parent sh gets core dumped in the
Wisconsin benchmark test.
1999-04-16 06:38:17 +00:00
Tatsuo Ishii e062a176a8 Overhaul Wisconsin Benchmark test suit
- change temp -> temp_bench ("temp" is now a reserved word)
	- fix bugs in queries
	- add -B 256 option to run the postgres command
	  (without this, postgres seems to fail with hashjoin)
1999-04-16 06:31:13 +00:00
Tom Lane 26139bb4a0 Improve error messages when a connection is rejected. 1999-04-16 04:59:03 +00:00
Thomas G. Lockhart 1d1cf38c0d Fix max(int8) result by making sure int8larger() copies its result
rather than reusing the input storage.
Also made the same fix to int8smaller(), though there wasn't a symptom,
 and went through and verified that other pass-by-reference data types
 do the same thing. Not an issue for the by-value types.
1999-04-15 13:34:45 +00:00
Tom Lane 0c0151a3ec Initialize reltuples = 1000, relpages = 10 in a newly created
relation, rather than zeroes.  This prevents the optimizer from making
foolish choices (ie, using nested-loop plans) on never-yet-vacuumed tables.
This is a hack, of course.  Keeping accurate track of these statistics
would be a cleaner solution, but it's far from clear that it'd be worth
the cost of doing so.  In any case we're not going to do that for 6.5.
In the meantime, this quick hack provides a useful performance improvement
in the regression tests and in many real-world scenarios.
1999-04-15 04:08:07 +00:00
Tom Lane dbce02f133 Add ORDER BY clauses to some select-from-view operations
in rules regression test, in order to eliminate bogus test 'failures'
that occur due to platform-dependent and join-implementation-dependent
ordering of tuples.  I'm not sure that I got all of the SELECTs that need
ordering clauses --- we may need some more.  But this takes care of the
diffs between my platform and Jan's.
1999-04-15 03:40:50 +00:00
Tom Lane 1ae6739ee1 psql did the wrong thing with COPY FROM STDIN inside a file
sourced with \i (tried to read data from the terminal, rather than from
the source file; this breaks pg_dump scripts read with \i).  Also, \o file
followed by COPY TO STDOUT wrote to terminal not designated file.
All better now.
1999-04-15 02:24:41 +00:00
Thomas G. Lockhart 99e57ee86f Move some useful date/time test macros to here to allow
sharing across files.
1999-04-15 02:24:23 +00:00
Thomas G. Lockhart 879d1be2fe Declare hashint8(). 1999-04-15 02:23:37 +00:00
Thomas G. Lockhart b2b3d5d184 Fix code to check legal dates *before* calling localtime() to get the
time zone.
Previously, localtime() rotated a date with a day of month field which
 exceeded the actual range into the next months, masking the fact that
 a bad date had been specified.
Regression tests pass.
1999-04-15 02:22:39 +00:00
Thomas G. Lockhart 64e74e30b5 Fix boolean assignment of return values to use "FALSE" rather than the
mis-copied "NULL", which happens to have the same binary value.
Previously, gcc gave non-fatal warnings.
1999-04-15 02:20:50 +00:00
Thomas G. Lockhart e1a4ddeda8 Code modified to reject out of range day of month.
Previously, dates falling within Unix system time range were run through
 a call to localtime() to get the time zone, if it was not specified.
This had the effect that dates with DOMs which were larger than would be
 valid for that month were "rotated" into the following months.
1999-04-15 02:19:02 +00:00
Thomas G. Lockhart 9f9823950a Fix error message to match that returned by new regression test reference
machine (linux-2.0.36 RH5.2 with RH5.2 patches).
1999-04-15 02:15:36 +00:00
Tom Lane 630ed05063 Correct documentation of CREATE OPERATOR. 1999-04-15 00:09:00 +00:00
Tom Lane eaffc61675 Correct psql's online help for CREATE OPERATOR, which did
not match what the backend actually accepts.
1999-04-14 23:48:07 +00:00
Tom Lane faba9fa747 pg_dump was trying to use an incorrect (or, perhaps, only obsolete?)
syntax for CREATE OPERATOR with SORT parameters.  Fixed.
It is now actually possible to dump and reload a database containing
fully specified user-definable operators ...
1999-04-14 23:47:19 +00:00
Michael Meskes 29e2916827 *** empty log message *** 1999-04-14 18:51:37 +00:00
Marc G. Fournier 9a4344e73e use new config.guess output for system specific expected files .. 1999-04-14 14:04:41 +00:00
Marc G. Fournier a6311431b5 use config.guess instead of uname -s to figure out system, so that we can
include platform spcific changes ...

thanks to Mark Hollomon <mhh@nortelnetworks.com> for the awk script used
1999-04-14 14:02:00 +00:00
Bruce Momjian c672559c9c Fix adding columns to a temp table. 1999-04-13 19:04:33 +00:00
Bruce Momjian c0cd32d7b4 Add ARM32 support by Andrew McMurry 1999-04-13 17:42:26 +00:00
Bruce Momjian a01dfe71b8 array_in is defined in the system catalog as taking two arguments while it
actually takes three. Please apply the following patch.

Massimo
1999-04-13 17:28:35 +00:00
Bruce Momjian 174b552e71 There are some bugs about backward scanning using
indexes.

1. Index Scan using plural indexids never scan backward
   as to the order of indexids.
2. The cursor using Index scan is not usable after moving
   past the end.

This patch solves above bugs.
Moreover the change of _bt_first() would be useful to extend
ORDER BY patch by Jan Wieck for all descending order cases.

Hiroshi Inoue
1999-04-13 17:18:29 +00:00
Michael Meskes df6e504437 *** empty log message *** 1999-04-13 12:36:38 +00:00
Vadim B. Mikheev c3b09c2237 Fix HEAP_MOVED_IN handling in HeapTupleSatisfiesDirty(). 1999-04-12 16:57:27 +00:00
Vadim B. Mikheev 12a5aa4f1a Some comments... 1999-04-12 16:56:36 +00:00
Vadim B. Mikheev 401293fcff Unique btree-s:
/*
 * Have to check is inserted heap tuple deleted one
 * (i.e. just moved to another place by vacuum)!
 */
1999-04-12 16:56:08 +00:00
Tatsuo Ishii a2c96a16e4 add mipsel-unknown-linux-gnu support. config.guess seems slightly changed
since April 1?
1999-04-12 04:04:54 +00:00
Peter Mount ded46bd522 Implement UpdateCount 1999-04-11 18:03:00 +00:00
Tom Lane 50eb8b7d7f Repair problems seen when CREATE OPERATOR mentions a
not-yet-defined operator in commutator, negator, etc links.  This is
necessary in order to ensure that a pg_dump dump of user-defined operators
can be reloaded.  There may still be a bug lurking here, because it's
provoking a 'Buffer Leak' notice message in one case.  See my mail to
pgsql-hackers.
1999-04-11 02:30:59 +00:00
Tom Lane 194326d6ff Fix another batch of bogosities in pg_operator table.
These were bogus selectivity-estimator links, like a '>' operator
pointing to intltsel when it should use intgtsel.
1999-04-10 23:53:00 +00:00
Tom Lane 2d49637ca7 Tweak create_operator regress test so it doesn't illustrate
incorrect usage of commutator link.
1999-04-10 23:51:16 +00:00
Tom Lane 098e043849 Fix CREATE OPERATOR ... LANGUAGE 'internal', which I broke while
making prosrc instead of proname be the link to the actual internal function.
1999-04-09 22:35:43 +00:00
Tom Lane af87148065 Fix some more hashjoin-related bugs in pg_operator. Fix
hashjoin's hashFunc() so that it does the right thing with pass-by-value
data types (the old code would always return 0 for int2 or char values,
which would work but would slow things down a lot).  Extend opr_sanity
regress test to catch more kinds of errors.
1999-04-07 23:33:33 +00:00
Tom Lane 4e21023fd4 Unmark 'hashable' operators that can't really be used for
hashjoins.  Extend opr_sanity regress test to help detect similar mistakes.
1999-04-07 04:21:11 +00:00
Thomas G. Lockhart d1c1301039 Version string was truncating the last character.
Use memcpy() rather than StrNCpy() which had forced a string termination
 character at the end.
1999-04-06 15:35:36 +00:00
Tom Lane 5763683ce4 On reflection, filesize limit ought to be an exact power
of 2 to save a few cycles in md.c.  So, make it 2^30 not 10^9.
1999-04-06 03:04:22 +00:00
Tom Lane 5ce851dcda Reduce default file size limit to 1Gb, and move the
configuration constant to config.h.
1999-04-05 22:25:11 +00:00
Vadim B. Mikheev 9cae93d309 Fix HEAP_MOVED_OFF handling in HeapTupleSatisfiesDirty
(may be used while vacuuming unique btree-s).
1999-04-05 10:55:49 +00:00
Tom Lane e91f43a122 Fix potential overflow problems when relation size exceeds
2gig.  Fix failure to reliably put the smaller relation on the inside of
a hashjoin.
1999-04-05 02:07:07 +00:00
Tom Lane 2e7ef7477c We use CFLAGS = -O2 on every other gcc platform, so why not
hpux_gcc too?
1999-04-04 20:16:50 +00:00
Tom Lane 2de404e173 Use MAXALIGN value found by configure instead of a
hardwired assumption.
1999-04-04 20:10:12 +00:00
Tom Lane a253dcdb23 Give a better error message if an SQL-language function is
called through fmgr.  Someday we should try to actually execute the function,
but that looks like it might be a major feature addition.
Not something to try during beta phase.
1999-04-03 22:57:29 +00:00
Tom Lane 4ed9269676 Fix bogus pg_amop entries for int8 hash, cidr btree,
polygon rtree, circle rtree indexes.
1999-04-03 18:07:47 +00:00
Tom Lane ff38837fe9 Fix nasty bug in optimization of multiway joins: optimizer
would sometimes generate a plan that omitted a sort step before merge.
1999-04-03 00:18:28 +00:00
Tom Lane 97c52abcc5 Repair problems with omitted password and VALID UNTIL
parameters in CREATE USER.
1999-04-02 06:16:36 +00:00
Tom Lane f620241d73 Remove overly presumptuous use of __STDC__ in c.h, replacing
it with configure-script tests to see whether const, inline, volatile, etc
work or not.  (Curiously, configure was already doing the work to see if
const and inline were OK, but the results were not getting plugged into
config.h :-(.)
1999-04-02 05:10:16 +00:00
Tom Lane 0b874f01dd Clean up compile errors and warnings, cf Billy Allie's
complaints (and some of my own).
1999-04-02 04:51:05 +00:00
Tom Lane b5b5852c26 Update config.guess and config.sub to versions from
autoconf 2.13.
1999-04-02 03:37:17 +00:00
Tatsuo Ishii e57c34c012 Add -E option 1999-03-30 05:14:03 +00:00
Tatsuo Ishii 3f8f0ac1a7 Bug fixes and enhances to psql submitted by Masaaki Sakaida
1. Fix problems of PAGER and \? command
2. Add -E option that shows actual queries sent by \dt and friends
3. Add version number in startup banners for psql
1999-03-30 05:00:42 +00:00
Bruce Momjian 0000a0c004 Small cleanups. 1999-03-30 01:37:28 +00:00
Tatsuo Ishii 4373c4d4fa Addition to test/locale submitted by Oleg Broytmann. Comments from him:
There are two subdirectories (ISO8859-7 and koi8-to-win1251) containing
tests for Greek locale and server<=>client recoding feature (recently
submitted by Tatsuo Ishii <t-ishii@sra.co.jp>; we've debugged his patches
together in the field of Cyrillic support).
1999-03-29 09:00:19 +00:00
Tatsuo Ishii c2d59497df change comparison char* and NULL to char* and '\0'. This should be
more portable way.
1999-03-29 08:19:36 +00:00
Tom Lane c537d4295a Modify fmgr so that internal name (compiler name) of a built-in
function is found in prosrc field of pg_proc, not proname.  This allows
multiple aliases of a built-in to all be implemented as direct builtins,
without needing a level of indirection through an SQL function.  Replace
existing SQL alias functions with builtin entries accordingly.
Save a few K by not storing string names of builtin functions in fmgr's
internal table (if you really want 'em, get 'em from pg_proc...).
Update opr_sanity with a few more cross-checks.
1999-03-29 01:30:45 +00:00
Vadim B. Mikheev fdf6be80f9 1. Vacuum is updated for MVCC.
2. Much faster btree tuples deletion in the case when first on page
   index tuple is deleted (no movement to the left page(s)).
3. Remember blkno of new root page in BTPageOpaque of
   left/right siblings when root page is splitted.
1999-03-28 20:32:42 +00:00
Tom Lane d4ed17842a Expanded opr_sanity test to look at pg_proc and other
related tables.
1999-03-28 02:07:58 +00:00
Tom Lane b0a66dd1be New regression test to cross-check pg_type, pg_class,
and related tables.
1999-03-28 02:06:23 +00:00
Tom Lane 8a3ef74b7c Clean up various minor irregularities detected by type_sanity
and newly expanded opr_sanity tests.
1999-03-28 02:01:39 +00:00
Tom Lane 79e1d1d58a Remove pg_attribute_check.sql: these checks merged into new
regress test 'type_sanity'.
1999-03-28 01:57:32 +00:00
Tom Lane 23ef47f89d Fix bogus function signature for areajoinsel.
It still doesn't do anything, but at least now it does nothing correctly.
1999-03-28 01:56:12 +00:00
Tom Lane 763a7ab6b0 Delete unused system table pg_parg. 1999-03-27 17:26:26 +00:00
Tom Lane 7cb2fd6577 No longer need this file here; superseded by oidjoins regress test. 1999-03-26 08:04:53 +00:00
Tom Lane e5685df258 Add results of findoidjoins as a standard regression test. 1999-03-26 08:02:52 +00:00
Tom Lane f95538269f Remove a bunch of dead entries exposed by findoidjoins crosschecks.
Apparently, whatever these things used to link to got recycled into
something else ... but the dependent entries didn't.
1999-03-26 07:32:42 +00:00
Tom Lane 1e117923aa Revise memutils.h to use alignment information gathered by
configure, instead of having a bunch of crufty platform-specific guesses.
1999-03-25 19:05:19 +00:00
Tatsuo Ishii 235a569aaa Fix multi-byte+locale problem 1999-03-25 04:46:53 +00:00
Tom Lane 6febecc569 Clean up att_align calculations so that XXXALIGN macros
need not be bogus.
1999-03-25 03:49:34 +00:00
Michael Meskes d471f8073a *** empty log message *** 1999-03-24 20:05:15 +00:00
Tatsuo Ishii 5ae9d85f77 Add KOI8/WIN/ALT support 1999-03-24 07:02:17 +00:00
Tatsuo Ishii eb42c1c762 These small utilities are for generating internal tables from
rcode encoding tables.
1999-03-24 07:01:37 +00:00
Tatsuo Ishii e1a22d5e84 Add KOI8/WIN/ALT to set client_encoding command help 1999-03-24 06:57:20 +00:00
Tatsuo Ishii 494b82b718 Fix typo. #ifdef MUTIBYTE --> #ifdef MULTIBYTE 1999-03-24 06:55:14 +00:00
Tatsuo Ishii 2c775870bc Add KOI8/WIN/ALT to the multi-byte encoding selections 1999-03-24 06:53:28 +00:00
Tatsuo Ishii 61ce9cd366 Add KOI8/WIN/ALT to the multi-byte encoding selections 1999-03-24 06:20:38 +00:00
Tatsuo Ishii 5e5ed8fdd0 Add KOI8/WIN/ALT to the multi-byte encoding selections 1999-03-24 04:22:13 +00:00
Bruce Momjian 344dfc0b0f Remove Tee code, move to _deadcode. 1999-03-23 16:51:04 +00:00
Bruce Momjian 92781fc18a cleanups 1999-03-23 05:41:00 +00:00
Bruce Momjian 48ea8b76db Hi,
I have solved some problems with dynamic loading on NT. It is possible
to
run succesfully both trigger and plpgsql regression tests. The patch is
in
the included file "diff".

                        Dan
1999-03-22 16:45:30 +00:00
Bruce Momjian 9aa535a2b9 Add % to b_expr. 1999-03-22 05:07:32 +00:00
Bruce Momjian 53d52a685a Cleanup of NULL in inet types. 1999-03-22 05:00:57 +00:00
Tom Lane 419b91c058 Correct some comments, fix a small memory wastage when datatype
is pass-by-value.
1999-03-21 19:59:13 +00:00
Bruce Momjian beb1851dd9 This patch fixes the bug that made it impossible to grant permissions to
a user such as "www-data".

Oliver
1999-03-21 06:31:59 +00:00
Tom Lane b01a272755 Add .cvsignore file so cvs doesn't complain if you have lex/yacc
output files laying about.
1999-03-21 02:43:58 +00:00
Bruce Momjian f8263c52b0 cleanup 1999-03-21 02:30:22 +00:00
Tom Lane 8425c2496f Ah, *now* I understand: plpgsql lexer must be generated with flex -l ... 1999-03-21 02:27:47 +00:00
Bruce Momjian 7ed3b89d48 Fix for %4 and 4%. 1999-03-21 02:26:56 +00:00
Tom Lane 1b8d9466fb Hmm, it seems some versions of flex declare yytext as extern char[]
but others declare it as extern char *.  gcc complains (quite rightly too).
Worked around it by rearranging the order of inclusions so that we don't
have to explicitly declare yytext; this should work with either variant.
1999-03-21 01:07:07 +00:00
Michael Meskes e4274d60a5 *** empty log message *** 1999-03-20 19:46:54 +00:00
Tom Lane a4ce6f00f8 Remove yacc/lex output files from CVS repository. 1999-03-20 18:45:27 +00:00
Tom Lane 19e4d33bf0 Remove yacc/lex output files from CVS repository. 1999-03-20 18:03:37 +00:00
Tom Lane bb7c0da104 Clean up build procedure: do not keep raw lex/yacc files around,
only the edited ones.
1999-03-20 18:00:38 +00:00
Tom Lane e8f9b6baed make clean should remove lex.yy.c 1999-03-20 17:58:21 +00:00
Tom Lane c96add9a08 Script for preparing derived files during tarball construction. 1999-03-20 17:53:54 +00:00
Bruce Momjian 0aa2aed5f8 Reverse out pfree agg part of patch from Erik Riedel. 1999-03-20 13:18:20 +00:00
Bruce Momjian 3ea6c806eb cleanup 1999-03-20 02:31:45 +00:00
Bruce Momjian afac6363a6 cleanup 1999-03-20 02:07:31 +00:00
Bruce Momjian 7d0ab659ac Fix for aggregate memory leaks from Erik Riedel. 1999-03-20 01:13:22 +00:00
Bruce Momjian 5bfac23006 Fix shift/reduce for NULL = Var. 1999-03-19 23:48:50 +00:00
Bruce Momjian 0dfc358427 Fix for memory leak in executor with fjIsNull. 1999-03-19 22:31:39 +00:00
Bruce Momjian bd6f98af31 I suggest the following portability patch, which does not
change functionality, but makes the code more ANSI C'ish.
My AIX xlc compiler barfs on all of these. Can someone please
review and apply to current.

 <<port.patch>>
Thanks
Andreas
1999-03-19 18:56:43 +00:00
Bruce Momjian 0d01fd4e19 Add EXCEPT/INTERSECT doc changes. 1999-03-19 02:41:41 +00:00
Bruce Momjian 58cc2b6ead cleanup parser 1999-03-18 22:11:47 +00:00
Bruce Momjian 5dd9b58a86 grammar cleanup' 1999-03-18 22:03:59 +00:00
Bruce Momjian ddd50c440a cleanup of grammer. 1999-03-18 22:01:56 +00:00
Bruce Momjian 30ad427388 Fix optimizer indexing not working for negative numbers. 1999-03-18 21:39:56 +00:00
Bruce Momjian dc02fd709f cleanups 1999-03-18 19:59:55 +00:00
Michael Meskes 7729ba073d *** empty log message *** 1999-03-18 15:20:33 +00:00
Bruce Momjian 58118db39d Add new postgres -O option to allow system table structure changes. 1999-03-17 22:53:31 +00:00
Bruce Momjian 4989feaf3d Left associates all operators, instead of non-associating them. 1999-03-17 21:02:57 +00:00
Bruce Momjian 3b43accb0f Have % operator have precedence like /. 1999-03-17 20:17:13 +00:00
Bruce Momjian bfcf90600b Update nextval() code. 1999-03-16 20:15:06 +00:00
Bruce Momjian 89b762e509 Fix snprintf with strings, and nextval('"Aa"'); 1999-03-16 04:26:01 +00:00
Bruce Momjian 434762b559 Here is a patch.
I have changed to call pg_exec_query_dest() instead of pg_exec_query().

Thanks.

Hiroshi Inoue
1999-03-16 03:24:18 +00:00
Bruce Momjian 33cac03c3e autoconf 1999-03-16 03:09:09 +00:00
Bruce Momjian 0ab3c09356 Hmmm. It had to do with tcl/tk on FreeBSD. The configure scripts are
in
different directories.  The patch gave the option of specifying a dir
for
the tk script and if they were both in the same directory then it didn't
mind being empty.  It's small so I'm including it.  It was tested with
autoconf 2.12.

Vince.
1999-03-16 03:02:55 +00:00
Bruce Momjian d4ff6c3093 Change Does Not Exist to 'does not exist'. 1999-03-16 02:57:10 +00:00
Bruce Momjian 3a03e3cd30 cleanup 1999-03-15 22:20:20 +00:00
Michael Meskes 75380d3eae *** empty log message *** 1999-03-15 18:26:55 +00:00
Bruce Momjian 4b583a8a56 Allow sequence nextval actions to be case-sensitive. 1999-03-15 16:48:34 +00:00
Bruce Momjian b53ddbea5e Irix fix from Jeff Johnson 1999-03-15 15:20:52 +00:00
Bruce Momjian 1a305b7ad5 Drop buffers before destroying database files. 1999-03-15 14:07:44 +00:00
Bruce Momjian 25541a5cd3 LIKE cleanup. 1999-03-15 13:45:09 +00:00
Tom Lane 4a9c239063 Fix brain death in !!= operator ... it's still pretty bogus
but at least now it does what it's supposed to do ...
1999-03-15 03:24:32 +00:00
Bruce Momjian 265c283e1b > > > This patches src/bin/psql/psql.c.
> > >
> > > This patch is in responce to the following TODO list item:
> > >  * have psql \d on a view show the query
> > > -Ryan
1999-03-15 02:18:37 +00:00
Tom Lane f621b85a2a Fix int8 configure one more time ... prior version didn't
define INT64_FORMAT in all cases.
1999-03-15 01:43:07 +00:00
Bruce Momjian db42533eae cleanup 1999-03-14 20:17:20 +00:00
Bruce Momjian 5d34abc6f1 Cleanup 1999-03-14 20:01:14 +00:00
Bruce Momjian d66a44a58c Reversed out libpq protocol patch for Tom Lane. 1999-03-14 18:12:21 +00:00
Bruce Momjian 8930699cd6 src/backend/utils/adt/numeric.c fails to compile due to a string having
an
embedded new-line character.


Billy G. Allie
1999-03-14 16:49:32 +00:00
Bruce Momjian cfb7ed414d This is another example of why not allowing utility functions in SPI
would be a Bad Thing.

For what it's worth, I found another case in libpq where you can get a T
message without a D that my utility patch needs to handle.  I have
attached
the updated patch against the 6.4.2 version of
src/interfaces/libpq/fe-exec.c

Jerry Gay
1999-03-14 16:46:21 +00:00
Bruce Momjian c10e6bcbed Attempting to insert a value of 'now' into a datetime type
results in a bogus datetime value under AlphaLinux.  (Note that
the link to submit a port-specific bug on your website is broken)

-Test Case:
----------
testdb=> create table dttest (dt datetime);
testdb=> insert into dttest values ('now');

--------------------------------------------------------------------------


Solution:
---------
The basic problem is the typedefs of AbsoluteTime and RelativeTime,
which are both 'int32'.  These types appear to be used synonymously
with the 'time_t' type, which on AlphaLinux is typedef'd as a 'long
int', which is 64-bits (not 32).  The solution included here fixes
the datetime type (it now passes the regression test), but does not
pass the absolute and relative time regression tests.  Presumably, a
more thorough investigation of how these types are used is warranted.
The included patch is from the v6.3.2 source, but can be applied to
the v6.4.2 source.  Please note that there is also a RedHat-specific
patch distributed with the PostgreSQL source package from RedHat
that was applied first.

Rich Edwards
1999-03-14 16:44:02 +00:00
Bruce Momjian e2c4d41f32 Hi,
Just in case you'd like to see what I was talking about, I am
attaching
my patch to src/interfaces/libpq/fe-exec.c to prevent utility functions
called from SPI from locking up the client.

Jerry Gay
1999-03-14 16:42:15 +00:00
Bruce Momjian 80db587e7b Here is a little syntax error found in a .y file... A dropped semi.
DwD
--
Daryl W. Dunbar
1999-03-14 16:40:18 +00:00
Bruce Momjian 042ec823cf Cleanup of hash functions in pg_proc. 1999-03-14 16:32:46 +00:00
Bruce Momjian 1d3166d3fa compile cleanup 1999-03-14 16:27:59 +00:00
Bruce Momjian f1cdcffb05 Compile cleanup 1999-03-14 16:25:07 +00:00
Bruce Momjian 4c9392230a Done.
o overwriting an existing lobj now works
o 8KB garbage block always inserted problem is fixed

Tatsuo Ishii
1999-03-14 16:08:17 +00:00
Bruce Momjian 9cab13c42e I've been having also sorts of fun trying to get kerberos 4
authentifica
tion
working with postgresql-6.4.2 and  KTH-KRB Ebones
(http://www.pdc.kth.se/kth-kr
b) on a dec alpha running DU 4.0D using the native compiler. The
following
patch does the trick.

The rationale behind this is as follows. The KTH-KRB code header files
defines
lots of lengths like INST_SZ,REALM_SZ and KRB_SENDAUTH_VLEN. It also has
a
habit of doing things like

        chararray[LENGTH] = '\0'

to ensure null terminated strings. In my instance this just happens to
blat
the kerberos principal instance string leading to error like

        pg_krb4_recvauth: kerberos error: Can't decode authenticator
(krb_rd_req
)

The application code that comes with KTH-KRB uses "KRB_SENDAUTH_VLEN +
1" and
sometimes uses "INST_SZ + 1" so it seems safest to put that 1 char
buffer in
the appropriate place.


Rodney McDuff
1999-03-14 16:06:43 +00:00
Bruce Momjian aba8c12f67 We have tested the patches on three platforms:
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE

All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.

Tatsuo Ishii
1999-03-14 16:03:33 +00:00
Bruce Momjian e94fffc1c1 This patch improves the destroyuser script's behaviour in checking whether
the user is allowed to detroy users.  It also allows for a possible incorrect
empty reply to a yes/no question.


Oliver Elphick
1999-03-14 16:00:55 +00:00
Bruce Momjian 344190b7ef Fixup for src/tutorial/func.c and src/tutorial/func.source
Removed char16 and replaced with an example using Point
as suggested by Tom Lane.  The dept field was changed to
the cubicle field denoting the row(x) and column(y) of
the employee's cube in the corporate jungle.  The C function
builds a 'compromise' cubicle from two suggested ones.

I'll try and patchup the documentation next.

Clark
1999-03-14 15:22:15 +00:00
Bruce Momjian f6a9ed0445 Hello,
I've been working on the following TODO list item:
  * psql \d on index with char()/varchar() fields shows improper length

I've attached a simple patch to fix this.

-Ryan
1999-03-14 05:23:12 +00:00
Bruce Momjian 983fc97672 The isWritable method in ResultSetMetaData returns the logically
incorrect result. This bug goes back to at least 6.3.

Alvin
1999-03-14 05:18:00 +00:00
Bruce Momjian d13fe29000 I have a problem with Access97 not working properly when entering new
records using a sub form, i.e. entering a new order/orderlines or master
and
detail tables.  The problem is caused by a SQL statement that Access97
makes
involving NULL.  The syntax that fails is "column_name" = NULL.  The
following attachment was provided by -Jose'-.  It contains a very small
enhancement to gram.y that will allow Access97 to work properly with sub
forms.  Can this enhancement be added to release 6.5?

 <<gram.patch>>
Thanks, Michael
1999-03-14 05:15:08 +00:00
Bruce Momjian fd80c102fa There are errors in the PGmoney class in the conversion routines over
the handling of negative numbers and commas. The attached path attempts
to fix these.
However the getValue method does not yet insert commas into the
generated string.
Also in getValue there is an incorrect assumption that the currency
symbol is '$', it should of course be '£'!. I have no idea on how to go
about fixing this one.

Alvin
1999-03-14 05:12:45 +00:00
Bruce Momjian 817a3e6d39 Enclosed below I have a patch to allow a btree index on the int8 type.
I would like some feedback on what the hash function for the int8 hash
function
in the ./backend/access/hash/hashfunc.c should return.

Also, could someone (maybe Tomas Lockhart?) look-over the patch and make
sure
the system table entries are correct?  I've tried to research them as
much as I
could, but some of them are still not clear to me.

Thanks,
-Ryan
1999-03-14 05:09:05 +00:00
Michael Meskes f9f458be10 *** empty log message *** 1999-03-11 15:42:08 +00:00
Vadim B. Mikheev 2a76aa23e0 We have to return dummy tuple for empty targetlist!
Try select t1.x from t1, t2 where t1.y = 1 and t2.y = 1
- t2 scan target list will be empty and so no one tuple
will be returned...
1999-03-10 12:16:09 +00:00
Tom Lane f8f0efb43d Make type 'regproc' binary-compatible with int4 and oid,
so that it has some SQL operators available.  It's difficult to write
automated tests of a data type that you haven't even got == for...
1999-03-10 05:05:58 +00:00
Tom Lane 3bca9c6c4b Fix some typos in argument and result types in pg_proc
and pg_operator.  The lone error in pg_operator was reported as a bug
by Michael Reifenberger; the multiple errors in pg_proc would only have
been noticed if one invoked the functions by name rather than using
operator syntax.  I guess few people do that.
1999-03-10 05:02:34 +00:00
Marc G. Fournier 1c264e68c5 From: Constantin Teodorescu <teo@flex.ro>
UPgrade to 0.96 ..
1999-03-09 14:17:51 +00:00
Marc G. Fournier f34240de06 Changes to fix/improve the dynamic loading on NT
From: Horak Daniel <horak@mmp.plzen-city.cz>
1999-03-09 13:39:15 +00:00
Bruce Momjian f7430af934 Fix OR index selectivity problem. 1999-03-08 14:01:57 +00:00
Bruce Momjian c831d08fac Fix for Alpha OR selectivity bug. 1999-03-08 13:35:50 +00:00
Marc G. Fournier 75007a72d6 Have configure check for use of %lld for int64, and if that fails, check for
use of %qd...a more generic solution then having #ifdef __<INSERT OS HERE>__
in the code...
1999-03-08 04:17:33 +00:00
Tom Lane a431aaec44 Export include/utils/mcxt.h so that external stuff can include
palloc.h again.  Move exporting of backend header files out of libpq's
Makefile (whatever was it doing there in the first place?) and into
backend/Makefile.
1999-03-07 23:05:57 +00:00
Tom Lane 86c2eadb18 Modify mcxt.h so that it doesn't pull in half of creation. 1999-03-07 23:03:32 +00:00
Tom Lane dffb88b024 Cleaner autoconf tests for int8 support. 1999-03-07 21:32:06 +00:00
Bruce Momjian a564d2bf0f geqo now at 11 tables 1999-03-07 12:00:40 +00:00
Michael Meskes 6f66fd8c2e *** empty log message *** 1999-03-07 08:01:18 +00:00
Bruce Momjian 60bb92af33 Really remove Recipe. 1999-03-07 03:34:11 +00:00
Tom Lane 6c51355612 Eliminate duplicated code in dt.h 1999-03-06 22:58:11 +00:00
Tom Lane d19fc4cacb Reduce DEF_MAXBACKENDS to 32 so that default configuration
is less likely to fail for lack of semaphores.
1999-03-06 21:25:04 +00:00
Tom Lane 731603a92b A few further tweaks to shared memory space estimation.
This change brings the default size of the main shmem block back under 1MB,
which is a fairly popular value for the kernel's SHMMAX parameter.
1999-03-06 21:17:56 +00:00
Michael Meskes 03842eb03b *** empty log message *** 1999-03-05 09:38:51 +00:00
Michael Meskes 9db6b7f3f7 *** empty log message *** 1999-03-05 09:25:34 +00:00
Tom Lane e0345e09bf Partial fix for copied-plan bugs reported by Hiroshi Inoue:
_copyResult didn't copy subPlan structure completely.  _copyAgg is still
busted, apparently because of changes from EXCEPT/INTERSECT patch
(get_agg_tlist_references is no longer sufficient to find all aggregates).
No time to look at that tonight, however.
1999-03-03 00:02:42 +00:00
Tom Lane b204d10c79 Executor no longer cares about mergejoinop, mergerightorder, mergeleftorder,
so remove them from MergeJoin node.  Hack together a partial
solution for commuted mergejoin operators --- yesterday
a mergejoin int4 = int8 would crash if the planner decided to
commute it, today it works.  The planner's representation of
mergejoins really needs a rewrite though.
Also, further testing of mergejoin ops in opr_sanity regress test.
1999-03-01 00:10:44 +00:00
Marc G. Fournier d077c61492 From: Michael Meskes <Michael_Meskes@topmail.de>
+
+ Tue Feb 23 17:32:25 CET 1999
+
+       - Other than a struct a union itself cannot be specified as variable.
+
+ Fri Feb 26 07:18:25 CET 1999
+
+       - Synced preproc.y with gram.y.
+
+ Sat Feb 27 20:30:03 CET 1999
+
+       - Added automatic allocating for NULL pointers.
1999-02-28 07:25:34 +00:00
Tom Lane 51f0f6ddc8 Fix pg_operator entries for mergejoinable operators with different left and
right side data types.  Correct the opr_sanity regress test to check these
entries properly.  NOTE that opr_sanity will now fail until you do an initdb!
1999-02-28 00:56:42 +00:00
Tom Lane dc77be0432 Fix executor to work correctly with mergejoins where left and
right sides have different data types.
1999-02-28 00:36:05 +00:00
Tom Lane 98f739454c Remove recipe.o from Makefile ... dead code not quite dead enough,
it seems.
1999-02-27 21:42:33 +00:00
Tom Lane 1e006ba2ad Put back T_RecipeStmt, since the system doesn't actually build
without it.  Sloppy, sloppy.
1999-02-27 21:40:39 +00:00
Tom Lane b775655e8a Someone forgot to commit gram.c and parse.h after his latest
set of updates to gram.y.
1999-02-27 21:33:53 +00:00
Bruce Momjian c438520b91 Remove reference to recipe.h. 1999-02-25 17:25:47 +00:00
Bruce Momjian 6df955fd3b Fix problem with selectivity error in added columns with ALTER TABLE.
Move files to deadcode.
1999-02-24 17:29:06 +00:00
Bruce Momjian f3f7c2acde update comments 1999-02-24 10:20:07 +00:00
Bruce Momjian 02fa3e4394 Thank you for the advice. I concluded that current inet code has a
portability problem. Included patches should be applied to both
current and 6.4 tree. I have tested on LinuxPPC, FreeBSD and Solaris
2.6. Now the inet regression tests on these platforms are all happy.
---
Tatsuo Ishii
1999-02-24 03:17:05 +00:00
Marc G. Fournier fa9db42a6e From: Michael Meskes <Michael_Meskes@topmail.de>
+
+ Son Feb 21 14:10:47 CET 1999
+
+       - Fixed variable detection in libecpg.
+
+ Mon Feb 22 19:47:45 CET 1999
+
+       - Added 'at <db_connection>' option to all commands it is apllicable
+         to. Due to changing the API of some libecpg functions this
+         requires me to increase the major version number.
+       - Synced pgc.l with scan.l.
+       - Added support for unions.
+       - Set library version to 3.0.0
+       - Set ecpg version to 3.0.0
1999-02-23 12:57:03 +00:00
Thomas G. Lockhart e17d8448f2 Add parameters to function calls to pass back table qualifications. 1999-02-23 08:05:27 +00:00
Thomas G. Lockhart 9fd28029eb Add a few other parser-only nodes for debugging help.
Define the JoinExpr node.
1999-02-23 08:01:47 +00:00
Thomas G. Lockhart 0a8e9c4e7f Define JoinExpr structure for outer join syntax.
Clean up comments in execnodes.h.
1999-02-23 07:55:24 +00:00
Thomas G. Lockhart 70600bd6f1 Clean up error messages. 1999-02-23 07:54:03 +00:00
Thomas G. Lockhart 681c587d22 Do a better job of selecting candidates among functions
when no exact match.
Clean up elog error messages.
1999-02-23 07:51:53 +00:00
Thomas G. Lockhart b4def32439 Include some new code for outer joins. Disabled by default, but enable by
including the following in your Makefile.custom:
 CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG
1999-02-23 07:46:42 +00:00
Thomas G. Lockhart 449020f782 Put in explicit checks for implicit index name lengths.
Put in hooks for outer joins by passing a few parameters back and forth
 in function calls. May not be close to working yet.
1999-02-23 07:44:44 +00:00
Thomas G. Lockhart 03d5c070f0 Modify the outer join placeholder code with something closer to working
code. Works here, but not completely implemented past this point.
1999-02-23 07:42:41 +00:00
Thomas G. Lockhart 8f0a76f012 Bring debugging print statement declarations up to date.
Comment-out the #undef default declarations to allow the parameters to be
 set on the compiler command line.
1999-02-23 07:39:40 +00:00
Thomas G. Lockhart 889c1530c9 Add constants for outer join states in executor. 1999-02-23 07:37:31 +00:00
Thomas G. Lockhart 25cccc05aa Fix typos in comments. 1999-02-23 07:36:31 +00:00
Thomas G. Lockhart 6d73a8c0cb Add first code to help with outer joins.
Enable by defining
 CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG
in your Makefile.custom
1999-02-23 07:35:09 +00:00
Thomas G. Lockhart 97287e1d13 Fix typo in comment. 1999-02-23 07:33:09 +00:00
Thomas G. Lockhart e587f202e4 Update error messages with more consistant format. 1999-02-23 07:31:02 +00:00
Thomas G. Lockhart 4335a3779b Add many new test cases. 1999-02-23 07:30:05 +00:00
Thomas G. Lockhart dfdb2e5fb0 Remove non-portable queries by replacing getpgusername() with a constant
string.
1999-02-23 07:29:19 +00:00
Thomas G. Lockhart 4aa0e645e2 First tests using JOIN syntax. 1999-02-23 07:27:13 +00:00
Thomas G. Lockhart 348ab94822 Rearrange order of subdirectory creation to help generate parse.h
file early enough to use in nodes/.
Try to be more complete for rules on generating parse.h,
 but it still does not work any better than before. Should be able to
 make correctly if parser/gram.y is updated even without a "make clean"
 but so far not there yet.
1999-02-23 07:24:08 +00:00
Bruce Momjian 1e70c1fe5d comments cleanup. 1999-02-22 19:55:44 +00:00
Bruce Momjian 7fe29ecefc comment cleanup. 1999-02-22 19:40:10 +00:00
Bruce Momjian 01ec673cba ifdef out append(). 1999-02-22 17:29:57 +00:00
Bruce Momjian 9aa7e899dc Ok. I found an align problem in lobj that might not appear other than
Solaris/sparc. Please apply included patches to
src/backend/storage/large_object/inv_api.c and try again. (These are

Tatsuo Ishii
1999-02-22 16:46:43 +00:00
Tom Lane bcfdc9df04 Repair some pretty serious problems in dynahash.c and
shared memory space allocation.  It's a wonder we have not seen bug
reports traceable to this area ... it's quite clear that the routine
dir_realloc() has never worked correctly, for example.
1999-02-22 06:16:57 +00:00
Bruce Momjian ceb233ed11 more cleanup 1999-02-22 06:08:48 +00:00
Bruce Momjian 1ed5cbbfd8 Final optimizer cleanups. 1999-02-22 05:26:58 +00:00
Bruce Momjian 47dd11bdd0 rename pgsql to postgres in regression. 1999-02-22 02:08:32 +00:00
Bruce Momjian e23623584f change pgsql to postgres 1999-02-22 02:06:38 +00:00
Bruce Momjian e73d417105 fix compile problem. 1999-02-22 01:57:50 +00:00
Marc G. Fournier 8c3e8a8a0e From: Tatsuo Ishii <t-ishii@sra.co.jp>
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
NOT_USED" for current. I have tested these patches in that the
postgres binaries are identical.
1999-02-21 03:49:55 +00:00
Tom Lane 1efa3f4228 Document postmaster's -N switch. 1999-02-21 03:17:31 +00:00
Marc G. Fournier ae4a40dc26 From: Michael Meskes <Michael_Meskes@topmail.de>
+
+ Fri Feb 19 21:40:14 CET 1999
+
+       - Fixed bug in libecpg that caused it to start transactions only for
+         the first connection.
+       - Set library version to 2.7.1
1999-02-21 03:02:35 +00:00
Bruce Momjian 23c30246d7 pathkeys.c cleanup. 1999-02-21 01:55:03 +00:00
Tom Lane 9d197856dd Rearrange handling of MAXBACKENDS a little bit. The default setting
of MAXBACKENDS is now 1024, since all it's costing is about 32 bytes of memory
per array slot.  configure's --with-maxbackends switch now controls DEF_MAXBACKENDS
which is simply the default value of the postmaster's -N switch.  Thus,
the out-of-the-box configuration will still limit you to 64 backends,
but you can go up to 1024 backends simply by restarting the postmaster with
a different -N switch --- no rebuild required.
1999-02-21 01:41:55 +00:00
Bruce Momjian 75cccd0ad3 pathkeys fixes 1999-02-20 19:02:43 +00:00
Bruce Momjian 0ff2733355 Update pathkeys comparison function. 1999-02-20 18:01:02 +00:00
Bruce Momjian 148ec3b1d8 update pathkey description. 1999-02-20 16:32:35 +00:00
Bruce Momjian 9188aab758 add pathkeys description. 1999-02-20 16:28:20 +00:00
Bruce Momjian 67fd67f53a another rename of optimizer 1999-02-20 15:27:42 +00:00
Marc G. Fournier bf6636baa6 From: Michael Meskes <Michael_Meskes@topmail.de>
See Changes file...
1999-02-20 07:01:08 +00:00
Tom Lane 3eb22085b5 OOPS ... Perl5 interface to PQsetdbLogin was actually
calling PQsetdb ...
1999-02-19 23:27:17 +00:00
Tom Lane 4c31393135 Reorder startup ops so that if preallocation of semas fails,
postmaster will release whatever it did get before dying.
1999-02-19 07:10:48 +00:00
Tom Lane e77b630cf0 Allow maximum number of backends to be set at configure time
(--with-maxbackends).  Add a postmaster switch (-N backends) that allows
the limit to be reduced at postmaster start time.  (You can't increase it,
sorry to say, because there are still some fixed-size arrays.)
Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at
postmaster startup, so that this particular form of bogus configuration
is exposed immediately rather than under heavy load.
1999-02-19 06:06:39 +00:00
Bruce Momjian 612b8434e4 optimizer cleanup 1999-02-19 05:18:06 +00:00
Bruce Momjian 8ab72a38df optimizer cleanup 1999-02-19 02:05:20 +00:00
Bruce Momjian cd38f08598 rename optimizer file name 1999-02-18 19:58:53 +00:00
Bruce Momjian b4e7510e09 Enable bushy and right-hand queries by default. 1999-02-18 06:01:11 +00:00
Bruce Momjian 65ccd1039a Enable bushy plans by default. 1999-02-18 05:26:34 +00:00
Bruce Momjian e78662d879 optimizer cleanup 1999-02-18 04:55:54 +00:00
Bruce Momjian d977ff7b52 more optimizer cleanups 1999-02-18 04:45:36 +00:00
Tom Lane 63393bdf90 Produce a more specific error message when backend sees EOF on
client connection.
1999-02-18 01:13:26 +00:00
Bruce Momjian 31cce21fb0 Fix bushy plans. Cleanup. 1999-02-18 00:49:48 +00:00
Bruce Momjian c82ca4c158 Re-enable bushy plans. Vadim want them. 1999-02-16 00:41:03 +00:00
Bruce Momjian cd550c7672 Update optimizer readme. 1999-02-15 22:19:01 +00:00
Tom Lane 390d5e9f14 regprocin should accept '-' signifying InvalidOid, for
symmetry with regprocout.
1999-02-15 16:29:32 +00:00
Bruce Momjian e6bf7b4d93 rename 1999-02-15 05:56:07 +00:00
Bruce Momjian 56bb23a8fe optimizer rename 1999-02-15 05:50:02 +00:00
Bruce Momjian 50034a852d optimizer rename 1999-02-15 05:28:10 +00:00
Bruce Momjian c5449d5354 otherrels is now unjoined_rels 1999-02-15 05:21:12 +00:00
Bruce Momjian 82682ff31f optimizer rename 1999-02-15 03:59:28 +00:00
Bruce Momjian ba2883b264 Remove duplicate geqo functions, and more optimizer cleanup 1999-02-15 03:22:37 +00:00
Tom Lane 944d3c395e Replace non-idiomatic nconc(x, lcons(y, NIL)) with lappend(x, y). 1999-02-15 02:04:58 +00:00
Tom Lane dec354ca97 Fix a number of places that made faulty assumptions about
what is_opclause will accept.
1999-02-15 01:06:59 +00:00
Tom Lane 5500039843 Fix optimizer coredump with unary-operator WHERE clauses.
A test case is:
create table linetab (x line);
select * from linetab where ?| x;
which coredumps in 6.4.2 and current sources.
1999-02-14 22:24:25 +00:00
Bruce Momjian d8b482be7c optimizer cleanup. 1999-02-14 05:27:12 +00:00
Bruce Momjian 808a6df065 optimizer rename. 1999-02-14 05:14:15 +00:00
Bruce Momjian 61aa825876 Optimizer rename. 1999-02-14 04:57:02 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Thomas G. Lockhart 8c3fff7337 Fix offset of one for date_part(timespan) when given arguments of
decade, century, or millenium.
1999-02-13 05:34:24 +00:00
Thomas G. Lockhart ba71b81966 Remove equivalence between datetime and float8. Led to nothin' but trouble. 1999-02-13 05:25:54 +00:00
Thomas G. Lockhart a97683bc6c Change #if FALSE to #if NOT_USED to avoid port problems.
Fix problem with date_part() for timespan (had an offset of one)
 when given decade, century, and millenium as arguments.
 Reported by Ricardo J.C.Coelho.
1999-02-13 04:25:01 +00:00
Thomas G. Lockhart 910fe5891e Add routines to convert between int8 and text/varchar types.
Change #if FALSE to #if NOT_USED to avoid port problems.
Fix up pg_indent weirdness with function argument declarations.
1999-02-13 04:22:34 +00:00
Thomas G. Lockhart 02e85e7e5f Add routines to convert between int8 and text/varchar types.
Fix output type for int8out, but I don't think it matters.
1999-02-13 04:19:54 +00:00
Thomas G. Lockhart 7a724a0231 Include some Julian date declarations to share between various date/time
modules. Used to be in dt.c I think.
1999-02-13 04:15:33 +00:00
Bruce Momjian ad4b27ac3f Optimizer cleanup. 1999-02-12 17:25:05 +00:00
Bruce Momjian c0d17c7aee JoinPath -> NestPath for nested loop. 1999-02-12 06:43:53 +00:00
Bruce Momjian 3fdb9bb9c7 Fix optimizer and make faster. 1999-02-12 05:57:08 +00:00
Bruce Momjian 55d0465009 optimizer update 1999-02-12 02:37:52 +00:00
Tom Lane 847da1a1ee Remove Perl module's unnecessary dependence on libpq-int.h. 1999-02-11 23:25:16 +00:00
Bruce Momjian 34ecb9d850 Optimizer cleanups. 1999-02-11 21:05:28 +00:00
Bruce Momjian c873fcdaf4 Optimizer cleanup. 1999-02-11 17:21:51 +00:00
Bruce Momjian 8dc2209f71 optimizer cleanup 1999-02-11 17:03:17 +00:00
Bruce Momjian 6de25f09b1 Optimizer cleanup. 1999-02-11 17:00:49 +00:00
Bruce Momjian 4ea3f728e9 More optimization. 1999-02-11 16:09:41 +00:00
Bruce Momjian d244df95db More optimizer speedups. 1999-02-11 14:59:09 +00:00
Bruce Momjian 129543e22d optimizer cleanup 1999-02-11 05:29:08 +00:00
Bruce Momjian dbd80c97f4 Optimizer fix for samekeys() and cost fixes for longer optimizer keys. 1999-02-11 04:08:44 +00:00
Tom Lane 403b3eff79 Include <varargs.h> on SunOS. (Does any other platform need it??) 1999-02-11 01:36:55 +00:00
Bruce Momjian 9dbb0efb0b Optmizer cleanup 1999-02-10 21:02:50 +00:00
Bruce Momjian d5a785cd5a Update find_typedefs for bsdi 4.0. 1999-02-10 17:14:32 +00:00
Bruce Momjian f859c81c18 Rename Path.keys to Path.pathkeys. Too many 'keys' used for other things. 1999-02-10 03:52:54 +00:00
Bruce Momjian 318e593f03 Rename Temp to Noname for noname tables. 1999-02-09 17:03:14 +00:00
Bruce Momjian 78511d8fe9 Optimizer fix for samekeys. 1999-02-09 06:30:45 +00:00
Bruce Momjian fe35ffe7e0 Major optimizer improvement for joining a large number of tables. 1999-02-09 03:51:42 +00:00
Jan Wieck be948af2e8 Added LIMIT/OFFSET functionality including new regression test for it.
Removed CURRENT keyword for rule queries and changed rules regression
accordingly. CURRENT has beed announced to disappear in v6.5.

Jan
1999-02-08 14:14:32 +00:00
Bruce Momjian 54e5d25666 Optimizer cleanup. 1999-02-08 04:29:25 +00:00
Tom Lane 07c33ba79e pg_dump -d or -D didn't quote special characters in INSERT data
correctly.  -D had problems with tables with inherited fields, also.
1999-02-08 01:46:28 +00:00
Jan Wieck 566c712c58 Revert some changes from the INTERSECT/EXPECT patch that broke
rule system semantics by having Var nodes referenced across multiple
parsetrees when rules split them.

Added more tests to the rules regression test.

The code in question resulted from v6.3 based development and was
a little careless applied to the v6.5 source tree.

Jan
1999-02-08 01:39:46 +00:00
Tom Lane bd422fbce2 Simplify scanstr(), fix broken octal-escape code. 1999-02-07 23:59:59 +00:00
Tom Lane f7c6a88c33 Simplify lexer's rules for string constants, eliminate potential buffer overrun. 1999-02-07 23:58:52 +00:00
Tom Lane 45ff93c460 Include -lcrypt when needed to link libpgtcl.so and plpgsql.so 1999-02-07 22:10:47 +00:00
Jan Wieck afd57dbb3a Changed manpages for create_rule/drop_rule to the semantics
of the rule system of v6.4 and descendants.

Jan
1999-02-07 22:10:10 +00:00
Tom Lane fa0f24165c Add PQresStatus() function to avoid direct access to pgresStatus[] array,
making life easier for Windoids...
1999-02-07 22:08:54 +00:00
Tom Lane f280266985 Clean up some minor compile warnings. 1999-02-07 22:07:02 +00:00
Tom Lane 5212ef8e46 Correct definition of srandom() --- it takes unsigned int not int. 1999-02-07 22:04:57 +00:00
Jan Wieck 04075a0c60 New gram.c after modification of gram.y
Jan
1999-02-07 19:04:59 +00:00
Jan Wieck 28fc5d7b83 Reenabled parentheses for grouping multiple rule actions and
added this syntax to rules regression test so it will show up
if someone breaks it again.

Jan
1999-02-07 19:02:20 +00:00
Jan Wieck ef590e101e Changed ExecConstraints() and ExecRelCheck() to cache the constraints
qualification expression trees in the execution state. Prevents from
memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK
constraints. Speedup against the variant using freeObject() is more than
factor 2.

Jan
1999-02-07 16:17:14 +00:00
Jan Wieck dd4a357dc9 Missing semicolon in last fix :-}
Jan
1999-02-07 14:20:11 +00:00
Jan Wieck 6fa3d0a7ab One more fix to QuerySnapshot usage in ExecutorStart(). Maybe
current QuerySnapshot could be NULL.

Jan
1999-02-07 13:54:58 +00:00
Jan Wieck a5f3abacb5 Fixed problem with multiple portals shown up in portals_p2 regression
test after new AllocSet code.

Activated optimal AllocSet blocksize and chunk limit.

Jan
1999-02-07 13:37:56 +00:00
Tom Lane 65d320e7e4 Fix bracketing error in CaseExpr code 1999-02-07 03:02:21 +00:00
Bruce Momjian 65decc3402 Allow psql to do \p\g. Ingres does it, why not us? 1999-02-07 02:56:53 +00:00
Tom Lane 48fd9a2cc2 Add equality checking for T_Query so that we don't get
complaints in UNION regress test.  Probably still need some more node
types to be handled here, but I'm done for the day...
1999-02-07 00:52:12 +00:00
Tom Lane 3fd3d028fb Add floating-point support to our emulation of snprintf
so that EXPLAIN works again.
1999-02-06 21:51:03 +00:00
Tom Lane fd1afb7453 Fix silly typo causing SELECT INTO TABLE to sometimes be
treated as SELECT INTO TEMP TABLE.
1999-02-06 20:28:11 +00:00
Bruce Momjian a553760845 Optimizer cleanup. 1999-02-06 17:29:30 +00:00
Jan Wieck ead64f317b New alloc set code using a memory block pool for small allocations.
Jan
1999-02-06 16:50:34 +00:00
Bruce Momjian 7d2b3874aa optimizer cleanup 1999-02-05 20:34:11 +00:00
Bruce Momjian 6e2edaf4b8 Optimizer cleanup. 1999-02-05 19:59:31 +00:00
Bruce Momjian d5db88142c Fix for returning stack pointer from selectivity, from Bernard Frankpitt. 1999-02-05 17:47:29 +00:00
Bruce Momjian f962514403 Reverse out const to libpq interface from D'Arcy. 1999-02-05 04:25:55 +00:00
Tom Lane d3a85108c2 Fix silly typo in prune_joinrel 1999-02-05 03:43:05 +00:00
Bruce Momjian c45e4925ab Optimizer cleanups. 1999-02-04 23:19:53 +00:00
Bruce Momjian ae12e25263 Update optimizer comments. 1999-02-04 19:20:12 +00:00
Bruce Momjian 19cc38b28d Large object write-into-middle fix from Tatsuo Ishii. 1999-02-04 14:52:00 +00:00
Marc G. Fournier fc590b6f1a From: Michael Meskes <Michael.Meskes@usa.net>
+ Tue Feb  2 07:40:52 CET 1999
+
+       - Brought preproc.y in sync again with gram.y.
+       - Set ecpg version to 2.4.9
+
1999-02-04 04:58:05 +00:00
Bruce Momjian a03b817373 Const fixes from D'Arcy. 1999-02-04 03:20:39 +00:00
Bruce Momjian ce3afccf7f More optimizer cleanups. 1999-02-04 03:19:11 +00:00
Bruce Momjian 18fbe4142f More optimizer renaming HInfo -> HashInfo. 1999-02-04 01:47:02 +00:00
Bruce Momjian 9322950aa4 Cleanup of source files where 'return' or 'var =' is alone on a line. 1999-02-03 21:18:02 +00:00
Bruce Momjian 3982368a4e The libpq function PQfnumber does not handle case-insensitive
comparisons correctly. The psql monitor converts all table and field
names to lower case. If the PQfnumber function is called with a mixed
case name, it will always return -1.

Bahman Rafatjoo
1999-02-03 20:19:10 +00:00
Bruce Momjian 8d9237d485 Optimizer rename ClauseInfo -> RestrictInfo. Update optimizer README. 1999-02-03 20:15:53 +00:00
Jan Wieck f3a6b38e32 Sort node for ORDER BY is suppressed if choosen index scan will
allways present tuples in the requested order.

Jan
1999-02-03 19:31:24 +00:00
Tom Lane 724119a979 Modify int8 to not depend on sscanf(), and fix configure's test
for int8 support.  configure now checks only snprintf() for int8 support,
not sprintf and sscanf as it used to.  The reason for doing this is that
if we are supplying our own snprintf code (which does handle long long int),
we now only need working long long support in the compiler not in the
platform's C library.  I have verified that int8 now passes regression test
on HPUX 9, and I think it should work on SunOS 4.1.* and other older
platforms if gcc is used.
1999-02-03 00:18:53 +00:00
Bruce Momjian 4090d17fee SET_ARGS cleanup 1999-02-02 23:53:26 +00:00
Bruce Momjian f1b7823471 Make GEQO use dependent on table and index count. 1999-02-02 20:30:18 +00:00
Bruce Momjian eb3415538e OK I found it,
I search in the planner for the '\xFF' appending.
Finally I found in MakeIndexable() in gram.y

Attach a patch which removes the "<=" test in USE_LOCALE,
might make some queries a bit slower for us "locale-heads",
BUT correct result is more important.

        regards,
--
-----------------
Göran Thyni
1999-02-02 19:20:54 +00:00
Bruce Momjian 2163d9e33e Add missing mb files. 1999-02-02 19:04:43 +00:00
Bruce Momjian a7ad43cd18 Included patches make some enhancements to the multi-byte support.
o allow to use Big5 (a Chinese encoding used in Taiwan) as a client
  encoding. In this case the server side encoding should be EUC_TW

o add EUC_TW and Big5 test cases to the regression and the mb test
  (contributed by Jonah Kuo)

o fix mistake in include/mb/pg_wchar.h. An encoding id for EUC_TW was
  not correct (was 3 and now is 4)

o update documents (doc/README.mb and README.mb.jp)

o update psql helpfile (bin/psql/psqlHelp.h)

--
Tatsuo Ishii
t-ishii@sra.co.jp
1999-02-02 18:51:40 +00:00
Bruce Momjian 8358a8f6a0 psql help fix. 1999-02-02 18:41:17 +00:00
Bruce Momjian 1b907ab8f5 Fix for psql help create table. 1999-02-02 18:39:23 +00:00
Bruce Momjian 8e958b8a38 Fix create_rule is->as. 1999-02-02 17:46:17 +00:00
Jan Wieck 7ab88a16a1 Fixed failed assertion happening in multiple action rules
when parsestate in makeRangeTable() already contains an
opened p_target_relation.

Jan
1999-02-02 12:57:51 +00:00
Bruce Momjian 4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
Jan Wieck 7fc75517df Fixed growing of backend due to not pfree()'d data on COPY FROM
Fixed growing of backend if BEFORE DELETE trigger returns heap tuple
different from trigtuple.

Jan
1999-02-01 20:25:55 +00:00
Vadim B. Mikheev 072be47202 Initialize es_snapshot. 1999-02-01 13:33:27 +00:00
Tom Lane 757f403451 Tighten coding in samekeys(). Pretty braindead change,
but it saves almost 10% of the runtime in Charles Hornberger's optimizer
example, so what the heck ...
1999-02-01 04:20:50 +00:00
Marc G. Fournier 6ca2bf6534 freebsd4.0 needed to be added to configure... 1999-02-01 02:52:23 +00:00
Marc G. Fournier 91fed81c77 From: Michael Meskes <Michael.Meskes@usa.net>
+
+ Wed Jan 27 12:42:22 CET 1999
+
+       - Fixed bug that caused ecpg to lose 'goto' information.
+       - Set ecpg version to 2.4.7
+
+ Fri Jan 29 18:03:52 CET 1999
+
+       - Fixed bug that caused 'enum' to be rejected in pure C code.
+       - Fixed bug that caused function names to be translated to lower case.
+       - Set ecpg version to 2.4.8
+
1999-01-31 19:56:28 +00:00
Marc G. Fournier f7c4ec5085 From: D'Arcy J.M. Cain <darcy@druid.net>
The following patch does two things.

 - Clarifies what the effect of allowing users to add new users (Thet
   become super-users.)
 - Makes the default database for the new user if they are not allowed
   to and the user agrees to create it.
1999-01-31 05:04:25 +00:00
Tom Lane 36c1895533 Fix postmaster to not try to start more than MaxBackendId children,
per patch from Tatsuo Ishii
1999-01-30 20:04:37 +00:00
Vadim B. Mikheev bfa6d510b3 Small fix for READ COMMITTED isolevel. 1999-01-29 13:24:36 +00:00
Vadim B. Mikheev aaef7beb79 Hope that execMain.c good merged.
Fix for BEFORE ROW UPDATE triggers: result tuple may be different
(due to concurrent update) from one initially produced by top level plan.
1999-01-29 11:56:01 +00:00
Vadim B. Mikheev 1d41e88568 Trying to fix bad merging... 1999-01-29 10:15:09 +00:00
Vadim B. Mikheev e3a1ab764e READ COMMITTED isolevel is implemented and is default now. 1999-01-29 09:23:17 +00:00
Jan Wieck 3e2f87f3f3 Changed qualification of pg_views and pg_tables to directly
check if a rewrite rule on SELECT exists/not exists instead
of asking pg_get_viewdef() function.

Jan
1999-01-28 15:28:40 +00:00
Jan Wieck 51e8a1d390 New prebuilt versions of gram.c and scan.c for the mixed case
identifier support.

Jan
1999-01-28 11:50:42 +00:00
Jan Wieck c42b959fb3 Partial support for mixed case in PL/pgSQL.
Left are identifiers that contain non-alnum/_ chars.
So e.g. whitespaces in identifiers are still not
supported.

Jan
1999-01-28 11:48:31 +00:00
Tom Lane b946244c1c Quick fix for subplan-related crash. 1999-01-27 16:48:20 +00:00
Jan Wieck 28d8b42ca5 Speedup of PL/pgSQL by calling ExecEvalExpr() directly
instead of SPI_execp() for simple expressions.

Jan
1999-01-27 16:15:22 +00:00
Bruce Momjian d611ccb874 fix for aggregates 1999-01-27 16:15:01 +00:00
Marc G. Fournier 2ae5d51668 From: Tatsuo Ishii <t-ishii@sra.co.jp>
Included patches fix a portability problem of unsetenv() used in
6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and
Linux so I decided to replace with putenv().
1999-01-27 01:18:23 +00:00
Tom Lane e27f8791f9 Turns out it's easy to cache the fmgr function lookup
result, too ... another little bit of speed for SELECT.
1999-01-27 01:11:43 +00:00
Tom Lane 422221c90d Another SELECT speedup: extract OIDs of column print functions
only once per SELECT, not once per tuple.  10% here, 10% there,
pretty soon you're talking about real speedups ...
1999-01-27 00:36:28 +00:00
Bruce Momjian 36693c0525 More agg cleanup. 1999-01-26 23:32:04 +00:00
Marc G. Fournier 38a5bda208 primary key support cleanups from D'Arcy... 1999-01-26 14:38:52 +00:00
Bruce Momjian 692a65e6ff pgindent file. 1999-01-26 05:57:14 +00:00
Marc G. Fournier 2ee522954d From: Peter T Mount <peter@retep.org.uk>
This implements some of the JDBC2 methods, fixes a bug introduced into the
JDBC1 portion of the driver, and introduces a new example, showing how to
use the CORBA ORB thats in Java2 with JDBC.

The Tar file contains the new files, the diff the changes to the others.
CHANGELOG is separate as I forgot to make a .orig ;-)
1999-01-25 21:22:06 +00:00
Bruce Momjian 1401f63dd1 Agg/Aggreg cleanup and datetime.sql patch. 1999-01-25 18:02:28 +00:00
Vadim B. Mikheev 247b3f9054 SELECT FOR UPDATE is implemented... 1999-01-25 12:01:19 +00:00
Tom Lane 443e24beb7 Tighten coding of fmgr_isbuiltin() ... managed to speed it up
by about 10% which seems to be good for half a percent or so of a SELECT.
1999-01-25 00:44:53 +00:00
Tom Lane 49b6be244c Tighten coding of inner loops in nocachegetattr ...
seems to have improved speed of routine by 5% or so ...
1999-01-24 22:53:25 +00:00
Tom Lane 18577547d4 Use heap_attisnull, rather than heap_getattr, for a small
but useful speedup.
1999-01-24 22:50:58 +00:00
Tom Lane d03e98737c Replace typtoout() and gettypelem() with a single routine,
so that fetching an attribute value needs only one SearchSysCacheTuple call
instead of two redundant searches.  This speeds up a large SELECT by about
ten percent, and probably will help GROUP BY and SELECT DISTINCT too.
1999-01-24 05:40:49 +00:00
Tom Lane 77f5428244 Fix a couple little problems with signed vs. unsigned
characters ...
1999-01-24 02:47:15 +00:00
Bruce Momjian 17467bb7fb Rename Aggreg to Aggref. 1999-01-24 00:28:37 +00:00
Tom Lane 157349e3af Improper addition of NaN/Infinity recognition to float8in()
was causing it not to detect out-of-range float values, as evidenced by
failure of float8 regression test.  I corrected that logic and also
modified expected float8 results to account for new error message
generated for out-of-range inputs.
1999-01-24 00:12:59 +00:00
Bruce Momjian 598a4e15dd Remove unused Choose node. 1999-01-23 23:28:09 +00:00
Tom Lane e6725d1574 Add explicit buffering in backend libpq, to compensate for
buffering lost by not going through stdio anymore for client I/O.
1999-01-23 22:27:29 +00:00
Tom Lane 13c7c183f7 Fix unportable test syntax in regression script. 1999-01-23 21:36:00 +00:00
Bruce Momjian 598b628b27 Fix for intersect FOR UPDATE check. 1999-01-22 19:35:54 +00:00
Bruce Momjian 15871b48c4 Relcache Size fix. 1999-01-22 18:47:37 +00:00
Bruce Momjian 753c9cb9dd Fix for Size sizeof in cache code. 1999-01-22 16:49:25 +00:00
Marc G. Fournier 8135140a3e |From: "D'Arcy" "J.M." Cain <darcy@druid.net>
|
|The following patch just prevents a warning from being generated because
|the data type isn't specified.
1999-01-22 13:28:50 +00:00
Bruce Momjian 03155dc764 It seems that SPI_prepare() doesn't work well in some cases.
Pawel Pierscionek [pawel@astercity.net] reported about the
following case 1([SQL] drop table in pgsql).
Michael Contzen [mcontzen@dohle.com] reported about the
following case 2(PL/PGSQL bug using aggregates).
You can find it from pgsql-hackers archive.

1. PL/pgSQL can't execute UTILITY commands.
   SPI_prepare() doesn't copy(save) the utilityStmt member of
   Query type nodes,because copyObject() is not implemented
   for nodes of (Create/Destroy etc)Stmt type.

2. Aggregates in PL/pgSQL cause wrong results.

...
   It's a list including Aggreg type nodes which exist in
   TargetList(i.e Aggreg type nodes are common to aggs
   member list and TargetList).
   AFAIC the common pointer is not copied to the same
   pointer by copyObject() function.
   In my patch I reconstruct aggs member node from
   new(copied) Agg type node.
   Is it proper to use set_agg_tlist_references() function to
   reconstruct aggs member node for Agg type nodes ?

Thanks.

Hiroshi Inoue
Inoue@tpf.co.jp
1999-01-21 22:55:41 +00:00
Bruce Momjian 289a826dab Here is a new version of my patch for allowing pg_dump to DROP schema
elements prior to CREATEing new ones.  It is under control of the -c
command line option (with the default being status quo).

The DROP TRIGGER portion still needs implementation.  Anyone able to
help clarify what exactly the CREATE TRIGGER portion does so I can fix
this?

Again, I have tried this with tables/indexes/sequences, but do not
have other schema elements in my database.  As a result, I am not 100%
convinced that I got the syntax correct in all cases (but think I did,
nonetheless).  If anyone can check the other cases, I'd appreciate it.

Cheers,
Brook

[I added manual page and sgml additions for the new -c option.]
1999-01-21 22:53:37 +00:00
Bruce Momjian c91dbcc5c7 The following patch finishes primary key support. Previously, when
a field was labelled as a primary key, the system automatically
created a unique index on the field.  This patch extends it so
that the index has the indisprimary field set.  You can pull a list
of primary keys with the followiing select.

SELECT pg_class.relname, pg_attribute.attname
    FROM pg_class, pg_attribute, pg_index
    WHERE pg_class.oid = pg_attribute.attrelid AND
        pg_class.oid = pg_index.indrelid AND
        pg_index.indkey[0] = pg_attribute.attnum AND
        pg_index.indisunique = 't';

There is nothing in this patch that modifies the template database to
set the indisprimary attribute for system tables.  Should they be
changed or should we only be concerned with user tables?

D'Arcy
1999-01-21 22:48:20 +00:00
Marc G. Fournier cdbaec771c From: Michael Meskes <Michael.Meskes@usa.net>
See attached file. Now accepts "exec sql whenever sqlwarning".
1999-01-21 20:01:34 +00:00
Vadim B. Mikheev 1f37905681 Copy RowMark node (it's for (-:)) FOR UPDATE). 1999-01-21 16:38:36 +00:00
Vadim B. Mikheev 12be3e08f1 FOR UPDATE is in parser & rules. 1999-01-21 16:08:55 +00:00
Bruce Momjian c8ae6afd13 Update gram.c. 1999-01-20 22:31:07 +00:00
Bruce Momjian 2a6081235c Add Intersect check. 1999-01-20 19:48:13 +00:00
Thomas G. Lockhart 1ace93c46c Fix "Y-2K" problem with two-digit BC dates being corrected by two millenia.
They are not corrected now.
Allow the date type to accept BC dates.
Share more date/time validation declarations through dt.h.
1999-01-20 16:29:39 +00:00
Thomas G. Lockhart 791822e3a7 Clean up leap year support and date/time validation.
Move declarations to allow sharing between modules.
1999-01-20 16:26:45 +00:00
Thomas G. Lockhart 974757f19a Add a set of braces to clarify conditional nesting.
gcc complained about ambiguities.
1999-01-20 16:24:59 +00:00
Bruce Momjian 0347dcc860 Okay, I've updated the ecpg parser yet again. Unfortunately it has one
remaining shift/reduce conflict. But the very same conflict is in gram.y, so
I don't dig into it very much now.

Anyway, I just saw that there were minor changes made to ecpg by others. Now
I like that but I would prefer if I was told about that. Otherwise my
version numbering and Changelog maintaining might break. Or simply change
these too. :-)

Also I had to add #include <errno.h> to  backend/libpq/pqcomprim.c to be
able to compile postgresql.

Patch is attached. Since my resubscription process is still not finished
yet, I still send them here.

Michael
1999-01-18 17:17:06 +00:00
Bruce Momjian 909c519733 Add missing Windows files. 1999-01-18 12:43:55 +00:00
Bruce Momjian d3423daaee Fix cfor typos. 1999-01-18 06:46:33 +00:00
Bruce Momjian fd7b963316 Fix for typo in gram.y 1999-01-18 06:32:27 +00:00
Bruce Momjian bd8ffc6f3f Hi!
INTERSECT and EXCEPT is available for postgresql-v6.4!

The patch against v6.4 is included at the end of the current text
(in uuencoded form!)

I also included the text of my Master's Thesis. (a postscript
version). I hope that you find something of it useful and would be
happy if parts of it find their way into the PostgreSQL documentation
project (If so, tell me, then I send the sources of the document!)

The contents of the document are:
  -) The first chapter might be of less interest as it gives only an
     overview on SQL.

  -) The second chapter gives a description on much of PostgreSQL's
     features (like user defined types etc. and how to use these features)

  -) The third chapter starts with an overview of PostgreSQL's internal
     structure with focus on the stages a query has to pass (i.e. parser,
     planner/optimizer, executor). Then a detailed description of the
     implementation of the Having clause and the Intersect/Except logic is
     given.

Originally I worked on v6.3.2 but never found time enough to prepare
and post a patch. Now I applied the changes to v6.4 to get Intersect
and Except working with the new version. Chapter 3 of my documentation
deals with the changes against v6.3.2, so keep that in mind when
comparing the parts of the code printed there with the patched sources
of v6.4.

Here are some remarks on the patch. There are some things that have
still to be done but at the moment I don't have time to do them
myself. (I'm doing my military service at the moment) Sorry for that
:-(

-) I used a rewrite technique for the implementation of the Except/Intersect
   logic which rewrites the query to a semantically equivalent query before
   it is handed to the rewrite system (for views, rules etc.), planner,
   executor etc.

-) In v6.3.2 the types of the attributes of two select statements
   connected by the UNION keyword had to match 100%. In v6.4 the types
   only need to be familiar (i.e. int and float can be mixed). Since this
   feature did not exist when I worked on Intersect/Except it
   does not work correctly for Except/Intersect queries WHEN USED IN
   COMBINATION WITH UNIONS! (i.e. sometimes the wrong type is used for the
   resulting table. This is because until now the types of the attributes of
   the first select statement have been used for the resulting table.
   When Intersects and/or Excepts are used in combination with Unions it
   might happen, that the first select statement of the original query
   appears at another position in the query which will be executed. The reason
   for this is the technique used for the implementation of
   Except/Intersect which does a query rewrite!)
   NOTE: It is NOT broken for pure UNION queries and pure INTERSECT/EXCEPT
         queries!!!

-) I had to add the field intersect_clause to some data structures
   but did not find time to implement printfuncs for the new field.
   This does NOT break the debug modes but when an Except/Intersect
   is used the query debug output will be the already rewritten query.

-) Massive changes to the grammar rules for SELECT and INSERT statements
   have been necessary (see comments in gram.y and documentation for
   deatails) in order to be able to use mixed queries like
   (SELECT ... UNION (SELECT ... EXCEPT SELECT)) INTERSECT SELECT...;

-) When using UNION/EXCEPT/INTERSECT you will get:
   NOTICE: equal: "Don't know if nodes of type xxx are equal".
   I did not have  time to add comparsion support for all the needed nodes,
   but the default behaviour of the function equal met my requirements.
   I did not dare to supress this message!

   That's the reason why the regression test for union will fail: These
   messages are also included in the union.out file!

-) Somebody of you changed the union_planner() function for v6.4
   (I copied the targetlist to new_tlist and that was removed and
   replaced by a cleanup of the original targetlist). These chnages
   violated some having queries executed against views so I changed
   it back again. I did not have time to examine the differences between the
   two versions but now it works :-)
   If you want to find out, try the file queries/view_having.sql on
   both versions and compare the results . Two queries won't produce a
   correct result with your version.

regards

    Stefan
1999-01-18 00:10:17 +00:00
Tom Lane 52065cf347 Clean up trivial compiler warning from gcc. 1999-01-17 21:53:32 +00:00
Tom Lane d1a391c332 Reverse out yesterday's patch from Horak Daniel, since
it fails to compile on any machine without a <features.h> header.
If this header is actually necessary on Windows, perhaps an #if test
is in order.
1999-01-17 21:44:46 +00:00
Tom Lane be94d8fb1e Keep Tcl from getting confused if backend closes connection
when a notify is installed.
1999-01-17 21:14:33 +00:00
Tom Lane 5d2cf6af9e TCL_ARRAYS option patches from Massimo Dal Zotto 1999-01-17 21:12:55 +00:00
Tom Lane f134a1a90a Add missing variable, per Massimo. 1999-01-17 21:05:23 +00:00
Tom Lane 740c9da76d fixes to lock debugging macros from Massimo Dal Zotto 1999-01-17 20:59:56 +00:00
Tom Lane 00a420d53c Add description of ELOG_TIMESTAMPS and USE_SYSLOG options,
per Massimo Dal Zotto.
1999-01-17 20:58:03 +00:00
Bruce Momjian bce901af7d Win32 new files. 1999-01-17 06:27:05 +00:00
Bruce Momjian 7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
Bruce Momjian 298682d9e0 As the email posted to the announce and interfaces list, attached is a tar
file containing the latest version of the JDBC driver, allowing it to be
compiled and used under JDK 1.2 and later.

NB: None (well almost none) of the new methods actually do anything. This
release only handles getting it to compile and run. Now this is done, I'll
start working on implementing the new stuff.

Now this tar file replaces everything under src/interfaces/jdbc. I had to
do it this way, rather than diffs, because most of the classes under the
postgresql subdirectory have moved to a new directory under that one, to
enable the support of the two JDBC standards.

Here's a list of files in the tar file. Any file not listed here (in the
postgresql directory) will have to be deleted, otherwise it could cause
the driver to fail:

Peter Mount
1999-01-17 04:51:59 +00:00
Tom Lane 4a6285ee44 Improve error message when connect() call fails:
report kernel's errno value.
1999-01-17 03:37:19 +00:00
Bruce Momjian 4deb20f4ce Fix for missing NAN. 1999-01-17 03:28:37 +00:00
Tom Lane 7fab608205 Add configure test to see whether vsnprintf() is present,
separately from snprintf() --- HPUX, for one, has snprintf but not
vsnprintf.  Fix a minor typo in snprintf.c, too.
1999-01-17 03:22:52 +00:00
Tom Lane cd6bc85aa2 Remove uses of MSG_WAITALL temporarily, since it doesn't
seem to be portable (HPUX doesn't like it, anyway).  Also, clean up
StreamConnection(), which was mis-coded to assume that the address
family field is already set when it's called.
1999-01-17 03:10:23 +00:00
Tom Lane 21badba151 Replace direct inclusions of c.h with inclusion of postgres.h,
to ensure that config.h is included as well.
1999-01-17 03:04:57 +00:00
Tom Lane 4e34686a36 Apply Magnus Hagander's followup patch to correct
out-of-sync routine prototypes ... the system doesn't compile without this ...
1999-01-17 01:45:42 +00:00
Tom Lane 46ced3429b Re-insert %.sl rule into Makefile.hpux ... seems it is not
quite as unused as I thought ... how embarrassing.
1999-01-17 00:18:59 +00:00
Marc G. Fournier d8b96ade81 From: Magnus Hagander <mha@sollentuna.net>
Here's another patch for the libpq backend areas. This patch removes all
usage of "FILE *" on the communications channel. It also cleans up the
comments and headers in the pqcomm.c file - a lot of things were either
missing or incorrect. Finally, it removes a couple of unused functions
(leftovers from the time of shared code between the libpq backend and
frontend).
1999-01-12 12:49:52 +00:00
Marc G. Fournier 3b3ffc8d97 From: Magnus Hagander <mha@sollentuna.net>
Here is a first patch to cleanup the backend side of libpq.
This patch removes all external dependencies on the "Pfin" and "Pfout" that
are declared in pqcomm.h. These variables are also changed to "static" to
make sure.
Almost all the change is in the handler of the "copy" command - most other
areas of the backend already used the correct functions.
This change will make the way for cleanup of the internal stuff there - now
that all the functions accessing the file descriptors are confined to a
single directory.
1999-01-11 03:56:11 +00:00
Thomas G. Lockhart 6d5d673ca8 Be more careful to check input string lengths as well as values
when deciding whether a field is a year field.  Assume *anything* longer
 than 2 digits (if it isn't a special-case doy) is a valid year.
 This should fix the "Y1K" and "Y10K" problems
  pointed out by Massimo recently.
Check usage of BC to require a positive-valued year; before just used it
 to flip the sign of the year without checking. This led to problems
 near year zero.
Allow a 5 digit "concatenated date" of 2 digit year plus day of year.
Do 2->4 digit year correction for 6 and 5 digit "concatenated dates".
 Somehow forgot this originally. Guess not many folks use it...
1999-01-10 17:20:54 +00:00
Thomas G. Lockhart c715788681 Handle "NaN" and "Infinity" for input values.
I think NAN is already guaranteed to be there from Jan's work on NUMERIC,
 but perhaps HUGE_VAL needs some #ifndef's in the same place.
Should also include "-Infinity" as -HUGE_VAL sometime; not there yet.
1999-01-10 17:13:06 +00:00
Byron Nikolaidis 0b644ad332 Update 06-40-0004 -- Add Bookmark support! 1999-01-08 18:24:45 +00:00
Bruce Momjian 97b88f1c15 Sorry for posting it here again, but I haven't corrected my
subscriptions
yet. It's just a small patch to ecpg to keep it in sync with gram.y.

Michael
1999-01-07 19:11:18 +00:00
Byron Nikolaidis a1164a2508 Update 06-40-0003 1999-01-06 20:44:08 +00:00
Vadim B. Mikheev dfa23f5e41 SELECT FOR UPDATE syntax 1999-01-05 15:46:25 +00:00
Jan Wieck b5626a2089 Restricted maximum precision for NUMERIC to 1000 digits.
Anything else is CPU overkill.

Jan
1999-01-05 11:12:11 +00:00
Jan Wieck 814c8495a7 Removed precision restriction in numeric_round() causing
overflow error on high precision calculations where temporary
huge precision is required.

Jan
1999-01-05 11:10:45 +00:00
Byron Nikolaidis 8aad28da2d Mini Update #2 -- final fixes for buffer lengths, null buffers, truncation 1999-01-05 00:32:21 +00:00
Jan Wieck 1bbe55c79f Just one more bugfix - this time in cmp_abs (cannot imagine that
taking a logarithm with a 400 digit precision worked with that bug
in place).

Jan
1999-01-04 17:51:58 +00:00
Jan Wieck c1855793df Fixed backend crashing bug in apply_typmod()
Jan
1999-01-04 12:53:23 +00:00
Jan Wieck e3a5ac283b Little fix for round() function
Jan
1999-01-04 11:20:33 +00:00
Bruce Momjian 936d89e9e0 Fix NAN code. 1999-01-03 05:30:47 +00:00
Bruce Momjian 6fd29f2c01 Fix for NAN generation. 1999-01-03 02:40:12 +00:00
Bruce Momjian f0fbd7b87e Some security, since we now have vsnprintf, I remade an old patch
with some extra ugly sprintfs fixed. More work in this area is
   needed still.

Göran Thyni
1999-01-01 04:48:49 +00:00
Bruce Momjian d8ae7ffb2f Fix for no platform NAN. 1999-01-01 04:17:13 +00:00
Bruce Momjian da361ee24b Add max oid display, rather than returning just a dash for the last entry. 1998-12-31 20:09:49 +00:00
Thomas G. Lockhart 4d56dbd678 Change ordering of HAVE_TM_ZONE and HAVE_INT_TIMEZONE code blocks
to give HAVE_TM_ZONE priority. This fixes glibc2 machines and any other
 machine which passes both tests in configure.
Repair HAVE_TM_ZONE code which stuffs tm structure with date type values.
 Same problems as were originally there before v6.1, but never noticed.
Thanks to Oleg for nagging :)
1998-12-31 16:30:59 +00:00
Byron Nikolaidis 2d74bf8843 uncomment MYLOG to prevent warnings in compile 1998-12-31 00:26:44 +00:00
Byron Nikolaidis bc9bab0390 Mini update to fix SQLGetInfo to work properly (truncation, NULL) 1998-12-31 00:26:06 +00:00
Jan Wieck 5df20d4449 Little precision fix for POWER(). I discovered problems with big
exponents.

Jan
1998-12-30 20:46:06 +00:00
Jan Wieck 0e9d75c6ac Added NUMERIC data type with many builtin funcitons, operators
and aggregates.

Jan
1998-12-30 19:56:35 +00:00
Bruce Momjian 6059c5a141 Update for deadlock detection. 1998-12-29 19:32:08 +00:00
Bruce Momjian 06c120e67e Update for deadlock timer. 1998-12-29 18:36:29 +00:00
Bruce Momjian 2b8736bac6 Fix for deadlock detection timeout. 1998-12-29 18:30:33 +00:00
Bruce Momjian f659ec545f Fix for deadlock timer timeout. 1998-12-29 18:29:18 +00:00
Byron Nikolaidis 550de5db2c Minor fixes to compile on unix for v6-40-0002 1998-12-29 14:59:30 +00:00
Byron Nikolaidis 6d7735e7f0 Update for version 6-40-0002 and re-merge Thomas' changes. 1998-12-29 01:49:58 +00:00
Bruce Momjian d73cf044f6 autoconf 1998-12-28 05:41:51 +00:00
Bruce Momjian dfe4304879 Fix for current dir not in path, from stan's report. 1998-12-28 05:37:50 +00:00
Bruce Momjian 58e539e574 Long awaited port for NetBSD/m68k was finally done by Mr. Mutsuki
Nakajima. Since he is not subscribing the mailing list, I'm posting
his patches by his request.  According to him, he has successfully
compiled and passed the regression test on Mac SE/30 running
NetBSD/m68k. Also, another person has reported that with the patches
PostgreSQL is working on NetBSD/sun3 too.
--
Tatsuo Ishii
1998-12-26 18:15:53 +00:00
Bruce Momjian 2be1eccec7 Fix for version, update to 6.5. 1998-12-25 02:20:12 +00:00
Bruce Momjian cb6331901c Fix for snprintf and long long unsigned. 1998-12-24 05:28:50 +00:00
Thomas G. Lockhart 18bdefa23f Fix reference to null pointer when no aggregate function candidates
are available. Problem reported by David Sauer <davids@iol.cz>.
Modify information in resulting error message to indicate both agg name
 and data type.
1998-12-23 14:38:40 +00:00
Bruce Momjian 5afe8d3478 Add subversion mention 1998-12-23 14:35:42 +00:00
Marc G. Fournier e237194b72 From: Michael Meskes <Michael.Meskes@usa.net>
+
+Wed Dec  9 11:24:54 MEZ 1998
+
+       - Synced preproc.y with gram.y and the keywords.c files to add CASE
+         statement.
+
+Tue Dec 22 14:16:11 CET 1998
+
+       - Synced preproc.y with gram.y for locking statements.
+       - Set version to 2.4.5
1998-12-22 18:50:56 +00:00
Jan Wieck d7171601a3 Changed TypeName.typmod to int32 - atttypmod is of that size
Jan
1998-12-21 12:50:29 +00:00
Marc G. Fournier 1adb6a9d18 finished cleaning up outnodes.c ... 1998-12-20 07:13:36 +00:00
Bruce Momjian 3cd3be92ff Fix deadlock so it only checks once. 1998-12-18 19:45:38 +00:00
Bruce Momjian 99603f8578 Add pgaccess Makefile. 1998-12-18 17:54:42 +00:00
Bruce Momjian 3d39ea7341 Here are descriptions:
- the first patch is just to preven listing the perl warning in the
  make output unless it is actually emitted by the make.  this may
  prevent new users from being confused by the warning in their output

- the second patch (to 2 files) just enables building/installing
  pgaccess if TCL and TK are available.  a Makefile is created to do
  this, but you may wish to change the heading information in it since
  I just copied another Makefile to use as a template.

I hope these make it into 6.4.1.

Cheers,
Brook
1998-12-18 17:53:22 +00:00
Bruce Momjian b8d5f02e4e I have ported PostgreSQL 6.4 to Cobalt Qube running Linux 2.0.33 with
MIPS cpu (I think it's R4000). I have tested the patches on LinuxPPC
and FreeBSD. I believe they do not harm other platforms.
--
Tatsuo Ishii
1998-12-18 17:25:41 +00:00
Jan Wieck eeff2c94be Fixed nodeToString() to put out "<>" for NULL strings again.
More cleanups to appendStringInfo() usage in node/outfuncs.c.

Jan
1998-12-18 14:45:09 +00:00
Vadim B. Mikheev 3498d878cb SET TRANSACTION ISOLATION LEVEL ...
LOCK TABLE IN ... MODE
...implemented
1998-12-18 09:10:39 +00:00
Bruce Momjian c7da80bb9a Missed a few files. 1998-12-18 07:09:26 +00:00
Bruce Momjian 03f1648872 Attached is a patch with some fixes that (I think that) should go into
6.4.1. Here is the list:

- The type int8 now works. In fact, the bug(s) were in
src/backend/port/snprintf.c, so int8 is probably broken in every platform
that hasn't a native snprintf/vsnprintf. The type itself worked as
expected, only the output was wrong. Anyway, this patch should be checked
in other platforms.

- The regression tests for int2 and int4, which were broken due to
differences in the error messages, are fixed.

- The regression test for float8, which was broken in the reference
platform, is also fixed. I don't know if the new file (float8-OSF1.out)
will work on other platforms, but it might be worth to try it.

- Two new template files are provided (alpha_cc, which includes
optimization, and alpha_gcc), and src/templates/.similar is updated
accordingly. src/templates/alpha should be removed from the distribution.
*IMPORTANT NOTE*: I don't know if you can use gcc to compile postgres;
I've written the alpha_gcc file because alpha_cc has some flags that are
specific to DEC C.

- There is a (very basic) Digital Unix specific FAQ in
doc/FAQ_DigitalUnix.

--
-------------------------------------------------------------------
Pedro José Lobo Perea                   Tel:    +34 91 336 78 19
1998-12-18 07:08:03 +00:00
Bruce Momjian 9d6f0606c5 Fix for HAVE_LONG bug in snprintf.c. 1998-12-18 07:03:06 +00:00
Bruce Momjian 6b7cf13200 Fix for snprintf with long long's, define problem. 1998-12-18 06:59:39 +00:00
Marc G. Fournier 597205c353 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Looks like :vartypmod got transmuted to %vartypmod in an editing session.
1998-12-17 13:09:52 +00:00
Bruce Momjian e9491eb91c Upgrade to Pygress 2.2. 1998-12-17 01:43:04 +00:00
Vadim B. Mikheev c13a64d7fb Serialized mode works! 1998-12-16 11:53:55 +00:00
Marc G. Fournier 54c3e65242 Oops, sorry...meant to commit the patch from Thomas for tzn->CTZName 1998-12-15 15:28:57 +00:00
Vadim B. Mikheev 83f558afdd tzn undeclared in FreeBSD, commented out. 1998-12-15 15:10:03 +00:00
Vadim B. Mikheev 3f7fbf85dc Initial MVCC code.
New code for locking buffer' context.
1998-12-15 12:47:01 +00:00
Marc G. Fournier c5a27161a1 More cleanups ... this is one big file *sigh* 1998-12-15 04:00:46 +00:00
Marc G. Fournier 3b8854ff93 Correct some typos... 1998-12-15 02:32:57 +00:00
Marc G. Fournier c1bc907f01 More cleanups of appendStringInfo() function calls... 1998-12-15 02:24:15 +00:00
Bruce Momjian 66d64b727f Compilation of libpq for Win32 breaks on 6.4, because of a change that I
missed before the release. It's simply a symbol that is undefined. This
patch defines this symbol in "win32.h", so it should have no effect on any
other platforms. It should go into 6.4.1 if possible, since compilation is
completely broken without it.

I am also attaching a patch for the "win32.mak" file - it leaves a file
behind when doing "make clean" after the library is built on Visual C++ 6.0.
This is not at all as urgent, but I don't see it breaking here, so I think
it might as well go in there too?

//Magnus
1998-12-14 15:05:27 +00:00
Marc G. Fournier 9396802f14 more cleanups...of note, appendStringInfo now performs like sprintf(),
where you state a format and arguments.  the old behavior required
each appendStringInfo to have to have a sprintf() before it if any
formatting was required.

Also shortened several instances where there were multiple appendStringInfo()
calls in a row, doing nothing more then adding one more word to the String,
instead of doing them all in one call.
1998-12-14 08:11:17 +00:00
Marc G. Fournier df1468e251 Many more cleanups... 1998-12-14 06:50:32 +00:00
Marc G. Fournier 7c3b7d2744 Initial attempt to clean up the code...
Switch sprintf() to snprintf()
Remove any/all #if 0 -or- #ifdef NOT_USED -or- #ifdef FALSE sections of
	code
1998-12-14 05:19:16 +00:00
Bruce Momjian ffb90a01fd Current multi-byte related codes have a bug with SQL_ASCII
support. Included patches will solve it and should be applied to
both trees.  Also, it fix the problem with \c command of psql when
switching different encoding databases.

Regression tests passed.
--
Tatsuo Ishii
t-ishii@sra.co.jp
1998-12-14 04:59:58 +00:00
Thomas G. Lockhart 4140c2f30e Add support for the CASE statement in the rewrite handling.
Allows (at least some) rules and views.
Still some trouble (crashes) with target CASE columns spanning tables,
 but lots now works.
1998-12-14 00:02:17 +00:00
Thomas G. Lockhart 2b189aa953 Improve CASE statement support.
Try to label CASE columns for a SELECT if not specified with an AS clause.
1998-12-13 23:56:44 +00:00
Thomas G. Lockhart 44cf948467 Fix up error messages when looking up functions and operators to not
make the sometimes misleading claim that more than one candidate was
 identified. Now say "Unable to identify...".
1998-12-13 23:54:40 +00:00
Thomas G. Lockhart 1a8790f7eb Use the new implicit type coersion techniques for matching up types
between columns and DEFAULT clauses.
1998-12-13 23:50:58 +00:00
Thomas G. Lockhart 23cebf11b6 Clean up error messages associated with rules and views.
Fix parser error message when an operator is not found
 to not explicitly claim that there is more than one.
1998-12-13 23:49:18 +00:00
Tom Lane e3909672f1 Build pltcl.so correctly on platforms that want dependent
shared libraries to be listed in the link command.
1998-12-13 23:46:49 +00:00
Thomas G. Lockhart 3a52e3f3a2 Add routines and synonyms to help with single-byte char type handling.
Fix one usage of substr() which mapped to the "Oracle compatibility" funcs
 rather than the more recent (and closer to SQL92) function in varlena.c.
Add more DESC() entries for conversion functions.
1998-12-13 23:45:22 +00:00
Thomas G. Lockhart e18d900da4 Adjust handling of data type names to suppress double quotes
unless necessary.
Label internal bpchar types as "character" and varchar types as
 "character varying" to be less Postgres-specific. These types map to
 the SQL92 definitions anyway.
Redefine g_force_quotes to be the local variable force_quotes.
Pass this as an argument to fmtId().
These should help with handling the single-byte internal "char" type.
1998-12-13 23:41:32 +00:00
Thomas G. Lockhart 239564e9ef Add routines to help with single-byte (internal) character type support. 1998-12-13 23:36:48 +00:00
Thomas G. Lockhart f9f4004b7c Switch around conditional code so that HAVE_TM_ZONE takes precedence
over HAVE_INT_TIMEZONE. This may help out linux/glibc2 and Dec Alpha.
Included #error precompiler macros to catch cases where neither is defined
 but USE_POSIX_TIME is (shouldn't happen). Hopefully this isn't just
 a gcc-ism.
1998-12-13 23:34:17 +00:00
Tom Lane e791d86012 Partial fix for vendor-cc-versus-gcc incompatibility on HPUX:
prefer aCC as c++ compiler if hpux_cc is selected as template.
Doesn't solve the problem if you have g++ and not aCC, however...
1998-12-13 20:05:16 +00:00
Tom Lane a10b38f255 Use standard AC_PROG_INSTALL macro to search for install program,
instead of our own halfway-there code.  Add AC_STRUCT_TIMEZONE call
to check whether tm_zone exists in struct tm.  Revise reading of template
file so that templates can define any variables they feel like (and,
indeed, can execute arbitrary shell code) rather than being constrained
to a fixed set of variable names.
1998-12-13 20:03:07 +00:00
Bruce Momjian 26a23e33db Add enable_plpgsql from Oliver. 1998-12-13 05:22:58 +00:00
Bruce Momjian 2d11676999 Cleanup patch from Oleg. 1998-12-13 05:14:53 +00:00
Bruce Momjian afded8add3 Fix for lo_import crash. 1998-12-13 05:07:50 +00:00
Bruce Momjian 31d825ba07 While investigating a user's complaint, I have found some memory
destructions in 6.4 source using purify.

(1) parser/gram.y:fmtId()

It writes n+3 bytes into n+1 byte-long memory area if mixed case or
non-ascii identifiers given.

(2) catalog/index.c:

ATTRIBUTE_TUPLE_SIZE bytes are allocated but
sizeof(FormData_pg_attribute) bytes are written. Note that
ATTRIBUTE_TUPLE_SIZE is smaller than
sizeof(FormData_pg_attribute). (for example, on solaris 2.6,

Tatsuo Ishii
1998-12-13 04:37:51 +00:00
Bruce Momjian 589f5aa241 I have a simple patch about the treatment of functions.
But it may be self-satisfied.
Please check my patch at the end of this posting.

Case 1. executor evaluates functions twice

Hiroshi Inoue
Inoue@tpf.co.jp
1998-12-13 04:16:51 +00:00
Bruce Momjian b693983004 New ecpg man page. 1998-12-13 03:53:56 +00:00
Bruce Momjian 0ad5d2a3a8 Change Size from unsigned int to size_t. 1998-12-13 03:44:38 +00:00
Bruce Momjian ecdf95f6d6 This patch fixes the undefined (according to C) and erroneous (under
Digital Uni x with both DEC cc and gcc) behaviour of modifying an
lvalue on the left side an d then using it on the right side of an
assignment. Since this code modifies the
 dbname parameter, it was changing, for example, "dbname=template1"
 into "dbname =emplate1".

David Smith Programmer P
1998-12-13 02:50:20 +00:00
Bruce Momjian 5c431eb1f2 Included patches should fix following problems in the muti-byte
enabled PostgreSQL 6.4.

o binary cursor does not work
o pg_dumpall produces incorrect create database statemnt

Tatsuo Ishii
t-ishii@sra.co.jp
1998-12-12 22:04:09 +00:00
Bruce Momjian 439ef85b0d Fix prototype for 64-bit platforms. 1998-12-12 21:30:57 +00:00
Bruce Momjian 4c87f79854 Update to pgaccess 0.93. 1998-12-12 21:15:40 +00:00
Bruce Momjian 0d5a08f769 Add stdio for NULL define. 1998-12-12 19:57:51 +00:00
Thomas G. Lockhart 053004a80b Clean up a few elog() messages for aggregates and functions. 1998-12-08 06:20:48 +00:00
Thomas G. Lockhart 53b476798a Define routines and catalog entries for string min()/max() functions.
Extend new type coersion techniques to aggregates.
Clean up a few elog() messages.
1998-12-08 06:19:15 +00:00
Thomas G. Lockhart 9470ab03c9 Define routines and catalog entries for string min()/max() functions.
Extend new type coersion techniques to aggregates.
1998-12-08 06:18:34 +00:00
Tom Lane 84107b419e Fix coredumping bug in pg_dump -z; also eliminate memory leaks
in the ACL code, and spell "GRANT RULE" correctly.
Apply patch from Oliver Elphick to not dump inherited constraints.
Apply patch from Constantin Teodorescu to dump table definitions with a
readable layout.
1998-12-05 22:09:57 +00:00
Thomas G. Lockhart 6a7fdf2592 These data types were removed before the last release. 1998-12-04 15:52:45 +00:00
Thomas G. Lockhart 47e506fb8f Include test for CASE expression. 1998-12-04 15:36:51 +00:00
Thomas G. Lockhart bedd04a551 Implement CASE expression. 1998-12-04 15:34:49 +00:00
Tom Lane 19740e2fff Portability fixes found needed for SunOS 4.1.x:
SunOS has tas(), but not memmove or strerror, and its sprintf() doesn't
return int.  Also, older versions of GNU Make don't like rules with
empty left-hand sides...
1998-11-30 00:30:05 +00:00
Tom Lane b10a719777 Use autoconf to determine whether system has POSIX signals,
instead of relying on port's os.h to tell us.  (Needed for HPUX
where system major version is not enough info.)
configure unsets USE_TK if X libraries not found.
doc/Makefile uses gzcat or zcat as found by autoconf.
1998-11-29 05:30:25 +00:00
Tom Lane 92eacaf523 Change exp() behavior to generate error on underflow rather
than silently returning zero on some machines.  Correct float8 regress test
to agree.  Also fix pow() overflow/underflow check to work correctly on
HPUX.
1998-11-29 01:57:59 +00:00
Tom Lane 67531c42bd Portability fix for old SunOS releases: realloc(NULL, ...)
doesn't work there.
1998-11-29 01:53:54 +00:00
Tom Lane 79fcde48b2 Portability fix for old SunOS releases: fflush(NULL)
doesn't work there.  Fortunately the postmaster only has stdout and
stderr to flush.
1998-11-29 01:51:56 +00:00
Tom Lane 9e0e148a83 pq_getstr didn't handle buffer overrun correctly; it would
fail to consume the rest of the input string, and worse it would write
one more byte than it should into the buffer, probably resulting in coredump.
Fortunately there's a correct implementation next door in pqcomprim.c.
1998-11-29 01:47:42 +00:00
Vadim B. Mikheev 971175fa0c New HeapTuple structure/interface. 1998-11-27 20:09:56 +00:00
Vadim B. Mikheev 6beba218d7 New HeapTuple structure/interface. 1998-11-27 19:52:36 +00:00
Vadim B. Mikheev 2435c7d501 New HeapTuple structure/interface. 1998-11-27 19:33:35 +00:00
Jan Wieck 07ffc4628e Fixed bug in the unknown module. Module still tried to call
builtin SPI commands by their old SPI_* names. New names are spi_*.

Jan - 11/23/1998
1998-11-23 16:50:54 +00:00
Tom Lane 6fef1a26cc modify configure so that template/.similar entries can be
selected when they match a prefix of the  value.  The previous method,
which stripped all version data from  and then tried to match that
against .similar entries, was entirely useless when .similar contained
several entries for different version numbers of a single OS name.
1998-11-23 04:40:58 +00:00
Vadim B. Mikheev 34680930d5 Fix using indices in OR.
EXPLAIN all indices used.
1998-11-22 10:48:45 +00:00
Vadim B. Mikheev 1f00f0dc2e Added indxqualorig to IndexScan: fix for using indices in OR. 1998-11-22 10:45:09 +00:00
Marc G. Fournier 056ba12881 Updating and addign files... 1998-11-19 02:39:51 +00:00
Tom Lane fd0366e1b5 Performance improvement for libpq: avoid calling malloc separately
for each field of each tuple.  Makes more difference than you'd think...
1998-11-18 00:47:28 +00:00
Thomas G. Lockhart 643c7beddf Add text<->float8 and text<->float4 conversion functions.
This will fix the problem reported by Jose' Soares
 when trying to cast a float to text.
1998-11-17 14:36:51 +00:00
Thomas G. Lockhart 8d507c204b Additional fixes for mixed-case table names from Billy Allie. 1998-11-17 14:26:39 +00:00
Marc G. Fournier 91a62480f7 From: Taral <taral@cyberjunkie.com>
More COS Query Service support.
1998-11-17 03:10:36 +00:00
Marc G. Fournier 935a2e694e Start defining the Corba work...
From: Taral <taral@cyberjunkie.com>
1998-11-16 18:03:34 +00:00
Tom Lane 0856cdf3f7 Fix a couple of bugs involving calling fmtID() twice in
a single printf() ... it'd work if fmtId() didn't use a static return area...
1998-11-15 07:09:13 +00:00
Thomas G. Lockhart 9f07f8f40f Add "vacuumdb" utility to make it easier to clean databases.
Also supports the "analyze" mode, with or without specifying tables
 and columns.
1998-11-14 01:58:15 +00:00
Thomas G. Lockhart 69ff5b9c7e Add "vacuumdb" utility. 1998-11-14 01:56:36 +00:00
Thomas G. Lockhart 2795fae5bf Fix test for table existance to allow mixed-case and whitespace in
the table name. Problem reported by Billy Allie.
1998-11-12 15:39:06 +00:00
Tom Lane c7d9aca135 Fix at least a few shared-library problems on Linux.
We have not seen the end of this issue :-(.
1998-11-12 05:27:01 +00:00
Byron Nikolaidis 87225ca31d Update for version 06-40-0001 1998-11-11 21:54:01 +00:00
Bruce Momjian f03729c621 Fix for NOT in where clause causing crash. 1998-11-09 02:49:13 +00:00
Tom Lane 39792e5b01 EXPLAIN VERBOSE had a very high probability of triggering
a backend core dump, because it was concatenating a potentially long
string onto another string that didn't necessarily have enough room.
Shame, shame.
1998-11-08 19:38:34 +00:00
Tom Lane 8f5ff4cf1c Fix a potential infinite loop in appendStringInfo: would lock
up if first string to be appended to an empty StringInfo was longer
than the initial space allocation.
Also speed it up slightly.
1998-11-08 19:22:24 +00:00
Thomas G. Lockhart 680e4a2950 Add "-N" flag to force double quotes around identifiers.
This is the default, but the new flag will allow overriding an alias,
 for example. So psql -n -N will put in the double quotes,
 and psql -n can be an alias for psql.
Also, add a few braces around a nested single-line conditional construct
 to suppress compiler warnings about "an ambiguous else".
1998-11-06 15:54:47 +00:00
Thomas G. Lockhart 3d22596fe7 August version of docs superceded by sgml version from Jan. 1998-11-06 15:04:31 +00:00
Marc G. Fournier a00c668139 Upgrade to 0.91 ... 1998-11-06 04:11:52 +00:00
Thomas G. Lockhart 30f35ef9c4 Test for and handle NULL arguments to mylog() print statements.
Include definition for _IN_ADDR_T if INADDR_NONE is not defined.
1998-11-04 16:24:32 +00:00
Thomas G. Lockhart f47bd801e3 Somehow had the solaris template names reversed. Probably was something
fixed in src/configure.in a while ago.
1998-11-04 16:22:09 +00:00
Bruce Momjian 733ad60409 Fix for relname.data from SHIOZAKI Takehiko 1998-11-02 15:28:36 +00:00
Marc G. Fournier c200938343 slight mods required for freebsd (elf vs aout stuff) 1998-11-02 05:30:10 +00:00
Marc G. Fournier 46fb81636c Remove various files that were moved to various subdirectories...
Requested by: Peter T Mount peter@retep.org.uk
1998-11-01 16:55:02 +00:00
Marc G. Fournier 585442154a oops, forgot one part of the patch...remove 'false' setting to ELF_SYS... 1998-10-31 04:07:00 +00:00
Marc G. Fournier 15d61bb439 Minor FreeBSD fixes put in place
From: SHIOZAKI Takehiko <takehi-s@ascii.co.jp>

I tried snapshot(Oct30) and made some patches.
# I think that it is confused to manage both Makefile.shlib and
# makefiles/Makefile.*, don't you?

* configure
        Now FreeBSD 2.X is not supported..., so I added its entry.
        If ELF_SYSTEM is set, gmake treat it defined even though
        it is "false".  So nothing should be set to use "ifdef".
        BSD_SHLIB etc. may have same problems.

* Makefile.shlib
        As you said, FreeBSD entry is much like BSD's.
        I only added ELF_SYSTEM code.

* makefiles/Makefile.freebsd
        Ifdef/else/endif can not be indented with TABs.
1998-10-31 03:58:55 +00:00
Bruce Momjian 2e18525dbe s_lock patch from Ryan. 1998-10-31 02:06:08 +00:00
Tom Lane 47ea32f7d4 Mention --without-CXX option in online help. 1998-10-30 22:36:00 +00:00
Tom Lane 54789138bd Behave reasonably on a system without shared libraries. 1998-10-30 15:05:23 +00:00
Marc G. Fournier 4283089d07 Okay, this shoudl provide a fix for the freebsd problem...
Added a ELF_SYS variable and check to configure.in...
1998-10-30 04:54:06 +00:00
Tom Lane c6338530f6 oid8neq => oid8ne 1998-10-29 19:03:50 +00:00
Tom Lane a91c019c06 Drat. Should test a few more cases before committing. 1998-10-29 18:15:28 +00:00
Thomas G. Lockhart 485a71a4ce Add tests for comparison operators. 1998-10-29 18:13:03 +00:00
Thomas G. Lockhart d9a2be00ec Fix regression test now that code seems to work.
Add tests for comparison operators.
1998-10-29 18:12:50 +00:00
Thomas G. Lockhart 396571d79c Very minor cleanup of no-op code. 1998-10-29 18:11:28 +00:00
Thomas G. Lockhart 9b24e7fa40 Fix discrepency in "@" operator for point and path. 1998-10-29 18:10:23 +00:00
Bruce Momjian 1e7c7343c4 Add oid8neq. 1998-10-29 18:07:09 +00:00
Tom Lane 1145d007bf Run autoconf. 1998-10-29 17:58:21 +00:00
Tom Lane 579b72c5de Run AC_PROG_GCC_TRADITIONAL only when running AC_PROG_CC,
ie, not when user specifies --with-CC.  This corrects a scripting error
that I'm surprised hasn't been reported more often.  Moving the macro call
to the earlier point in the script is correct anyway: if -traditional is needed,
it should get added to CFLAGS before we start using the compiler for
other tests.
1998-10-29 17:57:52 +00:00
Tom Lane 9e38dcfd43 Re-fix test for negative-integer return code that should be
testing for null-pointer return code...
1998-10-29 16:13:07 +00:00
Bruce Momjian 374d9a1f2b D'Arcy INET fix. 1998-10-29 04:41:44 +00:00
Tom Lane 94e37a30da I suspect that there is no longer a need for a platform-
specific version of this result, now that tintervals actually sort
correctly.  We can always add it back if NetBSD really is different.
1998-10-29 04:32:57 +00:00
Tom Lane 99d3e27112 Update tinterval test to have correctly sorted results,
now that bugs in pg_operator that caused wrongly sorted results have
been corrected (I hope ... it works here, anyway).
1998-10-29 04:29:12 +00:00
Tom Lane 478d460f3b Add new regression test to catch some simple kinds of
mistakes in creating pg_operator table.  NOTE: right now, this will
fail because of conflicting definitions for point @ path operator.
I trust we're gonna fix that.
1998-10-29 04:27:11 +00:00
Tom Lane de43a5e1bd Add new regression test to catch some simple kinds of
mistakes in creating pg_operator table.
1998-10-29 04:25:23 +00:00
Tom Lane 4038dc0ee2 Fix a veritable boatload of errors in oprcom, oprnegate,
oprlsortop and oprrsortop links.  There's still a bug involving
conflicting definitions for point @ path, but I'm not taking
responsibility for deciding which one is right...
1998-10-29 04:22:52 +00:00
Bruce Momjian cec42339fc Remove bad pg_operator entry, found by Tom Lane. 1998-10-29 04:04:17 +00:00
Tom Lane 8acc682552 Autoconf... 1998-10-28 19:40:08 +00:00
Tom Lane 6ff52d303f Remove unreliable test for how to do cpp from stdin. 1998-10-28 19:39:33 +00:00
Tom Lane a787b88e3c Eliminate need for cpp-from-stdin by using a temp file. 1998-10-28 19:38:47 +00:00
Tom Lane 1f27facc90 Add ORDER BY to ensure platform-independent results in rules test. 1998-10-28 19:32:43 +00:00
Thomas G. Lockhart 571d121664 Fix macro declarations to allow disabling mylog() and qlog() on Unix boxes.
Fix spelling of "DIRSEPARATOR".
1998-10-28 17:09:22 +00:00
Bruce Momjian f4ccb5e170 Make these file generated in distribution. 1998-10-28 17:07:17 +00:00
Bruce Momjian 53b8ea58d3 Fix for serial creation. 1998-10-28 16:06:54 +00:00
Bruce Momjian 1adacc7d1e This looks like a wrong entry in one of the system tables. Any ideas
which one it is, and how to correct this ?

lseg_eq -> lseq_neq

Guido Weber
1998-10-28 16:00:08 +00:00
Bruce Momjian e3b06a871b s_lock aix patch. 1998-10-28 15:58:34 +00:00
Marc G. Fournier e6556e7365 Updated "expected" regression output for Solaris-Sparc 1998-10-28 14:47:54 +00:00
Thomas G. Lockhart 20a034d5bd Include appropriate flags for resolved shared library LDFLAGS_ODBC
to allow ODBC library to be linked.
1998-10-28 06:49:10 +00:00
Bruce Momjian 8386c8145c Reverse out addition of snprintf. 1998-10-28 02:57:59 +00:00
Tom Lane 997966061e Fix missing dependency for Makefile inclusions.
Get rid of some stray tabs that might confuse Make.
1998-10-27 21:51:54 +00:00
Tom Lane 9f39b9a15b Detect lack of permission to install into Perl module library,
and emit informative message instead of aborting the Postgres install.
1998-10-27 21:27:36 +00:00
Thomas G. Lockhart 695453738a Add new inet/cidr regression test.
All regression tests pass on Linux/i686 with the current source tree.
1998-10-27 19:34:18 +00:00
Bruce Momjian 0ebb238035 backslash for portability, from Andreas Zeugswetter 1998-10-27 17:47:51 +00:00
Marc G. Fournier 82a9c9cf38 Missed one more required file... 1998-10-27 04:42:59 +00:00
Marc G. Fournier 8107299d5e Don't forget to create the dynloader files... 1998-10-27 04:41:29 +00:00
Marc G. Fournier 208cb8b279 Oops, don't forget to get rid ofthe -Bforcearchive option altogether... 1998-10-27 04:32:53 +00:00
Marc G. Fournier 949953060a Starting with v3.0 of FreeBSD, we are now an elf system, and dont' have a
-Bforcearchive flag for ld...

Give FreeBSD its own special Makefile to get around the "bug"
1998-10-27 04:32:02 +00:00
Bruce Momjian 7825f9b890 Fix for tprintf overruns from Göran Thyni. 1998-10-27 03:26:48 +00:00
Tom Lane 990fa43c23 Get rid of some minor compiler warnings. 1998-10-26 01:05:07 +00:00
Tom Lane 0bdf46a37f Fix some actual bugs exposed by compiler warnings.
(Someone forgot whether their subroutine signaled errors by a NULL pointer
return value, or a negative integer... I'm surprised gcc -Wall doesn't
catch this...)
1998-10-26 01:03:24 +00:00
Tom Lane 3d87216ab9 Get rid of some minor compiler warnings.
(HP's cc doesn't like if you forward-declare a routine static,
and then don't make it static in the actual definition...)
1998-10-26 01:00:13 +00:00
Tom Lane 0852fbbb55 Compiler options not spelled quite right... 1998-10-26 00:57:33 +00:00
Tom Lane 51239ba51e Run autoconf 1998-10-26 00:56:47 +00:00
Tom Lane c719a82683 Fix cpp-from-stdin detection so that it works even if the
compiler silently accepts an empty command line.
Don't bother searching for bison and yacc unless we are going to use them.
1998-10-26 00:56:16 +00:00
Bruce Momjian d79f3884f4 cleanup 1998-10-25 02:48:55 +00:00
Bruce Momjian ba74ce73bb Fix from Tom Lane for pg_shadow in pg_upgrade 1998-10-25 02:47:38 +00:00
Tom Lane 29317100ae Update README to reflect the fact that you don't have to
run the regression tests with a special postmaster TZ setting anymore.
Correct a few typos too.
1998-10-24 22:21:12 +00:00
Tom Lane a7cdfdf022 Fix pg_upgrade to notice if psql fails to execute the given
script, and not proceed with the update if so.
Also add #!/bin/sh header line.
1998-10-24 20:09:46 +00:00
Bruce Momjian ba63dcd6a6 Put back string instead of string.h in libpq++. 1998-10-23 21:54:56 +00:00
Bruce Momjian 54fd5f6cc4 Fix from Jan for vacuum statistics loss. 1998-10-23 16:49:24 +00:00
Bruce Momjian 3037aace73 Change string to string.h in libpq++. BSDI 3.0 complains. 1998-10-23 16:11:14 +00:00
Bruce Momjian 1115162c84 rename file. 1998-10-23 02:56:13 +00:00
Bruce Momjian e7cbcf23c4 autoconf 1998-10-23 02:52:09 +00:00
Bruce Momjian 759b17f0f6 Fix for version guessing in configure. 1998-10-23 02:49:17 +00:00
Bruce Momjian aeb277c405 Update for bsdi 3.0. 1998-10-23 01:02:10 +00:00
Bruce Momjian 33c4072dbc INET/CIDR cleanup from D'Arcy. 1998-10-22 20:40:50 +00:00
Bruce Momjian 002657f7ed Add LIMIT syntax for Jan. 1998-10-22 13:52:24 +00:00
Bruce Momjian ca2995be7b Remove duplicate CIDR funcs by using coerce entries. 1998-10-22 13:51:07 +00:00
Bruce Momjian 9ac0c1e371 CIDR/INET fixes from D'Arcy. 1998-10-22 13:16:27 +00:00
Bruce Momjian 7787d75d78 Fix indexing for INET / CIDR. 1998-10-22 05:29:24 +00:00
Bruce Momjian 3fe6a77f91 Fix for funcs on INET/CIDR. 1998-10-22 04:58:11 +00:00
Bruce Momjian 2ba4ee74aa Fix function calls to INET/CIDR functions. Added cidr_out. 1998-10-22 00:35:28 +00:00
Bruce Momjian f9ee08499f Cleanup of \df for INET/CIDR. 1998-10-21 21:14:20 +00:00
Bruce Momjian 524f4b2d10 The patch does 2 things:
Fixes  a  bug  in  the rule system that caused a crashing
        backend when a join-view with calculated column  is  used
        in subselect.

        Modifies  EXPLAIN to explain rewritten queries instead of
        the plain SeqScan on a view. Rules can produce very  deep
MORE

Jan.
1998-10-21 16:21:29 +00:00
Bruce Momjian 858a3b570a New CIDR type and fixed INET type, from D'Arcy. 1998-10-21 16:06:50 +00:00
Thomas G. Lockhart 56f96f56df Include new Makefile.shlib from top level
when constructing standalone tarball.
1998-10-21 05:39:19 +00:00
Thomas G. Lockhart 09128223be Arbitrary addition of a comment line to get ownership of file in the
cvs tree. Am trying to fix the permissions to allow file execution,
 since I had damaged the permissions when transferring in with ftp.
1998-10-21 05:23:36 +00:00
Bruce Momjian 89f01cd92f Add RIP notice for Paul. 1998-10-21 04:25:25 +00:00
Bruce Momjian f8042120b6 INET fix from D'Arcy. 1998-10-21 02:48:22 +00:00
Bruce Momjian a824add49a Remove unused INET functions for D'Arcy. 1998-10-20 23:03:20 +00:00
Bruce Momjian d7fc00c20d Fix for rules system from Jan. 1998-10-20 17:21:44 +00:00
Tom Lane 6d98d3737a Centralized shared-library build knowledge in a new file,
src/Makefile.shlib.  Updated all the makefiles that try to build shlibs
to include that file instead of having duplicate (and mostly incomplete)
copies of shared-library options.  It works on HPUX, a lot better than it
did before in fact, but there's a chance I broke some other platforms.
At least now you only have to fix one place not six...
1998-10-19 00:00:51 +00:00
Bruce Momjian 6e13e0c684 cleanup of keywords.c 1998-10-18 23:30:17 +00:00
Bruce Momjian 07ed634c18 Resort keywords for Jan. 1998-10-18 23:29:27 +00:00
Tom Lane acdf3c25f9 run autoconf 1998-10-18 19:42:31 +00:00
Tom Lane e1942f5b9e Clean up shared makefile install procedures.
Get the permissions right, don't overwrite real files with symlinks, etc.
plpgsql and odbc still aren't fully up to speed, but at least they don't crash and burn...
1998-10-18 19:41:00 +00:00
Tom Lane 14f4ca009c run autoconf 1998-10-18 19:16:50 +00:00
Tom Lane f0f1b628e3 Use AC_CONFIG_HEADER as documented by Autoconf manual: call it
only once at the top of the file.  I'm surprised include/config.h wasn't
being overwritten from interfaces/odbc/config.h.in ...
1998-10-18 19:16:09 +00:00
Bruce Momjian a00dcabc6e autoconf 1998-10-18 04:19:05 +00:00
Bruce Momjian f49cf6d094 The TCL/TK configuration cleanup patches I submitted have the following
problem:

    'tclsh' still had to be found even if --with-libs (or
--with-libraries) was
    specified to configure.

    --with-libs is really an overloaded option.  It really should only be used
    to specify additions directories to search in order to file needed
    libraries.  It was also being used to locate the *Config.sh files.

Billy G. Allie
1998-10-18 04:16:08 +00:00
Tom Lane 8ccf86bf32 Still another round of Perl-module installation tweaks.
Now, src/interfaces/perl5/Makefile.PL is pretty simple, and instead we
work a little harder in src/interfaces/Makefile.
1998-10-18 02:36:48 +00:00
Tom Lane 164510289e Still another round of Perl-module installation tweaks.
This time, src/interfaces/perl5/Makefile.PL no longer needs to be autoconf'd.
1998-10-18 02:34:34 +00:00
Tom Lane f2ca34dfb3 Add code to pltcl's Makefile to cope with the situation where
libtcl has been installed as a non-shared library.  pltcl cannot be
built in that situation; we want to do nothing and let the overall Postgres
build complete, rather than failing.
1998-10-17 23:33:23 +00:00
Bruce Momjian 71a5da47d2 Disable inet. 1998-10-17 04:08:40 +00:00
Bruce Momjian 0c430306fe Re-enable inet code. 1998-10-17 03:59:14 +00:00
Bruce Momjian f4389d5262 Fix for GNUmakefile and distclean. 1998-10-17 03:49:59 +00:00
Bruce Momjian 8333387dec Fix for GNUmakefile. 1998-10-17 03:48:54 +00:00
Bruce Momjian 4aa8376505 Remove Makefile.PL. 1998-10-17 03:37:04 +00:00
Bruce Momjian 2bb38b5e2d Fix for GNUmakefile and stupid cruft I forgot in there. 1998-10-17 02:36:13 +00:00
Bruce Momjian af8df21b7e Add missing tcl *.in files. 1998-10-16 17:00:44 +00:00
Bruce Momjian f731abe635 interfaces/Makefile fix. 1998-10-16 15:31:04 +00:00
Bruce Momjian 8fa2742ddf The problem is that read_pg_options needs DataDir to read its file but
DataDir is set after read_pg_options if postgres is called
interactively.  If postgres is forked by postgres DataDir is read from
the PGDATA enviromnent variable set by the postmaster and this explains
while the bug disappears.  I have written this patch but I don't like
it. Any better idea?

Massimo Dal Zotto
1998-10-16 06:05:18 +00:00
Bruce Momjian 9f69aa0831 add missing file for perl. 1998-10-16 05:58:22 +00:00
Bruce Momjian 7483856772 autoconf 1998-10-16 04:46:37 +00:00
Bruce Momjian 06edbafd4b Here's a patch. It also includes the latest parser changes.
Michael
1998-10-16 04:40:39 +00:00
Bruce Momjian baa2f9998c Perl fixes from Brook Milligan 1998-10-16 04:37:38 +00:00
Bruce Momjian e7663e34b8 LAtest cvs has a little bug in src/interfaces/ecpg/lib/Makefile.in
$(LD) $(LDFLAGS_SL) -o $@ ecpglib.sho typename.sho.o

must be
        $(LD) $(LDFLAGS_SL) -o $@ ecpglib.sho.o typename.sho.o
                                             ^^

        Regards,

        Oleg
1998-10-15 16:17:33 +00:00
Bruce Momjian 3f20878791 autoconf 1998-10-15 16:01:45 +00:00
Bruce Momjian 01cdd04731 TCL/TK fixes from Billy G. Allie. 1998-10-15 15:58:16 +00:00
Bruce Momjian 31bca4540e I have included a couple of patches that will make postgres
compile out of the tar file on Solaris with the SUN 5.0 compilers.
These compilers will be needed if you wan to compile the libpg++
interface without using the gcc/g++. The SC4.2 compilers do not
understand the string class.

The first patch changes the ecpg intermediate shared library
name from *.sho to *.sho.o so that the SUN compiler will
allow it to be used in conjunction with the -o option.

Matthew C. Aycock
1998-10-14 17:59:22 +00:00
Thomas G. Lockhart 9b895d0658 Clean up library names and installation paths.
Include soft links in the installation directory for major version number.
Use the existing $(DLSUFFIX) parameter to name shared library.
1998-10-14 16:13:03 +00:00
Thomas G. Lockhart bbf4dae028 Remove $(DESTDIR) as a path prefix. $(POSTGRESDIR) is sufficient now. 1998-10-14 16:09:32 +00:00
Thomas G. Lockhart 624eb9ee24 Allow auto-detection of cpp and required flags. 1998-10-14 16:06:14 +00:00
Thomas G. Lockhart b48edd74d1 Make genbki.sh a configureable shell program to allow auto-detection
of the proper cpp program.
1998-10-14 16:05:01 +00:00
Thomas G. Lockhart fe6d19f15f Add Taral's test for flags required by the detected cpp program to read
from stdin. Necessary at least for systems missing cpp but having gcc -E.
Include new configured file backend/catalog/genbki.sh.
1998-10-14 16:02:11 +00:00
Thomas G. Lockhart 56792f3729 Allow TIMESTAMP as a column name or general identifier.
timestamp had become a token a while ago, but had been omitted from the
 keywords.c until recently. This uncovered the omission in the ColId decl.
1998-10-14 15:57:25 +00:00
Tom Lane acc9c38471 Fix another memory leak in pg_select --- pointed out by teo@flex.ro 1998-10-14 15:17:51 +00:00
Bruce Momjian aa3a1f46df New PGQUERY_LIMIT environment variable, and doc changes. 1998-10-14 05:31:50 +00:00
Bruce Momjian 8cec4cf91b New QUERY_LIMIT set command. 1998-10-14 05:10:12 +00:00
Bruce Momjian 39f2ec55d7 No more pgintro. 1998-10-14 02:54:39 +00:00
Bruce Momjian 103959a3df No more pgbuiltin. 1998-10-14 02:36:45 +00:00
Marc G. Fournier f9649012d3 Updated regression.diffs file for Solaris x86... 1998-10-13 22:42:43 +00:00
Marc G. Fournier 4fff1dada7 From: Peter Gucwa <pg@softcomputer.com>
Here are patches needed to complie under AIX 4.2.
I changed configure.in, pqcomm.c, config.h.in, and fe-connect.c.
Also I had to install flex because lex did not want to translate pgc.l.
1998-10-13 20:44:49 +00:00
Marc G. Fournier 5dc94a1b5a New regression results for Solaris-Sparc 2.6 w/ gcc 2.8.1 1998-10-13 20:37:20 +00:00
Marc G. Fournier 6edea913be This is plain wrong, but check to see if DataDir was set *before* running
read_pg_options ... read_pg_options should probably be moved to after the
getopt() instead?
1998-10-13 20:05:44 +00:00
Marc G. Fournier 37f90d82ab case statement in select call was missing a break... 1998-10-13 19:51:50 +00:00
Marc G. Fournier cd3a8e232c change configure so that if postgresql isn't being installed as root,
do not configure in the perl5 interface.

the perl5 interface needs to be installed under /usr/local/lib/perl5/*, which
is generally owned by root.  This allows a non-root build/install with the
only root requirement being the make/install of hte perl5 stuff...
1998-10-13 17:26:50 +00:00
Bruce Momjian 8c586b2a2a auytoconf 1998-10-13 16:34:01 +00:00
Bruce Momjian ecf145f492 Remove TCL_LIB,TCL_INCDIR,TK_LIB,TK_INCDIR. 1998-10-13 16:30:49 +00:00
Marc G. Fournier 97f5547297 Remove the -soname ${SHLIB} from solaris_{sparc,x86} as they conflict
with the -o $@ used in the ${SHLIB} directive, causing a failure for
*at least* gcc2.8.1 + Solaris 2.6 under both hardware platforms...
1998-10-13 14:12:22 +00:00
Bruce Momjian fbcda7b4a7 autoconf 1998-10-12 19:56:24 +00:00
Bruce Momjian e33a23fccd TCL_LIB/TCL_INCDIR cleanup. 1998-10-12 19:47:25 +00:00
Bruce Momjian 882158a4db TCL_LIB. 1998-10-12 19:45:03 +00:00
Bruce Momjian a643d97f29 Fix for inet from Tom H. 1998-10-12 15:56:34 +00:00
Bruce Momjian 5d79f26e5b No more TCL_LIB> 1998-10-12 15:01:40 +00:00
Bruce Momjian af7e03997b autoconf 1998-10-12 14:44:46 +00:00
Bruce Momjian c94323d1f5 Fix for Solaris/i386. 1998-10-12 14:41:45 +00:00
Bruce Momjian b1f3293b8b Fix for version.c warning. 1998-10-12 05:09:55 +00:00
Bruce Momjian 7d6eee24da distclean fixup 1998-10-12 05:07:53 +00:00
Bruce Momjian c743b8cecd Add mklang.sh.in to plpgsql. 1998-10-12 04:55:03 +00:00
Bruce Momjian 0f78649ccc Cleanup from Billy. 1998-10-12 04:45:22 +00:00
Bruce Momjian 2facf5460f TCL_LIB, TCL_INC not used. 1998-10-12 04:40:48 +00:00
Bruce Momjian d2d919f7b7 tcl cleanup. 1998-10-12 04:32:24 +00:00
Bruce Momjian 51fd8dd36a autoconf 1998-10-12 04:11:03 +00:00
Bruce Momjian eb3e640ea2 New INET functions from D'Arcy J.M. Cain 1998-10-12 04:07:53 +00:00
Bruce Momjian 03ab5f0174 This patch updates the ImageViewer example to use Multiple Threading.
When importing an image into the database, the example now fires off a
new
Thread, which imports the image in the background. This also means that
the application doesn't freeze on the user, and they can still browse
the
images in the database, while the upload is running.

This now makes the ImageViewer a true example on how to use Threads (the
threadtest class is just that - a test).

Peter
1998-10-12 02:45:45 +00:00
Bruce Momjian d32c89bbb8 plpgsql fixes from Billy G. Allie 1998-10-12 02:44:10 +00:00
Bruce Momjian 4c64bb7d97 add new file. 1998-10-12 02:42:22 +00:00
Bruce Momjian 7a9312b422 Tcl fixes from Billy G. Allie 1998-10-12 02:41:01 +00:00
Bruce Momjian b0dfc47794 2) Can't dump/restore varchar fields (See attached bug report/patch)
Cary B. O'Brien
1998-10-12 02:05:42 +00:00
Bruce Momjian 8a7bec3d45 autoconf 1998-10-12 02:01:41 +00:00
Bruce Momjian 0453f4d0f2 Cleanup. 1998-10-12 01:58:14 +00:00
Bruce Momjian 377b5fa3a4 Fix for inet_net_pton() from Tom. 1998-10-12 01:30:26 +00:00
Bruce Momjian e48623ce87 More Solaris fixes. 1998-10-12 01:23:29 +00:00
Bruce Momjian e16634386a Add SVr4 shared libraries. 1998-10-12 01:10:09 +00:00
Bruce Momjian 66f893f3fe Solaris shared library fixes. 1998-10-12 01:04:02 +00:00
Bruce Momjian beac8c1c46 Fix for vacuum and cache use. Fix for BSDI 4.0. 1998-10-12 00:53:42 +00:00
Thomas G. Lockhart 03cb232a1f Move documentation to sgml sources, so remove man page installation. 1998-10-10 17:08:11 +00:00
Thomas G. Lockhart f5da9422be Move documentation to sgml sources. 1998-10-10 17:07:16 +00:00
Bruce Momjian 6799af7d80 Reverse out vacuum change. 1998-10-09 21:31:34 +00:00
Bruce Momjian 2ac3173d75 major/minor shared name cleanup 1998-10-09 21:28:50 +00:00
Bruce Momjian 878f9dbb66 autoconf 1998-10-09 17:34:57 +00:00
Bruce Momjian ada4cfce29 configure cleanup 1998-10-09 17:31:39 +00:00
Bruce Momjian edcf5a7eba autoconf 1998-10-09 16:59:43 +00:00
Bruce Momjian 40703f282a There where a few more problems fixed by the patch below.
o configure.in

Jan.
1998-10-09 16:57:10 +00:00
Bruce Momjian 1483456418 Fix for version() string overwrite. 1998-10-09 16:42:32 +00:00
Thomas G. Lockhart d12d4c78e5 Add wildcard asterisk to the UNLISTEN syntax. 1998-10-09 07:06:37 +00:00
Thomas G. Lockhart 4c9239173a Changes to support standalone installation. 1998-10-09 07:04:53 +00:00
Thomas G. Lockhart 25f90202f7 Adjustments for standalone and integrated ODBC. 1998-10-09 07:01:26 +00:00
Bruce Momjian a8428c9e3f More bsdi 4.0 cleanups for shared libraries. 1998-10-09 04:50:12 +00:00
Bruce Momjian 765dd1b3f2 More bsdi 4.0 fixes. 1998-10-09 04:22:49 +00:00
Bruce Momjian 4b86cabcb4 Cleanup of distclean. 1998-10-09 04:07:49 +00:00
Bruce Momjian af45dab6d7 Fix for BSDI shared libraries. 1998-10-09 03:08:00 +00:00
Bruce Momjian 76392f8cc4 Autoconf 1998-10-09 00:51:50 +00:00
Bruce Momjian db882f6a18 Cleanup of pl files. 1998-10-09 00:41:28 +00:00
Tom Lane 5524a85172 Clean up minor gcc warning about lack of reset_r_plans prototype. 1998-10-08 23:50:28 +00:00
Bruce Momjian 23815260a3 I have had a few problems with the PL stuff recently committed. The
following patches fix the problems (i.e., all regression tests pass)
in what I hope to be a platform-independent fashion.  The accomplish
the following:

Brook Milligan
1998-10-08 23:45:19 +00:00
Tom Lane 60fee725b8 Do not enable TCL_ARRAYS feature by default, because it
is wrong and dangerous unless you are using contrib/string.  We really
need a thorough look at the issue of making the backend and the FE/BE
protocols completely 8-bit-clean for string data, but that's a task
for some future release.
1998-10-08 23:31:20 +00:00
Bruce Momjian 2133276ecc Update to pgaccess 0.90. 1998-10-08 22:50:20 +00:00
Bruce Momjian 681343ab6c No need compile command/version.c anymore. 1998-10-08 18:37:14 +00:00
Bruce Momjian 173c555948 Make functions static or ifdef NOT_USED. Prevent pg_version creation. 1998-10-08 18:30:52 +00:00
Bruce Momjian deaaf96975 Fix for INET type addition. 1998-10-08 02:08:47 +00:00
Tom Lane af5d6b4ef6 I'm too short of time to make these man pages look like the
newly-updated SGML reference pages, so I just inserted a comment that they
are obsolete.  If you want to transcribe the newer info into these pages,
be my guest.
1998-10-08 01:16:18 +00:00
Tom Lane 976625c54a I continue my quest to eliminate documentation that claims
a listen/notify condition name is a class or table name, 'cause it ain't.
1998-10-08 01:10:28 +00:00
Bruce Momjian ba0a1ae721 Add changelog. 1998-10-08 00:41:36 +00:00
Bruce Momjian 5d8d65e8b3 remove unused file. 1998-10-08 00:39:11 +00:00
Bruce Momjian 25b5faa7cd Just a quick patch. This makes the JDBC driver thread safe, which is an
important step towards making the driver compliant, and means that for
some Java applications and servlets, only a single database connection
is
needed, so in a sence this is a nice little show stopper for 6.4 (and
should still be backward compatible to 6.3.2).

Peter
1998-10-08 00:38:21 +00:00
Bruce Momjian 9042e9d757 Cleanup for snprintf for long long's. 1998-10-08 00:34:47 +00:00
Bruce Momjian 8849655d24 I agree. I think, though, that the best argument presented in the
debate was from Paul Vixie, who wanted INET to be the name covering
both IPV4 and IPV6.  The following kit makes the needed changes:

Tom Ivar Helbekkmo
1998-10-08 00:19:47 +00:00
Bruce Momjian 30debec6e5 Hello!
Here are two new patches for the Win32 support.

1) The patch based on the one from Hiroshi Inoue [Inoue@tpf.co.jp], to
load
Winsock.dll from libpq.dll.
2) A patch for psql.c to remove the call to WSAStartup(), since it is
not
required when it's done in libpq.dll.

I'm still looking for the possibility of having a crypt() function in
libpq.dll too, the same way getopt was included. Any chance of getting
this
before 6.4, or should we wait for the next one?


//Magnus
1998-10-08 00:10:49 +00:00
Bruce Momjian cb4292ea64 vacuum cleanups 1998-10-07 22:31:50 +00:00
Bruce Momjian 9549a8cd7d Fix snprintf.c for machines that don't have long long, like some Irix. 1998-10-07 17:12:52 +00:00
Thomas G. Lockhart 7d4b59f024 Use the $(LN_S) substitution for "ln -s" since configure tests for it. 1998-10-07 06:50:37 +00:00
Thomas G. Lockhart ed24461ca1 Clean up for configuration from the Postgres main configure script.
Use @top-srcdir@ to find the right Makefile.global and use ODBCSRCDIR
 to point to this local directory.
Move non-platform-specific stuff to outside the if clauses.
Still need to move all platform-specific stuff to the templates.
1998-10-07 06:49:22 +00:00
Thomas G. Lockhart fca4519d5b Add conditional compilation of the ODBC directory.
Requires --with-odbc specified in the standalone configure.
1998-10-07 06:41:40 +00:00
Thomas G. Lockhart effb32c307 Add a few items to support an integrated build of the ODBC interface. 1998-10-07 06:39:30 +00:00
Thomas G. Lockhart 608dbb1b3e Separate out the lextest so that it is run by "make" and "make install".
Before, "make install" did not run the lextest.
Fix up the ODBC make from this main configure.
Include configure test for "ln -s" in Makefile.global.in.
 Was always in configure, just not carried through to here for use.
1998-10-07 06:38:29 +00:00
Bruce Momjian 3e66e2b17b make lock variable only used with fcntl 1998-10-07 03:45:12 +00:00
Bruce Momjian 252568dc11 Update pg_dump sgml and manuals to remove rule restriction. 1998-10-07 02:49:10 +00:00
Bruce Momjian 803204bd1e Playing around with pg_dump for a while resulted in some
fixes,  enhancements and some found bugs not yet fixed. After
    all I was able to get useful results  when  dumping/reloading
    the regression database.

Jan
1998-10-06 22:14:21 +00:00
Tom Lane 57d57d9500 Took it on myself to change libpq's sharedlib version number from
1.1 to 2.0 for this release.  The other frontend shlibs need version
number bumps too, but I think a minor version number change will do for them.
1998-10-06 14:22:12 +00:00
Tom Lane fe91cd41ea If we're going to offer a default definition of PQmblen,
it probably ought to actually work.
1998-10-06 14:16:50 +00:00
Tom Lane a4fd4cdc0d Re-apply fix stomped on by someone else's patch. Tsk, tsk. 1998-10-06 14:05:02 +00:00
Thomas G. Lockhart 1eab86e26d Update source code to Byron's v6.30.0250 sources plus minor cleanup
to get rid of unused variables.
Get clean compile on Linux (Thomas and Gerald).
Implement autoconf/configure for standalone builds and use the existing
 autoconf/configure system when in the Postgres source tree.
Code tests and functions with ApplixWare-4.4.1beta on a Linux box.
Changes should be backward compatible with WIN32 but still needs testing.
1998-10-06 05:58:41 +00:00
Thomas G. Lockhart 72129e98ce Try to configure interfaces/odbc using the --with-odbc switch.
Suppress installing man pages from here; do it from the doc/Makefile now.
1998-10-06 05:42:58 +00:00
Thomas G. Lockhart b53d36618f Forgot to initialize double quote option to be enabled. 1998-10-06 05:35:42 +00:00
Thomas G. Lockhart fe9bf46bd4 Add mention of the new "suppress double quotes" command line option "-n". 1998-10-06 05:05:48 +00:00
Bruce Momjian 237e0a6306 Fix for double free from Tatsuo Ishii 1998-10-06 03:55:43 +00:00
Bruce Momjian b7ed6f8512 Hi all
Is it too late to add a feature to pg_dump for 6.4??

I just spent most of the day learning pg_dump and modifing it so it
would
dump views also.

This is the first time I have ever contributed any code changes, so I'm
not sure of how to submit it.

The diff's and a readme as a tgz file are attached.

Thanks
Terry Mackintosh <terry@terrym.com>          http://www.terrym.com
1998-10-06 03:09:02 +00:00
Bruce Momjian e1ebac319d Here are the patches against the current source tree. I have run the
regression test on a FreeBSD box with both non-MULTIBYTE and
MULTIBYTE-enabled, and confirmed that the results are same.

However I do not tested on PCs(I don't have access to win). Please let
me know if the patches break anything on PCs.

Also please note that the patch for varchar.c is a fix for a nasty bug
of char(n) types that I introduced and I believe at least this should
be applied.

Tatsuo Ishii
1998-10-06 03:02:29 +00:00
Tom Lane c77a29a14e Substantial rewrite of async.c to avoid problems with non-reentrant stdio
and possibly other problems.  Minor changes in xact.c and postgres.c's
main loop to support new handling of async NOTIFY.
1998-10-06 02:40:09 +00:00
Tom Lane e7e027a6c9 Add configure test to make sure fcntl(SETLK) is available. 1998-10-06 02:32:28 +00:00
Tom Lane 9e23ab9b5c Add configure test to make sure fcntl(SETLK) is available,
and make backend/libpq/pqcomm.c only try to lock the socket file when
the call exists.  Also, change open-RDONLY to open-WRONLY; at least
on my platform, you can't get a write lock on a file you didn't open
for writing.
1998-10-06 02:31:42 +00:00
Thomas G. Lockhart 445ce6954f Information is now in the chapter on syntax in the User's Guide. 1998-10-05 02:55:58 +00:00
Thomas G. Lockhart a54ba52101 Properly interpret environment variables passed as the input location. 1998-10-05 02:51:21 +00:00
Thomas G. Lockhart 86234a0965 Fix up warning and error messages to use single-quotes around strings. 1998-10-05 02:49:36 +00:00
Thomas G. Lockhart 60ed8bbe75 Fix up warning and error messages to use single-quotes aroun strings. 1998-10-05 02:48:49 +00:00
Tom Lane 22da903a48 Disable doubling of backslashes in PQprint, per discussion
on pgsql-interfaces a couple months ago.
1998-10-04 20:46:39 +00:00
Tom Lane 280acf0904 hash.h's use of BSHIFT conflicts with <sys/param.h> on my
system.  Finally got tired of looking at the compiler warning messages.
BSHIFT isn't all that useful, so I just took out the macro.
1998-10-04 20:19:08 +00:00
Tom Lane 3512284bda Our 'install-sh' script is BSD-style, therefore requires -c
to behave sanely.  configure was not treating it as BSD...
1998-10-04 18:28:10 +00:00
Bruce Momjian 10d987c709 Add includes for prototypes for new IP type. 1998-10-04 16:24:32 +00:00
Bruce Momjian 18af384bb7 Unixware patches from Billy G. Allie. 1998-10-04 15:38:58 +00:00
Bruce Momjian a593107d9e Add prototype include to inet types. 1998-10-04 15:35:12 +00:00
Bruce Momjian f5a219204b Remove u_int32_t 1998-10-04 15:31:09 +00:00
Bruce Momjian 3f8bc47d6a cnf'ify cleanup 1998-10-04 03:30:56 +00:00
Bruce Momjian 2d69fd90b9 Integrate new IP type from Tom Ivar Helbekkmo. 1998-10-03 05:41:01 +00:00
Thomas G. Lockhart 607cd930d5 Changes from Michael Meskes:
Check strdup calls for out of memory.
Set library version to 2.6.2
Synced preproc.y and keywords.c with gram.y and keywords.c yet again.
Set version to 2.4.3
1998-10-03 02:33:51 +00:00
Thomas G. Lockhart cbfc9ec6ca Update for newest changes. 1998-10-03 02:30:47 +00:00
Bruce Momjian e5a8da02c2 Please apply the patch at the end. Disables use of system
columns of views at all (not only oid, cmin etc. too).
    pgsql=> select cmin from pg_rules;
    ERROR:  system column cmin not available - pg_rules is a view
    pgsql=> select * from pg_rules where pg_rules.oid = pg_class.oid;
    ERROR:  system column oid not available - pg_rules is a view
    pgsql=>

Jan
1998-10-02 21:53:39 +00:00
Thomas G. Lockhart 2da5e598e6 Obsolete information completely superceded by the sgml sources.
These weren't really "man page"-ish anyway, and I've verified that
 all information in them has moved to the newer sources.
1998-10-02 16:46:34 +00:00
Thomas G. Lockhart 9601964773 Surround all identifiers with double quotes.
Formerly did so only for those which clearly required it, but that
 would still miss things like reserved key words which also require it.
Implement the "-n" switch to revert the double quote behavior
 to put DQs only where there is more than lower-case, digits,
 and underscores.
1998-10-02 16:43:41 +00:00
Bruce Momjian f93b6974f9 Here's a combination of all the patches I'm currently waiting
for against a just updated CVS tree. It contains

        Partial new rewrite system that handles subselects,  view
        aggregate  columns, insert into select from view, updates
        with set col = view-value and select rules restriction to
        view definition.

        Updates  for  rule/view  backparsing utility functions to
        handle subselects correct.


        New system views pg_tables and pg_indexes (where you  can
        see the complete index definition in the latter one).

        Enabling array references on query parameters.

        Bugfix for functional index.

        Little changes to system views pg_rules and pg_views.


    The rule system isn't a release-stopper any longer.

    But  another  stopper  is  that  I  don't  know if the latest
    changes to PL/pgSQL (not already in CVS) made it  compile  on
    AIX. Still wait for some response from Dave.

Jan
1998-10-02 16:28:04 +00:00
Bruce Momjian 9b21a18cee the following little patch adds array references to query
parameters. With it applied a function like

    CREATE FUNCTION getname(oid8, int4) RETURNS name AS
        'SELECT typname FROM pg_type WHERE oid = $1[$2]'
        LANGUAGE 'sql';

    is possible. Mainly I need this to enable array references in
    expressions for PL/pgSQL. Complete regression test ran O.K.

Jan
1998-10-02 16:23:07 +00:00
Bruce Momjian 772a596ed2 Summary
The ident() function in src/backend/libpq/hba.c doesn't cope when
postmaster is contacted on an IP alias. This patch fixes it.

 Malcolm Beattie
1998-10-02 16:18:20 +00:00
Bruce Momjian 9b7c6ee00b Fixes for Irix from Robert Bruccoleri 1998-10-02 15:38:04 +00:00
Bruce Momjian 731ea8076f Here's the new diff for getting the NS32K assembly code into the
spin-locks.  Notice that it's now inline assembler in s_lock.h,
rather than seperate code in s_lock.c.  It also shrank a little
bit...  Just rip out the S_LOCK() define and insert the tas() inline
function.  Please let me know if there are any problems with it.

Jon Buller
1998-10-02 15:23:08 +00:00
Bruce Momjian 744c3cd271 regproc cleanups 1998-10-02 05:31:28 +00:00
Bruce Momjian 290428dd30 Fix for regproc so proc name can be supplied if unique, if not, oid. 1998-10-02 05:10:11 +00:00
Tom Lane 820f9f8be8 Fix potential coredump in pg_conndefaults (assigning constant string
to a field that will get free'd).  Also make it robust in cases where
values contain Tcl special characters.
1998-10-02 01:37:17 +00:00
Bruce Momjian 3f2fff5c5d Search contrib/tcl for tcl startup. 1998-10-02 01:22:43 +00:00
Tom Lane e12f4162c3 Clean up some minor bugs concerning what was inside the main loop
and what wasn't.  Also try to improve the comments so that doesn't happen
again.  Changed SIGPIPE handling to SIG_IGN so that if frontend quits,
we will finish out the current command and return to main loop before
quitting.  This seems much safer than a forced abort mid-command.
1998-10-02 01:14:14 +00:00
Bruce Momjian c17b2d1b16 Fix for constbyval. 1998-10-01 22:51:22 +00:00
Bruce Momjian 33572dd7ed Fix for constbyval . 1998-10-01 22:45:32 +00:00
Marc G. Fournier 2074b5f1ad failed to add some of Jan's files :( 1998-10-01 03:38:45 +00:00
Tom Lane d33bbb5b1f Get rid of some long-dead code that thinks NOTIFY is passed to the
planner/optimizer/executor.  It isn't.
Besides, most of the removed code consists of comments about how
it's not right.
1998-10-01 02:04:01 +00:00
Tom Lane 92edd4233e Make HP-PA S_UNLOCK a little faster and less dependent on unspecified compiler codegen details.
Make default S_LOCK macro more robust against syntax mistakes.
(I cleared these changes with David Gould a few days ago.)
1998-10-01 01:53:50 +00:00
Tom Lane 0d1aa5ac52 pg_dump -z was careless about ownership of indexes.
Now it's a little less so.
1998-10-01 01:49:12 +00:00
Tom Lane f447344003 Simplify pg_result by using new libpq PQresultErrorMessage;
fix some memory leaks in pg_select.
1998-10-01 01:45:38 +00:00
Tom Lane 6428074e27 Update libpq to store an error message in PGresult, per pgsq-interfaces discussion of 21-Sep. 1998-10-01 01:40:26 +00:00
Tom Lane 502769d0de Change HPUX loader flags to trap null pointer derefs 1998-10-01 01:26:45 +00:00
Thomas G. Lockhart 9bb7096bcd Update to track newest gram.y. 1998-09-30 05:48:28 +00:00
Thomas G. Lockhart c683abb1f0 Add as many keywords as possible to column identifier or label lists.
Add "timestamp" to list of tokens in keywords.c.
 Before, TIMESTAMP WITH TIME ZONE did not actually parser.
Reorder token lists to be more alphabetical.
Remove ARCHIVE keyword which was deprecated in v6.3.
1998-09-30 05:47:57 +00:00
Thomas G. Lockhart 96273049e9 Message changed slightly since "rename" is now allowed as a column name. 1998-09-30 05:43:23 +00:00
Marc G. Fournier 44e01bf992 From: Jan Wieck <jwieck@debis.com>
here  is  the  patch  that  includes  PL/pgSQL into the build
    (currently with make errors ignored) and  adds  a  regression
    test for it. A clean build and regression ran fine here.

    Can you please apply it?

    The  tar  should  be  extracted  in  /usr/local/src/pgsql and
    creates the following files:

    src/pl/Makefile
            called by toplevel GNUmakefile and for now only calls
            src/pl/plpgsql/Makefile

    src/pl/plpgsql/Makefile
            calls  src/pl/plpgsql/src/Makefile  (here the call to
            make ignores build errors  -  this  must  be  changed
            later for the final release).

    src/test/regress/input/install_plpgsql.source
            SQL script installing PL/pgSQL language in regression
            database. Will be modified by  .../input/Makefile  to
            point  to  correct  PGLIB  directory where plpgsql.so
            gets installed.

    src/test/regress/output/install_plpgsql.source
            expected output for installation script.

    src/test/regress/sql/plpgsql.sql
            the main regression  test.  It  tests  functions  and
            triggers written in PL/pgSQL including views that use
            supportfunctions in this language.

    src/test/regress/expected/plpgsql.out
            the expected output for the above regression test.

    make_plpgsql.diff
            patch that adds some lines to

            src/GNUmakefile.in
            src/test/regress/expected/Makefile
            src/test/regress/input/Makefile
            src/test/regress/output/Makefile
            src/test/regress/sql/Makefile
            src/test/regress/sql/tests
1998-09-29 12:43:05 +00:00
Edmund Mergl 376fbadbd2 pgsql_perl5-1.8.0 1998-09-27 19:12:35 +00:00
Bruce Momjian bd041d82bf multi-byte fix from Tatsuo Ishii 1998-09-25 15:51:02 +00:00
Bruce Momjian d73f73af6e Add new Makefile from Jan. 1998-09-25 15:50:02 +00:00
Thomas G. Lockhart 734d44988a Bracket filename in LOAD error message with single quotes
to clarify actual path used.
1998-09-25 13:47:27 +00:00
Thomas G. Lockhart d76b4069ad Update to track gram.y.
Had removed PARSEDEBUG statements...
1998-09-25 13:45:12 +00:00
Thomas G. Lockhart 4327a3675f Clean up existing debugging print statements.
Modify comment blocks to insulate from pgindent.
1998-09-25 13:38:32 +00:00
Thomas G. Lockhart ee88006cf2 Clean up code in analyze.c for SERIAL data type.
Remove _all_ PARSEDEBUG print statements.
1998-09-25 13:36:08 +00:00
Bruce Momjian 2df1465757 Fix comment for regproc. 1998-09-25 03:36:33 +00:00
Bruce Momjian f52e7346ea MB patches from Tatsuo Ishii 1998-09-25 01:46:25 +00:00
Bruce Momjian 31fea9777f Fix for datetime from Tatsuo Ishii 1998-09-23 17:51:46 +00:00
Bruce Momjian b9f16535a4 Fix for oidArray from Christopher Oliver. 1998-09-23 17:50:12 +00:00
Bruce Momjian b932b1b1c4 Allow 8-key indexes. 1998-09-23 04:22:14 +00:00
Marc G. Fournier 747e19aa6c Add in, I think, support for %lld in snprintf(), specifically with
Irix in mind...
1998-09-23 03:11:24 +00:00
Bruce Momjian 3ce8a1b4ba Fix for SELECT NOT boolfield FROM table 1998-09-22 21:48:27 +00:00
Bruce Momjian a3c5a3cb2f Cleanup for oid8[] from Tatsuo Ishii. 1998-09-22 20:28:15 +00:00
Bruce Momjian 738dc876ed Here are some patches to fix up the regression tests so that the union
test passes.  Interestingly, the fix involves no changes or special
cases in the union test and actually removes a special case for the
numerology test.  Thus, following the strategy outlined below is a
definite improvement over the previous situation.

Cheers,
Brook
1998-09-22 16:52:59 +00:00
Bruce Momjian ba0abfdecc Add .h to string include. 1998-09-22 16:41:19 +00:00
Bruce Momjian 748e300317 Fix for AND/OR handling. 1998-09-21 15:41:28 +00:00
Marc G. Fournier bf395e895b From: Michael Meskes <meskes@usa.net>
+ Mon Aug 31 09:40:04 CEST 1998
+
+       - Minor patch to Makefile
+       - Put pgc.l in sync with scan.l
+
+ Tue Sep  1 11:31:05 CEST 1998
+
+       - Fixed another bug in preproc.y
+
+ Thu Sep  3 12:21:16 CEST 1998
+
+       - Sync preproc.y with gram.y
+
+ Mon Sep 14 09:21:02 CEST 1998
+
+       - Sync preproc.y with gram.y yet again
+
+ Thu Sep 17 08:55:33 CEST 1998
+
+       - Synced preproc.y and gram.y one more time
+
+ Thu Sep 17 19:23:24 CEST 1998
+
+       - Added missing ´;´ in preproc.y
+       - Set version to 2.4.2
1998-09-21 05:52:55 +00:00
Bruce Momjian 25a64f7519 Fix for \z formatting from Tom Lane. 1998-09-21 02:25:29 +00:00
Bruce Momjian 4b048fbfaa This patch covers several to-do items that I had for libpgtcl:
* It works under both Tcl 7.6 and Tcl 8.0 now.  (The code claims to
  work under Tcl 7.5 as well, but I have no way to test that ---
  if anyone still cares, please check it with 7.5.)

* pg_listen suppresses extra LISTEN commands and correctly sends an
  UNLISTEN when the last listen request for a relation is cancelled.
  (Note this means it will not work with pre-6.4 backends, but that
  was true already because it depends on the current libpq, which
  only speaks protocol 2.0.)

* Added -error option to pg_result so that there's some way to find
  out what you did wrong ;-)

* Miscellaneous cleanups of code comments and overenthusiastic #includes.

BTW, I bumped the package version number from 1.2 to 1.3.  Is this
premature?  Does someone run around and do that routinely before
each pgsql release?

			regards, tom lane
1998-09-21 01:02:04 +00:00
Bruce Momjian b0297d806b autoconf 1998-09-20 05:01:04 +00:00
Bruce Momjian a186b57bff Fix for memory leak, configure path fix, from Tom Lane. 1998-09-20 04:57:40 +00:00
Bruce Momjian aa158a746c Fix memory leak from Tom Lane. 1998-09-20 04:51:12 +00:00
Bruce Momjian 3ac9688ae8 I also noticed that pg_dump contains a copy of the same
prompt_for_password code that psql does.  We fixed psql a month or
two back to permit usernames and passwords longer than 8 characters.
I propagated the same fix into pg_dump.

Tom Lane
1998-09-20 03:18:43 +00:00
Bruce Momjian 087eb4cd1a Regression test cleanup. 1998-09-18 21:47:27 +00:00
Bruce Momjian 4a9da7e5c4 NS32K lock patch reversed. 1998-09-18 17:18:41 +00:00
Bruce Momjian 1202ab259a Fixes for VC and libpq.
Magnus Hagander
1998-09-18 16:46:07 +00:00
Bruce Momjian 33554989c0 Fix for NS32K machine. 1998-09-18 05:36:24 +00:00
Bruce Momjian 0498b6a487 fix for aix snprintf 1998-09-18 05:20:22 +00:00
Bruce Momjian 62bc4de45b Remove /usr/local/* from templates. 1998-09-18 05:00:52 +00:00
Bruce Momjian 0fc8bce760 Fix for \df. 1998-09-18 04:43:20 +00:00
Bruce Momjian b68d690dd3 New gram.c 1998-09-18 03:02:47 +00:00
Thomas G. Lockhart 5a68fd56cd Consolidate Jan's rules test into one file.
Remove dependency on a specific Postgres user name in the results
 (Check result against CURRENT_USER with a boolean instead).
1998-09-16 14:35:37 +00:00
Thomas G. Lockhart 20693de474 Support specifying PRIMARY KEY for the SERIAL type.
Change DEFAULT NULL to send back a NULL pointer
 rather than a string "NULL". This seems to work, where sending
 the string led to type conversion problems (and probably the wrong
 thing anyway).
1998-09-16 14:29:35 +00:00
Thomas G. Lockhart 7c30ac961f Support specifying PRIMARY KEY for the SERIAL type.
Check for a constraint if is_sequence is set and omit making
 a UNIQUE index if so, since the primary key will cover that for us.
1998-09-16 14:25:37 +00:00
Thomas G. Lockhart 198bcef025 Use oper_select_candidate() for unary operators
rather than func_select_candidate().
Fix oper_select_candidate() to work with a single operator argument.
Repair left operator checking for null return from candidate list.
1998-09-16 14:22:22 +00:00
Marc G. Fournier 672bc164ce Forgot to remove README-1ST from the repository ... 1998-09-15 02:25:09 +00:00
Marc G. Fournier b97a227777 Change order of install...installing interfaces is the last to be done,
as, if not installing as root (which nobody *should* be doing, of course),
the perl install fails, which means that both bin and man directories
are not installed :(

This way, only thing that doesn't get installed is perl interface...
1998-09-14 04:17:40 +00:00
Bruce Momjian 3700981108 Add new make_oidjoin_check utility and template1_check.sql. Fix some
pg_operator problems.
1998-09-14 01:14:49 +00:00
Thomas G. Lockhart f1bcb171e8 Remove remnant from obsolete char16 data type. 1998-09-13 14:29:06 +00:00
Thomas G. Lockhart 8ee1c1936c Update to new DECLARE and FETCH features in gram.y. 1998-09-13 04:20:16 +00:00
Thomas G. Lockhart f16f35a0f8 Support SQL92-ish DECLARE and FETCH commands.
Adds a few new keywords, but all are allowed as column names etc.
1998-09-13 04:19:33 +00:00
Bruce Momjian af8e2760ba Here are some additional patches needed to get the UnixWare 7 C++
compiler to
attempt to compile libpq++.  The patches address the following problems:

1.  In my first pass at changing the libpq++ makefile, I forgot to
include the
    PORTNAME in the Makefile.in file.

2.  The UnixWare 7 C++ compiler did not like the '-K alloca' option in
CXXFLAGS.

Billy G. Allie
1998-09-13 04:00:44 +00:00
Bruce Momjian bcb51fc916 rename java file for Peter. 1998-09-12 17:26:04 +00:00
Bruce Momjian 6ee06b0fd3 Irix lock fix from Robert Bruccoleri 1998-09-12 16:07:53 +00:00
Bruce Momjian 786b1802c8 The pg_atoi() function uses strtol() to convert the string to numbers. Some
implementations of strtol() treat empty strings ("") as invalid arguments
while others convert this (erroneously, IHMO) to zero (0).  Assuming that the
expected behaviour of pg_atoi() is to return 0 if it is passed an empty
string, I am supplying the following patch to explictly check for an empty
string in pg_atoi() and return 0 if the string is empty.  The patch will also
trap a NULL character pointer being passed to pg_atoi() and will use elog() to
print out an error message if the input char pointer is NULL.


Billy G. Allie
1998-09-12 16:04:35 +00:00
Bruce Momjian 5f7fb67789 autoconf 1998-09-11 17:21:20 +00:00
Bruce Momjian 4fc3b068ab Remove lld from LONG LONG name 1998-09-11 17:16:11 +00:00
Bruce Momjian b3e72e518e autoconf 1998-09-11 17:08:22 +00:00
Bruce Momjian f1ab71ec5f The attached patches fix the following problems:
1.  The UnixWare tas macro was reformatted (by indent or it like?) which caused
    it to break.  The asm macro construct is very particular about the %mem
    construct -- it has to start in column 1.

2.  When compiling libpq++, g++ was used even if configure found the C++ com-
    piler to be CC.

3.  When compiling libpq++, '-Wno-error' was added to CXXFLAGS, even if the
    compiler wasn't g++.

Billy G. Allie
1998-09-11 16:56:24 +00:00
Bruce Momjian 339d2769a1 autoconf 1998-09-11 16:50:20 +00:00
Bruce Momjian 28834b7226 Remove %qd. 1998-09-11 16:43:26 +00:00
Bruce Momjian 13b6f724c1 Tatsuo Ishii fix for pg_user crash, with slight modification. 1998-09-11 16:39:59 +00:00
Bruce Momjian a752e322a3 %lld fix. 1998-09-11 14:10:53 +00:00
Bruce Momjian 4da5714ced long long cleanup 1998-09-10 21:10:51 +00:00
Vadim B. Mikheev 36ef34d73c Added attributes for primary/unique/foreign keys... 1998-09-10 15:32:32 +00:00
Bruce Momjian d9d8169858 Fix for length in libpq from Tom Lane. 1998-09-10 15:18:06 +00:00
Bruce Momjian 3a9c626a86 autoconf 1998-09-10 05:40:16 +00:00
Bruce Momjian a7b5abcbc7 %lld not %Ld 1998-09-10 05:36:00 +00:00
Bruce Momjian e1f21884c6 More bsdi 4.0 additions. 1998-09-10 04:59:01 +00:00
Bruce Momjian 56a2d8042b bsdi 4.0. 1998-09-10 04:46:45 +00:00
Bruce Momjian 42cc8c019e Add some support for BSDI 4.0. 1998-09-10 04:39:47 +00:00
Vadim B. Mikheev 098c63c0ff Porting efforts... :) 1998-09-10 04:11:52 +00:00
Vadim B. Mikheev ee00b75441 flock --> fcntl 1998-09-10 04:07:59 +00:00
Bruce Momjian f4c222f986 cleanup 1998-09-10 03:54:07 +00:00
Bruce Momjian a19b1dc705 Cleanup of configure.in 1998-09-10 03:42:19 +00:00
Bruce Momjian 01b16f88e6 autoconf 1998-09-10 03:33:32 +00:00
Bruce Momjian c34ed86ea8 Allow long long on BSDI. 1998-09-10 03:27:09 +00:00
Bruce Momjian 6d3a5482aa Aix4 fixes from Andreas Zeugswetter 1998-09-09 18:39:33 +00:00
Bruce Momjian 6921f364db >
> Open portability issues:
>
> /usr/local should be searched for lib and include for all ports if
present
> (currently not working, I have libreadline there)
>
> the stream functions on AIX need a size_t for addrlen's in
fe-connect.c and pqcomm.c.
>
> lock.c still has an incompatible TPRINTF(flags, args...) definition

Massimo
1998-09-09 18:32:05 +00:00
Bruce Momjian a29ae2264a Hi patchers/hackers.
Here's a patch for initdb that does two things.

1) Encloses the created rulenames in quotes to preserve case
   in the creation step. (stores _RETpg... instead of _retpg...)
   I believe _RET is standard for views.

2) Renames pg_view to pg_views and pg_rule to pg_rules.
   I believe Jan and myself agreed this would be a "good idea"

Keith Parks
1998-09-09 18:16:36 +00:00
Vadim B. Mikheev 9a2949e5dd Fix using GroupBy/non-GroupBy expressions in HAVING. 1998-09-09 03:48:17 +00:00
Vadim B. Mikheev 04abb54197 Fix for indexing problem (?): heap tuple was pfree-d before CatalogIndexInsert()... 1998-09-09 03:42:52 +00:00
Bruce Momjian b5ed4be218 AIX align fix. 1998-09-08 22:15:42 +00:00
Bruce Momjian 6f84e86d69 Fix for macro for AIX. 1998-09-08 15:24:11 +00:00
Vadim B. Mikheev 994cfba1e5 Fix GroupBY func broken by HAVING. 1998-09-08 02:50:20 +00:00
Bruce Momjian 202751921d Alignment cleanup so no more massive switch statements for alignment,
just two macros.
1998-09-07 05:35:48 +00:00
Bruce Momjian e15807f410 BTW, in catalog/pg_type.h:
#define Anum_pg_index_indisunique               8

I think this should be 9.

Tatsuo Ishii
1998-09-06 04:49:51 +00:00
Thomas G. Lockhart 6d62e1da9d Use alternate form for long-long-int to be compatible with AIX.
%Ld worked with gcc, but %lld works with both gcc and AIX.
1998-09-05 01:19:38 +00:00
Bruce Momjian 4b814b1886 offsetof cleanup. 1998-09-04 18:21:11 +00:00
Bruce Momjian f93281a1a1 t_bits alignment fix from Tatsuo Ishii 1998-09-04 18:05:39 +00:00
Marc G. Fournier edd626cb3e Try this snprintf() implementation, used in sendmail... 1998-09-04 14:34:23 +00:00
Marc G. Fournier 370d6cdb64 From: David Hartwig <daybee@bellatlantic.net>
I put some extra checks to make sure a query was a good candidate for
rewrite into a UNION.    Besides the existing checks:

1.  Make sure the AND/OR tree was rectangular.  ( i.e.    3 X 4  or 10 X
3)
2.  Only one table.
3.  Must have an AND dimension.
4.  At least 9 OP expressions total

Also  cleaned up and commented.
1998-09-04 12:52:23 +00:00
Bruce Momjian e9d0fa3762 libpgtcl cleanups for Tom Lane. 1998-09-04 05:03:05 +00:00
Thomas G. Lockhart b806b3d3f8 Allow insert statements to have every column
supplied by a DEFAULT clause.  Enables INSERT INTO TABLE DEFAULT VALUES...
1998-09-03 14:21:06 +00:00
Thomas G. Lockhart dfab686ce8 Update to match newest gram.c since both are generated from gram.y.
Should be done every time gram.c is refreshed.
1998-09-03 12:26:20 +00:00
Bruce Momjian b3f8bbb973 Oops missing file. 1998-09-03 05:09:27 +00:00
Bruce Momjian 9d8d647146 patch cleanups. 1998-09-03 05:08:28 +00:00
Bruce Momjian fcecc5ca1e [Part #1: Type: text/plain, Encoding: 7bit, Size: 59]
I will be cleaning this up more before the Oct 1 deadline.

David Hartwig.  AND/OR fix.
1998-09-03 02:34:35 +00:00
Bruce Momjian b25a513b49 Fix ifdef. 1998-09-03 02:32:41 +00:00
Bruce Momjian 35a945f2b5 New stuff from Peter Mount for jdbc. 1998-09-03 02:31:38 +00:00
Bruce Momjian c37adac74e New stuff for 6.4 jdbc.
Peter mount
1998-09-03 02:29:45 +00:00
Bruce Momjian d318315200 > Yikes, that is certainly not standard C. I have never seen that
before.
> Looks like a GNU-ism.  I nice one, but still a GNU-ism.

Sorry, I didn't know it is a GNU extension. I have written this patch
which should fix the problem. Let me know if you still have problems.

Massimo Dal Zotto
1998-09-03 02:20:30 +00:00
Bruce Momjian 9fbaf1d851 Remove \r\n in windows makefile. 1998-09-03 02:16:27 +00:00
Bruce Momjian 63e39ab9a9 O2. Seems tas() for PPC (storage/buffer/s_lock.c) never works if
compiled with -O0. Included are patches that should fix the problem
(of course I have confirmed -O2 works with this patch).

BTW, here is a platforms/regression test failure(serious one--backend
death) matrix.

Tatsuo Ishii
1998-09-03 02:14:39 +00:00
Bruce Momjian 811106676e Oops. I'll fix this.
Here are patches for bin/createdb/createdb.sh.
--
Tatsuo Ishii
t-ishii@sra.co.jp
1998-09-03 02:12:14 +00:00
Bruce Momjian f71d0cf64e Attached is a patch to remove the definitions of libpq's internal
structs from libpq-fe.h, as we previously discussed.

There turned out to be sloppy coding practices in more places than
I had realized :-(, but all in all I think it was a well-worth-while
exercise.

I ended up adding several routines to libpq's API in order to respond
to application requirements that were exposed by this work.  I owe the
docs crew updates for libpq.sgml to describe these changes.  I'm way too
tired to work on the docs tonight, however.

This is the last major change I intend to submit for 6.4.  I do want
to see if I can make libpgtcl work with Tcl 8.0 before we go final,
but hopefully that will be a minor bug fix.
1998-09-03 02:10:56 +00:00
Bruce Momjian bcc15f15e1 > David Hartwig wrote:
>
> Please apply this HAVING regression patch.
> > My bad.   It is caused by a known bug having to do with GROUP BY.
It ain't$
> > nothing to do with HAVING.  For some reason the bug went away for a
while, $
> > script.  It must have, because that is how I created the expected
file.   :(
> >
> > A patch to the regression will be forthcoming.
>
1998-09-02 23:37:13 +00:00
Bruce Momjian 58fdae0ddf Fix for indexing problems. 1998-09-02 23:05:37 +00:00
Thomas G. Lockhart 557d295b84 Update to support the CREATE TABLE DEFAULT VALUES statement in gram.y. 1998-09-02 15:48:28 +00:00
Thomas G. Lockhart 80c3241da7 Support CREATE TABLE DEFAULT VALUES statement. 1998-09-02 15:47:30 +00:00
Bruce Momjian e57cfd81d1 autoconf 1998-09-02 02:38:29 +00:00
Bruce Momjian 5ab8a4ee6e Fix for install path 1998-09-02 02:34:00 +00:00
Bruce Momjian 566cd87873 update 1998-09-02 02:08:02 +00:00
Bruce Momjian 21b9968d11 install file search fix 1998-09-02 02:04:39 +00:00
Bruce Momjian ec47d20cf9 autoconf 1998-09-02 02:00:07 +00:00
Bruce Momjian b07f4b4efb Configure fix for install script search. 1998-09-02 01:54:18 +00:00
Bruce Momjian 82707ffe2b re-add bsdi makefile 1998-09-01 21:43:16 +00:00
Bruce Momjian 61d673b2ea bsdi cleanup 1998-09-01 16:31:19 +00:00
Bruce Momjian c0dd20f92c cleanup 1998-09-01 16:21:47 +00:00
Thomas G. Lockhart b9cbb1ed39 Fix message delimiters for substitution by sed script during installation.
They were missing a "PG_" prefix so were not substituted properly.
1998-09-01 15:57:00 +00:00
Bruce Momjian 0f6b004ad2 cleanups of indexing.c 1998-09-01 06:51:35 +00:00
Bruce Momjian 4b9e21bbc2 cleanup 1998-09-01 06:22:46 +00:00
Bruce Momjian a89089c1f4 cleanup 1998-09-01 05:34:16 +00:00
Bruce Momjian fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
Bruce Momjian af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Bruce Momjian 2aa080fc93 indexing.c cleanups. 1998-08-31 17:49:18 +00:00
Bruce Momjian 24a05f5b3e Fix for regproc 1998-08-31 07:55:50 +00:00
Bruce Momjian 50676b40ac Fix for regprocout, use underscore, not parens. 1998-08-31 07:35:44 +00:00
Bruce Momjian 0705b02f18 OR clause index fix 1998-08-31 07:19:56 +00:00
Bruce Momjian cbf83190c5 Two spaces after a colon. 1998-08-31 04:48:36 +00:00
Bruce Momjian 2913d6557e Preserver pg_log and pg_variable in upgrade. Cleanups. 1998-08-31 04:32:18 +00:00
Bruce Momjian a753e5d192 Fix for possible releasebuffer bug. 1998-08-30 23:25:56 +00:00
Marc G. Fournier 6c4982851a From: Massimo Dal Zotto <dz@cs.unitn.it> 1998-08-30 21:05:27 +00:00
Thomas G. Lockhart 6f3de1bb66 Types removed from Postgres: oidint2, oidint4, oidname.
Fix example columns in alter_table.out to use datetime and timespan
 as a substitute for oidint4 and oidname.
1998-08-30 19:54:04 +00:00
Marc G. Fournier 91178b8b2e From: Tom Lane <tgl@sss.pgh.pa.us>
We're carrying around a copy of install-sh in case the local system
has no install script.  It's wasted baggage, because configure doesn't
know it's there :-(.  (Apparently everyone who's used postgres lately
already had an install script somewhere in their path.  I happened to
try to run configure with a minimal PATH tonight, and it promptly
gave up for lack of an install program.)  Here's the patch.
1998-08-30 19:41:50 +00:00
Marc G. Fournier 3067ac8e77 From: Massimo Dal Zotto <dz@cs.unitn.it>
After some playing with gdb I found that in printtup() there is a non null
attribute with typeinfo->attrs[i]->atttypid = 0 (invalid oid). Unfortunately
attibutes with invalid type are neither printed nor marked as null, and this
explains why psql doesn't get all the expected data.

So I made this patch to printtup():
1998-08-30 19:30:38 +00:00
Bruce Momjian 3b7d13a6b0 Make old db directory configurable. 1998-08-30 13:14:00 +00:00
Bruce Momjian 2739315a80 Update man pages. 1998-08-30 05:25:47 +00:00
Bruce Momjian c870be6590 New pg_upgrade command. 1998-08-30 05:06:54 +00:00
Bruce Momjian caa9468110 Improve distclean. 1998-08-30 03:34:05 +00:00
Bruce Momjian cd9b34ed67 Add missing pgaccess file. 1998-08-30 03:32:47 +00:00
Bruce Momjian e875dfb81e autoconf 1998-08-30 03:25:22 +00:00
Bruce Momjian 76002493f3 --without fix from Brook 1998-08-30 03:19:47 +00:00
Bruce Momjian 845a3bdc4f Add missing file. 1998-08-30 01:43:20 +00:00
Bruce Momjian 690235fcdd Update INSTALL, etc. for release 6.4. Update pgaccess to 0.88. 1998-08-30 01:40:52 +00:00
Bruce Momjian c9ac0ceb61 Update of changes 1998-08-30 00:17:42 +00:00
Bruce Momjian f1d0e64ff9 Prevent file descriptor leak from failed COPY. 1998-08-29 18:19:59 +00:00
Bruce Momjian 88800aac14 Ok. BTW Mr. Kataoka who is maintaing Japanese version of PostgreSQL
ODBC driver have found a bug in 6.3.2 pg_dump and have made patches.
I confirmed that the same bug still exists in the current source
tree. So I made up patches based on Kataoka's. Here are some
explanations.

o fmtId() returns pointer to a static memory in it. In the meantime
there is a line where is fmtId() called twice without saving the
first value returned by fmtId(). So second call to fmtId() will
break the first one.

o findTableByName() looks up a table by its name. if a table name
contanins upper letters or non ascii chars, fmtId() will returns
a name quoted in double quotes, which will not what findTableByName()
wants. The result is SEG fault.  -- Tatsuo Ishii t-ishii@sra.co.jp
1998-08-29 18:06:57 +00:00
Bruce Momjian 2618fcdf0d Fix scanner name length trimming. 1998-08-29 05:27:17 +00:00
Bruce Momjian 53916cab6a Better error message if table exists. 1998-08-29 04:19:08 +00:00
Bruce Momjian 5a722414a1 This patch resolves some regression test failures caused by platform
dependencies.

David Hartwig
1998-08-29 04:10:40 +00:00
Bruce Momjian 9728ce7499 This is the first (of hopefully few) AIX port patches. This patch
was tested with Linux/GCC.  I still have some issues with with the
snprintf() function.

David Hartwig
1998-08-29 04:09:29 +00:00
Bruce Momjian 9a88848027 update libpq.rc version. 1998-08-29 04:07:08 +00:00
Bruce Momjian a060d5bedf Hello!
Here is a new patch for libpq, to make it work on Win32 again (since
the latest modifications broke it a little).

Please also add the file "libpq.rc" to the interfaces/libpq directory.
This will allow version-stamping of the generated DLL file, so that
automatic install programs (and interested users) can determine
the version of the file.  The file is currently set as "prerelease".
Before the release, somebody should change the line "FILEFLAGS
VS_FF_PRERELEASE" to "FILEFLAGS 0".  That information should probably
go into toos\RELEASE_CHANGES.

The patch is against the cvs as of ~ 1998-08-26 14:30 CEST.


//Magnus
1998-08-29 04:05:46 +00:00
Bruce Momjian d15c37ca82 Truncate identifiers at NAMEDATALEN length. 1998-08-29 02:36:18 +00:00
Bruce Momjian 3e87302201 libpq's pqGetnchar() should not return a null-terminated value
anymore.  Fix for large objects.
1998-08-29 02:09:27 +00:00
Marc G. Fournier b9b00d5fe4 From: Michael Meskes <meskes@online-club.de>
This one is against the current archive (so it contains the one I send the
other day). It should fix the AIX problems. Andreas, could you please try
it? Thanks.

+ Wed Aug 26 16:17:39 CEST 1998
+
+       - Sync preproc.y with gram.y
+
+ Thu Aug 27 15:32:23 CEST 1998
+
+       - Fix some minor glitches that the AIX compiler complains about
+       - Added patchlevel to library
+
+ Fri Aug 28 15:36:58 CEST 1998
+
+       - Removed one line of code that AIX complains about since it was not
+         needed anyway
+       - Set library version to 2.6.1
1998-08-28 17:47:53 +00:00
Bruce Momjian 013184c882 Ignore spaces when reporting regression failures. 1998-08-28 14:17:57 +00:00
Marc G. Fournier b686927f4b From: Massimo Dal Zotto <dz@cs.unitn.it>
I have this small patch which fixes a typo in my previous lock patches.
Fortunately the bug affects only user locks.

-
1998-08-28 12:08:03 +00:00
Bruce Momjian d8dbbc8cf9 vacuum fix. 1998-08-28 04:57:21 +00:00
Bruce Momjian a53ea467e1 Hi all,
I  don't know if this is really related to the initdb problem
    discussion (haven't followed it enough). But seems so because
    it  fixes  a  damn  problem  during  index tuple insertion on
    CREATE TABLE into pg_attribute_relid_attnum_index.

    Anyway - this bug was really hard to find. During startup the
    relcache  reads  in  some  prepared  information  about index
    strategies from a file and then  reinitializes  the  function
    pointers  inside  the  scanKey data.  But for sake it assumed
    single attribute index tuples (hasn't that changed recently).
    Thus not all the strategies scanKey entries where initialized
    properly,  resulting  in  invalid  addresses  for  the  btree
    comparision functions.

    With  the  patch  at  the  end  the  regression  tests passed
    excellent except for the sanity_check that crashed at  vacuum
    and the misc test where the select unique1 from onek2 outputs
    the two rows in different order.

Jan
1998-08-28 03:36:31 +00:00
Marc G. Fournier 602ac52d3e From: Magnus Hagander <mha@edu.sollentuna.se>
Ok. Here is a patch to make psql work on Win32 (as a console mode
application, of course).
It requires getopt.c to be in src/utils - works fine with the FreeBSD
version of it.

Also, the file win32.mak should go into src/bin/psql.
1998-08-27 13:25:40 +00:00
Bruce Momjian 50ad4a70b9 Make 'name' type int aligned, like char/varchar. 1998-08-27 05:06:57 +00:00
Bruce Momjian 4166f73997 Fix 'd ' should be 'd'. 1998-08-27 01:04:23 +00:00
Bruce Momjian 823c393b9f Fix problem where attbyval was wrong for xid types. 1998-08-26 17:12:12 +00:00
Bruce Momjian d394d06d7a Fix atttypmod alignment again, and re-enable ecpg. 1998-08-26 16:43:54 +00:00
Bruce Momjian e2b0911564 Fix atttypmod to be int32 in system catalogs. Oops. 1998-08-26 05:51:24 +00:00
Bruce Momjian 093beb3560 Make attalign match type alignment. 1998-08-26 05:22:58 +00:00
Thomas G. Lockhart 651e31bb80 Fix up crashing symptoms for new serial type by making sure constraint
and index name fields are pstrdup'd (copied) rather than reused.
1998-08-26 04:20:27 +00:00
Bruce Momjian a873da484f Fix for select bug. 1998-08-26 03:17:32 +00:00
Marc G. Fournier 96c4212f99 cvs add'd two files for the tprintf() patch... 1998-08-25 21:43:47 +00:00
Marc G. Fournier f62d1253ef From: Massimo Dal Zotto <dz@cs.unitn.it>
>       these patches define the UNLISTEN sql command. The code already
>       existed but it was unknown to the parser. Now it can be used
>       like the listen command.
>       You must make clean and delete gram.c and parser.h before make.
1998-08-25 21:37:08 +00:00
Marc G. Fournier 7414d61950 From: Massimo Dal Zotto <dz@cs.unitn.it>
> tprintf.patch
>
>       tprintf.patch
>
>       adds functions and macros which implement a conditional trace package
>       with the ability to change flags and numeric options of running
>       backends at runtime.
>       Options/flags can be specified in the command line and/or read from
>       the file pg_options in the data directory.
1998-08-25 21:34:10 +00:00
Marc G. Fournier 51e8e187d1 Massimo Dal Zotto <dz@cs.unitn.it>
> socket-flock.patch
>
>       use advisory locks to check if the unix socket can be deleted.
>       A running postmaster keeps a lock on that file. A starting
>       postmaster exits if the file exists and is locked, otherwise
>       it deletes the sockets and proceeds.
>       This avoid the need to remove manually the file after a postmaster
>       or system crash.
>       I don't know if flock is available on any system. If not we could
>       define a HAVE_FLOCK set by configure.
1998-08-25 21:32:10 +00:00
Marc G. Fournier 53d7d47302 From: Massimo Dal Zotto <dz@cs.unitn.it>
> sinval.patch
>
>       fixes a problem in SI cache which causes table overflow if some
>       backend is idle for a long time while other backends keep adding
>       entries.
>       It uses the new signal handling implemented in tprintf.patch.
>       I have also increacasesed the max number of backends from 32 to 64
>       and the table size from 1000 to 5000.
>       I don't know if anybody is working on SI, but until another
>       solution is found this patch fixes the problem. I have received
>       messages from other people reporting the same problem which I
>       fixed many months ago.
1998-08-25 21:31:20 +00:00
Marc G. Fournier 82555376a1 missed adding a new include file 1998-08-25 21:29:16 +00:00
Marc G. Fournier 8e9d69d6ac From: Massimo Dal Zotto <dz@cs.unitn.it>
> sequence.patch
>
>       adds the missing setval command to sequences. Owner of sequences
>       can now set the last value to any value between min and max
>       without recreating the sequence. This is useful after loading
>       data from external files.
1998-08-25 21:25:46 +00:00
Marc G. Fournier 88b17d9c56 From: Massimo Dal Zotto <dz@cs.unitn.it>
> ps-status.patch
>
>       macros for ps status, used by postgres.c and utility.c.
>       Unfortunately ps status is system dependent and the current
>       code doesn't work on linux. The use of macros confines system
>       dependency to into one file (ps-status.h). Users of other
>       operating systems should check this code and submit new macros.
1998-08-25 21:24:12 +00:00
Marc G. Fournier ab00a220ab From: Massimo Dal Zotto <dz@cs.unitn.it>
> pqpacket.patch
>
>       fixed indentation.
1998-08-25 21:22:27 +00:00
Marc G. Fournier 7dbcf31be2 From: Massimo Dal Zotto <dz@cs.unitn.it>
lock.patch

        I have rewritten lock.c cleaning up the code and adding better
        assert checking I have also added some fields to the lock and
        xid tags for better support of user locks. There is also a new
        function which returns an array of pids owning a lock.
        I'm using this code from over six months and it works fine.
1998-08-25 21:20:32 +00:00
Marc G. Fournier 1acf0d85fe From: Massimo Dal Zotto <dz@cs.unitn.it>
config.patch

        remove old defines no more used in the code.
1998-08-25 21:17:11 +00:00
Marc G. Fournier 1a5fb65463 From: Massimo Dal Zotto <dz@cs.unitn.it>
assert.patch

        adds a switch to turn on/off the assert checking if enabled at compile
        time. You can now compile postgres with assert checking and disable it
        at runtime in a production environment.
1998-08-25 21:04:41 +00:00
Bruce Momjian 1682c362a3 Can someone please apply this portability patch to genbki.sh ?
(Mark or Bruce?) It fixes a problem when cpp gives a warning when
precompiling /dev/null like:  "/dev/null", line 1: 1506-229 (W)
File is empty.  This leads to a hangup when doing the description
load during initdb, since stderr also ends up in the global1.description
and local1_template1.description

stderr has to be redirected to /dev/null:

Andreas Zeugswetter
1998-08-25 17:36:18 +00:00
Thomas G. Lockhart e0e461e1a3 Add is_sequence flag to ColumnDef structure. Used to implement SERIAL type. 1998-08-25 15:09:31 +00:00
Thomas G. Lockhart 7ff198cd46 Support SERIAL column type. Expand column marked is_sequence into three
statements:
 - the table definition with a default clause referencing the sequence;
 - a CREATE SEQUENCE statement;
 - a UNIQUE constraint, which expands into a CREATE INDEX statement.
This is not a perfect solution, since the sequence will remain even if
 the table is dropped. Also, there is no absolute protection on updating
 the sequence column.
1998-08-25 15:08:12 +00:00
Thomas G. Lockhart 12cf9f8075 Support SERIAL column type. Expand into an integer column but mark
is_sequence in the ColumnDef structure.
1998-08-25 15:04:24 +00:00
Thomas G. Lockhart 6962f86e74 Clean up double-quotes around column and table names.
Had too many in some cases because there was already a routine
 taking care of it.
1998-08-25 15:02:04 +00:00
Thomas G. Lockhart 7540af490a Move debugging printout of the query tree to print for all cases.
Formerly came just after early exit from loop for command nodes,
 so missed some cases.
1998-08-25 15:00:17 +00:00
Marc G. Fournier c8b3d5d3f8 Add nextstep to similar template file 1998-08-25 14:12:27 +00:00
Marc G. Fournier dd70e439df re-integrate nextstep dynloader functionality
From: Jacek Lasecki <jacek@sound.eti.pg.gda.pl>
1998-08-25 14:07:13 +00:00
Marc G. Fournier 875a3f6604 From: Michael Meskes <meskes@online-club.de>
+
+ Fri Aug 14 12:44:21 CEST 1998
+
+       - Added EXEC SQL DEFINE statement
+       - Set version to 2.4.0
+
+ Tue Aug 18 09:24:15 CEST 1998
+
+       - Removed keyword IS from DEFINE statement
+       - Added latest changes from gram.y
+       - Removed duplicate symbols from preproc.y
+       - Initialize sqlca structure
+       - Added check for connection to ecpglib
+       - Set version to 2.4.1
+
+ Thu Aug 20 15:31:29 CEST 1998
+
+       - Cleaned up memory allocation in ecpglib.c
+       - Set library version to 2.6
+
1998-08-25 14:03:29 +00:00
Marc G. Fournier 35478b8028 From: Michael Meskes <meskes@online-club.de>
+
+ Fri Aug 14 12:44:21 CEST 1998
+
+       - Added EXEC SQL DEFINE statement
+       - Set version to 2.4.0
+
+ Tue Aug 18 09:24:15 CEST 1998
+
+       - Removed keyword IS from DEFINE statement
+       - Added latest changes from gram.y
+       - Removed duplicate symbols from preproc.y
+       - Initialize sqlca structure
+       - Added check for connection to ecpglib
+       - Set version to 2.4.1
+
+ Thu Aug 20 15:31:29 CEST 1998
+
+       - Cleaned up memory allocation in ecpglib.c
+       - Set library version to 2.6
+
1998-08-25 12:17:27 +00:00
Marc G. Fournier 32cfc4aa00 From: Michael Meskes <meskes@online-club.de>
+
+ Fri Aug 14 12:44:21 CEST 1998
+
+       - Added EXEC SQL DEFINE statement
+       - Set version to 2.4.0
+
+ Tue Aug 18 09:24:15 CEST 1998
+
+       - Removed keyword IS from DEFINE statement
+       - Added latest changes from gram.y
+       - Removed duplicate symbols from preproc.y
+       - Initialize sqlca structure
+       - Added check for connection to ecpglib
+       - Set version to 2.4.1
+
+ Thu Aug 20 15:31:29 CEST 1998
+
+       - Cleaned up memory allocation in ecpglib.c
+       - Set library version to 2.6
+
1998-08-25 11:57:06 +00:00
Bruce Momjian 2aab1b9a22 >Applied.
Thanks. But patches for src/backend/catalog/Makefile seems missing
in the current source tree. Please apply attached patches.

It also includes some corrections to src/backend/util/mb/wchar.c.
-- Tatsuo Ishii t-ishii@sra.co.jp
1998-08-25 04:19:16 +00:00
Bruce Momjian 6f36e9f7c9 Cleanup of target file. 1998-08-25 03:22:49 +00:00
Bruce Momjian 0fc13f582a Make sure resdomno for update/insert match attribute number for
rewrite system.  Restructure parse_target to make it easier to
understand.
1998-08-25 03:17:29 +00:00
Bruce Momjian a06ba33cfd int64 fix 1998-08-25 02:23:58 +00:00
Bruce Momjian 28d90a5f8b move plpgsql 1998-08-24 19:16:28 +00:00
Bruce Momjian 0c5e541a9a move plpgsql to src/pl for Jan. 1998-08-24 19:14:51 +00:00
Bruce Momjian 9b73210f9d Fix bootstrap so it properly defines alignment of attributes. 1998-08-24 19:04:04 +00:00
Bruce Momjian f821eece80 autoconf 1998-08-24 15:43:50 +00:00
Bruce Momjian 86117a636d LONG_LONG_64 fix. 1998-08-24 15:38:13 +00:00
Bruce Momjian 4d0c5506bc autoconf 1998-08-24 04:17:51 +00:00
Bruce Momjian 648f007fdb I have found a minor problem with current configure.in.
[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],

this line produces something like:

  echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF

and would append garbage "yes cat" to confdefs.h. Of course the
result confdefs.h is not syntactically correct therefore following
tests using confdefs.h would all fail.  To avoid the problem, we
could switch the order of AC_MSG_RESULT and AC_DEFINE (see attached
patch). This happend on my LinuxPPC box.


Tatsuo Ishii t-ishii@sra.co.jp
1998-08-24 04:09:39 +00:00
Bruce Momjian 0a15090dba man pages cleanup 1998-08-24 01:51:20 +00:00
Bruce Momjian 8876ae2c57 OLD has to return CURRENT for now, Jan. 1998-08-24 01:39:18 +00:00
Bruce Momjian 15cb32d93e This is the final state of the rule system for 6.4 after the
patch is applied:

	Rewrite rules on relation level work fine now.

	Event qualifications on insert/update/delete  rules  work
	fine now.

	I  added  the  new  keyword  OLD to reference the CURRENT
	tuple. CURRENT will be removed in 6.5.

	Update rules can  reference  NEW  and  OLD  in  the  rule
	qualification and the actions.

	Insert/update/delete rules on views can be established to
	let them behave like real tables.

	For  insert/update/delete  rules  multiple  actions   are
	supported  now.   The  actions  can also be surrounded by
	parantheses to make psql  happy.   Multiple  actions  are
	required if update to a view requires updates to multiple
	tables.

	Regular users  are  permitted  to  create/drop  rules  on
	tables     they     have     RULE     permissions     for
	(DefineQueryRewrite() is  now  able  to  get  around  the
	access  restrictions  on  pg_rewrite).  This enables view
	creation for regular users too. This  required  an  extra
	boolean  parameter  to  pg_parse_and_plan() that tells to
	set skipAcl on all rangetable entries  of  the  resulting
	queries.       There      is      a      new     function
	pg_exec_query_acl_override()  that  could  be   used   by
	backend utilities to use this facility.

	All rule actions (not only views) inherit the permissions
	of the event relations  owner.  Sample:  User  A  creates
	tables    T1    and    T2,   creates   rules   that   log
	INSERT/UPDATE/DELETE on T1 in T2 (like in the  regression
	tests  for rules I created) and grants ALL but RULE on T1
	to user B.  User B  can  now  fully  access  T1  and  the
	logging  happens  in  T2.  But user B cannot access T2 at
	all, only the rule actions can. And due to  missing  RULE
	permissions on T1, user B cannot disable logging.

	Rules  on  the  attribute  level are disabled (they don't
	work properly and since regular users are  now  permitted
	to create rules I decided to disable them).

	Rules  on  select  must have exactly one action that is a
	select (so select rules must be a view definition).

	UPDATE NEW/OLD rules  are  disabled  (still  broken,  but
	triggers can do it).

	There are two new system views (pg_rule and pg_view) that
	show the definition of the rules or views so the db admin
	can  see  what  the  users do. They use two new functions
	pg_get_ruledef() and pg_get_viewdef() that are  builtins.

	The functions pg_get_ruledef() and pg_get_viewdef() could
	be used to implement rule and view support in pg_dump.

	PostgreSQL is now the only database system I  know,  that
	has rewrite rules on the query level. All others (where I
	found a  rule  statement  at  all)  use  stored  database
	procedures  or  the  like  (triggers as we call them) for
	active rules (as some call them).

    Future of the rule system:

	The now disabled parts  of  the  rule  system  (attribute
	level,  multiple  actions on select and update new stuff)
	require a complete new rewrite handler from scratch.  The
	old one is too badly wired up.

	After  6.4  I'll  start to work on a new rewrite handler,
	that fully supports the attribute level  rules,  multiple
	actions on select and update new.  This will be available
	for 6.5 so we get full rewrite rule capabilities.

Jan
1998-08-24 01:38:11 +00:00
Bruce Momjian f92994b1bd Compile ecpg by default. 1998-08-24 01:18:51 +00:00
Bruce Momjian 63b01ba38d just that the regression tests for rules work, please apply
the following to regress/sql/tests.

    If applying by hand note that the setup_... must run before
    the run_... (that I splitted these two was due to the errors
    that occured when creating rules and using them then in the
    same session - I'll post another fix for this later).

    BTW: the regression tests sanity_checks and alter_table fail
    now due to the remove of some indices and the oidint4 and
    oidname types. At least expectes should be set to the current
    results.

    Thanks.


Jan
1998-08-24 01:17:46 +00:00
Bruce Momjian c0b01461db o note that now pg_database has a new attribuite "encoding" even
if MULTIBYTE is not enabled. So be sure to run initdb.

o these patches are made against the latest source tree (after
Bruce's massive patch, I think) BTW, I noticed that after running
regression, the oid field of pg_type seems disappeared.

	regression=> select oid from pg_type; ERROR:  attribute
	'oid' not found

this happens after the constraints test. This occures with/without
my patches. strange...

o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer
used, and shoud be removed.

o GetDatabaseInfo() in utils/misc/database.c removed (actually in
#ifdef 0). seems nobody uses.

t-ishii@sra.co.jp
1998-08-24 01:14:24 +00:00
Bruce Momjian 9438fe5d09 autoconf 1998-08-23 22:36:41 +00:00
Bruce Momjian 07ae591c87 Attached is a patch that uses autoconf to determine whether there
is a working 64-bit-int type available.

In playing around with it on my machine, I found that gcc provides
perfectly fine support for "long long" arithmetic ... but sprintf()
and sscanf(), which are system-supplied, don't work :-(.  So the
autoconf test program does a cursory test on them too.

If we find that a lot of systems are like this, it might be worth
the trouble to implement binary<->ASCII conversion of int64 ourselves
rather than relying on sprintf/sscanf to handle the data type.

			regards, tom lane
1998-08-23 22:25:54 +00:00
Bruce Momjian 9cad9febb1 cleanup 1998-08-23 14:43:46 +00:00
Bruce Momjian 212f7bdfe3 Patch to allow createuser options from the command line. 1998-08-22 05:19:35 +00:00
Bruce Momjian 99a099d436 With the attached patch, I have verified that long (> 8char anyway)
usernames and passwords work correctly in both "password" and
"crypt" authorization mode.  NOTE: at least on my machine, it seems
that the crypt() routines ignore the part of the password beyond
8 characters, so there's no security gain from longer passwords in
crypt auth mode.  But they don't fail.

The login-related part of psql has apparently not been touched
since roughly the fall of Rome ;-).  It was going through huge
pushups to get around the lack of username/login parameters to
PQsetdb.  I don't know when PQsetdbLogin was added to libpq, but
it's there now ... so I was able to rip out quite a lot of crufty
code while I was at it.

It's possible that there are still bogus length limits on username
or password in some of the other PostgreSQL user interfaces besides
psql/libpq.  I will leave it to other folks to check that code.

			regards, tom lane
1998-08-22 04:49:05 +00:00
Bruce Momjian c0d730460f The attached patch fixes a problem that I seem to have introduced
with the new support for asynchronous NOTIFY in libpgtcl.  With
the current sources, if the backend disconnects unexpectedly then
the tcl/tk application coredumps when control next reaches the idle
loop.  Oops.

			regards, tom lane
1998-08-22 04:34:22 +00:00
Bruce Momjian a738478ad8 Here are additional patches for the UnixWare 7 port.
Summary of changes:

In pqcomm.h, use the SUN_LEN macro if it is defined to calculate
the size of the sockaddr_un structure.

In unixware.h, drop the use of the UNIXWARE macro.  Everything can
be handled with the USE_UNIVEL_CC and DISABLE_COMPLEX_MACRO macros.

In s_lock.h, remove the reference to the UNIXWARE macro (see above).

In the unixware template, add the YFLAGS:-d line.

In various makefile templates, add (or cleanup) unixware and univel
port specific information.

-- Billy G. Allie
1998-08-22 04:24:41 +00:00
Bruce Momjian 9005da08de Fix display in initdb. 1998-08-21 23:22:36 +00:00
Bruce Momjian c8b4d4d000 Fix for index problem that showed up in constraint test. 1998-08-20 23:01:24 +00:00
Bruce Momjian 8ae24a7566 update fixes. 1998-08-20 22:24:11 +00:00
Bruce Momjian 4a70002149 fix for index problem. 1998-08-20 22:07:46 +00:00
Bruce Momjian 31309423c9 Another vacuum fix. 1998-08-20 15:16:59 +00:00
Bruce Momjian 09e125084a Fix for vacuum introduced today. 1998-08-19 23:48:23 +00:00
Bruce Momjian a4d3695f28 Vacuum cleanup. 1998-08-19 22:01:18 +00:00
Bruce Momjian bd5aaca391 Vacuum fix. Was modifying cache. 1998-08-19 19:59:49 +00:00
Bruce Momjian 9c4eceb4e3 Fix for vacuum updating problem. 1998-08-19 15:47:36 +00:00
Bruce Momjian 5fbbd364e8 fix for ecpg corruption 1998-08-19 14:51:31 +00:00
Bruce Momjian 7971539020 heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
1998-08-19 02:04:17 +00:00
Marc G. Fournier 31de2c9461 Fix for SNPRINTF test in configure
From: Tom Lane <tgl@sss.pgh.pa.us>
1998-08-19 00:16:04 +00:00
Marc G. Fournier 1a77894d46 Add rule tests to regression tests... 1998-08-19 00:14:39 +00:00
Marc G. Fournier 338c54cbc1 From: Jan Wieck <jwieck@debis.com>
Hi,

    as  proposed here comes the first patch for the query rewrite
    system.

  <for details, see archive dated Mon, 17 Aug 1998>
1998-08-18 00:49:04 +00:00
Thomas G. Lockhart 620c2c362f Update the random test so it should succeed most of the time.
Instead of directly showing the random results, test the results
 for the expected behavior (range and randomness).
1998-08-17 16:11:35 +00:00
Thomas G. Lockhart a8bcb8bc58 Update for changes to gram.y. 1998-08-17 16:08:54 +00:00
Thomas G. Lockhart 73fae67a0d Allow NOT LIKE, IN, NOT IN, BETWEEN, and NOT BETWEEN expressions
in constraint clauses.
 IN and NOT IN only allow constaints, not subselects.
Jose' Soares' new reference docs pointed out the discrepency.
 Updating the docs too...
1998-08-17 16:08:34 +00:00
Thomas G. Lockhart 15f82836bf Use the parser macro IS_BINARY_COMPATIBLE() to allow more success
in type checking for DEFAULT contraint clauses.
Could do more type coersion later...
1998-08-17 16:03:31 +00:00
Marc G. Fournier 91162057ae From: Tom Lane <tgl@sss.pgh.pa.us>To: pgsql-patches@postgreSQL.org
Sigh.  That tweak needs a tweak --- I didn't realize that ".DEFAULT"
processing ignores dependencies, at least in the version of gmake I
have here (not sure if it's a bug or not).  Apply this patch aftermy previous one...
1998-08-17 03:53:37 +00:00
Marc G. Fournier cf9ecbdabb Just a couple of "after-commit" cleanups... 1998-08-17 03:52:36 +00:00
Marc G. Fournier 9312033071 Date: Sun, 16 Aug 1998 14:56:48 -0400
From: Tom Lane <tgl@sss.pgh.pa.us>
Attached is a patch for this weekend's work on libpq.  I've dealt
with several issues:

        <for details: see message, in pgsql-patches archive for above data>
1998-08-17 03:50:43 +00:00
Thomas G. Lockhart efc9a91db9 Allow a null pointer to be returned from get_opname().
Previously, had thrown an error, but looking for alternate strategies
 for table indices utilization would prefer to continue.
1998-08-16 05:38:41 +00:00
Thomas G. Lockhart 4c91723d35 Check for null pointer returned from get_opname().
Don't bother checking for alternate strategies if so
 since it was more likely a function or some other non-operator anyway.
1998-08-16 05:37:04 +00:00
Thomas G. Lockhart 0f19904360 Check for null pointer returned from get_opname(). 1998-08-16 05:35:35 +00:00
Thomas G. Lockhart 402b47cffa Disable not-ready-to-use support code for the line data type.
Bracket things with #ifdef ENABLE_LINE_TYPE.
The line data type has always been used internally to support other types,
 but I/O routines have never been defined for it.
1998-08-16 04:06:55 +00:00
Thomas G. Lockhart 9e1d532027 This README only mentions nroff problems with page.5, which has been
removed from the man pages and put into the new sgml docs.
1998-08-15 16:39:21 +00:00
Thomas G. Lockhart 4ab9ac79ba Include a sentence in the top pointing to the new docs.
pgbuiltin.3 is obsolete for sure, and libpq.3 can become so since the
 size and scope of this man page is not appropriate in a man page format.
1998-08-15 16:36:22 +00:00
Thomas G. Lockhart b55a020aca Converted to page.sgml. Not needed in a man page. 1998-08-15 13:01:26 +00:00
Thomas G. Lockhart 223fa7ff4a Information moved to sgml source files.
The "Oracle compatibility" page should have always been in with functions
 anyway. The BKI information is not really appropriate for a man page.
1998-08-15 07:03:59 +00:00
Thomas G. Lockhart 4b11e394bc Remove single-argument trim() function from table.
Never seen because the parser frontend converts all trim() calls to
 btrim(), ltrim(), and rtime() calls before execution.
1998-08-15 06:47:39 +00:00
Thomas G. Lockhart 21d1e474f5 Some old cleanup fixes for close_ps() from G. Thaker. 1998-08-15 06:45:10 +00:00
Thomas G. Lockhart 6912beea70 Allow binary-compatible indices to be considered when checking for valid
indices for restriction clauses containing a constant.
Note that if an index does not match directly (usually because the types
 on both side of the clause don't match), and if a binary-compatible index
 is identified, then the operator function will be replaced by a new
 one. Should not be a problem, but be sure that if types are listed as
 being binary compatible (in parse_coerce.h) then the comparison functions
 are also binary-compatible, giving equivalent results.
1998-08-14 16:13:07 +00:00
Thomas G. Lockhart 94f42ed389 Include OID as a built-in type. 1998-08-14 16:07:00 +00:00
Thomas G. Lockhart 58e9267026 Check for bad result from pg_id. A bad result can come from shared library
trouble, and the name of the shared library has been changed recently.
 Had to rerun ldconfig on my machine to get it working again.
Give an error message with a helpful hint if so...
1998-08-14 16:05:51 +00:00
Bruce Momjian c7fe2543b8 fix typo. 1998-08-11 22:39:33 +00:00
Bruce Momjian a968e4f60e Strategy cleanups. 1998-08-11 20:55:52 +00:00
Bruce Momjian 024d5f74ba index strategy cleanup 1998-08-11 19:32:39 +00:00
Bruce Momjian f22c6f9237 the following patch fixes a bug in the oracle compatibility
functions btrim() ltrim() and rtrim().

    The error was that the character after the set  was  included
    in the tests (ptr2 pointed to the character after the vardata
    part of set if no match found,  so  comparing  *ptr  or  *end
    against *ptr2 MAY match -> strip).


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. # # Let's break this rule - forgive me.
# #======================================== jwieck@debis.com (Jan
Wieck) #
1998-08-11 18:38:07 +00:00
Bruce Momjian c6dd1e63a9 This one cleans the cursor problems ecpg had so far. It is now able
to understand cursors with variables.

Michael
1998-08-11 18:33:37 +00:00
Bruce Momjian 79c8d2e3a0 Change owner from oid to int4 type. 1998-08-11 18:28:49 +00:00
Bruce Momjian 8ed36c3dba More op_class cleanup. 1998-08-11 14:32:03 +00:00
Bruce Momjian 22cc0e1645 Remove NOBTREE defines, and make findoidlinks handle regproc. 1998-08-11 05:32:46 +00:00
Bruce Momjian 22b370e6ce cleanup. 1998-08-11 05:09:30 +00:00
Bruce Momjian ffb120ecc6 Add new \w write command to psql. 1998-08-10 20:31:42 +00:00
Bruce Momjian 5e490118f8 Update flowchart. 1998-08-10 14:39:45 +00:00
Bruce Momjian 2d13c5f1e2 Update flowchart. 1998-08-10 14:32:46 +00:00
Bruce Momjian 956b91a944 Cleanups of optimizer. 1998-08-10 04:49:39 +00:00
Bruce Momjian 2d32d909b5 Cleanup optimizer function names and clarify code. 1998-08-10 02:26:40 +00:00
Bruce Momjian addddea313 Update pgindent. 1998-08-09 17:57:31 +00:00
Bruce Momjian a08dc16c47 New pgindent. 1998-08-09 04:59:10 +00:00
Bruce Momjian 111b80ce00 cleanups. 1998-08-09 04:17:38 +00:00
Bruce Momjian e6311b4ad0 The attached patch implements some changes that were discussed a
couple weeks ago on the hackers and interfaces lists:

1. When the backend sends a NOTICE message and closes the connection
   (typically, because it was told to by the postmaster after
   another backend coredumped), libpq will now print the notice
   and close the connection cleanly.  Formerly, the frontend app
   would usually terminate ungracefully due to a SIGPIPE.  (I am
   not sure if 6.3.2 behaved that way, but the current cvs sources
   do...)

2. libpq's various printouts to stderr are now fed through a single
   "notice processor" routine, which can be overridden by the
   application to direct notices someplace else.  This should ease
   porting libpq to Windows.

I also noticed and fixed a problem in PQprint: when sending output
to a pager subprocess, it would disable SIGPIPE in case the pager
terminates early (this is good) --- but afterwards it reset SIGPIPE
to SIG_DFL, rather than restoring the application's prior setting
(bad).

			regards, tom lane
1998-08-09 02:59:33 +00:00
Bruce Momjian e46df2ff6e OPTIMIZER_DEBUG additions. 1998-08-07 05:02:32 +00:00
Bruce Momjian af5fde7491 Make large objects their own relkind type. Fix dups in pg_class_mb
files.  Fix sequence creation hack for relkind type.
1998-08-06 05:13:14 +00:00
Bruce Momjian 8962ec4bc4 flowchart update 1998-08-05 19:14:23 +00:00
Bruce Momjian 4f4953152d flowchart update 1998-08-05 19:01:58 +00:00
Bruce Momjian 7260ad7fd9 Fix for \d index display. 1998-08-05 16:23:40 +00:00
Marc G. Fournier a1627a1d64 From: David Hartwig <daybee@bellatlantic.net>
I have attached a patch to allow GROUP BY and/or ORDER BY function or
expressions.  Note worthy items:

1. The expression or function need not be in the target list.
Example:
            SELECT  name FROM foo GROUP BY lower(name);

2.   Simplified the grammar to use expressions only.

3.  Cleaned up earlier patch in this area to make use of existing
utility functions.

3.  Reduced some of the members in the SortGroupBy parse node.   The
original data members were redundant with the new expression node.
(MUST do a "make clean" now)

4.  Added a new parse node "JoinUsing".   The JOIN USING clause was
overloading this SortGroupBy structure.   With the afore mentioned
reduction of members, the two clauses lost all their commonality.

5.  A bug still exist where, if a function or expression is GROUPed BY,
and an aggregate function does not include a attribute from the
expression or function, the backend crashes.   (or something like
that)   The bug pre-dates this patch.    Example:

    SELECT lower(a) AS lowcase, count(b) FROM foo GROUP BY lowcase;
                 *** BOOM  ***

    --Also when not in target list
    SELECT  count(b) FROM foo GROUP BY lower(a);
                *** BOOM  AGAIN ***
1998-08-05 04:49:19 +00:00
Marc G. Fournier 186aeb1d67 From: Dr. Michael Meskes <meskes@online-club.de>
So this should finally get cursors working. There was an ugly bug in it.
1998-08-05 04:47:54 +00:00
Bruce Momjian 1c9a125096 OR processing cleanup. 1998-08-04 18:42:39 +00:00
Bruce Momjian f26e1d39be Add Indices display to \d command. 1998-08-04 18:29:41 +00:00
Bruce Momjian 0b44238841 Fix encoding grammer problem. 1998-08-04 17:37:48 +00:00
Bruce Momjian d9be0ff432 MergeSort was sometimes called mergejoin and was confusing. Now
it is now only mergejoin.
1998-08-04 16:44:31 +00:00
Bruce Momjian 7db9ea5c1e EXPLAIN VERBOSE prints the plan, and now pretty-prints the plan to
the postmaster log file.
1998-08-04 15:00:28 +00:00
Bruce Momjian f71b671bd5 Make EXPLAIN show output more clearly. 1998-08-04 04:50:15 +00:00
Bruce Momjian c8b42a6151 Update flow chart. 1998-08-04 00:42:14 +00:00
Bruce Momjian 439a2af0bc Update mark/reset index code for multiple indexes, (OR code).
Thanks for Vadim for fixes.
1998-08-03 19:41:35 +00:00
Bruce Momjian 21ad8695ca Fix typo in man pages. 1998-08-03 05:54:30 +00:00
Bruce Momjian b88e9784b6 Cleanup of OR processing. 1998-08-03 05:49:24 +00:00
Thomas G. Lockhart 7665e7b0a8 Allows the following query to succeed: "SELECT NULL ORDER BY 1;"
There are three or four cases in transformSortClause() and I had fixed
only one case for UNION. A second case is now fixed, in the same way; I
assigned INT4OID to the column type for the "won't actually happen"
sort. Didn't want to skip the code entirely, since the backend needs to
_try_ a sort to get the NULLs right. I'm not certain under what
circumstances the other cases are invoked and these are not yet
fixed up, though perhaps they don't need to be...
1998-08-02 13:34:26 +00:00
Bruce Momjian 39844ac2c3 Fix for OR handling with multiple indexes. 1998-08-02 07:10:38 +00:00
Bruce Momjian 34aecb3557 run autoconf 1998-08-02 00:34:05 +00:00
Bruce Momjian b942928bd1 Fix MULTIBYTE typo. 1998-08-02 00:21:39 +00:00
Bruce Momjian 77cce4e278 Fix duplicate inside initdb.sh 1998-08-01 22:57:41 +00:00
Bruce Momjian 2c6b370e64 Cleanup of OR fix. 1998-08-01 22:44:55 +00:00
Bruce Momjian 0a2e5cdfc9 Allow index use with OR clauses. 1998-08-01 22:12:13 +00:00
Marc G. Fournier 0668aa8817 Adrian Hall reported a problem to me that snprintf() doesn't exist in, at
least, Solaris 2.5.1.  We use it in backend/utils/adt/int8.c.

Add a check to configure so that we see if it exists or not, and, if not,
compile in snprintf.c from backend/port, which was taken from, and falls under
the same Berkeley license as us, the FreeBSD libc/stdio ...
1998-08-01 19:30:29 +00:00
Vadim B. Mikheev 0d78e8c112 Lmgr cleanup, new locking modes for LLL. 1998-08-01 15:26:38 +00:00
Vadim B. Mikheev 83d3626b1f Matching clauses to functional indices was broken, now fixed. 1998-07-31 15:10:40 +00:00
Vadim B. Mikheev f73fc6eb29 Fix scan adjustment. 1998-07-30 05:05:05 +00:00
Vadim B. Mikheev be8300b18f Use Snapshot in heap access methods. 1998-07-27 19:38:40 +00:00
Marc G. Fournier f7f989c990 Missed a few files in the last round of commits from Tatsuo, as well
as needed to run autoconf ...
1998-07-27 03:21:58 +00:00
Marc G. Fournier 5979d73841 From: t-ishii@sra.co.jp
As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).
1998-07-26 04:31:41 +00:00
Marc G. Fournier 74b30a3a1f I missed addding initdb.sh ... 1998-07-26 04:22:42 +00:00
Bruce Momjian e05aa52a55 Update flowchart. Add arrow. 1998-07-26 02:17:55 +00:00
Bruce Momjian 01a651aaf9 Fix compile error. Make transaction/work optional on all transaction
statements.  More cleanups of psql help.  Fix for shift/reduce on
UNION in subselect.
1998-07-26 01:18:09 +00:00
Bruce Momjian d8d0aa019b Update psql help syntax to remove <> and uppercaese keywords. 1998-07-25 00:17:30 +00:00
Bruce Momjian 8e2647a145 Add mention of actual SQL command to create*/destroy* commands. 1998-07-24 16:44:04 +00:00
Bruce Momjian 22616fdc5d Add mention of SQL commands to create/destroy man pages. 1998-07-24 16:36:56 +00:00
Bruce Momjian 253a294e9f Add mention of psql and template1 to create*, destroy* command
manual pages.
1998-07-24 16:10:19 +00:00
Bruce Momjian 809fc91fdd Fix HAVING patch missing cast. 1998-07-24 15:54:10 +00:00
Bruce Momjian 128d827d4b I'm sorry, but I think I introduced a little bug with my last patch.
Everyone using an [NOT] EXISTS subquery will have noticed that
already.

The bug is in "subselect.c" in the function "SS_process_sublinks()".

Here the whole function as it *SHOULD BE*:

Stephan
1998-07-24 04:03:10 +00:00
Marc G. Fournier bf00bbb0c4 I really hope that I haven't missed anything in this one...
From: t-ishii@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.
1998-07-24 03:32:46 +00:00
Byron Nikolaidis 6e66468f3a Version 06-30-0248 1998-07-22 23:47:48 +00:00
Vadim B. Mikheev 2a67742412 Fix _lo_commit: core if LO memmory context was not created (LO were not used?) 1998-07-22 05:48:59 +00:00
Vadim B. Mikheev 5afe171443 VariableCache (next XID generator) is placed in shmem. 1998-07-21 06:17:39 +00:00
Bruce Momjian 224a62c5b7 Update. 1998-07-21 04:48:31 +00:00
Bruce Momjian 7f61f8a71f Update. 1998-07-21 04:19:44 +00:00
Bruce Momjian e0058b6172 Theses buffer leaks are caused by indexes that are kept open between
calls. Outside a transaction, the backend detects them as buffer
leaks; it sends a NOTICE, and frees them. This sometimes cause a
segmentation fault (at least on Linux). These indexes are initialized
on the first lo_read/lo_write/lo_tell call, and (normally) closed
on a lo_close call.  Thus the buffer leaks appear when lo direct
access functions are used, and not with lo_import/lo_export functions
(libpq version calls lo_close before ending the command, and the
backend version uses another path).

The included patches (against recent snapshot, and against 6.3.2)
cause indexes to be closed on transaction end (that is on explicit
'END' statment, or on command termination outside trasaction blocks),
thus preventing the buffer leaks while increasing performance inside
transactions. Some (all?) 'classic' memory leaks are also removed.

I hope it will be ok.

--- Pascal ANDRE, graduated from Ecole Centrale Paris andre@via.ecp.fr
1998-07-21 04:17:30 +00:00
Bruce Momjian 7702d7aa4b target list fixes. 1998-07-20 21:18:35 +00:00
Bruce Momjian 1d00134be4 makeTargetEntry cleanup. 1998-07-20 20:48:54 +00:00
Bruce Momjian 61700b4089 Makefile removal of internal.c. 1998-07-20 20:01:48 +00:00
Bruce Momjian 3dd2eabc53 Cleanup makeTargetEntry and remove internal.c. 1998-07-20 19:53:53 +00:00
Bruce Momjian 97ac8f7ffc Use defines rather than constants for types. 1998-07-20 19:21:45 +00:00
Bruce Momjian db48f7a153 Fix problem brought in with 32K machine. 1998-07-20 17:45:49 +00:00
Bruce Momjian 0da6358f37 Cleanup use of 16 that should be NAMEDATALEN. 1998-07-20 16:57:18 +00:00
Bruce Momjian 34797d4225 Cleanup Name usage. 1998-07-20 16:14:18 +00:00
Bruce Momjian 7193719b4f Fix temp name length. 1998-07-20 11:28:12 +00:00
Bruce Momjian aabdd3094c Remove un-needed references to Name. 1998-07-20 11:17:11 +00:00
Bruce Momjian a6ca652508 Update version. 1998-07-20 10:01:51 +00:00
Bruce Momjian aac163336f Remove unneeded strcpy() of timezone. 1998-07-19 10:08:15 +00:00
Bruce Momjian 4e6eb4aca1 Remove un-needed psort close. 1998-07-19 10:05:19 +00:00
Bruce Momjian a292ed243a Lock fix from Tom Ivar Helbekkmo . 1998-07-19 09:44:36 +00:00
Bruce Momjian 460b20a43f 1) Queries using the having clause on base tables should work well
now. Here some tested features, (examples included in the patch):

1.1) Subselects in the having clause 1.2) Double nested subselects
1.3) Subselects used in the where clause and in the having clause
     simultaneously 1.4) Union Selects using having 1.5) Indexes
on the base relations are used correctly 1.6) Unallowed Queries
are prevented (e.g. qualifications in the
     having clause that belong to the where clause) 1.7) Insert
into as select

2) Queries using the having clause on view relations also work
   but there are some restrictions:

2.1) Create View as Select ... Having ...; using base tables in
the select 2.1.1) The Query rewrite system:

2.1.2) Why are only simple queries allowed against a view from 2.1)
? 2.2) Select ... from testview1, testview2, ... having...; 3) Bug
in ExecMergeJoin ??


Regards Stefan
1998-07-19 05:49:26 +00:00
Bruce Momjian 916710fc91 pg_dump -z has gotten rather thoroughly broken in the last couple
of days --- it was emitting stuff like
	REVOKE ALL on 'table' from PUBLIC; GRANT ALL on "table" to
	"Public"; neither of which work.  While I was at it I
cleaned up a few other things:

* \connect commands are issued only in -z mode.  In this way,
reloading a pg_dump script made without -z will generate a simple
database wholly owned by the invoking user, rather than a mishmash
of tables owned by various people but lacking in access rights.
(Analogy: cp versus cp -p.)

* \connect commands are issued just before COPY FROM stdin commands;
without this, reloading a database containing non-world-writable
tables tended to fail because the COPY was not necessarily attempted
as the table owner.

* Redundant \connect commands are suppressed (each one costs a
backend launch, so...).

* Man page updated (-z wasn't ever documented).

The first two items were discussed in a pgsql-hackers thread around
6 May 98 ("An item for the TODO list: pg_dump and multiple table
owners") but no one had bothered to deal with 'em yet.

			regards, tom lane
1998-07-19 05:24:51 +00:00
Bruce Momjian b41468dad2 Make sparc/solaris not use complex macr. 1998-07-19 05:02:51 +00:00
Bruce Momjian cf21d71a14 Attached are the three patches that were needed to get PostgreSQL
6.3.2 to compile (and run) on my Sparc Solaris 2.5.1 box. Details
below:

	pgsql.sparc.patch-template: Adds -D__sparc__ and -D__sun__,
defintions which gcc does define, but Sun's cc does not. :(
	pgsql.sparc.patch-makefile: Adds a define so that 'lorder'
	is not used, as it is not found on my machine.


Ryan Kirkpatrick
1998-07-19 04:30:04 +00:00
Bruce Momjian 0624f3dcbd My mailer munged the intro text in my last post. Here is the text
in a more readable form.  -- I am submitting the following patches
to the June 6, 1998 snapshot of PostgreSQL.  These patches implement
a port of PostgreSQL to SCO UnixWare 7, and updates the Univel port
(UnixWare 2.x).  The patched files, and the reason
 for the patch are:

File            Reason for the patch ---------------
---------------------------------------------------------------
src/backend/port/dynloader/unixware.c src/backend/port/dynloader/unixware.h
src/include/port/unixware.h src/makefiles/Makefile.unixware
src/template/unixware
		Created for the UNIXWARE port.

src/include/port/univel.h
		Modifed this file to work with the changes made to
		s_lock.[ch].

src/backend/storage/buffer/s_lock.c src/include/storage/s_lock.h
		Moved the UNIXWARE (and Univel) tas() function from
		s_lock.c to s_lock.h.  The UnixWare compiler asm
		construct is treated as a macro and needs to be in
		the s_lock.h file.  I also reworked the tas()
		function to correct some errors in the code.

src/include/version.h.in
		The use of the ## operator with quoted strings in
		the VERSION macro caused problems with the UnixWare
		C compiler.  I removed the ## operators since they
		were not needed in this case.  The macro expands
		into a sequence of quoted strings that will be
		concatenated by any ANSI C compiler.

src/config.guess
		This script was modified to recognize SCO UnixWare
		7.

src/configure src/configure.in
		The configure script was modified to recognize SCO
		UnixWare 7.

Billy G. Allie
1998-07-19 04:17:13 +00:00
Bruce Momjian 5b4ca67147 Conditionally execute Junk filter only when ORDER BY of columns
not in target list.
1998-07-19 03:46:29 +00:00
Bruce Momjian 62cd6e7b75 Somewhere between 6.1 and 6.3 someone removed the support for the
NS32K machine I contributed.  In any case, I now have postgresql-6.3
running again on NetBSD/pc532, a NS32532 machine.  The following
changes are needed relative to the src directory.  (It looks like
support was partially removed when the files were moved from the
src/backend/storage/.... tree to the src/include tree.)

If you need me to get a current development version of postgresql
for this change let me know.  Also, let me know if this code needs
updating due to another code movement that deleted the old NS32K
support.

Thank you.

Phil Nelson
1998-07-19 01:19:54 +00:00
Bruce Momjian 8ae23e1305 Add DISABLE_COMPLEX_MACRO to sco. 1998-07-19 01:11:01 +00:00
Bruce Momjian 7b2b779a2a Add auto-size to screen to \d? commands. Use UNION to show all
\d? results in one query. Add \d? field search feature.  Rename MB
to MULTIBYTE.
1998-07-18 18:34:34 +00:00
Bruce Momjian 550f209797 Move common lock code to their own section. 1998-07-18 14:58:58 +00:00
Bruce Momjian a93f397423 On architectures where we don't have any special inline code for
GCC, the inner "#if defined(__GNUC__)" can just be omitted in that
architecture's block.

The existing arrangement with an outer "#if defined(__GNUC__)"
doesn't have any obvious benefit, and it encourages missed cases
like this one.


BTW, I'd suggest making the definition of clear_lock for HPUX be

static const slock_t clear_lock = {{-1, -1, -1, -1}};

The extra braces are needed to suppress warnings from gcc, and
declaring it const just seems like good practice.

			regards, tom lane
1998-07-18 14:51:10 +00:00
Bruce Momjian b47466482f Thank you for testing and reporting this. It is my fault of course,
but as I don't have access to a sparc for testing I just did what
I could. I am guessing here, but please apply the following to your
pgsql and let me know what happens. Also, cd to src/storage/buffer
and do 'make s_lock_test' as well.

David Gould
1998-07-18 14:38:12 +00:00
Bruce Momjian 584f9438ca Rename Rel to RelOptInfo. 1998-07-18 04:22:52 +00:00
Bruce Momjian 3a132e9d83 update 1998-07-17 18:19:31 +00:00
Bruce Momjian 96f5323bcd Remove monitor mention and add psql. 1998-07-16 15:54:39 +00:00
Bruce Momjian e2bc275657 Fix for Group ReScan suggested by Vadim. 1998-07-16 02:58:09 +00:00
Bruce Momjian 4f807be2ad Patch for ReScan of Group. 1998-07-16 01:49:19 +00:00
Bruce Momjian c1f1a2e03a Allow UNION/UNION ALL in subselects. 1998-07-15 22:16:21 +00:00
Bruce Momjian 2077ce123b Fix for COPY problem and atttypmod. 1998-07-15 18:53:40 +00:00
Bruce Momjian 36549074a3 Update word. 1998-07-15 17:34:06 +00:00
Bruce Momjian 866a527163 Add PGUSER to man page. 1998-07-15 17:08:23 +00:00
Bruce Momjian 86883aec4f Allow UNION in subselect. 1998-07-15 15:56:36 +00:00
Bruce Momjian 9e964f90fb Fix explain for union and inheritance. Rename Append structure
members to be clearer.  Fix cost computation for these.
1998-07-15 14:54:39 +00:00
Thomas G. Lockhart 9fdbbdc877 Fix for UNION selects with constant NULL expressions; e.g.
SELECT 1 UNION SELECT NULL;
1998-07-14 03:51:42 +00:00
Bruce Momjian 0acc52ae91 utoconf 1998-07-14 03:02:53 +00:00
Bruce Momjian 36b03601c3 Update for hpux and rint 1998-07-14 02:58:59 +00:00
Bruce Momjian e36f96e42a More updates for typmod int32 change. From Tom Lane. 1998-07-14 02:41:26 +00:00
Bruce Momjian 3600fd320f Major man page update from Tom Lane. c 1998-07-14 01:45:25 +00:00
Bruce Momjian f99dcd6d15 Fix for AS name quotation problem. 1998-07-13 21:27:58 +00:00
Bruce Momjian 976b3862ce Currently, building on any platform that hasn't got getrusage()
requires manual editing of src/backend/port/getrusage.c, because
its substitute version of getrusage is #if'd out.

There is no good reason for that, because configure won't even
include the file into the Makefile unless the platform hasn't got
getrusage.  Furthermore, we only have one working substitute version
of getrusage --- the alleged HPUX syscall-based code doesn't work.
(It causes a coredump because the syscall returns a struct rusage
that's much larger than the stub struct defined in
src/include/rusagestub.h.)  The times()-based emulation works fine
on HPUX, however.

I propose, therefore, that getrusage.c should just unconditionally
compile the times-based version, and rely on configure to include
the file only if needed.  This will be one less manual configuration
step on all platforms that need this code.

Patch attached.

Tom Lane.
1998-07-13 16:39:07 +00:00
Bruce Momjian 5aea4062d6 Inline function, rename libpq variablees, change lrel to lockrel. 1998-07-13 16:35:04 +00:00
Bruce Momjian 8bac4ca87b Rename libpq to use more normal field names. 1998-07-13 02:41:59 +00:00
Bruce Momjian 6ce9c76b0a Fix libpq because it was reading from the backend as a short. 1998-07-13 00:01:45 +00:00
Bruce Momjian dc189183eb removed unneeded long spec on constants. 1998-07-12 23:41:19 +00:00
Bruce Momjian 683f399391 Change atttypmod from int16 to int32, for Thomas. 1998-07-12 21:29:40 +00:00
Bruce Momjian 647bbfb086 Fix distclean in libpq++. 1998-07-12 19:20:45 +00:00
Bruce Momjian cfef73b4c0 Update linux_i386 fix. 1998-07-12 18:48:08 +00:00
Bruce Momjian 37273977cb add mention of DISTINCT ON attrN 1998-07-12 04:49:47 +00:00
Bruce Momjian 76dd88f10b Reverse out unused patch. 1998-07-12 04:43:28 +00:00
Bruce Momjian 2a8996f631 Print relation name before vacuum, results after vacuum. 1998-07-12 04:37:55 +00:00
Thomas G. Lockhart fdcab1dbcb Moved to select_implicit.out. 1998-07-11 12:46:20 +00:00
Bruce Momjian da9db56930 change <CODE> to <I>. 1998-07-09 17:59:49 +00:00
Bruce Momjian b992bb457d update 1998-07-09 15:45:00 +00:00
Bruce Momjian db82332bdc Fix for views that use AS with two words. 1998-07-09 14:59:27 +00:00
Thomas G. Lockhart fa2a1d7d52 Handle case of GROUP BY target list column number out of range. 1998-07-09 14:34:05 +00:00
Thomas G. Lockhart a3c9cce930 "select_implicit" is renamed from "junkfilter" test.
Move from last test in list up to other "select_xxx" tests.
1998-07-09 14:32:58 +00:00
Thomas G. Lockhart 511b368f97 Renamed from "junkfilter" test. 1998-07-09 14:32:14 +00:00
Marc G. Fournier 3a3c1b85a3 From: Tom Lane <tgl@sss.pgh.pa.us>
I see someone missed an ancient bit of shell-scripting lore:
on some older shells, if your script's argument list is empty,
then "$@" generates an empty-string word rather than no word
at all.  You need to write ${1+"$@"} to get the latter behavior.
(Read your shell man page to see exactly how that works,
but it does the Right Thing on every Bourne shell.)

In particular, pg_dumpall fails when invoked without any switches
on HPUX 9.*, because pg_dump gets an empty-string argument that it
thinks is the name of the database to dump.  I expect this bug
also affects some other OSes, but couldn't tell you just which ones.
Patch attached.
1998-07-09 03:35:39 +00:00
Marc G. Fournier bd029bcb4a From: Tom Lane <tgl@sss.pgh.pa.us>
The attached patches respond to discussion that was on pgsql-hackers
around the beginning of June (see thread "libpgtcl bug (and symptomatic
treatment)").  The changes are:

1. Remove code in connectDB that throws away the password after making
a connection.  This doesn't really add much security IMHO --- a bad guy
with access to your client's address space can likely extract the
password anyway, to say nothing of what he might do directly.  And
there's the serious shortcoming that it prevents PQreset() from working
if the database requires a password.

2. Fix coredump problem: fe_sendauth did not guard against being handed
a NULL password pointer.  (This is the proximate cause of the coredump-
during-PQreset problem that Magosanyi Arpad complained of last month.)

3. Remove highly questionable "error recovery" logic in libpgtcl's
pg_exec statement.

I believe the consensus of the discussion last month was in favor of
#1 and #3, but I'm just now getting around to making the change.
I realized that #2 was a bug in process of looking at the change.
1998-07-09 03:32:10 +00:00
Marc G. Fournier ce812671b1 From: Tom Lane <tgl@sss.pgh.pa.us>
Attached are diffs (from current cvs sources) to bring libpq.sgml
and libpq.3 up to date.

It appears that at various times in the past, people have made edits to
one or the other of these files but not both.  I propagated some changes
from each into the other, but I don't think I caught every
inconsistency.  It'd be real nice if the man pages could be
automatically generated from the SGML...
1998-07-09 03:30:49 +00:00
Marc G. Fournier a0659e3e2c From: Tom Lane <tgl@sss.pgh.pa.us>
Making PQrequestCancel safe to call in a signal handler turned out to be
much easier than I feared.  So here are the diffs.

Some notes:
  * I modified the postmaster's packet "iodone" callback interface to allow
    the callback routine to return a continue-or-drop-connection return
    code; this was necessary to allow the connection to be closed after
    receiving a Cancel, rather than proceeding to launch a new backend...
    Being a neatnik, I also made the iodone proc have a typechecked
    parameter list.
  * I deleted all code I could find that had to do with OOB.
  * I made some edits to ensure that all signals mentioned in the code
    are referred to symbolically not by numbers ("SIGUSR2" not "2").
    I think Bruce may have already done at least some of the same edits;
    I hope that merging these patches is not too painful.
1998-07-09 03:29:11 +00:00
Thomas G. Lockhart 8bf61820f0 Surround table and column names with double-quotes
in generated SQL code to preserve case (SQL92 syntax).
1998-07-08 14:33:19 +00:00
Thomas G. Lockhart e2ba4ee2a8 Include tests for new 8-byte integer.
Include tests for HAVING clause.
1998-07-08 14:31:02 +00:00
Thomas G. Lockhart 5e7beed3eb Include int8_tbl from tests for new 8-byte integer. 1998-07-08 14:30:21 +00:00
Thomas G. Lockhart 4405a85d7f Include tests for new 8-byte integer (minimal).
Include tests for HAVING clause.
1998-07-08 14:29:09 +00:00
Thomas G. Lockhart 33dd5c444f Include int8 as a built-in data type.
Merge "resjunk" handling with automatic type conversion
 when selecting from another column.
1998-07-08 14:18:45 +00:00
Thomas G. Lockhart bad339827e Add int8 8-byte integer type. 1998-07-08 14:10:30 +00:00
Thomas G. Lockhart 0f0d51b858 Add int8 type for 8-byte integers.
Fix OID conflict between "line()" and "version()" by changing version OID.
1998-07-08 14:09:00 +00:00
Thomas G. Lockhart 92ed9294de Allow floating point constants for "def_arg" numeric arguments.
Used in the generic "CREATE xxx" parsing.
Do some automatic type conversion for inserts from other columns.
Previous trouble with "resjunk" regression test remains for now.
1998-07-08 14:04:11 +00:00
Thomas G. Lockhart fa838876e9 Include 8-byte integer type.
At the moment, probably only works for i686/gcc and Alphas...
1998-07-08 13:57:05 +00:00
Bruce Momjian febe53d813 Rename signal to SIGHUP. 1998-07-07 22:00:31 +00:00
Marc G. Fournier b27af0d94a From: "Dr. Michael Meskes" <meskes@online-club.de>
My first try at libpq. This one enables the two styles we agreed upon for
database descriptors.
1998-07-07 18:00:09 +00:00
Marc G. Fournier db921be319 From: "Dr. Michael Meskes" <meskes@online-club.de>
+ Thu Jul  2 20:30:14 CEST 1998
+
+       - Changed new style db name to allow connection types "tcp" and
+         "unix" only
+
+ Tue Jul  7 15:14:14 CEST 1998
+
+       - Fixed some bugs in preproc.y
+       - Set version to 2.3.4
1998-07-07 17:59:32 +00:00
Bruce Momjian f8a4746208 Patches HPUX applied for Tom Lane. 1998-07-06 20:28:09 +00:00
Bruce Momjian 824c6865fa Update lock manager README. 1998-07-06 18:16:07 +00:00
Bruce Momjian 1a2aee2d73 Add PQsetdbLogin() and cleanup. 1998-07-04 17:50:04 +00:00
Bruce Momjian 05f9966183 Update layout 1998-07-03 19:30:40 +00:00
Bruce Momjian 3909e4d23a Update flow chart 1998-07-03 19:17:22 +00:00
Bruce Momjian 9f9644d01d win32 cleanup 1998-07-03 04:29:04 +00:00
Bruce Momjian c765b4b052 Hello!
Through some minor changes, I have been able to compile the libpq
client libraries on the Win32 platform. Since the libpq communications
part has been rewritten, this has become much easier. Enclosed is
a patch that will allow at least Microsoft Visual C++ to compile
libpq into both a static and a dynamic library.  I will take a look
at porting the psql frontend as well, but I figured it was a good
idea to send in these patches first - so no major changes are done
to the files before it gets applied (if it does).

Regards,
  Magnus Hagander
1998-07-03 04:24:16 +00:00
Bruce Momjian d5283ccd3e Rename shared memory area. 1998-06-30 19:09:57 +00:00
Bruce Momjian 34d595729a update 1998-06-30 04:35:34 +00:00
Bruce Momjian 2584029e31 Rename locking structure names to be clearer. Add narrative to
backend flowchart.
1998-06-30 02:33:34 +00:00
Bruce Momjian f21fa6a773 Rename lockt to locktype and rename LOCKT to LOCKTYPE. 1998-06-28 21:17:36 +00:00
Bruce Momjian cff7e20467 update 1998-06-28 18:59:26 +00:00
Bruce Momjian b15e7df8c9 backend update. 1998-06-28 16:35:41 +00:00
Bruce Momjian 8986e609ab Update flowchart and backend descriptions. 1998-06-28 15:00:28 +00:00
Bruce Momjian 0cba552301 Update backend flowchart. 1998-06-28 06:17:14 +00:00
Bruce Momjian 54aabaa800 Rename BindingTable to ShmemIndex. 1998-06-27 15:47:48 +00:00
Bruce Momjian 7487a82667 More cleanups for compiler warnings. 1998-06-27 14:06:41 +00:00
Bruce Momjian 48a94aaf51 Rename proc_exit_clear to on_exit_reset. 1998-06-27 13:24:21 +00:00
Bruce Momjian e747c58718 Fix for hang after postmaster restart. Add new proc_exit and
shmem_exit to replace exitpg().
1998-06-27 04:53:49 +00:00
Bruce Momjian 8fa93b016a Rename Lockm to Locks. 1998-06-26 19:57:50 +00:00
Bruce Momjian ae6a658584 Rename LockTab to LockTable in function name. 1998-06-26 01:58:46 +00:00
Bruce Momjian eef15f555b Rename BindingTab to BindingTable. 1998-06-25 14:24:35 +00:00
Bruce Momjian a8376c1c84 cleanup 1998-06-24 13:21:30 +00:00
Bruce Momjian f391dcd0bf regenerate manual page list. 1998-06-24 13:05:01 +00:00
Bruce Momjian f9b9a30b7a manual cleanup 1998-06-24 13:01:26 +00:00
Bruce Momjian a726204908 Add another underscore to manual page name. 1998-06-24 12:52:47 +00:00
Bruce Momjian 898b3e6f6c Back out some changes I made just for testing. 1998-06-23 17:59:54 +00:00
Bruce Momjian 9dde6b3de9 Add underscores in manual references. 1998-06-23 17:52:38 +00:00
Bruce Momjian cfef6ef4ff cleanups 1998-06-23 16:04:46 +00:00
Bruce Momjian a1a6fd736f Remove mention of monitor in manual pages. 1998-06-23 15:43:19 +00:00
Bruce Momjian cba0c6559a rename MAIN_MEMORY to STABLE_MEMORY_STORAGE 1998-06-23 15:35:48 +00:00
Bruce Momjian 62b124b4ee new linux_ppc port. 1998-06-22 02:04:29 +00:00
Bruce Momjian 8bad4e23a8 Remove un-needed include files. 1998-06-21 16:39:11 +00:00
Bruce Momjian 9eb0afd0ad Fixup for asserts. 1998-06-20 04:34:31 +00:00
Bruce Momjian 454913c19a Remove -c option for Constraint syntax so we us it by default. 1998-06-20 02:49:38 +00:00
Marc G. Fournier 5fdefbc7ef From: t-ishii@sra.co.jp
As mentioned around line 1153 in backend/commands/copy.c, the method
of array checking is not perfect.

test=> create table t1 (i text);
test=> insert into t1 values('{\\.}');
INSERT 2645600 1
test=> select * from t1;
i
-----
{\\.}
(2 rows)
test=> copy t1 to '/tmp/aaa';
test=> copy t1 from '/tmp/aaa';
ERROR:  CopyReadAttribute - end of record marker corrupted

Copy cannot read data produced by itself!
1998-06-19 11:40:46 +00:00
Bruce Momjian 7a7770e682 Port name cleanup 1998-06-19 03:23:41 +00:00
Bruce Momjian 8ed5918faa Solaris cleanup. 1998-06-19 02:55:19 +00:00
Bruce Momjian da1ac9ad25 autocoinf 1998-06-18 16:38:59 +00:00
Bruce Momjian 7ebae4c096 Add SLEEP_ON_ABORT 1998-06-18 16:35:38 +00:00
Bruce Momjian a4834243ad port name cleanup 1998-06-18 16:32:51 +00:00
Bruce Momjian 4d96f02394 Update .similar file for new template names. 1998-06-18 04:29:53 +00:00
Bruce Momjian c711d41752 Add Assert(). 1998-06-18 04:20:34 +00:00
Bruce Momjian 6ab714e3e8 Cleanup UsePrivateMemory define. 1998-06-18 03:56:08 +00:00
Bruce Momjian 94cc3abe60 Cleanups. 1998-06-18 03:44:00 +00:00
Bruce Momjian c6f18c260d goodbye vfork. 1998-06-17 23:01:58 +00:00
Bruce Momjian 232dea3188 cleanup 1998-06-17 22:59:26 +00:00
Byron Nikolaidis a80771f0a7 Update to v.0246 1998-06-16 21:29:19 +00:00
Bruce Momjian 6e771e8dc2 Add files to be updated for release. 1998-06-16 17:04:31 +00:00
Bruce Momjian e0ca37bdf6 More mb patches. 1998-06-16 07:38:20 +00:00
Bruce Momjian cb7cbc16fa Hi, here are the patches to enhance existing MB handling. This time
I have implemented a framework of encoding translation between the
backend and the frontend. Also I have added a new variable setting
command:

SET CLIENT_ENCODING TO 'encoding';

Other features include:
	Latin1 support more 8 bit cleaness

See doc/README.mb for more details. Note that the pacthes are
against May 30 snapshot.

Tatsuo Ishii
1998-06-16 07:29:54 +00:00
Bruce Momjian 0d8e7f6381 Here is the long awaited optimized version of the S_LOCK patch.
This incorporates all the precedeing patches and emailed suggestions
and the results of the performance testing I posted last week. I
would like to get this tested on as many platforms as possible so
I can verify it went in correctly (as opposed to the horrorshow
last time I sent in a patch).

Once this is confirmed, I will make a tarball of files that can be
dropped into a 6.3.2 source tree as a few people have asked for
this in 6.3.2 as well.

David Gould
1998-06-16 07:18:16 +00:00
Bruce Momjian d6e0ee6bcb Added missing file. 1998-06-16 06:57:27 +00:00
Bruce Momjian 0f356be054 large object fix 1998-06-16 06:53:27 +00:00
Bruce Momjian 32eef5ad1e I've hacked up pg_dump so that it generates CONSTRAINT and CHECK
syntax that can be read back in with psql.  I did this by adding
a
 "-c" switch that controls moving the CONTSTRAINT statements inside
the CREATE TABLE statements and adding () around the CHECK arguments.
Here's diffs against the 6.3.2 version of pg_dump.c.

ccb
1998-06-16 06:52:15 +00:00
Bruce Momjian 8d8bcda253 Hello!
Attached to the mail is locale-patch.tar.gz. In the archive
   there are:

file README.locale
   short description

directory src/test/locale
   test suite; currently only koi8-r tests, but the suite can be
   easily extended

file locale.patch
   the very patch; to apply: patch < locale.patch; should be applied
   to postgres-6.3.2 (at least I created it with 6.3.2 without any
additional
   patches)

   Files touched by the patch:  src/include/utils/builtins.h
src/backend/utils/adt/char.c src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c

Oleg
1998-06-16 06:42:02 +00:00
Bruce Momjian 67a636918a There is a patch which has worked for me. The real problem might
be in PQreset, which can't reset a conninfo based connection. The
patch:

Arpad Magosanyi
1998-06-16 05:50:55 +00:00
Bruce Momjian 583891833f The attached patch modifies libpgtcl per previous discussion: the
pg_notifies statement is eliminated, and callbacks defined by
pg_listen are instead invoked automatically from the Tcl idle loop
whenever a NOTIFY message is received.

I have done only cursory testing, so there may be problems still
lurking (particularly on non-Unix machines?).  But it seems to
work.

Patch is against today's cvs sources.  Note that this will not work
with the 6.3.2 release since it depends on the new libpq.

The diffs are a bit large so I've gzipped them.  A patch to update
libpgtcl.sgml is included too.

			regards, tom lane
1998-06-16 04:10:17 +00:00
Bruce Momjian 693b156a70 Add flag for linux-alpha. 1998-06-16 04:04:00 +00:00
Bruce Momjian b4672e29df autoconf 1998-06-16 03:33:31 +00:00
Bruce Momjian 916cb38431 Here are two patches to fix up the c++ (and c) support in the
configuration system.  The idea is to make the configure arguments
that specify compilers to be compatible with the other --with
options.  The main point, though, is that the c++ support is on by
default, but can easily be disabled by the --without-CXX option
for those few(?) that don't want it.

Brook Milligan
1998-06-16 03:28:58 +00:00
Bruce Momjian 26d5a31dbf Add bsdi shared library support. 1998-06-16 03:17:47 +00:00
Bruce Momjian 3408635471 Remove time travel reference. 1998-06-16 03:03:03 +00:00
Bruce Momjian fce7556d33 Change error message and remove non-functional update message, from
Vadim.
1998-06-16 02:53:26 +00:00
Bruce Momjian a0f95aceb4 Fix portname defines in Makefiles. 1998-06-15 21:01:54 +00:00
Bruce Momjian 56bdbe1f4c Add remove extra braces code to pgindent. 1998-06-15 20:45:57 +00:00
Bruce Momjian 6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian 27db9ecd0b Fix macros that were not properly surrounded by parens or braces. 1998-06-15 18:40:05 +00:00
Bruce Momjian 3af536a15b RelationForgetRelation not needed in heap_destroy().
Vadim.
1998-06-14 13:31:07 +00:00
Bruce Momjian b52c666a99 Make new DISABLE_COMPLEX_MACRO for compilers that can't handle our
macros.
1998-06-14 01:34:07 +00:00
Bruce Momjian bedfe275cc Make lo_unlink take oid param, not int4. 1998-06-13 20:27:10 +00:00
Bruce Momjian 1e88d82462 Fix problem with table drop after rollback of transaction, no flush
of index tuples.  Thanks to Vadim for fix.
1998-06-13 20:22:54 +00:00
Bruce Momjian d3d541996b Cleanup of 'sameuser' patch. 1998-06-13 05:14:56 +00:00
Bruce Momjian 3f372ee6b3 > I needed to do that for the web database that I'm setting up. We
have > 20000 users and each (potentially) needs a separate database
which is > only accessible to them. Rather than having 20000 lines
in pg_hba.conf, > I've patched Postgres so that the special token
"sameuser" in the > database field of pg_hba.conf allows access
only to the username which > is connecting.
1998-06-13 04:27:18 +00:00
Bruce Momjian d939f60ca7 template change 1998-06-12 22:42:12 +00:00
Bruce Momjian 6a08857cc8 template changes 1998-06-12 22:26:24 +00:00
Bruce Momjian 8575afa4f1 run autoconf 1998-06-12 18:44:21 +00:00
Bruce Momjian 6f1a50746c Clean up template names and remove LINUX_ELF hack. No longer
needed.
1998-06-12 18:36:42 +00:00
Bruce Momjian be1d4719b4 Now 6.4. 1998-06-09 22:59:04 +00:00
Bruce Momjian 755c00a360 Auto-seed random so user's can't request random values based on
our postmaster random seed used from cancel.
1998-06-09 19:20:59 +00:00
Bruce Momjian 19a95d9742 Fix for exec() removal. 1998-06-09 17:36:28 +00:00
Bruce Momjian a608637768 Another for for exec() removal and finding binaries. 1998-06-09 17:13:06 +00:00
Bruce Momjian cb8539f9be Attached is a patch that fixes these leaks, and does a couple other
things as well:
  * Computes and saves a cancel key for each backend.  * fflush
  before forking, to eliminate double-buffering problems
    between postmaster and backends.

Other cleanups.

Tom Lane
1998-06-09 04:06:12 +00:00
Bruce Momjian 3912b75705 Fixed exec path problem. 1998-06-08 22:28:30 +00:00
Byron Nikolaidis b206958d13 Official V.0244 (missed a file) 1998-06-08 20:55:33 +00:00
Bruce Momjian 0957e08ac3 Show filename on exec failure. 1998-06-08 19:36:40 +00:00
Bruce Momjian 1572800b16 Fix typo. 1998-06-08 19:15:05 +00:00
Byron Nikolaidis 0e708e595e Update driver to official 6.30.0244 release. 1998-06-08 16:15:12 +00:00
Bruce Momjian 556e603b25 Add real random() call to postmaster for use in cancel. 1998-06-08 04:27:59 +00:00
Bruce Momjian b952a8491e Also added two new files.
src/test/regess/sql/junkfilter.sql                --  SQL for
regression test src/test/regess/expected/junkfilter.out      --
Expected output SQL for regression test


David Hartwig
1998-06-05 03:56:03 +00:00
Bruce Momjian 2e6159311a I made several adjustments to my earlier patch to handle the
condition where the target label is ambiguous.
1998-06-05 03:49:20 +00:00
Bruce Momjian a576a60e3f Show backend status on ps command line. Remove unused args from
pg_exec_query().
1998-06-04 17:26:49 +00:00
Byron Nikolaidis 99d21d5b62 Update odbc driver to current version V.0244 1998-06-03 20:33:45 +00:00
Marc G. Fournier 85f91d0e8e From: Peter T Mount <patches@maidast.demon.co.uk>
Bug fixes:

        PreparedStatement.setObject didn't handle short's

        ResultSet.getDate() now handles null dates (returns null rather
        than a NullPointerException)

        ResultSetMetaData.getPrecision() now returns 0 for VARCHAR

New features:

        Field now caches the typename->oid in a Hashtable to speed things
        up. It removes the need for some unnecessary queries to the
        backend.

        PreparedStatement.toString() now returns the sql statement that
        it will send to the backend. Before it did nothing.

        DatabaseMetaData.getTypeInfo() now does something.
1998-06-03 19:43:29 +00:00
Marc G. Fournier 9142e54e73 From: Peter T Mount <patches@maidast.demon.co.uk>
Bug fixes:

        PreparedStatement.setObject didn't handle short's

        ResultSet.getDate() now handles null dates (returns null rather
        than a NullPointerException)

        ResultSetMetaData.getPrecision() now returns 0 for VARCHAR

New features:

        Field now caches the typename->oid in a Hashtable to speed things
        up. It removes the need for some unnecessary queries to the
        backend.

        PreparedStatement.toString() now returns the sql statement that
        it will send to the backend. Before it did nothing.

        DatabaseMetaData.getTypeInfo() now does something.
1998-06-03 18:56:09 +00:00
Marc G. Fournier 2a74511bf4 From: Michael Meskes <meskes@topsystem.de>
+ Wed Jun  3 13:38:57 CEST 1998
+
+       - Made sqlca struct compatible with other systems.
+       - Give back a warning in case of truncation
+       - Changed the handling of OptimizableStmt since the old one broke
+         CREATE RULE
+       - Set library version to 2.3
+       - Set version to 2.3.3
1998-06-03 13:55:15 +00:00
Edmund Mergl 0b09955da8 pgsql no more needs to be installed for perl 1998-06-01 16:50:23 +00:00
Edmund Mergl df58a902f9 adapted Makefile.PL to be build in source tree 1998-06-01 16:41:27 +00:00
Thomas G. Lockhart 345b0f6b99 Rewrite JROUND macro to multiply by 1e6 rather than divide by 1e-6
and vica versa for the next operation.
This is reputed to fix inline math optimization troubles in glibc-2.0.x.
Regression tests still pass on libc/i686 machine.  Patch suggested by Matt.
1998-05-31 17:08:35 +00:00
Bruce Momjian ff84c98a65 cleanup. 1998-05-29 17:10:07 +00:00
Bruce Momjian 212c905e2c Remove fork()/exec() and only do fork(). Small cleanups. 1998-05-29 17:00:34 +00:00
Thomas G. Lockhart 2d4c6cab96 Define new routines oper_exact() and oper_inexact().
Add coerce_target_expr().
1998-05-29 14:07:50 +00:00
Thomas G. Lockhart d2404c17c9 Add func_select_candidate() to allow use in unary operator parsing. 1998-05-29 14:03:08 +00:00
Thomas G. Lockhart 3671cb3a32 Add NAMEOID as built-in type.
Change ordering of IS_BUILTIN_TYPE() macro to optimize lookup.
Make CASH type _not_ equivalent to INT4.
 CASH is passed by reference rather than passed by value.
1998-05-29 14:02:28 +00:00
Thomas G. Lockhart 8536c96261 Do type conversion to match columns in UNION clauses.
Currently force the type to match the _first_ select in the union.
Move oper_select_candidate() from parse_func.c to parse_oper.c.
Throw error inside of oper_inexact() if no match for binary operators.
Check more carefully that types can be coerced
 even if there is only one candidate operator in oper_inexact().
Fix up error messages for more uniform look.
Remove unused code.
Fix up comments.
1998-05-29 14:00:24 +00:00
Thomas G. Lockhart 329083a97e Require #define variable ALLOW_ABSOLUTE_DBPATHS if absolute paths are
allowed to be used for alternate database locations.
Probably best to default to not allowed, as now, since there are security
 and integrity issues which should be considered carefully before
 opening things up.
Will update docs to discuss this issue.
1998-05-29 13:43:14 +00:00
Thomas G. Lockhart 6222292582 Fix up a couple of comments broken by the automatic indenting process. 1998-05-29 13:39:30 +00:00
Thomas G. Lockhart 3984f0eeb2 Add conversion functions between "name" and other string types. 1998-05-29 13:37:29 +00:00
Thomas G. Lockhart 457b6efa43 Add conversion functions to and from the "name" data type. 1998-05-29 13:33:58 +00:00
Thomas G. Lockhart e8cbf3a79c Ensure string is completely null padded on input (as advertised). 1998-05-29 13:31:52 +00:00
Thomas G. Lockhart 5812d51270 Add test for UNION.
Add additional tests in strings for conversions of the "name" data type.
Test SQL92 string functions such as SUBSTRING() and POSITION().
1998-05-29 13:23:02 +00:00
Thomas G. Lockhart 3955d66803 Add test for UNION.
Add additional tests in strings for conversions of the "name" data type.
Test SQL92 string functions such as SUBSTRING() and POSITION().
Fix geometry tests to reflect code fixed by Gautam.
Update error messages.
1998-05-29 13:22:42 +00:00
Bruce Momjian 3af1cc6755 postmaster/postgres options cleanup. 1998-05-27 18:32:05 +00:00
Bruce Momjian b1eb7b5927 Cleanup. 1998-05-26 17:29:07 +00:00
Marc G. Fournier c31a80faf0 From: Michael Meskes <meskes@topsystem.de>
+Wed May 20 10:46:48 CEST 1998
+
+       - Fixed handling of preprocessor directives and variable
+         initialization.
+       - Added enum datatype.
        - Set version to 2.3.2
1998-05-26 13:43:55 +00:00
Bruce Momjian b15b768bfa Fix for drop database and junk filters. 1998-05-26 03:44:07 +00:00
Bruce Momjian e84f8a4656 Fix for postgres started from command line, sends 'Z' protocol
flag.
1998-05-26 03:20:01 +00:00
Bruce Momjian 7bcc2da09f Clean up pg_hba.conf 1998-05-24 17:34:23 +00:00
Marc G. Fournier b2d7c58cb2 1998-05-18 Karl Eichwalder <ke@suse.de>
* configure.in (AC_CHECK_LIB): check for ncurses; if this fails
        check for curses.
1998-05-24 03:54:56 +00:00
Marc G. Fournier e3a4ceac92 From: Brook Milligan <brook@trillium.NMSU.Edu>
Everything (except of course random) passes on my netbsd box except int2,
int4, oidint2, and oidint4; all fail because of error message differences.
Below are some patches to the expectations to correct the problem by creating
*-NetBSD.out files.
1998-05-24 03:52:39 +00:00
Marc G. Fournier eaa1df28bf From: Tom Lane <tgl@sss.pgh.pa.us>
... which causes it to build and install the shared version of
libpgtcl under the wrong name, on HPUX only.  Patch against
today's sources follows.
1998-05-24 03:48:58 +00:00
Bruce Momjian af73db0697 Solaris 5 fix. 1998-05-22 04:48:45 +00:00
Bruce Momjian 9af6bd9962 Move FAQ_DEV to docs directory, where it belongs. 1998-05-22 04:20:53 +00:00
Marc G. Fournier 9f3d63936b From: David Hartwig <daveh@insightdist.com>
Here is a patch to remove the requirement that ORDER/GROUP BY clause
identifiers be included in the target list.
1998-05-21 03:53:51 +00:00
Marc G. Fournier a45341979f From: Michael Meskes <meskes@topsystem.de>
+ Tue May 19 11:49:34 CEST 1998
+
+       - Tested (and fixed) 'set connection'
+       - Fixed string notation in C
+       - Set version to 2.3.2
1998-05-21 03:52:37 +00:00
Bruce Momjian 07140ee024 Allow cancel from client of backend query. Change some int variables
to bool's.
1998-05-19 18:05:58 +00:00
Marc G. Fournier ef567413d2 From: Michael Meskes <meskes@topsystem.de>
+
+ Wed May  6 16:09:45 CEST 1998
+
+       - Some more cleanups in the library.
+
+ Thu May  7 12:34:28 CEST 1998
+
+       - Made CONNECT and DISCONNECT statement more SQL3 compliant.
+       - Changed the API for the ECPGconnect function to be able to handle
+         hostnames and ports
+
+ Fri May  8 13:54:45 CEST 1998
+       - More changes to the parser. The connect statement now allows
+         ORACLE style logins.
+       - db-name is accepted in two ways:
+               - <dbname>[@<server>][:<port>]
+               - esql:postgresql://<server>[:<port>][/<dbname>]
+
+ Mon May 11 10:28:37 CEST 1998
+
+       - Added '? options' to connect call.
+       - Also allow USING as keyword for the password
+
+ Thu May 14 15:09:58 CEST 1998
+
+       - Changed preproc.y and pgc.l according to the parser changes in the
+         backend.
+
+ Fri May 15 09:55:21 CEST 1998
+
+       - Added connection_name handling
+
+
+ Mon May 18 10:33:58 CEST 1998
+
+       - Fixed some more bugs
+       - Set version to 2.3.1
+       - Set library version to 2.2
1998-05-18 16:05:05 +00:00
Bruce Momjian 45878915a8 Another \f\ fix for psql. 1998-05-15 01:57:33 +00:00
Bruce Momjian 683333644d Pass atttypmod to the frontend. 1998-05-14 17:18:14 +00:00
Thomas G. Lockhart ef0747fe5a Remove extraneous -DPARSEDEBUG from CFLAGS options. 1998-05-13 04:54:16 +00:00
Marc G. Fournier 8686b83784 Made a copy of errors with the AC_TRY_RUN() macro...appears to work better
under FreeBSD for DBL_MIN check now...
1998-05-13 04:01:44 +00:00
Marc G. Fournier 9391dd3698 Add a check for DBL_MIN problem...not sure if this is right...needs
testing...
1998-05-13 03:44:48 +00:00
Bruce Momjian 68f9c9819b Remove added NullProc define, and use fmgr.h value from fmgr.h. 1998-05-13 03:44:24 +00:00
Bruce Momjian 2af0d090f1 Fix to allow \f \ to make spaces as delimiter. 1998-05-13 03:27:07 +00:00
Bruce Momjian d020a2835f Remove --disabled options from configure 1998-05-12 23:12:42 +00:00
Bruce Momjian 982c695fbd The attached patch corrects two problems with autoconfiguration of
psql in Postgres 6.3.2.  Both of these problems were complained of
recently in pgsql-questions:

1. In the right circumstances, psql.c will fail to compile due to
trying
   to include a nonexistent <history.h>.  (Thread "Compile-time
   error" around 17 Apr 98.) 2. In other circumstances, psql will
compile but does not provide
   command history capability, even though the underlying readline
   library supports it.  (Various threads, most recently "query
   repetition in psql" around 29 Apr.)

Tom Lane
1998-05-12 23:05:12 +00:00
Bruce Momjian 95aa15f32a Give proper error on psql \copy use. 1998-05-12 23:04:01 +00:00
Bruce Momjian 58fffea03c Cleanups for large objects, so file is trucated on open, fix for
solaris/spare shared libararies, new error message for postmaster
startup, and makefile cleanups.
1998-05-12 21:44:08 +00:00
Bruce Momjian 1b70585d4b Someone remove a #define too much from pg_proc.h which breaks
compiling nbtsearch.c after configuring with --enable-cassert.
Patch below.

-- --------------------------------------------- Göran Thyni,
sysadm, JMS Bildbasen, Kiruna
1998-05-12 17:46:50 +00:00
Bruce Momjian c312583767 Add sys/time.h to fe-misc.c, prevent pgtclsh from using old libaries,
and allow CUSTOM_COPT to appear in compile AND LINK commands.
1998-05-12 15:42:09 +00:00
Thomas G. Lockhart 02a9d7e273 Changed error message slightly. 1998-05-09 23:50:24 +00:00
Thomas G. Lockhart e6a854dc41 Add some more node print routines for debugging only
(inside of #ifdef PARSEDEBUG blocks).
1998-05-09 23:46:35 +00:00
Thomas G. Lockhart 52dd4cfd7c Fix CACHEDEBUG debugging statements; usually not used and apparently
broke a long time ago when some definitions changed.
1998-05-09 23:45:29 +00:00
Thomas G. Lockhart de75f9ef49 Change parameters to func_error(). 1998-05-09 23:43:45 +00:00
Thomas G. Lockhart 3ace5fd082 Add capabilities for automatic type conversion. 1998-05-09 23:31:34 +00:00
Thomas G. Lockhart 54b5577cb6 Add TIMEZONE_HOUR, TIMEZONE_MINUTE keywords per SQL92 specs. 1998-05-09 23:28:49 +00:00
Thomas G. Lockhart cd692f2347 llow more variations on valid floating point numbers (e.g. ".1", "1e6").
Reintroduce fixes for unary minus parsing with leading spaces.
1998-05-09 23:27:39 +00:00
Thomas G. Lockhart f4f0e9d608 Implement TIMEZONE_HOUR, TIMEZONE_MINUTE per SQL92 specs.
Check for and properly ignore FOREIGN KEY column constraints
 (already had fixed same for table constraints).
Define USER as synonym for CURRENT_USER per SQL92 specs
 (no longer allowed as bare column name, sorry).
Re-enable HAVING clause but no fixes elsewhere yet.
Other stuff from today's update of gram.y...
1998-05-09 23:27:14 +00:00
Thomas G. Lockhart 8ff34188f7 Add parse_coerce.c for type conversion handling. 1998-05-09 23:24:27 +00:00
Thomas G. Lockhart ca354d9027 Implement TIMEZONE_HOUR, TIMEZONE_MINUTE per SQL92 specs.
Check for and properly ignore FOREIGN KEY column constraints
 (already had fixed same for table constraints).
Define USER as synonym for CURRENT_USER per SQL92 specs
 (no longer allowed as bare column name, sorry).
Re-enable HAVING clause but no fixes elsewhere yet.
Make "char" type a synonum for "char(1)" (actually implemented as bpchar).
Compress/compact row-style subselect and operator definitions
 (cut out ~140 lines of code with no change in functionality).
Save string type if specified for DEFAULT clause handling.
Enough for now...
1998-05-09 23:22:15 +00:00
Thomas G. Lockhart d4a95fd7ab Allow more variations on valid floating point numbers (e.g. ".1", "1e6").
Reintroduce fixes for unary minus parsing with leading spaces.
1998-05-09 23:15:20 +00:00
Thomas G. Lockhart dc9a9cdfb9 Make lines and support routines/operators more visible.
Add #define's for remaining "builtin" types.
1998-05-09 22:48:37 +00:00
Thomas G. Lockhart cb03826201 Add routines to convert between varchar and bpchar.
Add routines to allow sizing of varchar and bpchar into target columns.
1998-05-09 22:45:14 +00:00
Thomas G. Lockhart 9afe03355a Make lines more visible to the user. 1998-05-09 22:44:38 +00:00
Thomas G. Lockhart 14257ee2c6 Add bit flags to support timezonehour and minute in data retrieval. 1998-05-09 22:43:50 +00:00
Thomas G. Lockhart 70c4c57e42 Make a few line routines visible.
Incorporate patches from Gautam for line/point intersection.
1998-05-09 22:39:55 +00:00
Thomas G. Lockhart 8e602a3cb7 Define "tz_hour" and "tz_minute" arguments to date_part().
Fix up "ISO-style" timespan decoding and encoding.
1998-05-09 22:38:18 +00:00
Bruce Momjian 6ef58461ff Add missing includes. 1998-05-07 16:17:18 +00:00
Bruce Momjian 9527ce3efe Add missing file from Tom Lane. 1998-05-07 14:52:52 +00:00
Bruce Momjian 1c2d9cb637 It seems the regression tests don't cover copy in/out at all, so
code that I had assumed was working had not been tested.  Naturally,
it was broken ...

Tom Lane
1998-05-06 23:53:48 +00:00
Bruce Momjian edbd51395c What I've done:
1. Rewritten libpq to allow asynchronous clients.

2. Implemented client side of cancel protocol in library,
   and patched psql.c to send a cancel request upon SIGINT.  The
   backend doesn't notice it yet :-(

3. Implemented 'Z' protocol message addition and renaming of
   copy in/out start messages.  These are implemented conditionally,
   ie, the client protocol version is checked; so the code should
   still work with 1.0 clients.

4. Revised protocol and libpq sgml documents (don't have an SGML
   compiler, though, so there may be some markup glitches here).


What remains to be done:

1. Implement addition of atttypmod field to RowDescriptor messages.
   The client-side code is there but ifdef'd out.  I have no idea
   what to change on the backend side.  The field should be sent
   only if protocol >= 2.0, of course.

2. Implement backend response to cancel requests received as OOB
   messages.  (This prolly need not be conditional on protocol
   version; just do it if you get SIGURG.)

3. Update libpq.3.  (I'm hoping this can be generated mechanically
   from libpq.sgml... if not, will do it by hand.)  Is there any
   other doco to fix?

4. Update non-libpq interfaces as necessary.  I patched libpgtcl
   so that it would compile, but haven't tested it.  Dunno what
   needs to be done with the other interfaces.

Have at it!

Tom Lane
1998-05-06 23:51:16 +00:00
Bruce Momjian 2e12331d42 Remove extra paren in __alpha so it compiles. 1998-05-06 23:25:19 +00:00
Marc G. Fournier 6bccf64d7b From: Michael Meskes <meskes@topsystem.de>
Tue Apr 28 14:48:41 CEST 1998

      - Put operator "->" back into parser. Note that :foo->bar means the
        C term, but :foo ->bar means the operator "->".

Tue Apr 28 15:49:07 CEST 1998

      - Added exec sql disconnect command.
      - Allow varchar in C to be written in uppercase too.
      - Added whenever option "do break;"

Wed Apr 29 09:17:53 CEST 1998

      - Corrected parsing of C comments.
      - Also allow C++ style comments.
      - Make sure not found is only checked after commands that could
          return it.
      - Added error codes, see ecpgerror.h for details.
      - Added "exec sql <TransactionStmt> release" as disconnect statement
        for compatibility issues.

Thu Apr 30 10:42:10 CEST 1998

      - Added a -t option to disable automatic transaction start.
      - Added sqlerrd[] to sqlca struct.
      - Give back number of tuples affect in sqlca.sqlerrd[2].

Thu Apr 30 13:36:02 CEST 1998

      - Make the return code different in case of different errors.

Wed May  6 11:42:48 CEST 1998

      - Free memory if possible
      - Some bugfixes for bugs I found while changing the memory
          allocation code
      - Now able to fill complete array with one call (see test1.pgc for
          an example)
      - Set version to 2.3.0
      - Set library version to 2.1
1998-05-06 13:03:47 +00:00
Marc G. Fournier f9322c66d3 Missed the __alpha__ to __alpha change...
From: David Gould <dg@illustra.com>
1998-05-04 23:49:17 +00:00
Marc G. Fournier c73e186948 Okay...this should fix the s_lock() patches from David to what he
currently has...

From: David Gould <dg@illustra.com>
1998-05-04 16:58:59 +00:00
Marc G. Fournier 1d36bdcfa6 Major screwed up s_lock patches...need to be fixed... 1998-05-04 15:45:03 +00:00
Bruce Momjian f8b4a25fd7 return to normal values 1998-05-04 02:09:33 +00:00
Bruce Momjian 29c20d498d Fix for missing parens with \g causing psql to get completely
confused.
1998-05-04 02:02:09 +00:00
Bruce Momjian dfb731c273 test 1998-05-01 04:33:58 +00:00
Bruce Momjian c6e484a453 test 1998-05-01 04:31:02 +00:00
Bruce Momjian fc1000f9bb test 1998-05-01 04:28:03 +00:00
Bruce Momjian 745c642597 test 1998-05-01 04:26:52 +00:00
Bruce Momjian 08aa9d304b test 1998-05-01 04:22:24 +00:00
Bruce Momjian f97b679c82 test 1998-05-01 04:19:55 +00:00
Bruce Momjian 0540a19f12 test 1998-05-01 04:18:15 +00:00
Bruce Momjian 404c73bff9 test 1998-05-01 04:15:50 +00:00
Bruce Momjian a20df83df9 test 1998-04-30 14:54:27 +00:00
Bruce Momjian 65b5eb5add No reason to show flags in root error message. 1998-04-30 14:25:13 +00:00
Marc G. Fournier 51a1741cfb From: Jeroen van Vianen <jeroenv@design.nl>
Attached patch will add a version() function to Postges, e.g.

template1=> select version();
version
------------------------------------------------------------
PostgreSQL 6.3.2 on i586-pc-linux-gnu, compiled by gcc 2.8.1
(1 row)
1998-04-29 12:41:29 +00:00
Marc G. Fournier bab9818c4b Missed adding two files from the MultiByte patch... 1998-04-29 12:26:22 +00:00
Marc G. Fournier a9ed49d5b5 From: Oliver Elphick <olly@lfix.co.uk>
If PQfn() receives NOTICEs from the backend, it fails because there is no
provision to deal with them.

This patch (supplied by Anders Hammarquist <iko@netg.se> to me as Debian
maintainer of postgresql) cures the problem:
1998-04-29 02:04:01 +00:00
Bruce Momjian 23c0471007 test 1998-04-29 01:47:40 +00:00
Bruce Momjian ced3333594 test 1998-04-29 01:29:31 +00:00
Bruce Momjian fcfd60fe73 test 1998-04-29 01:21:08 +00:00
Bruce Momjian c1c5b39728 test 1998-04-29 00:56:13 +00:00
Bruce Momjian e8cfd4376d test 1998-04-29 00:28:56 +00:00
Bruce Momjian 4ec54e7aee test 1998-04-29 00:25:42 +00:00
Bruce Momjian 7a6111ee4b test 1998-04-29 00:24:30 +00:00
Bruce Momjian ba77aa5249 test 1998-04-29 00:13:10 +00:00
Bruce Momjian 227bbcc603 test 1998-04-29 00:10:35 +00:00
Bruce Momjian c2cc963d18 test 1998-04-28 21:51:34 +00:00
Bruce Momjian 8a9b784bfa test 1998-04-28 19:50:22 +00:00
Bruce Momjian 89f534e049 test 1998-04-28 19:24:08 +00:00
Bruce Momjian 62eb0e17dc test 1998-04-28 19:20:22 +00:00
Bruce Momjian a987f54955 test 1998-04-28 18:59:46 +00:00
Bruce Momjian d256ca4222 Add cursor name to man page. 1998-04-28 18:39:11 +00:00
Marc G. Fournier f554af0a9f From: t-ishii@sra.co.jp
Hi, here are patches I promised (against 6.3.2):

* character_length(), position(), substring() are now aware of
          multi-byte characters
* add octet_length()
* add --with-mb option to configure
* new regression tests for EUC_KR
  (contributed by "Soonmyung. Hong" <hong@lunaris.hanmesoft.co.kr>)
* add some test cases to the EUC_JP regression test
* fix problem in regress/regress.sh in case of System V
* fix toupper(), tolower() to handle 8bit chars

note that:

o  patches for both configure.in and configure are
included. maybe the one for configure is not necessary.

o pg_proc.h was modified to add octet_length(). I used OIDs
(1374-1379) for that. Please let me know if these numbers are not
appropriate.
1998-04-27 17:10:50 +00:00
Marc G. Fournier 5e202d8586 show the index used in an explain
From: Zeugswetter Andreas SARZ <Andreas.Zeugswetter@telecom.at>
1998-04-27 16:57:09 +00:00
Marc G. Fournier 6d817475b2 From: Tom Lane <tgl@sss.pgh.pa.us>
HP-UX (all versions) requires shared libraries to have execute
permission, and really needs them to be exactly mode 555 for
performance reasons.  The standard configure/install procedure
installs libpq.sl as mode 644, which DOES NOT WORK.

The attached patch modifies the makefiles to distinguish
INSTL_LIB_OPTS (install mode for ordinary libraries) from
INSTL_SHLIB_OPTS (mode for shared libs), and adds a test
to configure to set INSTL_SHLIB_OPTS="-m 555" when on HP-UX.
1998-04-27 14:55:46 +00:00
Marc G. Fournier 1af6b56427 From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
Ok, I have finally gotten all of the defines for Dec/Alpha and
Linux/Alpha sorted out as Marc asked. There is no longer any need for
'-Dalpha' or '-Dlinuxalpha' in either the Dec/Alpha or the Linux/Alpha
template files (./src/template/{alpha,linuxalpha}). I have replaced every
instance of 'alpha' or '__alpha__' with '__alpha', as that appears to be
the common symbol between C compilers on both operating systems (RH4.2 &
DecUnix 4.0b) for alpha.
1998-04-27 14:46:51 +00:00
Marc G. Fournier 718430ea40 From: Michael Meskes <meskes@topsystem.de>
And the next update. Now you can use only parts of a struct like this:

exec sql select a into :struct.string from foo;
1998-04-27 14:35:58 +00:00
Bruce Momjian 3e3477f5a4 Add Darren's char2-16 files. 1998-04-27 13:50:03 +00:00
Bruce Momjian 09baa3cc81 This patch...
1. Removes the unnecessary "#define AbcRegProcedure 123"'s from
pg_proc.h.

2. Changes those #defines to use the names already defined in
fmgr.h.

3. Forces the make of fmgr.h in backend/Makefile instead of having
it
   made as a dependency in access/common/Makefile  *hack*hack*hack*

4. Rearranged the #includes to a less helter-skelter arrangement,
also
    changing <file.h> to "file.h" to signify a non-system header.

5. Removed "pg_proc.h" from files where its only purpose was for
the
   #defines removed in item #1.

6. Added "fmgr.h" to each file changed for completeness sake.

Turns out that #6 was not necessary for some files because fmgr.h
was being included in a roundabout way SIX levels deep by the first
include.

"access/genam.h"
 ->"access/relscan.h"
   ->"utils/rel.h"
     ->"access/strat.h"
       ->"access/skey.h"
	 ->"fmgr.h"

So adding fmgr.h really didn't add anything to the compile, hopefully
just made it clearer to the programmer.

S Darren.
1998-04-27 04:08:07 +00:00
Bruce Momjian e8fd57d763 Add prper perl config testing. 1998-04-27 03:56:59 +00:00
Bruce Momjian df533d2993 manual page update from Oliver Elphick
Oliver.Elphick@lfix.co.uk
1998-04-27 03:41:33 +00:00
Bruce Momjian 85519eea83 Fix cc-specifc compiler flags in templatees. 1998-04-27 03:32:11 +00:00
Bruce Momjian 306f89232a Fixed table type lengths for Maurice. 1998-04-27 03:19:10 +00:00
Bruce Momjian 4fcd0d6371 FIx confusion over SORT and SORTCLAUSE in node handling. 1998-04-27 02:58:07 +00:00
Bruce Momjian 1efd2cf7b0 Included is a patch for ecpg which seems to have some compiling
problems on non POSIX systems such as SunOS 4.1.x.  -- Tatsuo Ishii
t-ishii@sra.co.jp -
1998-04-26 23:14:39 +00:00
Bruce Momjian 0d203b745d Re-apply Darren's char2-16 removal code. 1998-04-26 04:12:15 +00:00
Bruce Momjian 9260d4b440 template cleanup 1998-04-24 15:58:17 +00:00
Bruce Momjian 4cbfeef912 Inline some small functions called for every row. 1998-04-24 14:43:33 +00:00
Marc G. Fournier 7500a961f1 From: Michael Meskes <meskes@topsystem.de>
+ Thu Apr 23 09:27:16 CEST 1998
+
+       - Also allow call in whenever statement with the same functionality
+         as do.
+
+ Thu Apr 23 12:29:28 CEST 1998
+
+       - Also rewrote variable declaration part. It is now possible to
+         declare more than one variable per line.
+       - Set version to 2.1.0
+
+ Fri Apr 24 13:50:15 CEST 1998
+
+       - Fixed some bugs.
+       - Set version to 2.1.1
1998-04-24 12:10:20 +00:00
Marc G. Fournier f2b64d3593 Clean up configure so that it properly (I hope?) GUESSes the template to
use, if not stipulated via --with-template
1998-04-24 01:19:00 +00:00
Bruce Momjian 2201d48ccd Add hpux patch for cpp. 1998-04-21 16:18:30 +00:00
Marc G. Fournier 64e35e1468 Upgrade ECPG to 2.0
Michael Meskes <meskes@topsystem.de>
1998-04-21 13:23:24 +00:00
Marc G. Fournier 5e6b0a574b Try for a LINUX_ELF fix (bandage?) 1998-04-21 12:38:46 +00:00
Marc G. Fournier 5bdda53f12 From: Bryan Henderson <bryanh@giraffe-data.com>
Here's a fix for a tiny memory leak in PQsetdb/PQfinish.

(Analysis of a running program indicates there are several others, but
this is the only obvious one I saw in the code).
1998-04-21 04:00:06 +00:00
Bruce Momjian 72098f3803 Try to find cpp failure and report it. 1998-04-20 18:11:42 +00:00
Marc G. Fournier b542fa1a6e From: Peter T Mount <patches@maidast.demon.co.uk>
This fixes a problem in ResultSet.getDate() when the column is NULL
(reported by Vincent Partington <Vincent.Partington@nmg.nl>)

And fixes a problem with Field's (ResultSet.getObject() was proving to be
slow as it repetedly send queries for oid -> name mapping - fixed by
creating a cache. (reported by Mario Ellebrecht <ellebrec@nads.de>)
1998-04-18 18:32:44 +00:00
Bruce Momjian 323fefdb9d Update HISTORY/TODO. Disable HAVING. 1998-04-17 04:12:56 +00:00
Marc G. Fournier 83fd305f78 A few minor mods:
gram.c updated
	scan.c updated
	ecpg/Makefile added LDFLAGS
	configure requires sfio for those systems with it installed...
1998-04-17 03:06:35 +00:00
Marc G. Fournier 19d41d4438 From: Darren King <darrenk@insightdist.com>
This will force the aix compiler to insert trapping code to
check for division by zero for the 4.1 port.
1998-04-17 02:44:01 +00:00
Marc G. Fournier 2219c230ed Get rid of the TEMPLATE verbosity and make it so that --with-template is
documented in ./configure --help
1998-04-17 01:55:31 +00:00
Marc G. Fournier 8973192283 From: Brook Milligan <brook@trillium.NMSU.Edu>
Here is a pair of patches that (I hope) finish the configuration
issues with tcl/tk and make the recognition of the two packages
completely parallel in organization.  This should make future changes
easier to maintain.

Hope to see this in 6.2.2.
1998-04-17 01:30:21 +00:00
Marc G. Fournier 34299b4fac From: David Hartwig <daveh@insightdist.com>
Marc, I overlooked this file it should be included in the source.  Oops
Also the binary file is only 1.2 meg not 2.5 meg. Oops again.
1998-04-15 21:56:54 +00:00
Bruce Momjian 7d03bb460d pgintro now has a list of all manual pages. 1998-04-15 16:44:36 +00:00
Bruce Momjian 5529b783a8 Move HAVING function to proper file. 1998-04-15 15:29:57 +00:00
Edmund Mergl 11c091272a 1.7.3 1998-04-14 21:14:52 +00:00
Bruce Momjian 1957f2402c Update gram.c.nd *.h files. 1998-04-14 03:28:50 +00:00
Bruce Momjian 27c490bed0 Update gram.c scan.c. 1998-04-14 01:52:47 +00:00
Bruce Momjian 8eb08ae6b9 Cleanup up code. 1998-04-13 21:07:15 +00:00
Bruce Momjian 0435ecf5d5 What was LINUX_ELF doing in there? 1998-04-13 16:34:48 +00:00
Marc G. Fournier 9e3382dfc5 Replace old PostODBC driver with new one...
This one is based on an older PostODBC driver, rewritten and maintained by
InsightDist(?)
1998-04-13 15:02:05 +00:00
Marc G. Fournier d4d26f9c33 From: Diab Jerius <dj@pelf.harvard.edu>
Fix for Solaris/cc problem
1998-04-13 14:46:48 +00:00
Bruce Momjian 66feaefa98 New book to FAQ. 1998-04-12 14:17:40 +00:00
Marc G. Fournier 07e3fb08be More work in the right direction on linux/alpha
From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
1998-04-12 02:58:22 +00:00
Bruce Momjian 5da68b98cb Fix for PROFILE env. 1998-04-12 01:18:35 +00:00
Marc G. Fournier a362212a17 linuxalpha patches from Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu> 1998-04-11 21:14:50 +00:00
Marc G. Fournier afdc54ab15 Oops...I used Relation->rd_fd->relname exactly, instead of using the actual
variable name *blush* *grin*
1998-04-10 22:07:41 +00:00
Marc G. Fournier 57a40abd68 Okay, add relation name to the file generating the error... 1998-04-10 21:59:30 +00:00
Marc G. Fournier 0b746a7d05 See if I can determine where the BTP_CHAIN error is coming from... 1998-04-10 18:43:30 +00:00
Marc G. Fournier b5bd8c3f08 make --with-libs == --with-libraries 1998-04-10 02:59:38 +00:00
Bruce Momjian 7e12122b40 Oops reverse patch. no need for it. 1998-04-09 04:42:56 +00:00
Bruce Momjian fa785bac3b Allow -lib-dir to find libreadline.a 1998-04-09 04:24:52 +00:00
Thomas G. Lockhart 43cfa1a0ce Fix incorrect second argument type for dpow() declaration. 1998-04-08 06:40:09 +00:00
Thomas G. Lockhart 242b347877 Prepare the EXTRACT() clause for supporting TIMEZONE_HOUR
and TIMEZONE_MINUTE but don't introduce until v6.4.
Fix SET TIMEZONE LOCAL to pass null pointer
 rather than older "default" string.
Fix handling of NULL pointer returns from FOREIGN KEY clauses
 which are currently ignored.
Allow START as a table/column name.
1998-04-08 06:39:01 +00:00
Thomas G. Lockhart 31b9e3fc68 Temporarily back out fixes for unary minus parsing.
Will re-introduce for v6.4 but requires fixes for automatic type
 conversion beforehand.
1998-04-08 06:35:02 +00:00
Bruce Momjian 45a0b4743a Remove name.* files. 1998-04-08 02:32:52 +00:00
Marc G. Fournier 4a7b30d126 From: Bruce Stephens <bruce@cenderis.demon.co.uk>
fix for the tk problem...
1998-04-08 02:06:37 +00:00
Bruce Momjian bf7b72109f Re-add pg_dump fix. 1998-04-07 22:36:38 +00:00
Bruce Momjian e83621aa13 Reverse out pg_dump changes. 1998-04-07 22:00:37 +00:00
Bruce Momjian 3da39b3fd2 Update configure. 1998-04-07 21:26:52 +00:00
Bruce Momjian 8e8116468b Update for 6.3.2 1998-04-07 21:01:28 +00:00
Bruce Momjian db21523314 Back out char2-char16 removal. Add later. 1998-04-07 18:14:38 +00:00
Bruce Momjian 6a3c751448 Fix for ACL's from Thomas A. Szybist. 1998-04-07 16:41:11 +00:00
Bruce Momjian 1125bbf871 Assert fix 1998-04-06 17:52:35 +00:00
Bruce Momjian 2ffd727531 ASSERT fixes. 1998-04-06 17:27:54 +00:00
Bruce Momjian d8077ab007 distclean cleanup 1998-04-06 17:02:13 +00:00
Bruce Momjian 471dbbc223 DESTDIR removed, again. 1998-04-06 16:53:15 +00:00
Bruce Momjian cf1f24fbf0 destdir cleanup. 1998-04-06 04:57:32 +00:00
Bruce Momjian c61846e53f Makefile cleanup./ 1998-04-06 03:23:01 +00:00
Bruce Momjian 041d2e1ca2 confiure cleanup 1998-04-06 03:10:32 +00:00
Bruce Momjian 645146260e Cleanup of compiler warnings. 1998-04-06 02:38:26 +00:00
Bruce Momjian 6d708c6900 Cleanup initdb 1998-04-06 02:10:49 +00:00
Bruce Momjian bc40727042 cleanup and possible alpha-linux fix. 1998-04-06 02:03:08 +00:00
Bruce Momjian 066ee9a2e9 Make DESTDIR consistent, and verious Linux cleanups. 1998-04-06 01:36:41 +00:00
Bruce Momjian 5523beb949 Re-introduce $DISTDIR. 1998-04-06 01:16:55 +00:00
Bruce Momjian 47364f315b Move initdb.sh to initdb 1998-04-06 01:05:54 +00:00
Bruce Momjian 1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Bruce Momjian 2dfee93457 Remove DISTDIR. 1998-04-05 22:02:56 +00:00
Bruce Momjian fdb37f073b this patch solve 2 problemes :
probleme number 1 :

- configure can find the library readline , but don't
  find the header file . so in this case we don't use lib readline
  .

probleme number 2 :

- when you have postgres 6.2.1 and readline installed
  with the same prefix( and generally all your software ) .  you
  can compile the version 6.3 .  I use this prefix , when configure
  ask me for "Additional directories to search for include files"
  .

  ( because there a conflict in the header when you
    compile psql.c ) In this case, you must permut the sequence of
  directive -I .

Erwan MAS
1998-04-05 21:29:49 +00:00
Bruce Momjian 34fec16198 configure cleanup. 1998-04-05 21:18:03 +00:00
Bruce Momjian 4b6fcc4459 Remove GetDatabaseName/Path and use globals. Make consts later. 1998-04-05 21:04:50 +00:00
Bruce Momjian 9e45687df5 confiugre.in cleanup. 1998-04-05 20:54:38 +00:00
Bruce Momjian 05102c7551 Here are 3 patches (all relative to the src directory) to help with
the configuration of v6.3.1.  I have replaced the queries for
include/lib directories with --with configuration options.  I have
also included a list of potential tcl/tk include directories directly
in the CPPFLAGS variable.  As new versions are needed, these should
be added to the list in reverse numerical order (libraries are in
a separate list near the end).  This greatly simplifies the later
checks if --with-tcl is set.  I hope this solution works for
everyone.

I also added a check to disable the perl support if postgres was
not already installed (as per the instructions in the directory).
By the way, why must there be an installed pgsql to compile perl
support? This seems odd, at best.

Finally, I changed the Makefile in the libpgtcl interface to place
the shared libraries at the end of the list of files, not at the
beginning.  With NetBSD at least, libraries are linked in order,
so the original sequence does not work.

Brook Milligan
1998-04-05 20:28:23 +00:00
Bruce Momjian 03a7cd1788 Fix for memory leak. 1998-04-05 05:52:10 +00:00
Bruce Momjian 6755026937 A couple of weeks ago I submitted a patch to fix configure --with-tcl.
However somebody else also applied a patch to the same part of
configure to fix a different problem. So part of my patch was not
applied or got reversed or ... whatever.

The attached patch will restore configure --with-tcl to working
order and should remove a lot of the messages complaining about
tcl not working.

Alvin
1998-04-03 20:21:51 +00:00
Vadim B. Mikheev bb80f8a918 Fix merging pathes of pruned rels ("indices are unused" problem). 1998-04-02 07:27:15 +00:00
Marc G. Fournier 91964bd984 resync configure 1998-04-01 18:47:47 +00:00
Marc G. Fournier 896a42a5a7 From: Maurice Gittens <mgittens@david.gits.nl>
After applying the following patch there remain two
probable buffer overruns detected by Electric Fence during
the regression test.
I'll try find out what causes the remain two ones.

This patch also corrects a typo in smgr.c.
1998-04-01 15:35:33 +00:00
Marc G. Fournier 0a0bd3d646 remove the call to port-protos.h ... 1998-04-01 03:13:37 +00:00
Bruce Momjian 8dc48ba877 Small HAVING cleanup. 1998-03-31 23:31:10 +00:00
Bruce Momjian 9fbdda039d Fix macro read violation for Maurice. 1998-03-31 15:53:51 +00:00
Bruce Momjian d7050cb68c Merge rename name page into alter table. Fix UNION with DISTINCT
or ORDER BY bug.
1998-03-31 04:44:35 +00:00
Marc G. Fournier 62943bb76f Pointed out by: Doug Winterburn <dlw@seavme.xroads.com>
3) Add "#include "config.h" to src/interfaces/ecpg/preproc/pgc.l
   to correct "strings.h not found".  config.h has the proper define to
   make this work and should probably be near the top of pgc.l before
   the first include.
1998-03-31 03:00:20 +00:00
Marc G. Fournier 92c6bf9775 Pointed out by: Doug Winterburn <dlw@seavme.xroads.com>
2) Add "#define gettimeofday(a,b) gettimeofday(a) to src/include/config.h
        On the 88k SVR4, gettimeofday only has one argument.  This is
        checked for in a few other packages by configure, so there should
        be some examples of the configure test out there.
1998-03-31 02:59:07 +00:00
Bruce Momjian 01ecb2e3a0 documentation for HAVING, clean up UNION comment. 1998-03-30 19:05:10 +00:00
Bruce Momjian ef0eecfa1f This simple patch to catalog/pg_type.c fixes a buffer overrun. It
was detected by Electric Fence and triggered by statements like:

	SELECT * into table t from pg_database;

The system would crash on a memmove call in DataFile() with arguments
like this:

	memmove(0x0, 0x0, 0);

Maurice Gittens
1998-03-30 17:46:45 +00:00
Bruce Momjian dbf34c5c19 This problem had nothing to do with the upgrades I made. There
was a 2000 character buffer allocated for results, and the files
you refer to produce a 2765 byte column called formsource.  This
should not have worked with any version of libpgtcl.

Nevertheless, the limit is an artificial one, since there is no
need to use this intermediate buffer where it is being used and
abused.

Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>
1998-03-30 17:39:16 +00:00
Bruce Momjian 57b5966405 The following uuencoded, gzip'd file will ...
1. Remove the char2, char4, char8 and char16 types from postgresql
2. Change references of char16 to name in the regression tests.
3. Rename the char16.sql regression test to name.sql.  4. Modify
the regression test scripts and outputs to match up.

Might require new regression.{SYSTEM} files...

Darren King
1998-03-30 17:28:21 +00:00
Bruce Momjian 31c36102ca The buffer overrun while creating sequences turns out to be a read
access overrun. For the sake of doing things properly here is a
patch which fixes it.

This patch is for the file backend/commands/sequence.c.

Maurice Gittens
1998-03-30 17:15:26 +00:00
Bruce Momjian 9a0dd4fb18 There's a patch attached to fix gcc 2.8.x warnings, except for the
yyerror ones from bison. It also includes a few 'enhancements' to
the C programming style (which are, of course, personal).

The other patch removes the compilation of backend/lib/qsort.c, as
qsort() is a standard function in stdlib.h and can be used any
where else (and it is). It was only used in
backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c,
and backend/storage/page/bufpage.c

> > Some or all of these changes might not be appropriate for v6.3,
since we > > are in beta testing and since they do not affect the
current functionality.  > > For those cases, how about submitting
patches based on the final v6.3 > > release?

There's more to come. Please review these patches. I ran the
regression tests and they only failed where this was expected
(random, geo, etc).

Cheers,

Jeroen
1998-03-30 16:47:35 +00:00
Bruce Momjian c579ce0fb0 I started adding the Having Clause and it works quite fine for
sequential scans! (I think it will also work with hash, index, etc
but I did not check it out! I made some High level changes which
should work for all access methods, but maybe I'm wrong. Please
let me know.)

Now it is possible to make queries like:

select s.sname, max(p.pid), min(p.pid) from part p, supplier s
where s.sid=p.sid group by s.sname having max(pid)=6 and min(pid)=1
or avg(pid)=4;

Having does not work yet for queries that contain a subselect
statement in the Having clause, I'll try to fix this in the next
days.

If there are some bugs, please let me know, I'll start to read the
mailinglists now!

Now here is the patch against the original 6.3 version (no snapshot!!):

Stefan
1998-03-30 16:36:43 +00:00
Marc G. Fournier 9c93fa2e4a Upgrade to v0.86 1998-03-29 21:52:54 +00:00
Bruce Momjian 748fab8d5d Prevent pgindent from being run on odbc in the future. 1998-03-28 02:24:49 +00:00
Bruce Momjian f07c7bf4e7 I have been troubled by a segmentation fault when reloading from
a dumpall.  This has been happening when a second \connect is
encountered.

The faulty code was in fe-connect.c, where the memory for the user
password was freed, but the pointer itself was not set to NULL.
Later, the memory was reused and the password appeared not to be
empty, so that an attempt was made to reference it.

Oliver Elphick
1998-03-26 23:46:14 +00:00
Bruce Momjian 0d8a7dc6a4 BETWEEN and LIKE patch from Thomas 1998-03-26 21:08:10 +00:00
Bruce Momjian 3b40fd9ea9 Update manual 1998-03-26 21:01:47 +00:00
Bruce Momjian b411e26a9a Mention rollback instead of abort. 1998-03-25 01:54:53 +00:00
Bruce Momjian f74f2d39d8 update for 6.3.1 1998-03-23 16:14:50 +00:00
Bruce Momjian 817fc4b2ac Manual page fixes. 1998-03-23 15:09:43 +00:00
Bruce Momjian 137d3428de autoconf again. 1998-03-23 06:08:51 +00:00
Bruce Momjian 953ca76b8d more tcl/tk fixes 1998-03-23 06:03:04 +00:00
Bruce Momjian 97e461b101 Another tcl/tk fix. 1998-03-23 04:08:05 +00:00
Bruce Momjian df18ece06c oops, forgot to run autoconf. 1998-03-23 03:48:32 +00:00
Bruce Momjian c69e58f620 another tcl/tk patch
another tcl/tk patch
1998-03-23 03:45:10 +00:00
Bruce Momjian 4d09be4413 fix for tcl/tk in configure 1998-03-23 03:27:07 +00:00
Marc G. Fournier 9b381a69f6 Add NetBSD specific expected files 1998-03-22 19:46:45 +00:00
Marc G. Fournier 5191d5207f Slightly updated regression output for FreeBSD 3.0-CURRENT 1998-03-22 19:40:33 +00:00
Marc G. Fournier 0279d55eef Made some changes to clean up how initdb works...just more made a 'PGSQL_OPTS'
variable that can be set in one place to affect everything...
1998-03-22 19:35:30 +00:00
Marc G. Fournier 8dd692c8e3 Change 2>$1 to -o /dev/null instead...
From: Andreas Klemm <andreas@klemm.gtn.com>
1998-03-22 18:28:39 +00:00
Marc G. Fournier 8d53465ed5 Moved sys/types.h to before netdb.h
From: Vince Vielhaber <vev@michvhf.com>
1998-03-22 04:18:17 +00:00
Bruce Momjian 10fac62c25 Better identify tcl and tk. 1998-03-21 04:42:58 +00:00
Bruce Momjian 2b3bb341fe This patch fixes a couple of minor bugs:
1) DatabaseMetaData.getPrimaryKeys() would fail saying that there
is no
   table t.

2) PreparedStatement.getObject() was missing some break statements,
which
   was causing updates not to work with JBuilder (supplied by Aaron
   Dunlop).


jdbc fixes from Peter.
1998-03-20 22:03:55 +00:00
Bruce Momjian 55c235b266 Disable -lbsd on alpha. 1998-03-20 18:47:15 +00:00
Bruce Momjian ee85fda2ad Add missing file. 1998-03-20 17:24:37 +00:00
Bruce Momjian 922c83fe62 OK...here is a patch that will cause the magnetic disk storage
manager to not try to split files in 2 gig chunks.  It will just
try to get another block.

If applied, everything is just as before. But if LET_OS_MANAGE_FILESIZE
is defined, the chaining disappears and the file just keeps on
going, and going, and going, til the OS barfs.

Darren King
1998-03-20 04:22:54 +00:00
Bruce Momjian 5920345068 Sorry. I made above mistakes. "__svr4" should be "__svr4__" or
"__SVR4" as you pointed out.  There is another file that has the
same mistakes.  Included is a patche for include/c.h.

t-ishii@sra.co.jp
1998-03-20 04:17:34 +00:00
Bruce Momjian 6df719184c Fix spelling of "including
Edward J. Huff
1998-03-20 04:12:25 +00:00
Bruce Momjian 76e6d26011 HPUX build does not build shared lib versions of libpq and libpq++
--------------------------------------------------------------------------

Test Case:  ----------


--------------------------------------------------------------------------

Solution:  --------- Add this to the libpq and libpq++ Makefiles
to build shared libs:

Mike Ferrara
1998-03-20 04:07:11 +00:00
Bruce Momjian e98df1ab29 In libpq-fe.h: #if defined(sun) && defined(sparc) && !defined(__svr4)
extern char *sys_errlist[]; #define strerror(A) (sys_errlist[(A)])
#endif                                                  /* sunos4
*/

is picked up by Solaris when the above is intended only for SunOS.

Fix Solaris.  Albert Chin-A-Young
1998-03-20 04:02:57 +00:00
Bruce Momjian f6c0fc1959 The real trick is to add -Dalpha to the CFLAGS setting. The changes
to main.c are only to add some extra includes to support some code
that's suddenly being used.

The #define ASSEMBLER is to prevent most of the code of sys/proc.h
from being included, as it ends up conflicting with some of the
postgresql definitions.  This may or may not work on other versions
of Digital Unix.


Get alpha working.  Yea.  Dwayne Bailey
1998-03-20 03:55:52 +00:00
Bruce Momjian d705aa8136 > > I'm using text[] arrays. Some of my array elements have '"'
> > characters in them.  Dumping and reloading using pg_dumpall >
> doesn't work with this and dumping the entire array and > > then
trying to parse it is hopeless.

Doug Gibson
1998-03-20 03:44:19 +00:00
Bruce Momjian 80f7c41388 Here's my next patch to bring ecpg to version 1.1. It now correctly
handles all transaction commands and the exec sql include command.

Michael Meskes
1998-03-20 03:08:11 +00:00
Thomas G. Lockhart 561aead3f1 Allow parsing expressions with ") -" (scan.l, scan.c only).
Make "TABLE" optional in "LOCK TABLE" command
 and "... INTO TABLE..." clause.
Explicitly parse CREATE SEQUENCE options to allow a negative integer
 as an argument; this is an artifact of unary minus handling in scan.l.
Add "PASSWORD" as an allowed column identifier.
These fixes will require a "make clean install" but not a dump/reload.
1998-03-18 16:50:25 +00:00
Bruce Momjian c530fbfb2f Add checks for UNION target fields, and add optional TABLE to LOCK
and SELECT manual pages and psql help.
1998-03-18 15:49:08 +00:00
Bruce Momjian 94abcc1665 SunOS .similar cleanup. 1998-03-16 15:14:50 +00:00
Bruce Momjian 45ce9e4030 Add SunOS entries. 1998-03-16 14:46:37 +00:00
Bruce Momjian cc494cebbb Prevent \do from wrapping. 1998-03-16 14:27:38 +00:00
Bruce Momjian 5346488bf7 Make pg_user /xpg_user change complete. 1998-03-16 05:58:46 +00:00
Bruce Momjian cb0dc06f63 Remove duplicates 1998-03-16 05:52:23 +00:00
Bruce Momjian a866d1adef Fix for Datasize = 0 error, from Vadim. 1998-03-16 05:49:32 +00:00
Bruce Momjian 4799bb8d33 Fix for pg_dump of large objects, from alvin@camberlo.demon.co.uk. 1998-03-16 05:41:39 +00:00
Bruce Momjian 4d72e2b1c6 subselect notes from Vadim. 1998-03-16 05:37:16 +00:00
Marc G. Fournier d30ad52918 From: Jeroen van Vianen <jeroenv@design.nl>
tools.patch patches tools/find_static (use indices to increase
performance) and tools/ccsym (no hardcoded paths).
1998-03-15 08:33:59 +00:00
Marc G. Fournier 22bd99e462 From: hankin <hankin@consultco.com>
a while back I posted a patch for pg_ident, the patch worked but I didn't
diagnose the problem properly.
on my compiler(gcc2.7.2) this compiles with no errors...

char buf[1000]; if(buf != '\0') {

...but it doesn't compare '\0' with the first char of buf.
1998-03-15 08:18:03 +00:00
Marc G. Fournier bb7f173c0c Reply-To: Jordi MacDonald <jordi@spartanmedia.com>
There is an error in the configure script when using
--with-pgport= that will cause the compiled version of
PostgreSQL to no longer allow connections to the
new port and to treat shared memory improperly.

What happens is that if the port is changed, the configure
script defines DEF_PGPORT as "", which atoi() will return
as 0, which makes the IPC_KEY value 0. This then causes
semaphores to be allocated, but never released. Postgres
eventually returns from semget() with
"no space left on device". The source of this error could
easily be overlooked in version 6.3 since it is possible
to connect via UNIX domain sockets, and having DEF_PGPORT
defined as "0" would not be noticed until TCP was used.
1998-03-15 08:15:46 +00:00
Marc G. Fournier e4135ad17e From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>
The following patch is to src/interfaces/libpq of postgresql-6.3.
The purpose of the patch is to make the initialization of
const char *pgresStatus[] match the ExecStatusType enum.
1998-03-15 08:11:11 +00:00
Marc G. Fournier e4dccfdc6e From: t-ishii@sra.co.jp
6.3 postmaster is supposed to work with pre 6.3 protocol. This is true
for little endian architecture servers. But for big endian machines
such as Sparc the backward compatibility function do not work.
Attached are patches to fix the problem.
1998-03-15 08:09:37 +00:00
Marc G. Fournier b64a7549b4 From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
For substr() and substring() on the text data type, the relevant code is in
varlena.c. You are right, there is a problem. I have a patch which I will
apply to the source tree soon. The copy enclosed below probably does not
preserve tabs correctly so cannot be applied directly; the relevant change
is simply changing the ">=" to ">"...
1998-03-15 08:07:01 +00:00
Marc G. Fournier 6ac2528616 From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>
It is my hope that the following "patches" to libpgtcl get included
in the next release.

See the update to the README file to get a full description of the changes.
This version of libpgtcl is completely interpreter-safe, implements the
database connection handle as a channel (no events yet, but will make it
a lot easier to do fileevents on it in the future), and supports the SQL
"copy table to stdout" and "copy table from stdin" commands, with the
I/O being from and to the connection handle.  The connection and result
handles are formatted in a way to make access to the tables more efficient.
1998-03-15 08:03:00 +00:00
Marc G. Fournier 609026bb6b From: t-ishii@sra.co.jp
Included are patches intended for allowing PostgreSQL to handle
multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and
Mule internal code. With the MB patch you can use multi-byte character
sets in regexp and LIKE. The encoding system chosen is determined at
the compile time.

To enable the MB extension, you need to define a variable "MB" in
Makefile.global or in Makefile.custom. For further information please
take a look at README.mb under doc directory.

(Note that unlike "jp patch" I do not use modified GNU regexp any
more. I changed Henry Spencer's regexp coming with PostgreSQL.)
1998-03-15 07:53:03 +00:00
Marc G. Fournier 661ecf3c48 From: t-ishii@sra.co.jp
Included are patches intended for allowing PostgreSQL to handle
multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and
Mule internal code. With the MB patch you can use multi-byte character
sets in regexp and LIKE. The encoding system chosen is determined at
the compile time.

To enable the MB extension, you need to define a variable "MB" in
Makefile.global or in Makefile.custom. For further information please
take a look at README.mb under doc directory.

(Note that unlike "jp patch" I do not use modified GNU regexp any
more. I changed Henry Spencer's regexp coming with PostgreSQL.)
1998-03-15 07:39:04 +00:00
Marc G. Fournier 31a925c4d0 From: Peter T Mount <patches@maidast.demon.co.uk>
Ok, this fixes three things:

1. It seems (from tests submitted by two people with JBuilder) that
   JBuilder expects a responce from ResultSetMetaData.getPrecision() &
   getScale() when used on non numeric types. This patch makes these
   methods return 0, instead of throwing an exception.

2. Fixes a small bug where getting the postgresql type name returns null.

3. Fixes a problem with ResultSet.getObject() where getting it's string
   value returns null if you case the object as (PGobject), but returns
   the value if you case it as it's self.
1998-03-15 07:12:07 +00:00
Bruce Momjian 7eddadee87 CLUSTER cleanup 1998-03-15 02:13:23 +00:00
Bruce Momjian 006fd9253f Cluster fixup. 1998-03-14 22:55:21 +00:00
Bruce Momjian 3674ccdf95 Change Postgres95 to PostgreSQL. Update CLUSTER manual page. 1998-03-14 21:58:09 +00:00
Bruce Momjian 12429af027 Remove postgres95. 1998-03-14 04:15:49 +00:00
Marc G. Fournier 8175eb3485 Update Pgaccess to 0.83 1998-03-12 13:09:46 +00:00
Marc G. Fournier c24ed70193 Get the ultrix4 ports back in sync... 1998-03-10 05:24:33 +00:00
Thomas G. Lockhart 2d87654aeb Repair "LIKE" behavior with two adjacent wildcard characters ("_").
Was ignoring second wildcard.
1998-03-07 06:04:59 +00:00
Thomas G. Lockhart a540f78668 Add one-line fix to allow redefining built-in functions.
Bug introduced in mid-January.
1998-03-07 06:03:28 +00:00
Bruce Momjian 8ecc01cf8a Fix bad oid in table. 1998-03-07 04:49:57 +00:00
Bruce Momjian c0cd1edfe2 xinv fix for tclsh 1998-03-06 22:49:58 +00:00
Bruce Momjian ba1d990cf7 pg_user cleanup. 1998-03-06 18:03:38 +00:00
Bruce Momjian ea89acc4d7 Rename pg_user to pg_shadow. 1998-03-06 17:25:51 +00:00
Marc G. Fournier 0bad7c1198 Add ecpg back in again 1998-03-05 13:18:51 +00:00
Bruce Momjian a8de40df53 Get rid of those pesky long constants, 'l'. Has no affect. 1998-03-04 18:41:08 +00:00
Marc G. Fournier b1c7c31e07 One last change to configure for 'non-gcc' compiler 1998-03-02 14:54:59 +00:00
Marc G. Fournier 9bc57c6665 From: Darren King <darrenk@insightdist.com>
Patch1:

Postgres thinks dist_pl (dist of a point to a line) is expecting a box (603)
for the right arg, but it really should be a line (628).

Otherwise the left & right args match those of dist_pb (dist of a point to a
box) two lines further down.


Patch2:

Anyways, these two functions take a path (602) whereas in pg_proc.h they are
listed as taking a lseg (601).
1998-03-02 06:12:15 +00:00
Bruce Momjian d45dfd0d65 Reminder for next time. 1998-03-02 05:52:57 +00:00
Marc G. Fournier 6a9627e792 Last minute clean up for SunOS...
From: t-ishii@sra.co.jp
1998-03-02 05:42:15 +00:00
Marc G. Fournier 86d1343987 Change configure to reflect v6.3 vs v6.2 :) 1998-03-02 05:33:14 +00:00
Marc G. Fournier bb01e98d48 Bring pgaccess up to 0.82 - last update before release 1998-03-02 03:04:26 +00:00
Thomas G. Lockhart 77ac40d73e Fix money type USE_LOCALE support at least for default "C" locale.
Still has questionable code for some locale-specific strings.
1998-03-02 00:13:36 +00:00
Bruce Momjian 09b187598c Install new 0.81 pgaccess release. 1998-03-01 21:13:30 +00:00
Thomas G. Lockhart 9ed7a21ba6 Fix boolean operator declarations for path to return boolean, not float8. 1998-03-01 08:10:34 +00:00
Marc G. Fournier 22d79d0ef1 From: "Billy G. Allie" <Bill.Allie@mug.org>
The following patch will change the meaning of the isinf function in the
HAVE_FPCLASS section from "not finite" to "is infinity".
1998-03-01 04:53:54 +00:00
Marc G. Fournier 207acd86d7 From: Darren King <darrenk@insightdist.com>
1. Make 'all' works without complaint.  Don't have to add the .exp
   files to the files list.  They are made automagically when
   making the respective shared lib file.

   Only port that actually uses EXPSUFF (from makefiles/Makefile.*)
   is Aix, so if this breaks anybody else, let me know, asap.

2. Make 'clean' actually cleans up correctly.  Previously, it would
   leave the .o files in C-code directory.

3. Changed references to reflect new location of .c files.

4. Added DELETE statements to complex.source so that it tidies up
   when done.  Previously, it would leave things in pg_amop,
   pg_amproc and pg_opclass.  Only possible to do this with the
   new SUBSELECT code in 6.3.  Nice work, fellas...

   Not deleting the index entries would cause a non-fatal error if
   complex.sql was run again on the same database.  Much tidier now.

5. Corrected the README.  obj directory hasn't existed since Bryan
   redid the make way back when.  Also changed the snipet from psql
   to match the current version. POSTGRES95?!?  I don't think so. :)
1998-03-01 04:52:59 +00:00
Marc G. Fournier f3f7712675 Move around files before applying Darren's second patch 1998-03-01 04:51:16 +00:00
Marc G. Fournier 56b3182241 From: "Billy G. Allie" <Bill.Allie@mug.org>
The following patches will allow postgreSQL 6.3 to compile and run on a
UNIXWARE 2.1.2 system with the native C compiler with the following library
change:

        The alloca function must be copied from the libucb.a archive and added
        to the libgen.a archive.

Also, the GNU flex program is needed to successfully build postgreSQL.
1998-03-01 04:47:38 +00:00
Marc G. Fournier 5b3e78afe3 From: Darren King <darrenk@insightdist.com>
Seem to remember someone posting to one of the lists a while back
that the tutorial code wouldn't compile and/or run.  Found four
problems with it that will let it run.

1. Tutorial makefile had a recursive use of DLOBJS.

2. Some tutorial needed semi-colons added to many statements.

3. Complex tutorial didn't clean up after itself.

4. Advanced had a time-travel example.  Commented it out and
   put a line pointing the user to contrib/spi/README.
1998-02-28 23:37:10 +00:00
Marc G. Fournier bc58c5867d Further updated regression output for FreeBSD 1998-02-28 21:28:30 +00:00
Marc G. Fournier 4a7447e032 Convert the -enable/-with options to use proper m4 macros and provide
-help messages

Suggested by: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-02-28 20:05:09 +00:00
Vadim B. Mikheev 4af1e537d6 Fix scan adjusting for marked index tuples. 1998-02-28 13:53:18 +00:00
Marc G. Fournier 9ceaa677ad Add for port hppa-??-hpux... 1998-02-27 21:55:22 +00:00
Marc G. Fournier 794fedc735 From: Darren King <darrenk@insightdist.com>
Two incorrect printf formats in parser/parse_type.c.  Prolly done
by me a long time ago when I cleaned up int's and Oid's...

Format flag is really just %u, not %ud.  Harmless, but results in
"type id lookup of 25d failed" instead of only "...25 failed"
1998-02-27 19:44:51 +00:00
Vadim B. Mikheev 9986d9a404 ExecReScan for MergeJoin. 1998-02-27 16:12:09 +00:00
Vadim B. Mikheev 0a1e28494e ExecReScan for MergeJoin.
Marked inner tuple now is copied into mergestate->mj_MarkedTupleSlot -
no more tricks arround ttc_shouldfree.
1998-02-27 16:11:28 +00:00
Vadim B. Mikheev b0571ebf65 In '(a,b,...) Op [ANY|ALL] (SubSelect)' Op is restricted to
'=' and '<>'.
1998-02-27 16:07:02 +00:00
Marc G. Fournier 96ac738269 From: Michael Meskes <meskes@topsystem.de>
No more shift/reduce conflicts. Also all other bugs I know about are fixed.
1998-02-27 12:59:33 +00:00
Vadim B. Mikheev 1a6de0760d Check SELECT permissions in subqueries. 1998-02-27 08:43:53 +00:00
Marc G. Fournier 472d802ced Update regression output for FreeBSD 1998-02-27 03:25:43 +00:00
Marc G. Fournier 29cdd1204a New regression test output for Aix from Darren 1998-02-27 03:17:54 +00:00
Marc G. Fournier c37be81cdf Add <sys/types.h> for SunOS
From: t-ishii@sra.co.jp
1998-02-27 03:07:35 +00:00
Marc G. Fournier 296a942b56 From: Darren King <darrenk@insightdist.com>
This patch will...

1. Remove the "-Wall" option from the ecpg/lib and ecpg/preproc Makefile.

2. Remove the addition of $(SRCDIR)/include and-or $(SRCDIR)/backend from
   ecpg/lib, ecpg/preproc, libpq and utils Makefiles. Already in CFLAGS...

3. Set MK_NO_LORDER and RANLIB in Makefile.aix to avoid a couple of extra
   steps taken care of by the 'ld' command anyways.
1998-02-27 02:41:21 +00:00
Marc G. Fournier 877224154d From: Jan Wieck <jwieck@debis.com>
I thought it would be a good idea to ensure that the new view
    permission  model  will  not   get   broken   by   subsequent
    fixes/changes. So I wrote a little regression test for it.

    There  is  an  ugly thing in this regression test. It creates
    temporary a test user that is required  for  the  tests.  The
    user  is removed at the end of the test, but if sometimes the
    regression suite is aborted or crashes exactly here, the test
    user will lay around in the pg_shadow.  Don't have a clue how
    to get around.
1998-02-27 02:38:15 +00:00
Marc G. Fournier 50e4120d5e From: Michael Meskes <meskes@topsystem.de>
Sorry, I just repeated the last call and send out a stupid should be empty
mail. Anyway, my last patch missed one change:
1998-02-27 02:34:33 +00:00
Marc G. Fournier f139617b55 From: Michael Meskes <meskes@topsystem.de>
Subject: [PATCHES] ecpg: correct whenever statement
1998-02-27 02:31:20 +00:00
Marc G. Fournier 73d309f54b From: Michael Meskes <meskes@topsystem.de>
Here's a small patch to ecpg's man page to make it list all known bugs.
1998-02-27 02:30:09 +00:00
Bruce Momjian ceebcd0a49 Remove data/*.orig files 1998-02-26 16:14:31 +00:00
Bruce Momjian 8367529c41 Remove compile warning. 1998-02-26 16:06:20 +00:00
Vadim B. Mikheev 8d78d16485 index_markpos()/index_restrpos() are in use now. 1998-02-26 12:14:54 +00:00
Vadim B. Mikheev 8749b6c794 execScan.c: in the end of scan projInfo->pi_slot must be
return, not a slot returned from access method (they have
	different TupleDesc and MergeJoin node was broken).
nodeIndexscan.c: index_markpos()/index_restrpos() call index-specific
	mark/restr funcs and are in use now (instead of
	IndexScanMarkPosition()/ExecIndexRestrPos()).
1998-02-26 12:13:11 +00:00
Vadim B. Mikheev 2c2b98385a index_markpos()/index_restrpos are used now. 1998-02-26 12:07:10 +00:00
Bruce Momjian a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Bruce Momjian 757bf69a2e Fix permist on libs. 1998-02-26 02:18:09 +00:00
Vadim B. Mikheev 20ef87171c Fix 6.X vacuum bug in shrinking code. 1998-02-25 23:40:32 +00:00
Marc G. Fournier 48a61651b5 Add updated regression output for Solaris-Sparc
Remove SunOS
1998-02-25 20:51:10 +00:00
Marc G. Fournier 3cff97d722 Commit Solaris-i386 regression.diffs file for comparisons 1998-02-25 15:06:47 +00:00
Marc G. Fournier f39bf166e9 Change from -u to -wC3 ... 1998-02-25 15:02:18 +00:00
Marc G. Fournier b5b3735f22 pg_user.h is obseleted in favor of pg_shadow.h 1998-02-25 14:54:44 +00:00
Marc G. Fournier 6132387d5a Make changes to psql so that it sees pg_user again instead of db_user 1998-02-25 14:50:36 +00:00
Marc G. Fournier 780068f812 From: Jan Wieck <jwieck@debis.com>
seems  that  my last post didn't make it through. That's good
    since  the  diff  itself  didn't  covered  the  renaming   of
    pg_user.h to pg_shadow.h and it's new content.

    Here  it's  again.  The  complete regression test passwd with
    only some  float  diffs.  createuser  and  destroyuser  work.
    pg_shadow cannot be read by ordinary user.
1998-02-25 13:09:49 +00:00
Bruce Momjian d067f83b27 pgindent changes for Thomas proc/lock cleanup 1998-02-25 00:31:23 +00:00
Bruce Momjian 19ba229299 Fix for locking problems an dpriority. 1998-02-24 19:58:26 +00:00
Marc G. Fournier f0da7129f5 Change -c to -u for regress.sh...should shrink regression.<portname> somewhat
at the same time...

Suggested by: Frank Ridderbusch <ridderbusch.pad@sni.de>
1998-02-24 15:56:45 +00:00
Marc G. Fournier 4ce6f0826e Forgot to run autoconf after updatign configure.in for Cyrillic patch 1998-02-24 15:53:54 +00:00
Marc G. Fournier 80e12829cf + Sat Feb 21 19:10:55 CET 1998
+
+       - use char[] as string not as array of bytes that is integers
+
+ Sun Feb 22 16:37:36 CET 1998
+
+       - use long for all size variables
+       - added execute immediate statement
+
+ Sun Feb 22 20:41:32 CET 1998
+
+       - use varcharsize = 1 for all simple types, 0 means pointer, > 1
+         means array if type is char resp. unsigned char
+
+ Thu Feb 24 12:26:12 CET 1998
+
+       - allow 'go to' in whenever statement as well as 'goto'
+       - new argument 'stop' for whenever statement

From: Michael Meskes <meskes@topsystem.de>
1998-02-24 15:52:13 +00:00
Marc G. Fournier 0227a4e114 From: "Denis V. Dmitrienko" <denis@null.net>
What it does:
It solves stupid problem with cyrillic charsets IP-based on-fly recoding.
take a look at /data/charset.conf for details.
You can use any tables for any charset.
Tables are from Russian Apache project.
Tables in this patch contains also Ukrainian characters.

Then run ./configure --enable-recode
1998-02-24 15:27:04 +00:00
Marc G. Fournier 96316211c3 From: t-ishii@sra.co.jp
Ok. I have decided to use:

#if defined(sun) && if defined(sparc) && !defined(__svr4)

instead of defined(sunos4).  interfaces/libpq/libpq-fe.h and
include/c.h have been modified(see included patches).

Another porblems I have found are:

o SunOS lacks strtoul(). to fix this I stole strtoul.c from FreeBSD
and place it under backend/port. necessary modifications have been
also made to backend/port/Makefile.in, include/config.h.in and
configure.in (see included patches).
1998-02-24 06:04:55 +00:00
Marc G. Fournier 712e77e3df Various fixes for string.h vs strings.h
From: Frank Ridderbusch <ridderbusch.pad@sni.de>
1998-02-24 04:02:20 +00:00
Marc G. Fournier 18e1f0331b Remove #include "port-protos.h", since we no longer use it
From: Frank Ridderbusch <ridderbusch.pad@sni.de>
1998-02-24 03:47:26 +00:00
Marc G. Fournier e479802747 There is no more 'port-protos.h', so don't try to include it
From: Frank Ridderbusch <ridderbusch.pad@sni.de>
1998-02-24 03:45:10 +00:00
Marc G. Fournier 88aa07c4e3 Forgot about the svr4 dynloader stuff
From: Frank Ridderbusch <ridderbusch.pad@sni.de>
1998-02-24 03:41:58 +00:00
Marc G. Fournier 5cf1964fc6 From: Jan Wieck <jwieck@debis.com>
So   if   the   relname   is   given   to   acldefault()   in
    utils/adt/acl.c, it can do a IsSystemRelationName() on it and
    return ACL_RD instead of ACL_WORLD_DEFAULT.
1998-02-24 03:31:50 +00:00
Marc G. Fournier 751ebd20a0 Various fixes for ecpg to remove compiler dependency...
From: Darren King <darrenk@insightdist.com>
1998-02-24 03:23:52 +00:00
Marc G. Fournier 906d5cc051 Slight change to GUESS for finding the right entry in .similar 1998-02-24 03:16:52 +00:00
Marc G. Fournier 7549bb66c2 Add an '#include <sys/types.h>' for the netinet/in.h section 1998-02-24 03:12:55 +00:00
Marc G. Fournier 9fdb501293 Install spi.h and trigger.in 1998-02-24 03:09:47 +00:00
Marc G. Fournier 04e3fd770d Create a RULE wrapper around pg_user for the password entry 1998-02-23 20:32:40 +00:00
Marc G. Fournier ab6e4ea3dc Modify initdb.sh so that it makes pg_user readable through view db_user
Modify psql so that it uses db_user instead of pg_user
GRANT SELECT on pg_class
1998-02-23 19:26:36 +00:00
Marc G. Fournier 0b4620b575 Quick cleanups 1998-02-23 18:43:13 +00:00
Marc G. Fournier 6c7c6d0c05 From: Jan Wieck <jwieck@debis.com>
The diff looks so simple and easy. But to find it wasn't fun.

    It must have been there for a long time. What happened:

    When a tuple in one of some central catalogs was updated, the
    referenced  relation  got flushed, so it would be reopened on
    the next access (to reflect new  triggers,  rules  and  table
    structure changes into the relation cache).

    Some  data  (the  tupleDescriptor e.g.) is used in the system
    cache too. So when a relation is subject to the system cache,
    this  must know too that a cached system relation got flushed
    because the tupleDesc data gets freed during the flush!

    For the GRANT/REVOKE on pg_class it was  slightly  different.
    There  is some local data in inval.c that gets initialized on
    the first invalidation of a tuple in some  central  catalogs.
    This  needs a SysCache lookup in pg_class. But when the first
    of all commands is a GRANT on pg_class,  exactly  the  needed
    tuple is the one actually invalidated. So I added little code
    snippets that the initialization of the  local  variables  in
    inval.c will already happen during InitPostgres().
1998-02-23 17:44:24 +00:00
Bruce Momjian 9324d5cbe3 Remove libpq README. 1998-02-23 16:51:14 +00:00
Marc G. Fournier 0daa8c3745 A few misc fixes brought up by Andrew 1998-02-23 15:44:25 +00:00
Vadim B. Mikheev 11303a941f Second query in select_views.sql is replaced. 1998-02-23 13:59:34 +00:00
Vadim B. Mikheev 3ae4edb245 Fix relation path constraction in mdblindwrt(). 1998-02-23 13:58:04 +00:00
Bruce Momjian d036a699dc Remind people of view permissions, and install libpq README. 1998-02-23 13:10:53 +00:00
Vadim B. Mikheev f0e7e2faa4 ExecReScan for Unique & Sort nodes. 1998-02-23 06:28:16 +00:00
Bruce Momjian e4fd534645 Partial fix for select distinct in subselect. 1998-02-23 02:54:11 +00:00
Bruce Momjian 55f86ec8f7 Configure patches from Brook Milligan. 1998-02-22 20:02:34 +00:00
Marc G. Fournier a35a681f97 The getColumns() method in DataBaseMetaData.java returns a column size
of -1 for varchar's.

From: CNT systemen BV <cntsys@cistron.nl>
1998-02-22 18:03:26 +00:00
Marc G. Fournier 0e1a352f09 From: Darren King <darrenk@insightdist.com>
Enclosed is the regression.diffs file from running the Feb 21st
snapshot regression tests for inclusion in src/test/regression
as regression.Aix41.  Appears to be standard differences to me,
error messages, fp accuracy and times off by an hour due to PST
vs PDT.
1998-02-22 00:02:18 +00:00
Marc G. Fournier aa7244ed01 Change:
#define TAPETEMP                "pg_btsortXXXXXX"

to:

#define TAPETEMP                "pg_btsortXXXXXXX"

For some reason, under FreeBSD, it appears that the mktemp() value needs the
extra 'X' to improve/ensure uniqueness
1998-02-21 19:23:14 +00:00
Bruce Momjian ec9e44ab7c Add handling for new RangeTblEntry column name. 1998-02-21 18:17:58 +00:00
Bruce Momjian 856da1e65a Constlen can be -1, so make it a signed type. 1998-02-21 16:58:49 +00:00
Marc G. Fournier 7b30490bc9 First step done,
below  is  the patch to have views to override the permission
    checks for the accessed tables. Now we can do the following:

    CREATE VIEW db_user AS SELECT
         usename,
         usesysid,
         usecreatedb,
         usetrace,
         usecatupd,
         '**********'::text as passwd,
         valuntil
        FROM pg_user;

    REVOKE ALL ON pg_user FROM public;
    REVOKE ALL ON db_user FROM public;
    GRANT SELECT ON db_user TO public;
1998-02-21 06:32:15 +00:00
Edmund Mergl 734328840c 1.7.01.7.0 1998-02-20 21:26:08 +00:00
Edmund Mergl 30b9b529f3 1.7.0 1998-02-20 21:25:47 +00:00
Marc G. Fournier b34841d511 From: Michael Meskes <meskes@topsystem.de>
Please remove src/interfaces/ecpg/prproc/y.tab.h from cvs. It is generated
by make anyway.
1998-02-20 14:28:56 +00:00
Marc G. Fournier 373b85329d Missign a comma...
From: AA van Raalte <alvin@camberlo.demon.co.uk>
1998-02-20 13:11:26 +00:00
Marc G. Fournier b76e437465 *** empty log message *** 1998-02-20 13:10:03 +00:00
Marc G. Fournier 34dddd51fd From: Michael Meskes <meskes@topsystem.de>
Subject: [PATCHES] one small fix for ecpg
1998-02-20 13:02:14 +00:00
Marc G. Fournier c6b62a429a Update bugs section of ecpg... 1998-02-20 02:07:25 +00:00
Marc G. Fournier 7f4edbfade Okay, revert back to non-REVOKED...happy now? :) 1998-02-20 01:44:18 +00:00
Marc G. Fournier 86af6275a7 From: Andreas.Zeugswetter@telecom.at
Improved fix to pg_user/passwd problem...using rewrite rules
1998-02-19 17:25:58 +00:00
Bruce Momjian df67b83a7a Password fix. Now people have to do the REVOKE themselves. 1998-02-19 17:20:01 +00:00
Marc G. Fournier 70ddf2dfc2 oops, missed one... 1998-02-19 17:08:57 +00:00
Marc G. Fournier e53b5269ca Makefile required some cleaning up for install and make 1998-02-19 17:08:22 +00:00
Marc G. Fournier 24549df4bf Don't make shared libraries for i386_solaris yet...it doesn't work 1998-02-19 17:02:25 +00:00
Marc G. Fournier ef12012e5b Updated from 0.61->0.76 1998-02-19 16:43:54 +00:00
Bruce Momjian 9540d9786e FIFO lock wait queue, with readers grouped together. 1998-02-19 15:04:45 +00:00
Marc G. Fournier 9a55013403 Various minor modes for i386_solaris 1998-02-19 14:27:33 +00:00
Marc G. Fournier 9a4d023bb5 Check for <netinet/in.h>, required by DG/ux 1998-02-19 13:59:16 +00:00
Marc G. Fournier 1d6424b1fb From: Michael Meskes <meskes@topsystem.de>
Here's my next patch. this one should fix some more bugs. ecpg now fully
understands the whenever statement.
1998-02-19 13:52:17 +00:00
Vadim B. Mikheev ed875a4132 Fix for InitPlan-s: have to copy subselect' result tuple. 1998-02-19 04:47:07 +00:00
Marc G. Fournier 015593fd00 Already moved to the appropriate documentation directories 1998-02-19 01:44:18 +00:00
Bruce Momjian fe521fbe76 Update FAQ's for release. 1998-02-18 15:56:06 +00:00
Bruce Momjian 2ed7b03c46 Fix -t for pg_dump when table is uppercase. 1998-02-18 15:33:37 +00:00
Vadim B. Mikheev e0aab4aa9e Restore 6.2.1 output 1998-02-18 13:15:07 +00:00
Vadim B. Mikheev 9d557f83d4 GroupState changed. 1998-02-18 12:41:36 +00:00
Vadim B. Mikheev b1b246ab40 New nodeGroup.c code uses own copy of first tuple in a group.
Free memory after comparison in nodeUnique.c
1998-02-18 12:40:44 +00:00
Thomas G. Lockhart 3d18ca70a7 Start shipping gram.y products gram.c and parse.h to avoid having to build
them from scratch. gram.y has now grown so that some non-bison yaccs
 (including FreeBSDs) run out of room and quit.
1998-02-18 07:37:05 +00:00
Thomas G. Lockhart ca45412853 Add new subselect test. 1998-02-18 07:32:17 +00:00
Thomas G. Lockhart ca38b10c00 New table from new subselect test. 1998-02-18 07:29:45 +00:00
Thomas G. Lockhart 8a9fbcc9c3 Include products of gram.y to allow systems without bison to build Postgres.
The parser recently grew too big for some yaccs, including FreeBSD.
1998-02-18 07:28:08 +00:00
Thomas G. Lockhart 64ebb583bc Allow LIKE expression in constraint clause.
Allow USER and VALID as column names and identifiers.
1998-02-18 07:25:57 +00:00
Thomas G. Lockhart 5ac4dcaa19 Fix parsing for <identifier>-<number> which was mis-identified as a unary
minus. Example is SELECT f1-2 FROM INT4_TBL;
1998-02-18 07:23:22 +00:00
Thomas G. Lockhart 6c1abf0d3c Fix from Vadim for simple-minded case SELECT 1 WHERE 1 IN (SELECT 1)
used in regression tests. No longer core dumps.
1998-02-18 07:19:34 +00:00
Thomas G. Lockhart 1aa93cbfa6 Remove inclusion of the doc make. Looks like all of the man pages are
in the usual man page source directory anyway. Source tree now builds.
1998-02-18 07:16:58 +00:00
Thomas G. Lockhart 38004ce57b Cancel last version which introduced unintended flags
for linux-alpha support.
1998-02-18 07:15:23 +00:00
Vadim B. Mikheev 581166da91 Fix useor for (a,b...) Op ANY/ALL 1998-02-18 03:26:54 +00:00
Marc G. Fournier cdfac31335 I'm getting a SEGV error when testing ecpg using the perftest,or
any other, example program.

I have tracked this down to a call to PQfinish() in ECPGfinish()
that occurs before any connection is established.

From: Keith Parks <emkxp01@mtcc.demon.co.uk>
1998-02-18 01:30:42 +00:00
Marc G. Fournier 74e015916e Update the preprocessor code
From: Michael Meskes <meskes@topsystem.de>
1998-02-18 01:28:03 +00:00
Marc G. Fournier 922ea913b1 Check for and include <getopt.h> 1998-02-18 01:26:02 +00:00
Marc G. Fournier 6ab7e31efd Just another missing dummy file 1998-02-17 02:09:17 +00:00
Marc G. Fournier 203f6d93da 2. IRIX has both HAVE_FPCLASS and HAVE_FP_CLASS, therefore, in
backend/port/isinf.c it tries to compile two versions of
isinf().


From: Andrew Martin <martin@biochemistry.ucl.ac.uk>
1998-02-17 02:00:12 +00:00
Marc G. Fournier 25ad1439e1 Major update of ecpg preprocessor
From: Michael Meskes <meskes@topsystem.de>
1998-02-17 01:48:12 +00:00
Marc G. Fournier 30f737f6b1 Totally forgot to add these files... 1998-02-17 01:43:04 +00:00
Marc G. Fournier 067cb82d6a The problem is that $ac_cv_prog_gcc is empty, instead of 'no' or
whatsoever. The patch is not a solution, because configure is generated
from configure.in, and I don't know how to patch it to get a working
'configure'.

From: "Pedro J. Lobo" <pjlobo@euitt.upm.es>
1998-02-17 01:32:37 +00:00
Marc G. Fournier ded3f3b3fc Remove all backend/port/${PORTNAME} references from template files, since
they don't exist anymore
1998-02-16 14:39:29 +00:00
Marc G. Fournier 527f8babc7 From: Brian E Gallew <geek+@cmu.edu>
dgux 5.4R4.11

Missing port-protos.h (not needed, I think).  Wants dld.h.  Should
really use the system dl stuff (like i386_solaris).  Needs to include
<netinet/in.h> before <arpa/inet.h>.  Here are some patches...
1998-02-14 19:56:21 +00:00
Marc G. Fournier d1891c6fb3 Apparently there was a
compiler define that should have been enabled, but was not due to
different naming conventions for Linux/Alpha. Attached is the patch he
sent me, that I have not had a chance to test yet.

From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
1998-02-14 18:06:20 +00:00
Marc G. Fournier dde2b66f44 Remove HBA related switch
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-02-14 18:02:43 +00:00
Marc G. Fournier aa0d3ec1be From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
The file 'backend/utils/adt/arrayfuncs.c' won't compile with the
February 14th snapshot, because of an inconsistency between the
declaration and implementation of ReadArrayStr().  As far as I can
tell, the predeclaration is wrong.  I assume this is what was meant:
1998-02-14 18:00:37 +00:00
Marc G. Fournier 9336b9b280 Man page for ecpg.1 1998-02-13 19:49:06 +00:00
Bruce Momjian edd3668895 Atttypmod cleanup. 1998-02-13 19:46:22 +00:00
Marc G. Fournier ce88b9b40b From: Jan Wieck <jwieck@debis.com>
just a little correction in the pltcl_guide.nr.

    Sometimes I changed the name of tuple arguments to numbers
    like the other args are. Otherwise it wasn't possible to
    create a function as

        CREATE FUNCTION f (EMP, EMP) ... LANGUAGE 'pltcl';

    The arguments are now accessed in the function as

        $1(name) vs. $2(name)
1998-02-13 17:18:25 +00:00
Marc G. Fournier 2a07e65dcd From: Zeugswetter Andreas SARZ <Andreas.Zeugswetter@telecom.at>
Only occurrs in
src/include/storage/s_lock.h:#if defined(__AIX)
src/include/utils/dt.h:#if defined(__AIX)
src/include/utils/nabstime.h:#if defined(__AIX)

Simply delete one underscore, only occurs once per file, so no patch.
1998-02-13 17:12:08 +00:00
Marc G. Fournier a04dcc9137 From: Jan Wieck <jwieck@debis.com>
Someone changed the parser to build a TypeName node on CREATE
    FUNCTION in any  case.  As  a  side  effect,  ALL!  functions
    created  got  the  proretset  attribute  to  true. Thus for a
    SELECT the parser wrapped an Iter node around  the  Expr  and
    since  singleton  functions  set  isDone  the Iter returns no
    tuple up.
1998-02-13 13:23:33 +00:00
Marc G. Fournier b6d5fce951 Add missing extern.h file 1998-02-13 13:15:23 +00:00
Marc G. Fournier b7c0d48423 Makefile.in needs to be configured to use PORTNAME variable 1998-02-13 13:15:12 +00:00
Marc G. Fournier 084e66a077 Remove interfaces/ecpg/{include,preproc}/Makefile.in from configure 1998-02-13 13:14:41 +00:00
Vadim B. Mikheev 6eeb3d9eac gram.y: ALL_SUBLINK type was returned for x Op (subquery).
parse_expr.c: only Op of bool type are supported currently...
1998-02-13 08:10:33 +00:00
Marc G. Fournier 64e7adb07b From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
Apart from this Makefile hack, all I've done is to make dynamically
loaded code modules fail properly (as was already done for __mips__,
although I think this is too loose: I believe NetBSD for the pmax can
do dynamic linking), and to add test-and-set lock handling.  As Bruce
suggested, this is done in a maximally efficient inlined way: I was
not aware that this code was so important, speed-wise.
1998-02-13 05:10:06 +00:00
Marc G. Fournier e3f2224664 Remove -m486 option, since it is platform specific...this should technically
be removed everywhere, but so far linux-elf is the only platform that is
being reported a problem with...
1998-02-13 04:57:23 +00:00
Vadim B. Mikheev 5d7923dd1c Subselects... 1998-02-13 03:46:56 +00:00
Vadim B. Mikheev 6fcf2d7cb3 New SubPlan node for subselects.
New PARAM_EXEC type.
1998-02-13 03:45:29 +00:00
Vadim B. Mikheev eab1471b2b EState->->es_param_exec_vals = NULL; in CreateExecutorState(). 1998-02-13 03:42:32 +00:00
Vadim B. Mikheev 7fab67a8ac Fix for EXISTS. 1998-02-13 03:41:23 +00:00
Vadim B. Mikheev e51c674c59 Support for subselects. 1998-02-13 03:40:23 +00:00
Vadim B. Mikheev 9184073324 Call union_planner() instead of planner(). 1998-02-13 03:39:26 +00:00
Vadim B. Mikheev 4a6e3a6a9f Old planner() becomes union_planner(); new planner() makes initialization
of some global variables to support subselects and calls union_planner().
Calls to SS_replace_correlation_vars() and SS_process_sublinks() in
query_planner() before planning.
Get rid of #ifdef INDEXSCAN_PATCH in createplan.c.
1998-02-13 03:37:04 +00:00
Vadim B. Mikheev a3f1c3673f Quite limited support for subselects in clausesel.c.
Get rid of #ifdef INDEXSCAN_PATCH in indxpath.c.
1998-02-13 03:29:39 +00:00
Vadim B. Mikheev dc892fd390 Support for subselects.
(Have to re-visit readfuncs.c)
1998-02-13 03:27:47 +00:00
Vadim B. Mikheev 1a105cefbd Support for subselects.
ExecReScan for nodeAgg, nodeHash, nodeHashjoin, nodeNestloop and nodeResult.
Fixed ExecReScan for nodeMaterial.
Get rid of #ifdef INDEXSCAN_PATCH.
Get rid of ExecMarkPos and ExecRestrPos in nodeNestloop.
1998-02-13 03:26:53 +00:00
Vadim B. Mikheev 13637df458 Support for subselects. 1998-02-13 03:21:30 +00:00
Marc G. Fournier 33c2da9725 From: Michael Meskes <meskes@topsystem.de>
Here's the ecpg patch for the local variables bug I reported earlier:
1998-02-12 14:02:10 +00:00
Marc G. Fournier 7d55b1c7f0 There, fixed 1998-02-12 12:38:12 +00:00
Marc G. Fournier ced5b1ff01 Screwed this up...fixing now 1998-02-12 12:37:49 +00:00
Marc G. Fournier d8b59b1d30 Clean up Makefiles - shouldn't require configure *.in Makefiles, as they should
pull their data/info from Makefile.global
1998-02-12 12:35:56 +00:00
Marc G. Fournier 7783c2b9ff Remove configure code from ecpg, as well as remove the 'for' loop from the
Makefile, as it isn't appropriate for GNUmake
1998-02-12 02:14:59 +00:00
Bruce Momjian 1e7fed7fd9 MemSet cleanup. 1998-02-12 01:50:01 +00:00
Bruce Momjian 1e3c5b0ab5 Memset cleanup 1998-02-11 21:45:40 +00:00
Bruce Momjian e166409033 Change to MemSet for Alpha. 1998-02-11 21:38:08 +00:00
Bruce Momjian 182c2057f2 Change int align. 1998-02-11 21:17:44 +00:00
Bruce Momjian 24cab6bd0d Goodbye register keyword. Compiler knows better. 1998-02-11 19:14:04 +00:00
Marc G. Fournier df10360d8e From: Michael Meskes <meskes@topsystem.de>
Cleanups for ecpg, as well as a missing patch so that its configured in
1998-02-11 15:30:00 +00:00
Marc G. Fournier 72aa1dabb9 From: Michael Meskes <meskes@topsystem.de>
Cleanups for ecpg, as well as a missing patch so that its configured in
1998-02-11 15:18:05 +00:00
Marc G. Fournier 755c2be9b4 From: Michael Meskes <meskes@topsystem.de>
Remove "temp" configure files
1998-02-11 14:44:02 +00:00
Marc G. Fournier 2784f7c81a From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
1998-02-11 14:38:31 +00:00
Marc G. Fournier 957a6149e5 From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
1998-02-11 14:14:18 +00:00
Marc G. Fournier a71a80b0f2 From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
1998-02-11 14:08:01 +00:00
Thomas G. Lockhart 9d99dacd08 Update test for newly implemented "<=" operator. 1998-02-11 04:13:33 +00:00
Thomas G. Lockhart cad3c5d35b Try bumping to version two... 1998-02-11 04:11:19 +00:00
Thomas G. Lockhart 878b8d64c8 Define ROW and STATEMENT as parser tokens.
Use explicit tokens to decode CREATE TRIGGER clauses.
Allow ROW and STATEMENT as column identifiers.
Fix CAST syntax to require parens per SQL92 spec.
Define TypeId to allow correct translation of type names in CREATE FUNCTION
 and other statements. Need to do this without looking up defined type
 names because CREATE FUNCTION can specify undefined (new) types.
Define UserId to complete removal of "Id" generic entity.
Define xlateSqlFunc() to convert SQL92 CHARACTER_LENGTH() and CHAR_LENGTH()
 functions to calls to length().
Define func_name parser entity for contexts requiring a function name.
Have xlateSqlType() translate "float" to "float8".
1998-02-11 04:09:54 +00:00
Thomas G. Lockhart 5e9e8849c9 Automatically promote out of range integers to floats.
Throw elog(NOTICE) to flag promotion.
1998-02-11 03:56:08 +00:00
Thomas G. Lockhart 9e22f82562 Fix typos in SQL statement terminators. 1998-02-11 03:51:38 +00:00
Marc G. Fournier 1f4f6b22bc regression test based off of Solaris/Sparc v2.6 1998-02-10 17:42:54 +00:00
Marc G. Fournier 38201e21d0 Erk, the whole directory structure changed on us here... 1998-02-10 16:44:17 +00:00
Marc G. Fournier a8313f9671 Updated ECPG From: Michael Meskes <meskes@topsystem.de> 1998-02-10 16:37:01 +00:00
Bruce Momjian 0386a50f31 Pass around typmod as int16. 1998-02-10 16:04:38 +00:00
Marc G. Fournier 2a3c589c5a Clean up regression tests for SunOS (based on Solaris v2.6)
Clean up strings.out , removed func_get_detail from error message
1998-02-10 14:22:50 +00:00
Bruce Momjian 2c482cdbf2 Pass attypmod through to executor by adding to Var and Resdom. 1998-02-10 04:02:59 +00:00
Marc G. Fournier 2535fcde2a From: Peter T Mount <patches@maidast.demon.co.uk>
This patch fixes the following:

* Fixes minor bug found in DatabaseMetaData.getTables() where it doesn't
  handle default table types.
* It now reports an error if the client opens a database using
  properties, and either the user or password properties are missing. This
  should make the recent problem with Servlets easier to find.
* Commented out obsolete property in Driver.getPropertyInfo()
1998-02-09 03:22:41 +00:00
Marc G. Fournier 83e637a99a This was a new class that was introduced last weekend. I'm attaching the
source here. It goes in the src/interfaces/jdbc/postgresql/util directory

Marc, can you make sure this is in the distribution, Thanks
1998-02-09 02:16:55 +00:00
Bruce Momjian b33f080c26 Atttypmod cleanups. 1998-02-07 21:41:52 +00:00
Bruce Momjian 65faaf3046 atttypmod now -1. 1998-02-07 06:11:56 +00:00
Bruce Momjian ec9d5d71ec Update now that attcacheoff initial value is -1 always. 1998-02-06 20:18:01 +00:00
Bruce Momjian 6009d70eab Set attcacheoff value to -1 for all tables. 1998-02-06 19:18:06 +00:00
Bruce Momjian c2dd3c4fef Fix for \d on long table names. 1998-02-06 17:46:31 +00:00
Bruce Momjian b20fd6c42d FIx hasSubLinks for Vadim. 1998-02-06 16:46:29 +00:00
Marc G. Fournier 33c34920ff From: Michael Meskes <meskes@topsystem.de>
I have implemented a better user interface (well part of) so you can use it
as expected. As usual there are some bug fixes. :-)
1998-02-06 13:32:34 +00:00
Bruce Momjian fe0154ba87 FIx for varchar(), char() and INSERT .. SELECT. 1998-02-05 22:48:44 +00:00
Bruce Momjian 4eb1ee294d Vadim fix for vacuum analyze. 1998-02-05 21:19:21 +00:00
Bruce Momjian 5e6de5d961 FIx for atttypmod on system tables. 1998-02-05 19:50:55 +00:00
Bruce Momjian 9188175ead FIx for atttypmod in system catalogs. 1998-02-05 19:02:44 +00:00
Bruce Momjian e3f2eb1f39 Fix for varchar functions, and indextyple j-1 fix. 1998-02-05 17:22:41 +00:00
Marc G. Fournier 82034103ed From: Michael Meskes <meskes@topsystem.de>
Well this is not really a patch. But I mananged to get Linus' old Postgres95
precompiler to compile and work with PostgreSQL. The next step would be to
collect bug/missing feature reports and to put it into the distribution so
that it is made with the standard make procedure.

Warning! So far it is not tested much and it does not install correctly. But
I was able to create a small binary with it.
1998-02-05 15:46:43 +00:00
Marc G. Fournier c10908e0d2 Symptom:
select  from  a  table  with  attrs  (a  int, b char(20))
        crashed in bpcharout() (palloc of -1 bytes). But a  table
        with attrs (a int, b varchar(20)) worked.

From: Jan Wieck <jwieck@debis.com>
1998-02-05 15:08:49 +00:00
Marc G. Fournier 692cfec8aa init_fixup_addr() function removed, so port-protos.h no longer required 1998-02-05 04:21:56 +00:00
Marc G. Fournier 7b6cbd53f7 func_error() changed so that if caller is passed with NULL value, its
output at least doesn't appear that its missing something.

wasn't particularly confident with removing 'caller' altogether :(
1998-02-05 04:08:44 +00:00
Marc G. Fournier af7a2b3243 Build in a 'dummy' tas file...nothing in it, just used for the link process
of configure
1998-02-05 04:00:55 +00:00
Bruce Momjian 0f582cee86 char() cleanup and more cacheoff improvements. 1998-02-05 03:47:08 +00:00
Marc G. Fournier 48ad446c04 Fix up this so that it also doesn't use a caller variable... 1998-02-05 03:40:10 +00:00
Marc G. Fournier 03febc634b Clean up func_error() function completely removing caller variable as
"more info then user requires"
1998-02-05 03:35:48 +00:00
Marc G. Fournier d85a5420f7 Port specific, compiler specfied for SGI/Irix5
From: Andrew Martin <martin@biochemistry.ucl.ac.uk>
1998-02-05 03:31:01 +00:00
Bruce Momjian 1637684af4 Cleanup getattr code. Make CHAR() use attcacheoff. 1998-02-04 21:32:12 +00:00
Marc G. Fournier 60f54d629d Try this fix for the tas.s code... 1998-02-04 13:19:32 +00:00
Thomas G. Lockhart c1dcd59c48 Allow most expressions in BETWEEN clause. Allow all expressions if
surrounded by parentheses (but not all are meaningful).
Remove unused keywords ACL, APPEND, MERGE.
Requires a "make clean" to recompile all code since keyword numeric
 assignments have changed with keyword removal.
1998-02-04 06:11:48 +00:00
Bruce Momjian bced35f1e1 Vacuum parameter fix. 1998-02-03 21:57:27 +00:00
Marc G. Fournier 73867f773e Strange, this should be required, but initialize need_tas to no 1998-02-03 20:30:43 +00:00
Marc G. Fournier cadda10a14 I tried to match up the if/test stuff...fixed now, I think 1998-02-03 19:40:15 +00:00
Bruce Momjian 00f325d510 Subselects with =, >, etc.
Cleanup for vacuum help, manual page, and error message
1998-02-03 19:27:30 +00:00
Marc G. Fournier f00a9e3e9f various i386_solaris cleanups that should fix sparc_solaris and hpux 1998-02-03 18:06:37 +00:00
Marc G. Fournier b17bf38ccc Learning a little more about autoconf each day...
Fix inclusion of 'tas.s' for various ports
1998-02-03 16:58:46 +00:00
Thomas G. Lockhart d6b5d8506d Supress call to tzset() in reset_timezone() if a new time zone has never
been set in the session.
General cleanup of timezone support code.
1998-02-03 16:06:49 +00:00
Thomas G. Lockhart a90b6a4464 Remove unused keyword CHANGE. 1998-02-03 16:04:05 +00:00
Thomas G. Lockhart 93d80d3359 Define boolean functions and operators for lseg <, <=, <>, >=, >.
Define functions and operators for closest point to lseg on box,
 to line on lseg, to lseg on lseg.
Define function and operator for length of lseg.
Change length operator from '??' to '@-@'
 (currently defined for path and lseg).
1998-02-03 16:01:59 +00:00
Thomas G. Lockhart 3f52d1705a Define boolean functions for lseg <, <=, <>, >=, >
Define close_ls(), close_lseg(), lseg_length().
Write real code for close_sb(), close_pb(), inter_sb(), inter_lb().
Repair lseg_perp() which determines if two lsegs are perpendicular.
Repair lseg_dt() distance between two lsegs.
Note: close_sl() is clearly broken  but will repair later
 (calculating point on lseg rather than point on line).
1998-02-03 15:55:58 +00:00
Marc G. Fournier 50436b7214 Use proper symbol for hpux 1998-02-03 12:42:52 +00:00
Marc G. Fournier 67c4b05f41 Just another dummy file 1998-02-03 12:41:24 +00:00
Marc G. Fournier feb5a2cfd6 Fix for various aix related 'mis-defines'
From: Darren King <darrenk@insightdist.com>
1998-02-03 02:09:08 +00:00
Marc G. Fournier ea514d2e6a Fix for missing tas.s under sparc_solaris
Reported by:  Shiby Thomas <sthomas@cise.ufl.edu>
1998-02-03 02:07:15 +00:00
Bruce Momjian c18ed2f5a7 Parser cleanup for expr and subqueries. 1998-02-03 01:53:24 +00:00
Marc G. Fournier eb348bf41c Clean up the alpha port, remove the backend/port/alpha subdirectory
structure, and move the init_address_fixup() code directly into
backend/main/main.c with appropriate #ifdefs around it...
1998-02-03 01:25:47 +00:00
Marc G. Fournier fe3737f6f9 Fixes for linux-elf-sparc related template file
From: "Thomas A. Szybist" <szybist@boxhill.com>
1998-02-03 01:00:50 +00:00
Marc G. Fournier 2bfc73f55e From: teunis <teunis@mauve.computersupportcentre.com>
Slight cleanups for glibc2.0
1998-02-03 00:57:42 +00:00
Marc G. Fournier bfd85c8ee3 Add an irix5.c dummy file for irix5 port 1998-02-02 15:24:47 +00:00
Marc G. Fournier 4e9dd95296 From: Peter T Mount <patches@maidast.demon.co.uk>
[This is a repost - it supercedes the previous one. It fixes the patch so
it doesn't bread aix port, plus there's a file missing out of the
original post because difforig doesn't pick up new files. It's now
attached. peter]

This patch brings the JDBC driver up to the current protocol spec.
Basically, the backend now tells the driver what authentication scheme to
use.

The patch also fixes a performance problem with large objects. In the
buffer manager, each fastpath call was sending multiple Notifications to
the backend (sometimes more data in the form of notifications were being
sent than blob data!).
1998-02-02 13:17:01 +00:00
Marc G. Fournier 67c92f423a Fix up the alpha port/dynloader for configure 1998-02-02 03:49:11 +00:00
Marc G. Fournier 68c6ddbe8f Fix for ltoa() problem pointed out by Stan Brown <stanb@awod.com> 1998-02-02 03:11:37 +00:00
Marc G. Fournier 7264c8226e set "caller" value in parse_func.h to func_get_detail instead of just "" 1998-02-02 02:12:34 +00:00
Marc G. Fournier ff88f7db9d Current output for FreeBSD (2/1/98) 1998-02-02 01:48:25 +00:00
Bruce Momjian 244c4a180f No datedebug printing of date debug is not defined. 1998-02-02 01:28:12 +00:00
Marc G. Fournier a86e06cb9b Fix HP/ux port for tas.s 1998-02-02 00:13:41 +00:00
Marc G. Fournier 40b75ef5d0 Fixes:
dynloader.c:25: port-protos.h: No such file or directory

In HPUX port
1998-02-02 00:10:10 +00:00
Marc G. Fournier dd26bef4ef #if aix changed to #if HAVE_SYS_SELECT_H 1998-02-02 00:05:03 +00:00
Marc G. Fournier e6e364088a Move all the isinf() stuff from float.c to isinf.c, and build it according to
configure vs port specific #ifdef's...
1998-02-02 00:04:08 +00:00
Bruce Momjian 79f99a3888 Fix for psort. fixes regression tests. 1998-02-01 22:20:47 +00:00
Bruce Momjian 6159ba3ab1 AIX patch from Darren King and Univel patch from Billy Allie, mostly
related to grammar and parser issues, with one postmaster fix.
1998-02-01 19:43:54 +00:00
Marc G. Fournier 44030ef229 minor change so that it outputs to regression.diffs ... 1998-02-01 11:46:10 +00:00
Marc G. Fournier ca5eefb645 Make changes so that when the diff is done between 'expected' and 'results',
if an operating specific expected file exists, use that for the comparison.
This allows for "legit" differences between results, like the "Result too
large" message vs "Math result not representable" ...

Also, have the failed diffs get output to regression.diffs so that its easy to
view those tests that failed
1998-02-01 11:43:17 +00:00
Marc G. Fournier 9fd18a6785 Missed adding new univel files and removing univel subdirectory 1998-02-01 07:46:43 +00:00
Marc G. Fournier 6e9558e639 From: "Billy G. Allie" <Bill.Allie@mug.org>
The following patches will bring the UNIVEL port in line with the new porting
model used in postgreSQL 6.3
1998-02-01 07:44:00 +00:00
Bruce Momjian d8ddb10f51 Reduce size of inlining. 1998-02-01 05:38:40 +00:00
Marc G. Fournier 1af818b8bf 1. "#ifdef 0" is bad C. ifdef is for checking a macro and 0 is
an illegal macro name.  Correct syntax is "#if 0".  This is in...

From: Darren King <darrenk@insightdist.com>
1998-02-01 00:02:59 +00:00
Marc G. Fournier 7a33578436 From: Phil Thompson <phil@river-bank.demon.co.uk>
I haven't had final confirmation from Peter yet, but the attached patch
needs to be applied for the Beta otherwise password and crypt
authentication just won't work.

It puts back the loop in libpq and also fixes a couple of problems with
maintaining compatability with pre-6.3 drivers.
1998-01-31 21:27:28 +00:00
Marc G. Fournier 93211b9170 From: Phil Thompson <phil@river-bank.demon.co.uk>
I haven't had final confirmation from Peter yet, but the attached patch
needs to be applied for the Beta otherwise password and crypt
authentication just won't work.

It puts back the loop in libpq and also fixes a couple of problems with
maintaining compatability with pre-6.3 drivers.
1998-01-31 20:14:15 +00:00
Bruce Momjian f1f01a70f9 fmgr_faddr cleanup 1998-01-31 05:54:57 +00:00
Bruce Momjian 32305d8c51 fmgr_faddr cleanup 1998-01-31 05:31:03 +00:00
Bruce Momjian 63d5fd177a Inline fmgr_faddr() for speed. 1998-01-31 05:22:43 +00:00
Bruce Momjian 726c3854cb Inline fastgetattr and others so data access does not use function
calls.
1998-01-31 04:39:26 +00:00
Marc G. Fournier 2df6bba3ca From: PostgreSQL DataBase <postgres@scuba.pcpipeline.com>
This again fixes the problem
with the default permissions for PUBLIC and the preventing of
statements like "GRANT null on test to test_user;".
1998-01-30 15:03:35 +00:00
Marc G. Fournier b7ed95ae15 don't forget to 'template' i386_solaris 1998-01-29 17:16:02 +00:00
Marc G. Fournier 8e789e8ef1 From: Phil Thompson <phil@river-bank.demon.co.uk>
Attached is the patch to fix the warning messages from my code.  I also
fixed one which wasn't my code.  Apart from the usual warnings about the
bison/yacc generated code I only have one other warning message.  This
is in gramm.y around line 2234.  I wasn't sure of the fix.

I've also replaced all the calls to free() in gramm.y to calls to
pfree().  Without these I was getting backend crashes with GRANT.  This
might already have been fixed.
1998-01-29 03:24:36 +00:00
Marc G. Fournier 2780576e36 From: "Pedro J. Lobo" <pjlobo@euitt.upm.es>
I've patched pg_dump.c and createdb to add support for password
authentication, using the '-u' switch as in psql. I have updated also the
man pages.
1998-01-29 02:26:47 +00:00
Bruce Momjian 0427469f57 psql \df cleanup and lock manual page cleanup. 1998-01-28 20:44:42 +00:00
Marc G. Fournier 7fc4c76edb Someone wants to try a Cynus port.... 1998-01-28 12:45:44 +00:00
Bruce Momjian 0ff43badd5 Lock cleanup 1998-01-28 06:52:58 +00:00
Marc G. Fournier 8a02b22e89 From: Peter T Mount <patches@maidast.demon.co.uk>
This has a problem when using any authentication other than trust or
ident.

Anything using libpq will hang, because the client will go into a loop
while connecting. The following patch simply comments out two lines (a do
and a while), removing the loop. Going through the new scheme, I can't see
why this do..while loop is in there.
1998-01-28 03:42:27 +00:00
Bruce Momjian 8abd424369 More deadlock code to check for escallation locks.
offsetof() addition to local socket size.
1998-01-28 02:29:40 +00:00
Bruce Momjian 54399bb2f9 dummyret cleanup 1998-01-27 15:57:41 +00:00
Bruce Momjian b65847b84e Reversed out group by patch. 1998-01-27 15:41:32 +00:00
Bruce Momjian b4564a98fa Deadlock ceallnup.
(void) change for aix and hp compilers.

protocol cleanup.
1998-01-27 15:35:30 +00:00
Marc G. Fournier f49d41353d This should fix Stan's USE_POSIX_SIGNALS problem as well 1998-01-27 05:04:35 +00:00
Marc G. Fournier 9efbe8d761 From what I can tell, -DNOFIXADE does absolutely nothing under HP/ux 1998-01-27 05:03:15 +00:00
Marc G. Fournier 7aeda9d667 add CC:cc so that configure uses cc on non-gcc machine
From: Stan Brown <stanb@awod.com>
1998-01-27 05:02:11 +00:00
Bruce Momjian 0519a96546 Fix local domain structure size computation. 1998-01-27 04:08:28 +00:00
Marc G. Fournier c4213aede1 From: Phil Thompson <phil@river-bank.demon.co.uk>
Cleanup patches for previous protocol changes patch
1998-01-27 03:25:14 +00:00
Bruce Momjian 7c3dc8f772 Protocol cleanup from Phil. 1998-01-27 03:11:46 +00:00
Bruce Momjian 862927f443 Real deadlock detection. 1998-01-27 03:00:43 +00:00
Marc G. Fournier 0e91367109 Try this to fix HP/UX port compile 1998-01-26 02:48:36 +00:00
Marc G. Fournier 90fb23e692 #include <sys/types.h> required for u_long in <netinet/in.h> 1998-01-26 01:55:05 +00:00
Marc G. Fournier 16a20c53dc #include <sys/types.h> required for u_long 1998-01-26 01:49:19 +00:00
Marc G. Fournier d5bbe2aca5 From: Phil Thompson <phil@river-bank.demon.co.uk>
I've completed the patch to fix the protocol and authentication issues I
was discussing a couple of weeks ago.  The particular changes are:

- the protocol has a version number
- network byte order is used throughout
- the pg_hba.conf file is used to specify what method is used to
  authenticate a frontend (either password, ident, trust, reject, krb4
  or krb5)
- support for multiplexed backends is removed
- appropriate changes to man pages
- the -a switch to many programs to specify an authentication service
  no longer has any effect
- the libpq.so version number has changed to 1.1

The new backend still supports the old protocol so old interfaces won't
break.
1998-01-26 01:42:53 +00:00
Bruce Momjian 91d983aa11 cash_words_out fix 1998-01-26 01:01:37 +00:00
Marc G. Fournier 20e11f2909 From: Darren King <darrenk@insightdist.com>
I have always been under the impression that NULL is not equal to
NULL and that NULL is not equal to anything else either.  If this
is the case, then this patch is correct.

If NULL _is_ equal to NULL, then I think there are other problems
in the Group By logic.
1998-01-26 00:21:02 +00:00
Bruce Momjian d57753efd4 Add cash_words_out and fix \df width. 1998-01-25 20:23:40 +00:00
Marc G. Fournier 594aae99ae From: todd brandys <brandys@eng3.hep.uiuc.edu>
o  The manual (really text) pages for create/alter/drop user.
1998-01-25 07:42:02 +00:00
Marc G. Fournier 9f8d3b668b this is to help someone that wants an AUX port get started... 1998-01-25 07:08:31 +00:00
Marc G. Fournier b611fefa0f Patch to document the /etc/psqlrc / ~/.psqlrc config files
From: <Dr. Andrew C.R. Martin> martin@biochem.ucl.ac.uk
1998-01-25 06:12:52 +00:00
Marc G. Fournier 753f720cb8 Merge in D'Arcy Cain's python interface (PyGreSQL 2.0) 1998-01-25 06:09:40 +00:00
Marc G. Fournier 98018c4b93 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Small patch for sparc solaris/tas()
1998-01-25 05:23:59 +00:00
Marc G. Fournier c58fb21bd4 From: Jeroen van Vianen <jeroenv@design.nl>
This patch solves the problem with multiple order by columns, with the
first one having NULL values.
1998-01-25 05:18:34 +00:00
Bruce Momjian c16ebb0f67 getpid/pid cleanup 1998-01-25 05:15:15 +00:00
Marc G. Fournier fc75484550 Somehow the 'comment' here got messed up 1998-01-25 05:04:21 +00:00
Marc G. Fournier 25a8c053e3 From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
Hi -- a couple of small items concerning the January 23rd snapshot:
the inclusion of the Kerberos stuff in one Makefile, a "leading tab"
cleanup in another, and a fix for a typo in the configure script.
1998-01-25 04:14:36 +00:00
Marc G. Fournier 81dc201921 Wish ppl would make up their mnd :) 1998-01-25 04:12:28 +00:00
Marc G. Fournier 47ad8d1cf5 OOps...missed the second patch of patch two that uses pfree() instead of
free()

From: James Hughes <jamesh@interpath.com>
1998-01-25 04:10:32 +00:00
Marc G. Fournier 151a1238d2 This is the second of two patches required to fix the the grant and
revoke statements.

From: James Hughes <jamesh@interpath.com>
1998-01-25 04:08:54 +00:00
Marc G. Fournier af32f4d5d3 Patch against src/backend/nodes/outfuncs.c.orig fixes backend crashes
when creating unique indexes.

From: James Hughes <jamesh@interpath.com>
1998-01-25 04:07:52 +00:00
Marc G. Fournier 49459d85a9 This patch fixes one of two problems with grant/revoke statements on the
Linux platform.

From: James Hughes <jamesh@interpath.com>
1998-01-25 04:07:00 +00:00
Bruce Momjian 7229513943 Fix prototypes so they don't look like function definitions. 1998-01-24 22:50:57 +00:00
Marc G. Fournier 27317a0d7c More up to date scan.c 1998-01-24 19:40:56 +00:00
Bruce Momjian 0e8ac82c63 Fix a variety of locking problems like newer lock waiters getting
lock before older waiters, and having readlock people not share
locks if a writer is waiting for a lock, and waiting writers not
getting priority over waiting readers.
1998-01-23 22:16:48 +00:00
Marc G. Fournier 1de8926bbe LOCK_LEVEL is defined in an i386_solaris system file, causing the compile
to break.  renaming to PG_LOCK_LEVEL
1998-01-23 19:53:44 +00:00
Marc G. Fournier b34c8ec3ec From: James Hughes <jamesh@interpath.com>
This is a patch to fix crashes in psql when executing queries from
an external file. The code also adds error checking to verify that
memory for "query" was allocated. The conditional for the block of
code was changed from "query == NULL" to "query_alloced == false".

The conditional, "query == NULL", was never true. This prevented
the memory being allocated for "query". A few lines later, an attempt
to write to an un-allocated memory area generated a SIGSEGV causing
the frontend to crash.
1998-01-23 19:22:24 +00:00
Marc G. Fournier b8476a09fe From: Andrew Martin <martin@biochemistry.ucl.ac.uk>
psql .psqlrc file startup(Andrew)
1998-01-23 19:21:11 +00:00
Marc G. Fournier 33de29fc45 Minor cleanups for i386_solaris port 1998-01-23 19:13:22 +00:00
Marc G. Fournier e697082f00 A dummy file so that configure under solaris works 1998-01-23 18:58:00 +00:00
Bruce Momjian 661bb38812 Cleanup deadlock message. 1998-01-23 06:01:36 +00:00
Marc G. Fournier c487962dd7 Fixes a free() problem under FreeBSD
Fixed pointed out by: jwieck@debis.com (Jan Wieck)
1998-01-23 02:31:18 +00:00
Bruce Momjian 7015dfef4b Add LOCK command as DELETE FROM ... WHERE false. 1998-01-22 23:05:18 +00:00
Bruce Momjian 0fd8d60185 Allow \z to show sequences. 1998-01-22 18:50:22 +00:00
Bruce Momjian ef06ec61e6 Small varlena cleanup. 1998-01-21 23:42:15 +00:00
Bruce Momjian 0f413d2dc2 Make subqueries rewrite properly. 1998-01-21 04:24:46 +00:00
Bruce Momjian 7e46348e62 FIx for regression-test found bug. 1998-01-20 22:55:25 +00:00
Bruce Momjian 7f31669bea Add Var.varlevelup to code. More parser cleanup. 1998-01-20 22:12:17 +00:00
Bruce Momjian 412a5e6539 Parser cleanup.
Add lock to i386 asm.
1998-01-20 05:05:08 +00:00
Marc G. Fournier 8700377384 Start an openbsd port 1998-01-20 03:11:11 +00:00
Bruce Momjian 1316113ea3 Fix problem with nodes handling. 1998-01-19 18:11:10 +00:00
Bruce Momjian 3d24e75176 Added code so SubLinks make it to optimizer. 1998-01-19 05:48:55 +00:00
Bruce Momjian 588867bd7b Create SubLink nodes in parser for Vadim. 1998-01-19 05:06:41 +00:00
Bruce Momjian 691dc282f8 Fix for SELECT INTO TABLE for varchar(). 1998-01-19 02:37:51 +00:00
Marc G. Fournier 8169769ee5 From: "Michael J. Maravillo" <mmj@philonline.com>
This patch makes it possible to do a "real" make distclean (back to its
fresh state) on the distribution after compilation, regression testing,
etc.
1998-01-17 23:39:35 +00:00
Marc G. Fournier 4aa861cabb From: "Michael J. Maravillo" <mmj@philonline.com>
Also, I think the existence of pgsql/src/bin/initlocation/initlocation
isn't necessary as it's generated by Makefile from initlocation.sh.
1998-01-17 23:36:44 +00:00
Marc G. Fournier 2a29325cec Must commit configure changes after patch to configure.in 1998-01-17 23:35:24 +00:00
Marc G. Fournier 36c1c94bca From: "Billy G. Allie" <Bill.Allie@mug.org>
The attached patches will allow postgreSQL to compile successfully on SCO
UNIXWARE 2.1.x.  The patches fix the following problems:

1.  Configure did not properly recognize the UNIXWARE system as needing the
    univel port.  It used the sys4 port.

2.  Configure did not properly process the CC flag in the template file.

3.  There was no working test and set locking implementation for the native
    UNIXWARE compiler.

4.  The test and set locking used for Intel X86 that was selected by defining
    NEED_I386_TAS_ASM could fail in a multi-processor environment.

5.  The makefiles for libpq and libpgtcl did not make a shared library for
    the univel port.
1998-01-17 23:33:58 +00:00
Marc G. Fournier 98c7cb11de From: Jan Wilhelm <Jan_Wilhelm@Physik.TU-Muenchen.DE>
a) psql dumps core when using -a password and PGUSER is set but PGPASSWORD
   not set.
1998-01-17 23:17:46 +00:00
Bruce Momjian 53622d66d2 Gram.y cleanup. 1998-01-17 05:01:34 +00:00
Bruce Momjian b37bc65f44 Creates the SubLink structure, and the Query->hasSubLink field,
with supporting code.

Creates SubLink node in gram.y.

psql.c patch for newatttypmod field.
1998-01-17 04:53:46 +00:00
Bruce Momjian c65ea0e040 New pg_attribute.atttypmod for type-specific information like
varchar length.

Cleans up code so attlen is always length.

Removed varchar() hack added earlier.

Will fix bug in selecting varchar() fields, and varchar() can be
variable length.
1998-01-16 23:21:07 +00:00
Bruce Momjian d7427e4802 Temporary varchar patch. 1998-01-16 05:03:45 +00:00
Bruce Momjian 41a4f64dcf Fix for aggreg problem and fmgr.c compile problems. 1998-01-15 22:31:33 +00:00
Marc G. Fournier d876c25803 Fix:
nodeAgg.c: WARN -> NOTICE for elog
parse_oper.c: was created after patch for fmgr_info, so function call wrong
scan.c: regenerated for i386_solaris using flex 2.5.4
gethostname.c: required prototype for gethostname() function
config.h.in: create prototype for isinfo() function

isinf.c: "fake" isinf() under i386_solaris using fpclass() call...
1998-01-15 20:54:52 +00:00
PostgreSQL Daemon baef78d96b Thank god for searchable mail archives.
Patch by: wieck@sapserv.debis.de (Jan Wieck)

   One  of  the design rules of PostgreSQL is extensibility. And
   to follow this rule means (at least for me) that there should
   not  only  be a builtin PL.  Instead I would prefer a defined
   interface for PL implemetations.
1998-01-15 19:46:37 +00:00
Bruce Momjian 763ff8aef8 Remove Query->qry_aggs and qry_numaggs and replace with Query->hasAggs.
Pass List* of Aggregs into executor, and create needed array there.
No longer need to double-processs Aggregs with second copy in Query.

Fix crash when doing:

	select sum(x+1) from test where 1 > 0;
1998-01-15 19:00:16 +00:00
Bruce Momjian f22d8e6668 Function cleanupo for List* when it should be Node *. 1998-01-14 19:55:53 +00:00
Bruce Momjian cb3ce64f2e Cleanup of prototypes. FIx for PQtrace start/stop several times. 1998-01-14 15:48:51 +00:00
Marc G. Fournier d8972c62b4 this should pretty much clean up the i386_solaris port, with regression
tests running "as expected"...
1998-01-13 20:13:19 +00:00
Marc G. Fournier 8adc838ff6 Various cleanups for the i386_solaris environment 1998-01-13 19:28:39 +00:00
Marc G. Fournier 434165295a isinf() doesn't exist under i386_solaris, so code it such that
it is (!isnan() && !finite()) instead
1998-01-13 19:22:29 +00:00
Marc G. Fournier 06356b8978 Oops, should be 'tas.o', not 'tas.s' 1998-01-13 19:04:39 +00:00
Marc G. Fournier 3a48ee4a0f MIssed a semi-colon in AC_LINK_FILES for i386_solaris port... 1998-01-13 15:53:02 +00:00
Marc G. Fournier 80b6206c5a Further clean up "auto-configuration" for ports 1998-01-13 15:31:24 +00:00
Marc G. Fournier 6361ac88b9 Work on getting the i386_solaris compile to work ... 1998-01-13 15:00:22 +00:00
Vadim B. Mikheev 1fd402be54 Remove unused "option" from PQconnectdb(). 1998-01-13 14:57:25 +00:00
Vadim B. Mikheev 9453940a85 Remove PageSizeIsValid from BufferGetPageSize. 1998-01-13 14:56:15 +00:00
Vadim B. Mikheev e8291f7ce2 extern char* crypt_getpwdreloadfilename(void);
^^^^
1998-01-13 14:53:36 +00:00
Marc G. Fournier dfef663fd6 Add a 'dummy' file for i386_solaris.c for configure 1998-01-13 13:33:12 +00:00
Marc G. Fournier a5b106ee89 Updated Regression output 1998-01-13 05:28:21 +00:00
Marc G. Fournier 7fddac925b Have clean clean out the test directory also, as well as the Makefiles in
interfaces/{libpq,libpgtcl}
1998-01-13 04:43:22 +00:00
Marc G. Fournier 6380e70f07 A minor patch for HP/UX 10 vs 9 1998-01-13 04:38:30 +00:00
Marc G. Fournier 602b0d0c1c From: Goran Thyni <goran@bildbasen.se>
OK, here comes a patch, DBD::Pg (and possibly other 3rd party clients)
can connect to unix sockets.
Patch is against current source tree.

Background:
libpq set some policy for client, which it should not
IMHO. It prevent some 3rd party clients to connect with
unix domain sockets etc.
1998-01-13 04:24:10 +00:00
Marc G. Fournier 80159ee2bc One more src/interfaces/libpq/Makefile problem: there's an explicit
reference to the name of the shared library, instead of dereferencing
the definition from the top of the file.

From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-01-13 04:20:51 +00:00
Marc G. Fournier 405ced26ba Various fixes resulting from removing the PORTNAME defines
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-01-13 04:18:22 +00:00
Marc G. Fournier 374bb5d261 Some *very* major changes by darrenk@insightdist.com (Darren King)
==========================================
What follows is a set of diffs that cleans up the usage of BLCKSZ.

As a side effect, the person compiling the code can change the
value of BLCKSZ _at_their_own_risk_.  By that, I mean that I've
tried it here at 4096 and 16384 with no ill-effects.  A value
of 4096 _shouldn't_ affect much as far as the kernel/file system
goes, but making it bigger than 8192 can have severe consequences
if you don't know what you're doing.  16394 worked for me, _BUT_
when I went to 32768 and did an initdb, the SCSI driver broke and
the partition that I was running under went to hell in a hand
basket. Had to reboot and do a good bit of fsck'ing to fix things up.

The patch can be safely applied though.  Just leave BLCKSZ = 8192
and everything is as before.  It basically only cleans up all of the
references to BLCKSZ in the code.

If this patch is applied, a comment in the config.h file though above
the BLCKSZ define with warning about monkeying around with it would
be a good idea.

Darren  darrenk@insightdist.com

(Also cleans up some of the #includes in files referencing BLCKSZ.)
==========================================
1998-01-13 04:05:12 +00:00
Marc G. Fournier f0445dcbc4 > It seems there is a mistake in substr function:
> then you try get substr, which consists only of last char in string
> you get all string
>
> For example:
> userbase=> select substr('123456', 6,1) ;
> substr
> ------
> 123456
> (1 row)
>

From Edmund Mergl <E.Mergl@bawue.de>
1998-01-13 03:49:51 +00:00
Marc G. Fournier fc7950993d Should fix it all, Peter? 1998-01-13 02:23:09 +00:00
Marc G. Fournier 06bad78075 Oops...missed over half the patch :( 1998-01-13 02:19:56 +00:00
Marc G. Fournier c77c608aa2 Upgrade to 0.76 1998-01-12 18:10:28 +00:00
Bruce Momjian f57cfa5e4d Html backend_dir cleanup 1998-01-12 14:41:38 +00:00
Bruce Momjian 1ea03f7de5 Manual page dash cleanup. 1998-01-11 22:18:01 +00:00
Marc G. Fournier e9fd73ca48 Fix from Peter for BLOBs 1998-01-11 21:16:01 +00:00
Marc G. Fournier ba977c086c Peter's Mega-Patch for JDBC...
see README_6.3 for list of changes
1998-01-11 21:14:56 +00:00
Bruce Momjian 4bad5be7bc Fix SCO and change index name. 1998-01-11 21:03:10 +00:00
Bruce Momjian 660f458d3b Clean up of copyfuncs. 1998-01-11 20:02:32 +00:00
Bruce Momjian f3dbe7356b psql help cleanup. 1998-01-11 04:36:28 +00:00
Bruce Momjian 40d55d2c0a Update psql help. 1998-01-11 04:17:01 +00:00
Bruce Momjian 600c958a30 Add UNION, GROUP, DISTINCT to INSERT. 1998-01-11 03:41:57 +00:00
Thomas G. Lockhart d70df16a76 Fix up for recent changes in elog error messages.
Some behavior of the triggers test cases changed for the least week or two;
 now back to the usual expected behavior.
1998-01-10 17:50:49 +00:00
Bruce Momjian 6cfa6cb95e Fix CLUSTER. 1998-01-10 05:19:22 +00:00
Bruce Momjian e6c714bf30 Bye CursorStmt, now use SelectStmt. 1998-01-10 04:30:11 +00:00
Bruce Momjian e7b205b486 Remove old quel labels. 1998-01-09 21:26:12 +00:00
Bruce Momjian ad8fa23727 Remove old quel labels. 1998-01-09 21:13:43 +00:00
Bruce Momjian 3d15d1332a Remove old quel labels. 1998-01-09 20:06:08 +00:00
Bruce Momjian bf8af2205b PAGER \z in psql. 1998-01-09 19:34:38 +00:00
Bruce Momjian 31a697bf92 Yohoo UNIONS of VIEWS. 1998-01-09 05:48:22 +00:00
Bruce Momjian 8f125413b0 Cleanup of varchar. 1998-01-08 06:18:18 +00:00
Bruce Momjian 84ef6aae18 Re-install working varchar() with compress size. 1998-01-08 04:58:19 +00:00
Bruce Momjian 5fe090c559 Completion of varchar rollback. 1998-01-08 04:19:16 +00:00
Bruce Momjian 35be73027e Cleanup of varchar. 1998-01-08 03:15:06 +00:00
Bruce Momjian c098f309e3 Rollback varchar size change. 1998-01-08 03:05:01 +00:00
Bruce Momjian 1c9fcfb683 Fix for varchar I missed. 1998-01-07 22:08:23 +00:00
Bruce Momjian 679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00
Bruce Momjian e6c6146eb8 Allow varchar() to only store needed bytes. Remove PALLOC,PALLOCTYPE,PFREE. Clean up use of VARDATA. 1998-01-07 18:47:07 +00:00
Marc G. Fournier 7a2a7d436d Wrap the function in and #ifdef, not the header files
Should fix an AIX compiler problem
1998-01-07 17:02:52 +00:00
Bruce Momjian 3f1b1db7c5 Cleanup of outnodes. 1998-01-07 15:40:17 +00:00
Bruce Momjian e9dc636e0c Cleanup of outnodes. 1998-01-07 15:32:47 +00:00
Bruce Momjian c01a56daf5 Fix for views and outnodes. 1998-01-07 08:08:08 +00:00
Bruce Momjian 56466049d6 Cleanup of outnode stuff. 1998-01-07 05:54:11 +00:00
Bruce Momjian c9d9fe7690 Cleanup of outnode stuff. 1998-01-07 05:50:41 +00:00
Bruce Momjian a552a894eb Cleanup of outnode stuff. 1998-01-07 05:42:47 +00:00
Bruce Momjian 1b9ab297f3 Change web page directions. 1998-01-07 03:48:29 +00:00
Bruce Momjian e22b09c227 Fix sorting of multiple fields broken with UNION. 1998-01-06 23:58:05 +00:00
Bruce Momjian 4557c846de Cleanup of sort nodes and use of strtoul . 1998-01-06 23:19:49 +00:00
Bruce Momjian f439eb35b8 ABORT to ERROR in catalog/. 1998-01-06 19:42:33 +00:00
Bruce Momjian 845f82e541 Regression cleanup of WARN. 1998-01-06 19:25:19 +00:00
Bruce Momjian 9d00fbbeb0 Change some labels in bootparse to make ctags happy. Clean up outfunc/readfunc code and add missing fields for Query structure and new Union fields. Fix optimizer bug shown in new \do command. Change WARN to ERROR in contrib and regression stuff. 1998-01-06 18:53:02 +00:00
Bruce Momjian 42acc6e8c4 Move variable.c to commands/ and aclchk.c to catalog/. 1998-01-05 18:53:12 +00:00
Bruce Momjian 9db64857e0 Move variable.c to commands/ and aclchk.c to catalog/. 1998-01-05 18:43:18 +00:00
Bruce Momjian deea69b90e Change some ABORTS to ERROR. Add line number when COPY Failure. 1998-01-05 16:40:20 +00:00
Bruce Momjian 3d8820a364 Remove un-needed quotes from psql \d DEFAULT display. 1998-01-05 13:56:05 +00:00
Bruce Momjian 69cf5abe10 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 04:10:07 +00:00
Bruce Momjian 345641e498 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:45:54 +00:00
Bruce Momjian 0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
Bruce Momjian 0af9137f14 Add NOT NULL and DEFAULT to \d table. 1998-01-05 02:21:22 +00:00
Marc G. Fournier 0aa928764a Various fixes NETBSD/sparc related
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-01-04 19:13:04 +00:00
Bruce Momjian a65e4484da Fix for aggs on views and complex ones. I missed one file. 1998-01-04 04:53:50 +00:00
Bruce Momjian 4b05912f0b Fix for count(*), aggs with views and multiple tables and sum(3). 1998-01-04 04:31:43 +00:00
Marc G. Fournier c629d3b9d6 need to include postgres.h before HAVE_DLD_H
need to include string.h for strdup()

From: Bryan Henderson <bryanh@giraffe-data.com>
1998-01-02 03:40:04 +00:00
Thomas G. Lockhart 8e3ccad128 Test for __ELF__ rather than LINUX_ELF in headers.
Comment-out dynamic link function declarations since they are all
 provided by the system.
Should we bother continuing to support non-elf Linux systems??
1998-01-01 06:02:04 +00:00
Thomas G. Lockhart e447a467fa Remove declaration for -DLINUX_ELF since testing for __ELF__ in code. 1998-01-01 05:59:24 +00:00
Thomas G. Lockhart 37f17d39c1 Define text_substr().
Change declarations from "struct varlena *" to "text *".
Remove register variables since compiler should do better on its own.
1998-01-01 05:50:50 +00:00
Thomas G. Lockhart a343b2e713 Coerce a function argument to avoid compiler warning. 1998-01-01 05:48:14 +00:00
Thomas G. Lockhart 439fb6c4fb Include text_substr() function and use instead of oracle_compat equivalent. 1998-01-01 05:47:11 +00:00
Thomas G. Lockhart fcabd0753c Change precedence for boolean operators to match expected behavior.
Change NOTICE/NOTICE/NOTICE/WARN elog messages to a single message
 with a few newline/tab breaks embedded in the string. Much cleaner I hope.
1998-01-01 05:44:54 +00:00
Thomas G. Lockhart cc19151e3b Add substring function for text based on oracle_compat package but
closer to standard behavior.
Substitute "text *" for "struct varlena *" in declarations.
1998-01-01 05:42:40 +00:00
Thomas G. Lockhart 1ac6d462b2 Bracket #define sigsetjmp() to avoid redefinition. Linux starts out with
sigsetjmp as a macro, so gives compiler warning without bracketing.
1998-01-01 05:40:28 +00:00
Thomas G. Lockhart b180144545 Include SPI module when cleaning. 1998-01-01 05:37:29 +00:00
Marc G. Fournier 0d48d4f3be Missed a subst() for the RANDOM substritution... 1997-12-31 03:51:17 +00:00
Marc G. Fournier d82f2f1f93 Change @RANDOM@ to @MISSING_RANDOM@ because of bash 1997-12-30 04:08:55 +00:00
Marc G. Fournier 42a3c46b4e Oops, missed adding a file
From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
1997-12-30 04:03:01 +00:00
Marc G. Fournier 8a0967a3b1 bring in alpha/linux s_lock changes
From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
1997-12-30 04:01:28 +00:00
Marc G. Fournier 3c1332e573 Slightly delayed patches from Todd...damn holidays :)
o  A new patch that contains the following changes:
        -- The pg_pwd file is now cached in the postmaster's memory.
        -- pg_pwd is reloaded when the postmaster detects a flag file creat()'ed
           by a backend.
        -- qsort() is used to sort loaded password entries, and bsearch() is
           is used to find entries in the pg_pwd cache.
        -- backends now copy the pg_user relation to pg_pwd.pid, and then
           rename the temp file to be pg_pwd.
        -- The delimiter for pg_pwd has been changed to a tab character.
1997-12-30 02:26:56 +00:00
Bruce Momjian a544b605e2 Change some mallocs to palloc. 1997-12-29 05:13:57 +00:00
Bruce Momjian a1dd409053 Fix for ORDER BY in UNION. 1997-12-29 04:31:50 +00:00
Bruce Momjian 499b13c994 UNION cleanup again. 1997-12-29 02:09:54 +00:00
Bruce Momjian a01b085c78 Cleanup of UNION ALL fix. Manual page updates. 1997-12-29 01:13:37 +00:00
Bruce Momjian 4ce24c8aa9 UNION work for UNION ALL and other union stuff. 1997-12-27 06:41:41 +00:00
Marc G. Fournier 2730c4a45c Knew I missed somewhere...remove PORTNAME references from GNUmakefile.in, since
PORTNAME should not be used anywhere anymore...I hope :)
1997-12-26 22:35:53 +00:00
Vadim B. Mikheev 031f471f44 Prototypes for new funcs. 1997-12-26 08:45:27 +00:00
Vadim B. Mikheev d8949adc20 Cleaning GCC warnings. 1997-12-26 06:02:26 +00:00
Vadim B. Mikheev c06ecfb456 extern char* crypt_getpwdfilename(void);
^^^^ gcc likes this
1997-12-26 05:51:51 +00:00
Bruce Momjian 6231e161c9 Implementation of UNIONs. 1997-12-24 06:06:58 +00:00
Bruce Momjian 18adbd9aed Reverse out Thomas's group clause change. 1997-12-23 21:49:03 +00:00
Bruce Momjian bbd5c21786 Make no-tty not use quiet in psql, fix group by copy failure, fix ccsym to delete tmp files. 1997-12-23 21:38:53 +00:00
Thomas G. Lockhart 6b2e7e12be Add newline/tab to middle of long failure message to pretty it up a bit. 1997-12-23 20:00:06 +00:00
Thomas G. Lockhart e8783d4af0 Change field name in RetrieveStmt from selectClause to unionClause.
Add unionall boolean field to SubSelect structure.
1997-12-23 19:58:12 +00:00
Thomas G. Lockhart 0c714ea9ae Lengthen some time conversion routine names now that longer names
(> 16 characters) are allowed in pg_proc (thanks Bruce!).
1997-12-23 19:55:51 +00:00
Thomas G. Lockhart 2119b523c5 Fix numeric comparision (... != NULL) to be (... > 0). gcc is happier now.
Add non-working code which is commented-out to copy GroupClause structures.
1997-12-23 19:53:30 +00:00
Thomas G. Lockhart 12d5c30c8c Add routines to print AExpr, Ident, and AConst parsing structures. 1997-12-23 19:50:54 +00:00
Thomas G. Lockhart 2c833a728f Implement CREATE TABLE ... AS SELECT borrowing code from SubSelect
and from SELECT ... INTO ... support code.
Allow NOT, IS NULL, IS NOT NULL in constraints.
Define unionall boolean flag in SubSelect structure.
Implement row descriptors: (a, b, c) = (x, y, z).
Change IS TRUE, IS FALSE, etc. to expressions using "=" rather than
 function calls to istrue() or isfalse() to allow optimization.
Force type for TRUE and FALSE to bool.
1997-12-23 19:47:32 +00:00
Thomas G. Lockhart 8ed721ffef Change variable name reference from selectClause to more appropriate unionClause.
Add a few lines of test code playing with the unique flag for unions.
 Does not do much helpful yet.
1997-12-23 19:39:42 +00:00
Thomas G. Lockhart 98f5975cb0 Fix up some elog error messages. 1997-12-23 19:36:20 +00:00
Thomas G. Lockhart 7c682b46c9 Expand a few date/time routine names to > 16 characters now that this
is legal. Fix a little whitespace in other declarations.
1997-12-23 19:29:15 +00:00
Thomas G. Lockhart ca23837ade Fix format to produce actual German style. Affects new "GERMAN" feature only. 1997-12-23 19:26:31 +00:00
Thomas G. Lockhart ed14f88512 Change logic slightly to avoid one unnecessary calculation. No big deal. 1997-12-23 19:24:43 +00:00
Thomas G. Lockhart c06331a47d Change a few routine names back to full length now that pg_proc allows
names over 16 characters. datet_datetime() -> datetime_datetime(), etc.
1997-12-23 19:23:09 +00:00
Bruce Momjian e4bd9127cb Remove regression in function. 1997-12-23 03:27:23 +00:00
Bruce Momjian 3827555869 Fix notty output to show status result. -q option still turns it off. 1997-12-22 20:03:53 +00:00
Bruce Momjian ad43a7219c Fix for test 0 error. 1997-12-22 05:56:43 +00:00
Bruce Momjian d404f1006b Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2). 1997-12-22 05:42:25 +00:00
Bruce Momjian 78a055a659 Remove some recursion in optimizer and clean up some code there. 1997-12-21 05:18:48 +00:00
Marc G. Fournier 0808e658a7 Potential fix for Bruce's "test" problem 1997-12-20 18:36:26 +00:00
Bruce Momjian 7fd4782504 Fix aggregates on inherited tables. 1997-12-20 07:59:44 +00:00
Marc G. Fournier 1783963cab Move more to dynloader subdir 1997-12-20 04:48:11 +00:00
Marc G. Fournier 44be631dd8 Make sure distclean works as well as clean 1997-12-20 04:43:20 +00:00
Marc G. Fournier 3cc95146c4 Missed a HAVE_ 1997-12-20 04:26:27 +00:00
Marc G. Fournier 9a60a20f99 fix so that dynloader.h is included instead of port-protos.h 1997-12-20 04:13:31 +00:00
Marc G. Fournier a38bd20b83 Fix use of variable in Makefile.in 1997-12-20 04:10:35 +00:00
Marc G. Fournier 0356acebd5 Make sure configure reflects changes 1997-12-20 03:41:06 +00:00
Marc G. Fournier 1d5cd311d1 Oops, forgot to add what I took away 1997-12-20 03:38:20 +00:00
Marc G. Fournier e3a18f6f50 More cleanups... 1997-12-20 03:36:35 +00:00
Marc G. Fournier 722fa83f05 More ports switched over 1997-12-20 03:23:46 +00:00
Marc G. Fournier b5466f8669 Move over the BSDi port files 1997-12-20 03:13:59 +00:00
Marc G. Fournier a0bc7aa74c This should get the linux port to work... 1997-12-20 02:36:26 +00:00
Marc G. Fournier 20ff6432a1 Get it so that everything else *should* work with my changes... 1997-12-20 02:33:56 +00:00
Marc G. Fournier 6e337eef45 Major cleanout of PORTNAME variables from Makefiles...bound to screw up
some of the ports...
1997-12-20 00:29:35 +00:00
Marc G. Fournier 10ff1eea60 First clean compile without a "PORTNAME" variable being set... 1997-12-20 00:11:13 +00:00
Marc G. Fournier 93e74460a9 removed the port-protos.h from bsd a little too quick...remedied now 1997-12-19 23:17:42 +00:00
Marc G. Fournier f4ceaf8484 If this doesn't break something, nothing will *muhahaha*
Just got rid of PORTNAME altogether for FreeBSD and AIX...more to follow
1997-12-19 23:10:16 +00:00
Marc G. Fournier 153558dff8 These files will get link'd to 'dynloader.[ch]', from configure, which
will then get link'd into SUBSYS.o
1997-12-19 22:58:27 +00:00
Marc G. Fournier 56a7d9fac2 More removal of port dependent stuff 1997-12-19 22:56:03 +00:00
Marc G. Fournier 903e21b451 More cleanups. Move alot of the prototype definitions straight into
config.h, right beside their appropriate HAVE_ #ifdefs...one central
location that is included everywhere...
1997-12-19 22:47:00 +00:00
Marc G. Fournier 4ee5f2b965 Get rid of PORTNAME from Makefile.global.in... 1997-12-19 21:29:28 +00:00
Marc G. Fournier 1f9eb5c106 Add regression output from FreeBSD 1997-12-19 21:23:19 +00:00
Bruce Momjian e2aec508e2 Replace foo/bar to l1/l2. 1997-12-19 16:54:15 +00:00
Marc G. Fournier d370849a9d Here is the difference between expected->results of the regression
tests under sparc_solaris
1997-12-19 15:50:18 +00:00
Marc G. Fournier c6bd6860d7 More cleanups...only need one rusagestub.h 1997-12-19 13:35:17 +00:00
Marc G. Fournier 5acf432ddb remove port from OBJS line... 1997-12-19 13:28:06 +00:00
Marc G. Fournier 429b9d6691 Nice clean compile...still need to run regression tests, but its a major
start
1997-12-19 03:42:14 +00:00
Marc G. Fournier d7046ada02 Update configure so that it auto-detects and configures for missing
functions...
1997-12-19 03:08:03 +00:00
Marc G. Fournier 2b4db36c00 Okay, that's it for tonight...broke a few ports, most likely, but that
is expected...a few ports don't have "ports" anymore, with most things
auto-configured by configure like it should be :)
1997-12-19 03:06:22 +00:00
Marc G. Fournier 70718dc25a More cleanups 1997-12-19 02:56:35 +00:00
Marc G. Fournier 3aae0f5300 More cleanups...several ports are major redundancies of other ports 1997-12-19 02:46:25 +00:00
Marc G. Fournier 3ad815fc2a port.c no longer required...individual functions that were in there are
auto-generated via configure

individual functions in individual files
1997-12-19 02:27:20 +00:00
Marc G. Fournier 5379b84eff More cleanups. I can now compile without PORTNAME being defined n
Makefile.global.

End result, if all goes well, should allow for much easier porting, since
there will no longer be a concept of a "port".  Most, if not everything,
*should* be determined by configure, or by the compiler itself.  Still
work to be done though :)
1997-12-19 02:09:10 +00:00
Bruce Momjian 30856a3904 copy query cleanup. 1997-12-18 19:46:37 +00:00
Bruce Momjian 72c296dffc Remove init_query_planner(), merged into planner(). 1997-12-18 19:41:44 +00:00
Bruce Momjian e9182152ec Fix copy for no aggregates. 1997-12-18 19:13:49 +00:00
Bruce Momjian 6a45941f2f Remove Existential, and ifdef out generate_fjoin. Neither did anything. 1997-12-18 12:54:45 +00:00
Bruce Momjian 4469eb63a3 Cost cleanup. 1997-12-18 12:30:44 +00:00
Bruce Momjian d3f0e87d17 Cost cleanup. 1997-12-18 12:21:02 +00:00
Bruce Momjian 6b00ec3713 Cleanup of agg copy. 1997-12-18 05:58:40 +00:00
Bruce Momjian bf9c9f716c Cleanup of agg copy. 1997-12-18 04:33:31 +00:00
Bruce Momjian c64cc3228a Fix Query handling for inheritance, and cost computations. 1997-12-18 03:03:41 +00:00
Thomas G. Lockhart d451a3b3bc Enable timespan_finite() and text_timespan() routines (was commented out).
Define an "ISO-style" timespan output format with "hh:mm:ss" fields.
 Enabled by DateStyle = USE_ISO_DATES.
1997-12-17 23:22:17 +00:00
Thomas G. Lockhart 5af05c0a59 Move declarations for timespan2tm() and tm2timespan() from dt.c to here. 1997-12-17 23:19:28 +00:00
Bruce Momjian 5266471a2f Rename Query label so ctags finds real structure. 1997-12-17 18:21:37 +00:00
Bruce Momjian d158fce8eb Add optimizer README file. 1997-12-17 18:02:33 +00:00
Marc G. Fournier 542d4e528d First pass through, of many to come, towards making the whole source
tree "non-PORTNAME" dependent.  Technically, anything that is PORTNAME
dependent should be able to be derived at compile time, through configure
or through gcc
1997-12-17 04:59:16 +00:00
Marc G. Fournier 9ef6b32c47 Makefile cleaned up
async.c: #include <port-protos.h> surrounded by an #ifdef HAVE_STRDUP

vacuum.c: #include <port-protos.h> commented out...can someone comment as
          to why it was included, as it doesn't seem to have any effect
          under FreeBSD so far...would like some sort of #ifdef wrapper
          like async.c if possible
1997-12-17 04:44:50 +00:00
Marc G. Fournier e2d9501094 Clean up the Makefiles
Essentially, this cleans things up so that if PORTNAME isn't defined (I'm
    working on getting rid of it for FreeBSD, at least, to see if its possible)
    none of the PORTNAME related stuff gets passed around.

	Had a little bit of -I related redundancy as well
1997-12-17 04:31:34 +00:00
Marc G. Fournier ceabf8cab9 Make it entirely possible for PORTNAME to be undefined 1997-12-17 04:03:30 +00:00
Marc G. Fournier 6bdcad66e4 Add recognition for 'machten' 1997-12-17 03:23:52 +00:00
Thomas G. Lockhart b31df3ebb7 Mention PST8PDT explicitly in the banner message (rather than PST/PDT). 1997-12-16 16:01:05 +00:00
Thomas G. Lockhart 6316f4d3db Define text, varchar, and bpchar string length functions. 1997-12-16 15:59:11 +00:00
Thomas G. Lockhart 6873af55cf Use MAXPGPATH to declare size of socket name storage. 1997-12-16 15:58:14 +00:00
Thomas G. Lockhart 8de20a3aed Use environment variable PGDATESTYLE on backend startup to initialize
date/time formats and conventions.
1997-12-16 15:57:00 +00:00
Thomas G. Lockhart a58825a467 Add declarations for text, bpchar, and varchar length functions.
Remove declarations in builtins.h duplicated in dt.h.
Change a few return type declarations to use "type *"
 rather than "struct ...".
1997-12-16 15:55:17 +00:00
Thomas G. Lockhart 3551ee097f Add declarations for text, bpchar, and varchar length functions. 1997-12-16 15:53:17 +00:00
Thomas G. Lockhart 331a163693 Allow multiple-argument functions in constraint clauses.
Formerly allowed only single arguments.
Declare column constraints using the usual list mechanism rather
 than explicit itemized lists.
Remove NOTNULL from default clause syntax (retain "NOT NULL").
 NOTNULL is not SQL92; eventually remove it from expressions too?
Move ISNULL, NOTNULL to Postgres-specific token declarations.
Fix up tabs and indenting on new CREATE USER commands.
1997-12-16 15:50:54 +00:00
Thomas G. Lockhart 640fe03bcf Improve (well, ok, fix) generated constraint name for column CHECK clause. 1997-12-16 15:45:46 +00:00
Bruce Momjian eb825d356e Fix order of keywords, must be alphabetical. 1997-12-16 05:04:00 +00:00
Bruce Momjian 0f1802f00c Fix for user password packet processing, from Goran Thyni. 1997-12-15 22:03:59 +00:00
Bruce Momjian ab179d6940 Make password null on startup. 1997-12-12 16:26:36 +00:00
Bruce Momjian c60f70b53f Rename pg_plan and pg_eval to be more meaningful. 1997-12-11 17:36:58 +00:00
Bruce Momjian 645cc13276 Remove PGDATA setting and use DataDir. 1997-12-11 17:03:52 +00:00
Bruce Momjian b69359e2d7 Spark/Linux patch for locking, from Tom Szybist 1997-12-09 20:55:33 +00:00
Marc G. Fournier da72b903ff Major code cleanup following the pg_password insertion...
...malloc/free -> palloc/pfree
	...fopen/fclose -> AllocateFile/FreeFile
1997-12-09 03:11:25 +00:00
Thomas G. Lockhart 405740ace6 Include informational messages added for implicit index creation. 1997-12-09 01:46:31 +00:00
Thomas G. Lockhart 2ac4cf5502 Add information message about implicitly created indices.
Check for duplicate implicit index names and generate unique names.
1997-12-09 01:44:14 +00:00
Thomas G. Lockhart a440f8e3d7 Remove trailing period from an elog message.
Most other messages do not have one.
1997-12-09 01:40:30 +00:00
Bruce Momjian 53026db75e More VARHDRSZ additions. 1997-12-08 04:42:48 +00:00
Marc G. Fournier bec35da8bf Add error check on getenv("DATADIR")
Add code to set DATADIR in postmaster.c if -D is used
1997-12-07 20:57:45 +00:00
Bruce Momjian a68a132a6c Add VARHDRSZ where needed. Many places just used 4. 1997-12-06 22:57:36 +00:00
Thomas G. Lockhart d358456ca3 Add test for multi-character char(). 1997-12-05 01:14:55 +00:00
Bruce Momjian 5a5cb30096 Fix tolower loops to go in proper direction for cache. 1997-12-05 01:13:24 +00:00
Marc G. Fournier 84fc5c4aed I found one other change that I would like to make to the
src. It is in the function ParseACL. When I find that I
can not allocate enough memory for the ACL structure I
return an NULL instead of doing an exit_nicely(g_conn);

From: Matthew C Aycock <maycock@scuba.pcpipeline.com>
1997-12-05 01:04:25 +00:00
Thomas G. Lockhart 733f2a43cc Change constraint syntax to SQL92 style.
Add tests for PRIMARY KEY and UNIQUE clauses.
1997-12-05 00:01:22 +00:00
Thomas G. Lockhart 5d7c9119fa Define USE_GERMAN_DATES for use in date/time I/O functions. 1997-12-04 23:58:01 +00:00
Thomas G. Lockhart dc88e795d1 Change Constraint structure to be a full node structure.
Add new constraint types PRIMARY, UNIQUE.
1997-12-04 23:55:52 +00:00
Thomas G. Lockhart 77356a7fc1 Add Constraint node type.
Remove TimeRange node type tag (everything else already gone).
1997-12-04 23:43:59 +00:00
Thomas G. Lockhart 352b36877f Add 'GERMAN' style to date/time output.
Probably have it wrong (dd.mm/yyyy) but can change it when we know.
 Input routines always handled it.
1997-12-04 23:30:52 +00:00
Thomas G. Lockhart d7e0e61d84 Run through toupper() conversion in the forward direction.
Most processors should optimize this a bit better wrt cache prefetch.
1997-12-04 23:28:20 +00:00
Thomas G. Lockhart 6ad698c928 Add some printing capability for a few more node types (CreateStmt,
IndexStmt, IndexElem, ColumnDef).
1997-12-04 23:20:32 +00:00
Thomas G. Lockhart 0295864514 Add 'GERMAN' option to DateStyle. 1997-12-04 23:17:13 +00:00
Thomas G. Lockhart 0569136e48 Change Constraint structure name from ConstraintDef to Constraint.
Change reference to field inside to be compatible with new definition
 as a "node" structure rather than a specialty structure.
1997-12-04 23:15:28 +00:00
Thomas G. Lockhart 1ac4ae4993 Add SQL92-compliant syntax for constraints.
Implement PRIMARY KEY and UNIQUE clauses using indices.
1997-12-04 23:07:23 +00:00
Bruce Momjian 8d30b40843 Update description for PGHOST and unix domain sockets. Add warning for failed connections. 1997-12-04 20:32:35 +00:00
Bruce Momjian 7d2fafe636 Update description for PGHOST and unix domain sockets. Add warning for failed connections. 1997-12-04 20:26:37 +00:00
Marc G. Fournier 8a57e21c30 Incorporate patch from Matt(maycock@intelliquest.com) for dumping ACLs
Clean up formatting of code

Integrate new functions into dumpTable


This is not tested yet...have to recompile server due to patches from
Todd...but this compiles cleanly as it stands now
1997-12-04 01:31:28 +00:00
Marc G. Fournier a91ad1af09 Missed a few files from Todd's patch...oops :) 1997-12-04 00:34:01 +00:00
Marc G. Fournier 4c04f7724e From: todd brandys <brandys@eng3.hep.uiuc.edu>
An extension to the code to allow for a pg_password authentication database
that is *seperate* from the system password file
1997-12-04 00:28:15 +00:00
Bruce Momjian 333323f304 Fix vacuum analyze syntax problem. 1997-12-02 16:09:15 +00:00
Marc G. Fournier 899326a78b the -l option doesn't take a port option, so the man page shouldn't say it
does
1997-12-02 03:43:54 +00:00
Marc G. Fournier 3253f9e222 gmake distclean wasn't removing the configure generated Makefile in
pg_version...

...fixed
1997-12-02 03:19:42 +00:00
Thomas G. Lockhart 8f4865bdd7 Remove premature code in constraint parsing.
Change elog WARN to NOTICE for unimplemented constraints.
1997-12-02 02:54:15 +00:00
Marc G. Fournier 9257cb65b2 Linux related change to .similar to handle 'a.out' files...
From: Herb Richter <hgr@buynet.com>
1997-12-02 02:43:08 +00:00
Bruce Momjian b05eddaaab Fix pg_dump, and libpq changes. 1997-12-01 22:02:49 +00:00
Bruce Momjian dfc1a6a848 Document pg_dump -z, clean up option list. Fix problem with libpq handling of field names uppercase code. 1997-12-01 21:01:24 +00:00
Thomas G. Lockhart df823bc42d Deep-six tests using time travel, which has been removed from Postgres. 1997-12-01 02:51:07 +00:00
Thomas G. Lockhart 7a86a2a9e5 Add tests for varchar() and combinations of string types. 1997-12-01 02:48:47 +00:00
Thomas G. Lockhart 1d7b6f14e2 Adjust tests to reflect removal of time travel.
Add tests for strings and varchar.
1997-12-01 02:46:13 +00:00
Thomas G. Lockhart f901971c86 Adjust output to reflect changes in tests. 1997-12-01 02:44:53 +00:00
Thomas G. Lockhart 07c1837f50 Change elog WARN messages for UNIQUE and PRIMARY, FOREIGN KEY
to NOTICE messages so that execution proceeds rather than halting.
 These clauses are ignored as stated in the messages.
Allow NOT NULL UNIQUE syntax (both were allowed individually before).
Allow Postgres-style casting ("::") of non-constants.
1997-11-30 23:11:10 +00:00
Thomas G. Lockhart 361f9e7f8d Add comments and move a few declaration blocks to help readability.
No functional changes this time!
1997-11-30 23:05:39 +00:00
Thomas G. Lockhart b12ba5f695 Specify hash table support functions for float8 and int4 rather than using
btree support functions. Don't know why this was that way, but would
 assume that these should be consistant with all other types with
 hash support. Regression tests OK.
Change a few comments and field alignment to make things more readable.
1997-11-30 23:03:28 +00:00
Thomas G. Lockhart 2c98143681 Add datetime and timespan hash index declarations. Use float8 for both;
certainly OK for datetime since it is a float8 and should be OK for
 timespan since the first field within timespan is a float8.
Use float8 hash function for time type (rather than char8).
1997-11-30 22:58:07 +00:00
Thomas G. Lockhart d16b4767fe Remove duplicate block of declarations. Must have been introduced recently
since I've run ./duplicate_oids (and found no problems) in the last
 couple of months.
Add and modify some DESCR() entries to describe functions.
1997-11-30 22:52:24 +00:00
Thomas G. Lockhart abedcddbd1 Change hash field for a few equality operators so all have it set.
Don't know why these few were not already this way, and don't know if
  there is some hidden problem with this, but assume it was done
  accidentally as entries were copied from other operators.
 Regression tests are OK, but...
Move one block of declaration source to keep OIDs in increasing order.
 Did not change OID values, just moved source code.
1997-11-30 22:49:22 +00:00
Thomas G. Lockhart 9faa6cabc5 Add pg_type.h to include list to regain declaration of type OID assignments.
Lost these when some include files were reorganized.
 Regression test could not compile.
1997-11-30 22:42:58 +00:00
Bruce Momjian 7059464335 Fix for \dd on types. 1997-11-30 17:46:01 +00:00
Bruce Momjian 002796b5ca Rename heap_destroyr to heap_destroy, heap_destroy to heap_destroy_with_catalog. 1997-11-28 17:28:02 +00:00
Bruce Momjian c445ba331b Rename heap_create to heap_create_and_catatlog, rename heap_creatr to heap_create(). 1997-11-28 04:40:40 +00:00
Bruce Momjian a8926e0461 Salt fix for password, from Tatsuo Ishii. 1997-11-27 03:11:55 +00:00
Bruce Momjian 241a87b951 Prevent flushing from packets, by Massimo. 1997-11-27 03:01:12 +00:00
Bruce Momjian db00632e0f Cleaups of comments. 1997-11-27 02:23:02 +00:00
Bruce Momjian bac80c218e Add README for parser directory 1997-11-26 15:36:00 +00:00
Bruce Momjian d79b9a1b7a Re-order args for TypeCreate() to be clearer. 1997-11-26 04:50:47 +00:00
Bruce Momjian 7c00ffb843 Fix from Zeugswetter Andreas DBT for Sendproc. 1997-11-26 04:37:53 +00:00
Bruce Momjian 983ec2cb4b Make parser functions static where possible. 1997-11-26 03:54:23 +00:00
Bruce Momjian b704426618 Make parser functions static where possible. 1997-11-26 03:43:18 +00:00
Bruce Momjian 97ad0b1cd4 \dd fix. 1997-11-26 02:34:28 +00:00
Bruce Momjian 43c7114b48 Cleanup up include files. 1997-11-26 01:26:13 +00:00
Bruce Momjian 598e86f3b3 Cleanup up include files. 1997-11-26 01:14:33 +00:00
Bruce Momjian 4a5b781d71 Break parser functions into smaller files, group together. 1997-11-25 22:07:18 +00:00
Bruce Momjian 3aff4011c7 Remove gram problems with archive. 1997-11-24 16:55:22 +00:00
Bruce Momjian 91742c5c24 Change heading. 1997-11-24 14:15:11 +00:00
Bruce Momjian 4857de6be4 Cleanup wrapping in \d commands. 1997-11-24 14:05:02 +00:00
Bruce Momjian a986b7ba4d Move descriptions to pg_proc, add descriptions. 1997-11-24 13:43:29 +00:00
Bruce Momjian 49656346b8 Move dbcommands.c to commands/. It should not be in the parser directory. 1997-11-24 05:32:56 +00:00
Bruce Momjian 36e3df0767 Move dbcommands.c to commands/. It should not be in the parser directory. 1997-11-24 05:21:03 +00:00
Bruce Momjian f7f2e18f8e Remove tqual.h includes not needed. 1997-11-24 05:09:50 +00:00
Bruce Momjian 1409819a87 Fix for textcat on varchar() fields. 1997-11-23 21:39:12 +00:00
Bruce Momjian f4253b0b49 Archive cleanups. 1997-11-21 19:59:39 +00:00
Bruce Momjian 195f78e43c More archive cleanup. 1997-11-21 19:12:41 +00:00
Bruce Momjian 043cebce2b More archive cleanup. 1997-11-21 19:02:59 +00:00
Bruce Momjian 629e27284d Remove unused files. 1997-11-21 18:22:04 +00:00
Bruce Momjian 3fa2bb316c Remove archive stuff. 1997-11-21 18:12:58 +00:00
Bruce Momjian 0889dcd6f7 Remove archive stuff. 1997-11-21 18:04:26 +00:00
Bruce Momjian e9e1ff226f Remove all time travel stuff. Small parser cleanup. 1997-11-20 23:24:03 +00:00
Bruce Momjian e075271c17 Fix socket file permissions, from Goran Thyni. 1997-11-19 18:28:59 +00:00
Bruce Momjian 58527aa227 Add to .similar file, Tatsuo Ishii 1997-11-19 17:57:42 +00:00
Bruce Momjian 474de35053 FIx for unix domain sockets, from Goran Thyni. 1997-11-19 17:52:00 +00:00
Vadim B. Mikheev 21261b031c Call ExecEvalExpr with &isDone (not with NULL). 1997-11-19 05:28:14 +00:00
Bruce Momjian b686104cd5 Change \df order. 1997-11-19 03:14:19 +00:00
Bruce Momjian 7372b8c2da Remove stuff that is now in psql \d. 1997-11-18 23:04:27 +00:00
Vadim B. Mikheev c5d7a27275 Get rid of unused variable 'address'. 1997-11-18 07:58:10 +00:00
Bruce Momjian 20858bdd96 Make \d commands not wrap over 80 cols. 1997-11-18 06:46:31 +00:00
Bruce Momjian 79daac6bad Add descriptions for types and operators. 1997-11-18 05:22:51 +00:00
Bruce Momjian bd6733f9ce Clean out pgbuiltin now that new psql \d commands exist. 1997-11-17 22:15:03 +00:00
Bruce Momjian d0928a3af3 Fix \e for empty file. 1997-11-17 17:54:24 +00:00
Bruce Momjian d0471244e6 Remove 16 char limit on system table/index names. Rename system indexes. 1997-11-17 16:59:36 +00:00
Thomas G. Lockhart 80c1e82232 Unscramble port selection logic to avoid compiler complaints about
uninitialized variables. I _think_ the logic is preserved...
1997-11-17 16:42:39 +00:00
Thomas G. Lockhart c2f4779ddf Define prototype for ExecutorLimit() to avoid compiler complaints. 1997-11-17 16:41:04 +00:00
Thomas G. Lockhart 680ef08511 Add DTK_DOY to help decode day of year fields. 1997-11-17 16:39:58 +00:00
Thomas G. Lockhart 45a8b666c0 Include first text in some type descriptions (~29 entries). 1997-11-17 16:39:16 +00:00
Thomas G. Lockhart 4b19101fc3 Update UNION and subselect syntax.
Support SQL92 syntax for type coersion of strings (type 'typeval').
 Example: "DATETIME 'now'". This works only for string constants and can
 not replace the CAST and ::type syntax which behave identically in this
 context.
1997-11-17 16:37:24 +00:00
Thomas G. Lockhart 6df962668a Update generated source for scan.l. 1997-11-17 16:33:21 +00:00
Thomas G. Lockhart 3d4d1e14f8 Implement SQL92 binary and hexadecimal string decoding (b'10' and x'1F').
Check decoding of integer in x - y syntax (already done for most ints).
1997-11-17 16:31:39 +00:00
Thomas G. Lockhart 2fa330284c Use limits.h for INT, SHRT, and SCHAR min and max values rather than
hardcoded values.
1997-11-17 16:26:27 +00:00
Thomas G. Lockhart 174f984b76 Use SHRT_MIN and SHRT_MAX for 2-byte integer limits. 1997-11-17 16:24:17 +00:00
Thomas G. Lockhart e7946a53ad Allow fractional values for delta times (e.g. '2.5 days').
Check valid numeric input more carefully for delta times.
Implement day of year as possible input to datetime_part().
1997-11-17 16:23:33 +00:00
Thomas G. Lockhart 55a6b7a9be Include unistd.h to get read/write function declarations.
Remove unused variable addrLen.
1997-11-17 16:18:07 +00:00
Thomas G. Lockhart 8e86c46be3 Add storage/ipc.h include file to get read/write function declarations. 1997-11-17 16:17:14 +00:00
Thomas G. Lockhart c47eaac952 Fix compiler complaints about mismatched pointer args using coersions. 1997-11-17 16:10:06 +00:00
Bruce Momjian 0f62b3024e Fix for \e on empty file. 1997-11-17 05:23:11 +00:00
Marc G. Fournier 9bcf350cc7 Apply Bryan's IPC Patches
From: Bryan Henderson <bryanh@giraffe.netgate.net>
1997-11-17 03:47:31 +00:00
Bruce Momjian 930bce33db Re-ordeer new \d command output. 1997-11-16 05:32:16 +00:00
Bruce Momjian 12fc33077b New \dS psql command. initdb cleanup. 1997-11-16 04:36:52 +00:00
Bruce Momjian 1c32d285a6 Remove pg_magic, defaults, server, hosts, and demon tables. unused. 1997-11-15 20:58:05 +00:00
Bruce Momjian 0dec3a8d37 Fix problem of COPY before vacuum. 1997-11-15 17:15:35 +00:00
Bruce Momjian 4e9df155f0 Add new \df psql option and oid8types() function. 1997-11-15 16:32:25 +00:00
Thomas G. Lockhart 2e0976e003 Fix testing problem when 'current' equal to 'now' for separate inserts
on fast machines with fast disks.
Adjust a few other tests to be more complete.
1997-11-15 02:55:57 +00:00
Thomas G. Lockhart 644b37c095 Add mention of new environment variables for session initialization.
Cross-reference libpq(3).
1997-11-15 02:47:23 +00:00
Bruce Momjian 2f4ccfe053 Make flowchart file smaller. 1997-11-14 22:00:32 +00:00
Bruce Momjian 4cbc06cff1 Add new psql \da, \do, and \dT options. 1997-11-14 21:38:25 +00:00
Thomas G. Lockhart 208dae3727 Set time zone and date style environment variables.
Update banner message regarding time zone.
1997-11-14 15:57:12 +00:00
Thomas G. Lockhart 0f2189efff Include flex output in the standard distribution to fix problems with
old AT&T lexers and exclusive states (Solaris has trouble and probably
 others).
1997-11-14 15:50:22 +00:00
Thomas G. Lockhart 6eaafef1df Supress cleaning scan.c since we will try to include it in the distribution.
This should help Solaris and (presumably) other distributions with
 old AT&T-descended lex programs which can't handle "exclusive states".
1997-11-14 15:48:19 +00:00
Thomas G. Lockhart 97d2b92384 Add flag to supress one compiler warning regarding unused "unput" function
in flex-specific code.
1997-11-14 15:43:27 +00:00
Thomas G. Lockhart e9c31055e6 Add mention of PGDATESTYLE, PGTZ, PGCOSTHEAP, PGCOSTINDEX, PGRPLANS, PGGEQO
as initialization environment variables.
1997-11-14 15:41:30 +00:00
Thomas G. Lockhart 3a73060ba5 Add other initialization environment variables:
PGCOSTHEAP, PGCOSTINDEX, PGRPLANS, PGGEQO
 (PGDATESTYLE, PGTZ already defined)
1997-11-14 15:38:31 +00:00
Thomas G. Lockhart f3311457ec Reformat parser table (cosmetic only). 1997-11-14 15:34:09 +00:00
Bruce Momjian 430169a5ea FIx for indexing regex stuff. Change rowoid to objoid. 1997-11-14 06:09:07 +00:00
Bruce Momjian ea4223c45f FIx for indexing regex stuff. Change rowoid to objoid. 1997-11-14 05:57:46 +00:00
Bruce Momjian 145bae2759 pg_description cleanup. 1997-11-13 03:36:42 +00:00
Bruce Momjian 5071ae2972 Add pg_description table for info on tables, columns, operators, types, and aggregates. Modify psql with new \dd operator to access description 1997-11-13 03:23:18 +00:00
Bruce Momjian 7e48d427c8 File has moved to include/catalog. 1997-11-12 03:30:33 +00:00
Thomas G. Lockhart 9507e539e2 Remove unnecessary inclusion of <ctype.h>. 1997-11-10 15:43:26 +00:00
Thomas G. Lockhart 367089b0c1 Add PGTZ environment variable to initialization code.
Rename PG_DATESTYLE to PGDATESTYLE environment variable.
Move environment variable code to a different place so it now works!
Note that regression tests can now run with "setenv PGTZ PST8PDT"
 at the frontend rather than requiring the backend to have TZ set.
1997-11-10 15:41:58 +00:00
Thomas G. Lockhart 4ebc4e39d1 Do a more complete job of supporting time zone information.
Try to save pre-existing TZ environment variable if possible.
Includes code from Keith Parks.
1997-11-10 15:37:15 +00:00
Thomas G. Lockhart b42e37bcde Change quickdie elog notice to a single message.
Clean up FloatExceptionHandler elog message source code.
1997-11-10 15:24:56 +00:00
Thomas G. Lockhart 25e950fca4 Change messages regarding "TimeRange" to say that time travel is no longer
available.
Remove lots of #ifdef'd debugging print statements.
1997-11-10 15:22:36 +00:00
Thomas G. Lockhart ced2ee8210 Clean up path handling esp. when interpreting environment variables.
Remove unused old code.
1997-11-10 15:17:44 +00:00
Thomas G. Lockhart fe36d461c2 Add errormsg initialization from patch by Keith Parks. 1997-11-10 15:15:40 +00:00
Thomas G. Lockhart 2b51c92d30 Clean up handling of environment variables in path names. 1997-11-10 15:14:34 +00:00
Bruce Momjian 725bbde05c Clean up indenting. 1997-11-10 05:16:00 +00:00
Bruce Momjian baeb8790ac Fix case issues with quotes. 1997-11-10 05:10:50 +00:00
Marc G. Fournier 0f367cf8c8 From: "Gillies, Robert" <GilliesR@Nichols.com>
Add: Stratus computer (a fault tolerant Unix box running an Intel I960
processor).
1997-11-10 03:31:49 +00:00
Bruce Momjian 50729ac764 Patch from Goran Thyni 1997-11-10 02:21:18 +00:00
Marc G. Fournier 242625f26b From: Bryan Henderson <bryanh@giraffe.netgate.net>
My analysis of the formerly mentioned IPC reinitialization problem was
hampered by an imprecise error message.  I have rewritten it so it is
clearer and more accurate.
1997-11-09 04:47:09 +00:00
Marc G. Fournier 213d7b1ae3 From: Bryan Henderson <bryanh@giraffe.netgate.net>
The attached patch makes elog() write the message to stderr if there is
no frontend to talk to.
1997-11-09 04:43:35 +00:00
Marc G. Fournier 8d0fe2d0d4 Oops, shouldn't have added that extra, it seems... :) 1997-11-09 03:58:20 +00:00
Marc G. Fournier 3dfcef7c5f Add i586-pc-sco3.2v5.0.2 to .similar file
Pointed out by: Pieter Huyser <pieter@inetsys.alt.za>
1997-11-09 03:45:39 +00:00
Bruce Momjian 6016148c61 new alpha linux locking from Travis Melhiser <melhiser@viper.co.union.nc.us> 1997-11-07 21:35:41 +00:00
Bruce Momjian 06a7001350 Update postmaster manual page. 1997-11-07 21:25:07 +00:00
Bruce Momjian 5af43965cf Update of Java driver from Peter Mount. 1997-11-07 21:07:48 +00:00
Bruce Momjian c17fa36d3c Add Unix domain socket support, from Goran Thyni, goran@bildbasen.se 1997-11-07 20:52:15 +00:00
Thomas G. Lockhart 27b12bfd54 Include transam.h to get NullTransactionId defined
for use by recently created macros.
1997-11-07 18:39:38 +00:00
Thomas G. Lockhart 4676b3034a Routines for database initial access info and support. 1997-11-07 07:05:46 +00:00
Thomas G. Lockhart 8a7f79c83c Add database.c for database initial access info and support. 1997-11-07 07:03:37 +00:00
Thomas G. Lockhart acc2843025 Implement CREATE DATABASE/WITH LOCATION=.
Implement SET keyword = DEFAULT and SET TIME ZONE DEFAULT.
Re-enable JOIN= option in CREATE OPERATOR statement (damaged for v6.2).
Allow more SQL and/or Postgres reserved words as column identifiers
 or, if there are shift/reduce problems, at least as column labels.
1997-11-07 07:02:10 +00:00
Thomas G. Lockhart 6210dd5264 File is created by make from source in ../output 1997-11-07 06:47:41 +00:00
Thomas G. Lockhart ea567d2fad Declare routines which support SET keyword = value SQL commands. 1997-11-07 06:45:16 +00:00
Thomas G. Lockhart 7016678aaf Enable SET value = DEFAULT by passing null parameter to parsers.
Enable SET TIME ZONE using TZ environment variable.
1997-11-07 06:43:16 +00:00
Thomas G. Lockhart b2905ea43a Describe new command to create alternate database locations. 1997-11-07 06:40:45 +00:00
Thomas G. Lockhart 7d1f2f8a27 Support alternate database locations. 1997-11-07 06:38:51 +00:00
Thomas G. Lockhart d98f2f9985 Support "with location" capability for database creation. 1997-11-07 06:33:57 +00:00
Thomas G. Lockhart 6698389349 Change error message for rejected input. 1997-11-07 06:32:05 +00:00
Thomas G. Lockhart c934ee7859 Change phrasing of input error message.
Add istrue() and isfalse() routines to implement SQL3 IS TRUE and IS FALSE.
1997-11-07 06:30:20 +00:00
Thomas G. Lockhart 7e1a8a90f8 Support "delimited identifiers" for \d tablename command.
This allows mixed-case identifiers if surrounded by double quotes.
Add mention of "with location" clause for "create database" in help.
1997-11-07 06:27:55 +00:00
Thomas G. Lockhart c97f6fd197 Add "-D location" to specify alternate database location. 1997-11-07 06:25:25 +00:00
Thomas G. Lockhart 75d5ce28ea Add initlocation. 1997-11-07 06:24:33 +00:00
Thomas G. Lockhart 7387e88720 Change "more" to "cat" to allow typeahead while making backend. 1997-11-07 06:22:36 +00:00
Thomas G. Lockhart b5417a39da Create alternate location(s) for databases. 1997-11-07 06:21:39 +00:00
Bruce Momjian 5aaf00f3f3 Remove NOT_USED for Massimo. 1997-11-05 21:18:59 +00:00
Bruce Momjian 7589967613 Remove time travel from manuals. 1997-11-03 04:47:08 +00:00
Bruce Momjian 475a8873b0 Add paging for \d, and fix \i. 1997-11-03 04:21:49 +00:00
Bruce Momjian 89ad327099 Portability fix for pg_passwd. 1997-11-02 18:15:20 +00:00
Vadim B. Mikheev 32cd09ac6d Good Bye, Time Travel! 1997-11-02 15:27:14 +00:00
Bruce Momjian 6cc0a00dec Fix acl error, and remove duplicate pqtrace. 1997-11-01 05:21:57 +00:00
Bruce Momjian 1e7ba76e43 Indexes for LIKE and ~, !~ operations. 1997-10-31 00:50:39 +00:00
Bruce Momjian 0308f91cd2 No more warnings on macros, thanks VAdim. 1997-10-30 23:37:01 +00:00
Bruce Momjian fcb47f8884 Remember release.txt change. 1997-10-30 22:37:28 +00:00
Bruce Momjian 818f2644e9 Update version to 6.3. dump/reload for 6.1 version users. 1997-10-30 22:09:04 +00:00
Bruce Momjian 65c00f7e80 We have multi-column indexes, so update manual. 1997-10-30 18:41:03 +00:00
Bruce Momjian ef1fc0c90d FIx for SCO compiles. 1997-10-30 18:31:47 +00:00
Bruce Momjian 0e58306857 Fix for java to allow password, european dates,from Peter T Mount 1997-10-30 18:24:44 +00:00
Bruce Momjian 2cc73c0d42 FIx for libptcl make, from Tatsuo Ishii. 1997-10-30 17:36:58 +00:00
Bruce Momjian 9a8fcee342 Patch for tcl library crash, from Jan Wieck. 1997-10-30 17:29:57 +00:00
Bruce Momjian 9f133d23ff Remove duplocate lock_timeout value. 1997-10-30 17:23:59 +00:00
Thomas G. Lockhart e037c351d4 Update for modified quoting style in some error messages. 1997-10-30 16:53:51 +00:00
Thomas G. Lockhart be74113f76 Add initial backend support for SET/SHOW/RESET TIME ZONE.
Uses TZ environment variable.
 Needs additional schemes for brain-dead SQL92 time offsets.
1997-10-30 16:52:11 +00:00
Thomas G. Lockhart 0dd738148c Support SQL92 delimited identifiers by checking some attribute names
for mixed-case and surrounding with double quotes.
1997-10-30 16:48:03 +00:00
Thomas G. Lockhart cc1b420cfd Add routines istrue() and isfalse() to directly evaluate boolean type. 1997-10-30 16:45:12 +00:00
Thomas G. Lockhart 770352d279 Add support for SQL92 delimited identifiers.
Add support for SQL3 IS TRUE and IS FALSE.
Augment support for SQL92 SET TIME ZONE...
1997-10-30 16:39:27 +00:00
Thomas G. Lockhart 0a9be2db9b Add support for delimited identifiers. Include new exclusive state "xd".
Remove unused ScanString variable and code.
1997-10-30 16:36:39 +00:00
Thomas G. Lockhart 0175759e17 Fix up elog messages for consistant usage of quotes around arguments. 1997-10-30 16:34:22 +00:00
Bruce Momjian 80440a51fa Fix for international identifiers, from Tatsuo Ishii 1997-10-30 15:28:25 +00:00
Bruce Momjian 06d88ecb17 Fix for when POSIX time not defined. 1997-10-30 14:06:47 +00:00
Bruce Momjian 1017ddd003 Fix for java timestamp type from teunis@sigil.computersupportcentre.com 1997-10-30 13:55:41 +00:00
Vadim B. Mikheev 6cfe951a42 CREATE PROCEDURAL LANGUAGE mans (Jan). 1997-10-30 05:38:20 +00:00
Bruce Momjian 43514b8485 Irix LORDER addition. 1997-10-30 05:36:38 +00:00
Bruce Momjian 58ed1232f5 Fix for netbsd locking, from Henry B. Hotz. 1997-10-30 05:24:19 +00:00
Bruce Momjian e2617c856e Fix for compile warning, from Ernst Molitor. 1997-10-30 05:07:58 +00:00
Bruce Momjian 5680f8795f Fix for array handling, from Gerhard Hintermayer 1997-10-30 05:00:56 +00:00
Bruce Momjian 1dfde614a4 Make configure more automated, from Brook Milligan. 1997-10-30 04:46:45 +00:00
Bruce Momjian cf1bfb3588 Fix for perl from Brook Milligan 1997-10-30 04:38:30 +00:00
Bruce Momjian a47158a0e1 Add script to check regression tests. 1997-10-30 04:27:14 +00:00
Bruce Momjian c35d7fb835 Rename pg_dump -H option to -h. 1997-10-30 03:59:59 +00:00
Bruce Momjian 868859b7e3 AIX patch from Darren King. 1997-10-30 03:37:28 +00:00
Bruce Momjian 9939e55513 Remove strcasecmp for univel. 1997-10-30 03:28:18 +00:00
Bruce Momjian d48006180c Generate error on large integer. 1997-10-30 01:55:49 +00:00
Bruce Momjian 97b1bb2281 New backend_dir html source. 1997-10-29 23:48:18 +00:00
Vadim B. Mikheev 5071d3124a Added support for shlib for BSD44_derived & i386_solaris. 1997-10-28 15:13:10 +00:00
Vadim B. Mikheev 7bff4c5078 Now we are able to CREATE PROCEDURAL LANGUAGE (Thanks, Jan). 1997-10-28 15:11:45 +00:00
Bruce Momjian 9db2992640 Rename postgres95 to postgresql. 1997-10-28 03:20:31 +00:00
Bruce Momjian ee08c36dd3 New backend dirs html file. 1997-10-27 17:53:38 +00:00
Bruce Momjian 8cae12b13b Add new html development tools, and flow chart. 1997-10-27 16:59:20 +00:00
Vadim B. Mikheev 6855820e8f c.h:
#define StrNCpy(dst,src,len)    \
	(strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : \
	NULL,(void)(dst))
	     ^^^^^^ - to avoid "value computed is not used" from gcc
	in ma-a-any places (should to fix thouse places instead, but ...
	time)

config.h.in:
/*
 * TBL_FREE_CMD_MEMORY: free memory allocated for an user query inside
 * transaction block after this query is done.
 */
#define TBL_FREE_CMD_MEMORY
- this is default now.
1997-10-27 12:07:13 +00:00
Vadim B. Mikheev 9b3d93293a Free ascii representations of compared values! 1997-10-27 12:00:43 +00:00
Vadim B. Mikheev a2c476b555 Use shared lock when building indices 1997-10-27 11:52:43 +00:00
Vadim B. Mikheev 110ba08a12 Fix binary cursors broken by MOVE implementation.
(Thanks to Bruce for finding what caused problem).
1997-10-27 08:55:16 +00:00
Thomas G. Lockhart f15eeff1bd Modify to reflect changes in boolean input behavior (rejects bad input
rather than assuming FALSE).
1997-10-25 06:03:08 +00:00
Thomas G. Lockhart ac357fb44c Remove extraneous row from user_relns table. Don't know where it came from... 1997-10-25 06:01:21 +00:00
Thomas G. Lockhart 2cad160f13 Have compiler use 486 instruction set. (Should add item in linux FAQ). 1997-10-25 05:58:56 +00:00
Thomas G. Lockhart f10b639237 Add SQL92 "constants" CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP,
CURRENT_USER.
Add syntax for primary and foreign keys.
Change optional syntax in CREATE INDEX to avoid parsing conflict with
 TIMESTAMP WITH TIME ZONE data type (use USING <class> rather than WITH...).
Decouple various categories of data type syntax to allow the most possible
 non-ambiguous extensions to SQL92 for column names and labels. This should
 make the parser a bit more understandable, or at least easier to find
 where and how the data types are handled.
Support syntax for IN and EXISTS clauses with subselects.
Support SQL92 syntax for IS TRUE/IS FALSE/IS NOT TRUE/IS NOT FALSE.
1997-10-25 05:56:41 +00:00
Thomas G. Lockhart 27d0d1a159 Add SQL92 reserved words for primary and foreign keys.
Add keywords for national character types.
Shorted date/time keyword token names for convenience.
Add SQL3 reserved words TRUE and FALSE.
1997-10-25 05:44:11 +00:00
Thomas G. Lockhart 60fee0d67c Add conversion routines for int2, int4, and oid to and from text.
Change a few routine names to ensure <= 16 characters in name
 to fit correctly into pg_proc.
1997-10-25 05:40:43 +00:00
Thomas G. Lockhart 7f06f34636 Change column number constant to reflect change in column name
from "action" to "ev_action".
1997-10-25 05:38:52 +00:00
Thomas G. Lockhart e9bb359d3e Change embedded query to reflect column name change from "action"
to "ev_action".
1997-10-25 05:37:07 +00:00
Thomas G. Lockhart c5173fc58c Rename "TYPE" parser keyword token from P_TYPE to TYPE_P to conform
to changes in parser.
1997-10-25 05:34:07 +00:00
Thomas G. Lockhart d8e260646e Reassign cash/float4 arithmetic operator oids to avoid duplicate oids. 1997-10-25 05:31:55 +00:00
Thomas G. Lockhart a9a91b54c6 Add conversion functions for int2, int4, oid to and from text.
Shorten a few routine names to <= 16 characters long to fit in table.
1997-10-25 05:29:48 +00:00
Thomas G. Lockhart b5f582b7ab Rename column to avoid "action" SQL92 reserved word. 1997-10-25 05:25:10 +00:00
Thomas G. Lockhart 4fa25b8c99 Shorten routine names to <= 16 characters to fit in pg_proc table. 1997-10-25 05:22:58 +00:00
Thomas G. Lockhart c0087c9faf Add conversion routines for oid to and from text. 1997-10-25 05:21:54 +00:00
Thomas G. Lockhart 08b1a09ee0 Clean up comments. 1997-10-25 05:21:10 +00:00
Thomas G. Lockhart 317acd0818 Add conversions for int2 and int4 to and from text. 1997-10-25 05:19:22 +00:00
Thomas G. Lockhart 2c1557a2ff Fix occasional uninitialized variable fractional seconds
in DecodeTimeOnly(). Only present when seconds are not specified
 for input.
1997-10-25 05:18:17 +00:00
Thomas G. Lockhart 9f99e4c6b6 Add conversion from datetime to time data type.
Rename date+time conversion to datetime to ensure less than 16 characters
 in routine name (required to fit in pg_proc table).
1997-10-25 05:16:09 +00:00
Thomas G. Lockhart 0d6facbad6 Modify one last line to complete changes for StrNCpy() macro addition.
Before, char16 was missing last character for output.
1997-10-25 05:12:38 +00:00
Thomas G. Lockhart 4677f0a255 Add debugging statement enabled by CASHDEBUG symbol definition. 1997-10-25 05:11:06 +00:00
Thomas G. Lockhart 3eb1bc67b1 Check explicitly for valid input strings for both TRUE and FALSE.
Allow true/false, yes/no, 1/0. Throw elog warning if anything else.
Allow shorter strings, so "t", "tr", "tru" and "true" match "true".
Old behavior accepted anything starting with "t" as TRUE,
 everything else as FALSE.
1997-10-25 05:09:58 +00:00
Bruce Momjian 789d075021 StrNCpy cleanup. 1997-10-25 02:14:22 +00:00
Bruce Momjian f3af1368bd Rename strNcpy to StrNCpy, and change third parameter. 1997-10-25 01:10:58 +00:00
Bruce Momjian 8b53f6e5b6 Fix alignment of source. 1997-10-24 15:51:37 +00:00
Vadim B. Mikheev eca199d7b0 Debug stuff added to BlowawayRelationBuffers(). 1997-10-22 19:04:43 +00:00
Vadim B. Mikheev bd305f3f06 Fix multi-column index scans in internal pages. 1997-10-22 19:02:52 +00:00
Bruce Momjian 8f4559d0e1 Fix \. in manual page. 1997-10-22 02:08:38 +00:00
Bruce Momjian 8a1a39c390 Update for 6.2.1 1997-10-18 16:59:06 +00:00
Vadim B. Mikheev 9620c7566f DEFAULT fixed 1997-10-17 11:35:33 +00:00
Vadim B. Mikheev fcfb4d1df6 Changes due to fixed DEFAULT behaviour. 1997-10-17 09:59:09 +00:00
Thomas G. Lockhart 962c8bd66d Accept additional values for TRUE: y, Y, 1.
Leave all other input values to return FALSE.
In next version, do more checking for valid inputs for both TRUE and FALSE.
1997-10-17 05:38:32 +00:00
Thomas G. Lockhart 9c800b8e48 Fix delta time decoding for 12 AM/PM. 1997-10-17 05:36:01 +00:00
Bruce Momjian b268758a3b New function PQcmdTuples. 1997-10-17 02:11:49 +00:00
Bruce Momjian ed966c4617 Updates for 6.2.1. Update pgaccess to 0.61. Add to HISTORY. 1997-10-16 17:32:07 +00:00
Vadim B. Mikheev 05a436b327 DROP TRIGGER. 1997-10-16 06:59:23 +00:00
Vadim B. Mikheev 9b10d6ffda Ignore copies of columns specified in ORDER/GROUP BY 1997-10-16 06:58:38 +00:00
Bruce Momjian a805635d21 Cleanups for 6.2.1. 1997-10-16 04:14:30 +00:00
Vadim B. Mikheev 78351f422b Fix for backward cursors with ORDER BY. 1997-10-15 06:36:36 +00:00
Thomas G. Lockhart b0df88745d Include SQL/92 string continuation across newlines.
Allows the following example:
  select 'first string'
  '---'
  'last string';
 to be output as 'first string---last string'.
1997-10-15 01:12:21 +00:00
Thomas G. Lockhart ba2358896a Fix final function for cash avg() aggregate.
Wrong function referenced in previous versions.
1997-10-15 01:08:25 +00:00
Vadim B. Mikheev 14f81d8d34 Decrement relation reference count incremented in
RelationIdCacheGetRelation() to flush relations from cache
in commit time.
1997-10-12 07:12:03 +00:00
Vadim B. Mikheev defb10a450 DEFAULT is handled by analyze.c now. 1997-10-12 07:09:20 +00:00
Thomas G. Lockhart c927f80fe4 Use P_TYPE rather than TYPE_P (which will be the name in the next release). 1997-10-09 05:43:59 +00:00
Thomas G. Lockhart 0f66d799a3 Allow both TIME and TYPE as column and table names. 1997-10-09 05:35:30 +00:00
Thomas G. Lockhart 070d494464 Clean up function declarations for the boolean type package
to use bool as the type for arguments and return values.
1997-10-09 05:07:25 +00:00
Thomas G. Lockhart a21c3e353a Allow 't', 'T', and even/odd ASCII characters to denote true/false
rather than just 't' and 'T'.  This allows yes/no and 1/0
 to be interpreted as one might expect.
Clean up function declarations to use bool as the type for arguments
 and return values.
1997-10-09 05:06:12 +00:00
Thomas G. Lockhart 8fe55efd7b Support special values 'now', 'current', etc on output. 1997-10-09 05:02:17 +00:00
Thomas G. Lockhart f54cc390e1 Allow TIME in column and table names (SQL/92 non-reserved word). 1997-10-09 05:00:54 +00:00
Thomas G. Lockhart 8bd813d6be Fix error in ordering of arguments. 1997-10-09 04:59:37 +00:00
Bruce Momjian 577b0584aa Update to version 0.51. 1997-10-03 23:11:26 +00:00
Marc G. Fournier f1bfc520c0 We never do remember to up the PG_VERSION number, do we? :( 1997-10-03 17:31:29 +00:00
Bruce Momjian 4aab22fcda Update to 0.5. 1997-10-03 15:47:17 +00:00
Bruce Momjian 83cd375cd2 Linux/alpha patch from Dan Maynard 1997-10-03 15:27:18 +00:00
Thomas G. Lockhart 8b028b5c2d From JM de Lauwereyns (jmlauwer@icdc.caissedesdepots.fr):
lconv is already taken as a struct identifier defined in a /usr/include file.
Only has an effect with USE_LOCALE enabled.
(Apparently unique to AIX and/or AIX compiler? thomas)
1997-10-03 13:10:06 +00:00
Bruce Momjian d663f1c839 Sparc lock fix for Linux/netbsd. 1997-10-02 18:32:58 +00:00
Vadim B. Mikheev 953e9e2b3c + MOVE
+ CREATE TRIGGER
Little changes for create table.
1997-10-02 13:58:06 +00:00
Vadim B. Mikheev abb0e707da Dump DEFAULT, CHECK, Triggers.
Fix BASETYPE for aggregates with sfunc2 only.
1997-10-02 13:57:07 +00:00
Vadim B. Mikheev 1b677e7e34 Fix \ handling 1997-10-02 13:52:29 +00:00
Vadim B. Mikheev 0c8ef6e5cb MOVE command 1997-10-02 03:15:11 +00:00
Vadim B. Mikheev 61a72beda5 A word about constraint nature of DEFAULT. 1997-10-02 02:50:22 +00:00
Marc G. Fournier bf125ca401 Bring in a "registration" file to be printed out after the user has
performed a 'make install'

Uses 'more', which should be standard across all systems, I hope?
1997-10-02 00:59:35 +00:00
Bruce Momjian f477db7705 Update manuals for 6.2 release. 1997-10-01 19:42:53 +00:00
Bruce Momjian 7566949a97 Update manuals for 6.2 release. 1997-10-01 19:30:59 +00:00
Bruce Momjian a127aafca7 Update manuals for 6.2 release. 1997-10-01 19:24:21 +00:00
Bruce Momjian c03c6857b7 Update manuals for 6.2 release. 1997-10-01 19:14:35 +00:00
Bruce Momjian c83beeff06 Update manuals for 6.2 release. 1997-10-01 19:08:48 +00:00
Bruce Momjian 140f728658 Update manuals for 6.2 release. 1997-10-01 18:57:48 +00:00
Bruce Momjian 59509a0711 Update manuals for 6.2 release. 1997-10-01 18:53:28 +00:00
Bruce Momjian 627730fa47 Update PQntuples now returns rows affected. 1997-10-01 18:14:53 +00:00
Thomas G. Lockhart 7cd15c47d8 Document NOT NULL for table creation.
Clarify usage of date_part() for timespan data type.
1997-10-01 17:05:16 +00:00
Bruce Momjian dec1889a73 Update to 0.4. 1997-10-01 15:38:59 +00:00
Bruce Momjian 4a226f0a7e Update to 0.4 version. 1997-10-01 15:13:14 +00:00
Bruce Momjian 1d3290e7ff Fix permits. 1997-09-30 18:40:37 +00:00
Bruce Momjian cb9604f2ac Add support for NetBSD/sparc. 1997-09-30 16:21:42 +00:00
Bruce Momjian a4cffdcf82 HPUX 10 fix. 1997-09-30 15:19:32 +00:00
Vadim B. Mikheev a788027724 Little changes. 1997-09-30 09:50:28 +00:00
Vadim B. Mikheev 7a5d3fbd9b STATEMENT triggers are not implemented - elog (WARN). 1997-09-30 09:49:54 +00:00
Bruce Momjian da707e4224 Cleanup. 1997-09-30 03:28:02 +00:00
Bruce Momjian 6238d836a1 Update readme. 1997-09-30 02:47:27 +00:00
Bruce Momjian f19ccf932e Update pgtcl to 0.3. Update README. 1997-09-30 00:22:43 +00:00
Marc G. Fournier 8e4169c786 Update to the newest version before beta12, and add a README file
from Constantin...
1997-09-29 21:06:48 +00:00
Marc G. Fournier 65818b6bf0 From: Peter T Mount <patches@maidast.demon.co.uk>
This patch fixes a few results in DatabaseMetaData, and updates the README
and TODO files (the later being a new file).

The TODO file lists the things that need to be looked into after 6.2 is
released, and describes the problem with Large Objects.
1997-09-29 20:11:51 +00:00
Marc G. Fournier 46032338cd Bring in Constantin's PGaccess TCL interface (v0.21) 1997-09-29 20:06:06 +00:00
Vadim B. Mikheev 3f6381d7e7 Fix error indicator for SPI_getvalue() and SPI_getbinval() 1997-09-29 06:28:45 +00:00
Vadim B. Mikheev 51689ece82 MOVE implementation (added bool ismove to FetchStmt). 1997-09-29 06:01:46 +00:00
Vadim B. Mikheev 5a447b4a26 MOVE implementation. 1997-09-29 05:59:16 +00:00
Bruce Momjian 4b9fb26648 HPUX patches from Vladimir Turin. 1997-09-29 03:27:18 +00:00
Bruce Momjian a638f6625b Cleanup tmp files for ccsym. 1997-09-28 16:57:44 +00:00
Marc G. Fournier 1337751e50 From: Darren King <darrenk@insightdist.com>
I asked for this a long time ago and Frank Dana recently has
indicated that using lbsd on aix breaks the timezone code.
1997-09-28 10:10:36 +00:00
Marc G. Fournier fb269b4675 From: CNT systemen BV <cntsys@cistron.nl>
I've found a problem in the Postgresql jdbc driver.
"ReceiveInteger" shifts a received byte right instead of left.
This means that only the least significant byte is read into the int.

Reviewed by: Peter T Mount <patches@maidast.demon.co.uk>
1997-09-28 10:05:15 +00:00
Bruce Momjian 9cd2680f93 ccsym cleanup. 1997-09-28 04:23:04 +00:00
Bruce Momjian a28c50ad3b Changed location of libpgtcl stuff. 1997-09-27 19:35:04 +00:00
Bruce Momjian cae19f61e3 Changed location of libpgtcl stuff. 1997-09-27 19:28:40 +00:00
Bruce Momjian fc50064d85 Changed location of libpgtcl stuff. 1997-09-27 19:13:56 +00:00
Bruce Momjian 16440d79bb Cleanup for find_keywords. 1997-09-27 17:25:48 +00:00
Bruce Momjian 87251d17f8 Cleanup for find_keywords. 1997-09-27 17:22:05 +00:00
Bruce Momjian 65b1ed4712 Add fiel to list keywords. 1997-09-27 16:42:21 +00:00
Bruce Momjian 725a03eb4b Make GetAttributeByNum visible again for external use. 1997-09-27 14:37:21 +00:00
Thomas G. Lockhart 384d4f6eba Update catalog lists for v6.2.
Add documentation of some text functions.
Add descriptions of some new SQL/92-compatible string functions.
1997-09-27 04:37:33 +00:00
Thomas G. Lockhart c19bd8c764 Use "man drop" as an introduction to all drop commands.
Create explicit drop_table man page (copied from old drop man page).
1997-09-27 04:36:02 +00:00
Bruce Momjian fcc0320b69 Manual page cleanup. 1997-09-27 03:58:29 +00:00
Bruce Momjian 2ab3d65900 Update manual pages. 1997-09-27 03:14:20 +00:00
Marc G. Fournier 802fc5f770 This gets things to compile...past this I'll have to test from home, or
someone will have to tell me
1997-09-27 00:05:23 +00:00
Marc G. Fournier 1fdd834672 Nothing in this file right now, but will contain appropriate 'chmod's
so that permissions are set for the end release...
1997-09-26 22:06:30 +00:00
Bruce Momjian c30b8f9dbd AIX float fix. 1997-09-26 20:32:02 +00:00
Bruce Momjian 5e2c0a87c9 Fix for psort temp file names, from Vadim. 1997-09-26 20:05:47 +00:00
Thomas G. Lockhart 544992c3d7 Include information on new DEFAULT and CONSTRAINT clauses. 1997-09-26 15:21:27 +00:00
Thomas G. Lockhart 09cfab3a7f Include references to other "drop" man pages. 1997-09-26 15:20:12 +00:00
Thomas G. Lockhart 5acd45f6fd Initial docs for Vadim's new trigger capabilities. 1997-09-26 15:13:09 +00:00
Thomas G. Lockhart b105324f7e Fix SUBSTRING(str FROM int TO int) parsing. 1997-09-26 15:09:11 +00:00
Vadim B. Mikheev 142d42f938 Scripts to run queries and data. 1997-09-26 14:57:36 +00:00
Vadim B. Mikheev dbde5caeed Some results. 1997-09-26 14:55:44 +00:00
Vadim B. Mikheev cf76759f34 Start with performance suite. 1997-09-26 14:55:21 +00:00
Vadim B. Mikheev 561b35e556 Return error if char *query is null in SPI_prepare() 1997-09-26 13:57:39 +00:00
Marc G. Fournier 99048aca00 Get these two files finally committed for Peter...sorry for delay :( 1997-09-26 08:22:21 +00:00
Edmund Mergl c5d49902fb *** empty log message *** 1997-09-25 21:15:04 +00:00
Bruce Momjian 4a98c5763e Back out inclusion of postgres.h. 1997-09-25 16:52:23 +00:00
Bruce Momjian 2f4275327e Massive examples fix from Nicola Bernardelli 1997-09-25 16:35:52 +00:00
Bruce Momjian 0384d37083 Fix for libpgtcl from Constantin Teodorescu. 1997-09-25 15:48:51 +00:00
Thomas G. Lockhart 5004b99e92 Tatsuo's patch to fix alignment problems in structure for RISC machines. 1997-09-25 14:11:42 +00:00
Thomas G. Lockhart e008c68408 One more change to recover v6.1.1 escaped-text input behavior.
Should be changed for v6.3!
1997-09-25 14:10:23 +00:00
Thomas G. Lockhart 4293adc117 Disable checking for zero or one points with deeper parens on input.
Polygon input would not accept single-point polygon output and dump.
1997-09-25 14:09:04 +00:00
Vadim B. Mikheev 6be30fb524 Fix handling of functions with non-attribute first argument in WHERE
clauses.
1997-09-25 12:48:15 +00:00
Vadim B. Mikheev c42f7f1460 Fix GROUP BY when order of entries is different from order in target list. 1997-09-25 12:21:15 +00:00
Vadim B. Mikheev bb0cc20e64 Fix handling of SPI_tuptable. 1997-09-25 12:16:05 +00:00
Bruce Momjian be5241420a S_LOCK_FREE fix. 1997-09-25 01:48:58 +00:00
Bruce Momjian ebb3008dbd Fix for S_FREE_LOCK. 1997-09-24 23:37:26 +00:00
Thomas G. Lockhart d77a506307 Use additional ORDER BY to cope with new sorting routines. 1997-09-24 17:55:38 +00:00
Thomas G. Lockhart 16d65f5c25 Add SQL/92 "constants" current_date, current_time, and current_timestamp.
Add SQL/92 types decimal and numeric (temporary for syntax support).
 These types need more support in the backend to be really implemented,
 and the parser will need to be changed at that time.
Adjust limits on precision parameters for FLOAT(p) to match IEEE-compliant
 arithmetic. Perhaps these limits should be processor-specific or obtained
 from system include files instead.
1997-09-24 17:53:53 +00:00
Thomas G. Lockhart ba8763c500 Add SQL/92 types decimal and numeric.
Add SQL/92 "constants" current_date, current_time, and current_timestamp.
1997-09-24 17:49:56 +00:00
Thomas G. Lockhart 53ad0aa262 Restore proper behavior for escaped quotes and for escaped literals
like newline inside quoted strings.
1997-09-24 17:48:25 +00:00
Thomas G. Lockhart c7dbd366ba Remove debugging "puts" print statement. 1997-09-24 17:46:14 +00:00
Thomas G. Lockhart 0e699286d3 Coerce type of NULL pointer return to suppress gcc compiler warnings. 1997-09-24 17:45:21 +00:00
Bruce Momjian e00f0ea39e Fix for pg_dump. 1997-09-24 16:20:04 +00:00
Bruce Momjian 9eaaf36f04 Update configure. 1997-09-24 15:57:28 +00:00
Bruce Momjian 28c2edcb3d Remove aix power pc. 1997-09-24 15:49:46 +00:00
Bruce Momjian 55780ae0e8 Remove extra float.h I added. 1997-09-24 15:40:59 +00:00
Bruce Momjian 837f0cbea0 CREATE FUNCTION fixup for types of functions. 1997-09-24 15:36:36 +00:00
Bruce Momjian 77d514a550 Rollback changes to pg_dump.c 1997-09-24 15:14:02 +00:00
Vadim B. Mikheev c13454edc2 Timetravel tests. 1997-09-24 08:36:47 +00:00
Vadim B. Mikheev 76271543ae Added: ttdummy() - variation of timetravel() function
for regress test.
1997-09-24 08:35:10 +00:00
Vadim B. Mikheev 1777ba4c80 + SPI_palloc(), SPI_repalloc(), SPI_pfree() 1997-09-24 08:32:09 +00:00
Vadim B. Mikheev f79b7a56b4 Allow use functions with no arguments in DEFAULT
Allow use IDENT as arguments of trigger functions
1997-09-24 08:31:04 +00:00
Vadim B. Mikheev eec6108650 + SPI_palloc(), SPI_repalloc(), SPI_pfree() - for allocations
in upper Executor memory context.
1997-09-24 08:28:37 +00:00
Bruce Momjian f0b9b2152e HPUX 10 patch. 1997-09-24 04:20:29 +00:00
Bruce Momjian 11b4a9689d Add -S to top of manual page. 1997-09-24 03:20:54 +00:00
Bruce Momjian 88325bd010 AIX fixes. 1997-09-23 22:53:47 +00:00
Bruce Momjian a572fc229b Fix for CREATE FUNCTION. 1997-09-23 21:44:07 +00:00
Bruce Momjian cad3e709fe Fix for backslash quote. 1997-09-23 19:47:59 +00:00
Bruce Momjian 38d2ca5418 AIx patch from Frank Dana. 1997-09-23 17:43:33 +00:00
Bruce Momjian bcdd0a93ed Cleanup. 1997-09-23 00:02:44 +00:00
Bruce Momjian 09dfed4022 Cleanup backslashes. 1997-09-22 18:14:25 +00:00
Bruce Momjian a2a0842d1c Fix for missing tas on some platforms. 1997-09-22 15:59:19 +00:00
Bruce Momjian 85f7555132 Small lock cleanup for prototype. 1997-09-22 15:49:14 +00:00
Vadim B. Mikheev 5fb82eb4c7 Blowaway relation buffers from buffer pool before truncation:
+ BlowawayRelationBuffers(relation, blocknumber)
1997-09-22 07:13:56 +00:00
Vadim B. Mikheev 708f67c7a9 Blowaway relation buffers from buffer pool before truncation. 1997-09-22 07:12:33 +00:00
Vadim B. Mikheev 94e52d38df Two copies... 1997-09-22 04:21:51 +00:00
Vadim B. Mikheev 90d490059d Have to PROC_INCR_SLOCK before return. 1997-09-22 04:20:53 +00:00
Vadim B. Mikheev e7046924a5 Fix: Operand Order Affects OR.
where x <> 1 or x isnull
didn't return tuples with x NULL.
1997-09-22 04:19:36 +00:00
Vadim B. Mikheev c2c26b6ff0 +#include <access/xact.h> 1997-09-22 03:58:32 +00:00
Bruce Momjian 2a8bea900a Configure OS cleanup. 1997-09-21 22:54:19 +00:00
Bruce Momjian 08566431c4 Make manual page for pg_passwd from README. 1997-09-21 04:54:36 +00:00
Thomas G. Lockhart 1556e62573 Output changed for new ORDER BY to cope with new sorting routines. 1997-09-20 16:37:02 +00:00
Thomas G. Lockhart 7971fb0d79 Output changed to reflect extra entries from new regression tests. 1997-09-20 16:35:34 +00:00
Thomas G. Lockhart 8bb569105a Change ORDER BY to get consistant results with new sorting routines. 1997-09-20 16:34:08 +00:00
Thomas G. Lockhart d8ec518000 Update results count to reflect bad entries now being rejected by new decoder. 1997-09-20 16:33:24 +00:00
Thomas G. Lockhart 68cd097e89 Change ORDER BY to get more consistant results. 1997-09-20 16:31:44 +00:00
Thomas G. Lockhart 354a18fcb2 Add tinterval comparison operators.
Add integer/money arithmetic.
1997-09-20 16:29:38 +00:00
Thomas G. Lockhart aae2420e8b Add point_ne() comparison routine. 1997-09-20 16:25:28 +00:00
Thomas G. Lockhart d0ab9c3f81 Add tinterval comparison routines. 1997-09-20 16:24:39 +00:00
Thomas G. Lockhart 2b83160dca Add integer/money arithmetic from Darren King. 1997-09-20 16:23:47 +00:00
Thomas G. Lockhart 75aef05530 Add point_ne() function.
Fix up tabbing of most function declarations.
1997-09-20 16:22:31 +00:00
Thomas G. Lockhart cc8dc825d8 Fix typo for default units for timespan input.
Place single-ticks around bad argument in elog messages.
Fix tabbing of large lookup tables (ugh).
1997-09-20 16:20:29 +00:00
Thomas G. Lockhart fbf12681ab Include tinterval comparison functions for span of interval. 1997-09-20 16:17:45 +00:00
Thomas G. Lockhart 5984746113 Include functions for integer/money arithmetic. 1997-09-20 16:15:34 +00:00
Thomas G. Lockhart eba607d8e5 Fix up elog warning messages. 1997-09-20 16:14:05 +00:00
Thomas G. Lockhart 3bb89a27ee Add support for FLOAT(p) SQL/92 data type.
Allow ALTER TABLE ADD ( column ) syntax.
1997-09-20 16:11:44 +00:00
Thomas G. Lockhart 007e4d9a07 Replace missing directory delimiter for postmaster installation command. 1997-09-20 16:08:24 +00:00
Marc G. Fournier fa67a247cf Bring in Peter's changes...finally :( 1997-09-20 02:21:25 +00:00
Bruce Momjian e9cd0f2e6b Update configure. 1997-09-19 22:02:26 +00:00
Marc G. Fournier ccca61b5fe 1997-06-15 Paul Eggert <eggert@twinsun.com>
* (src/backend/Makefile): Use `ln', not `cd;ln' so that installers
        can wrap ln.
1997-09-19 19:44:30 +00:00
Vadim B. Mikheev 6c84398411 + _copyGroup(Group *from) 1997-09-19 06:52:49 +00:00
Bruce Momjian 34ec62058a Fix \e and \p after query. 1997-09-19 03:42:39 +00:00
Bruce Momjian 3f365ba0fc Inline memset() as MemSet(). 1997-09-18 20:22:58 +00:00
Bruce Momjian c3072cb1f0 Have to do [[ ]] in configure.in. 1997-09-18 19:57:31 +00:00
Bruce Momjian 0f928c2d21 UPdate memset macro. 1997-09-18 18:48:32 +00:00
Bruce Momjian 79cb0fd9bb Cleanup for memset macro. 1997-09-18 17:06:21 +00:00
Marc G. Fournier 220941dac5 Add in srandom() check to configure
Add appropriate HAVE_{RANDOM,SRANDOM} values to config.h
Add approrpiate #ifdef's to sparc_solaris port files for Solaris v2.6
1997-09-18 16:09:41 +00:00
Vadim B. Mikheev 2a3e28282e QUERY: SELECT p.name, p.age FROM person* p ORDER BY age using >;
^^^^^^ - new order of tuples (due to psort changes)
1997-09-18 14:45:33 +00:00
Vadim B. Mikheev a6e0803a7f No more SortTuplesInTree... 1997-09-18 14:42:35 +00:00
Vadim B. Mikheev b0ccd78479 Don't limit number of tuples in leftist trees!
Use qsort to sort array of tuples for nextrun when current
run is done and put into leftist tree from sorted array!
It's much faster and creates non-bushy tree - this is ve-e-ery good
for perfomance!
1997-09-18 14:41:56 +00:00
Vadim B. Mikheev 8f1e1b4551 No more SortTuplesInTree... 1997-09-18 14:33:46 +00:00
Vadim B. Mikheev 4948a51d74 Convert sequence names tolower. 1997-09-18 14:32:15 +00:00
Vadim B. Mikheev 2de0da358d ALTER TABLE ADD COLUMN: set atthasdef to FALSE. 1997-09-18 14:31:38 +00:00
Bruce Momjian 8cb4154492 Inline frequently called functions. 1997-09-18 14:21:02 +00:00
Vadim B. Mikheev bbe2c10c14 Addded to Psortstate:
lt_tupcount - number of tuples in struct leftist *Tuples
	lasttuple   - last tuple put to disk by createfirstrun()
1997-09-18 05:42:01 +00:00
Vadim B. Mikheev 7ffd2c09c8 + SortTuplesInTree 1997-09-18 05:38:09 +00:00
Vadim B. Mikheev 712ea2507e 1. Use qsort for first run
2. Limit number of tuples in leftist trees:
	- put one tuple from current tree to disk if limit reached;
	- end run creation if limit reached by nextrun.
3. Avoid mergeruns() if first run is single one!
1997-09-18 05:37:31 +00:00
Vadim B. Mikheev 303f6514bd + int SortTuplesInTree = 2560;
(default value for max number of tuples in leftist tree)
1997-09-18 05:23:58 +00:00
Vadim B. Mikheev 10971a6f81 Allow set max number of tuples in leftist tree for sorts
(-S memory,tuples)
1997-09-18 05:19:17 +00:00
Thomas G. Lockhart 36b54847cb Add explicit test for various comment syntaxes. 1997-09-18 03:54:19 +00:00
Thomas G. Lockhart 1d9ad887cd Explicitly test various comment syntaxes. 1997-09-18 03:52:43 +00:00
Thomas G. Lockhart c407a38742 Add syntax and warnings for unsupported ALTER TABLE commands
including DROP COLUMN, SET CONSTRAINT, etc.
1997-09-18 03:46:18 +00:00
Marc G. Fournier 359cd689f8 Ack, I missed a template file here :( 1997-09-18 01:32:14 +00:00
Edmund Mergl 9d575627af *** empty log message *** 1997-09-17 20:53:35 +00:00
Edmund Mergl 5ec6055648 *** empty log message *** 1997-09-17 20:51:36 +00:00
Edmund Mergl 364efd1029 adapted to pgsql-v6.2 1997-09-17 20:48:15 +00:00
Edmund Mergl 9e74edda05 *** empty log message *** 1997-09-17 20:46:29 +00:00
Bruce Momjian b02086b303 Remove extra backets in tr test. 1997-09-17 20:14:16 +00:00
Bruce Momjian f05642bbcc Linux seems to have 3/4/5/686. 1997-09-16 18:51:49 +00:00
Bruce Momjian f3a58f2639 Makefile cleanup. 1997-09-16 18:47:36 +00:00
Bruce Momjian df7a435587 Mklinux patch from Tatsuo. 1997-09-16 16:25:28 +00:00
Thomas G. Lockhart 2b4be93787 Modify to match current expected output
after adding separate sections for DEFAULT and CHECK.
1997-09-16 16:17:19 +00:00
Thomas G. Lockhart b8967bfeec Add explicit, separate test sections for DEFAULT and CHECK.
Use conventions common to other regression test input files.
Leave non-temporary files at end of test.
1997-09-16 16:15:52 +00:00
Thomas G. Lockhart 829354d849 Remove extraneous blank lines from error messages. 1997-09-16 16:13:58 +00:00
Thomas G. Lockhart 31174f11d0 Remove difftime() calls.
Still uses time_t declarations, but most code will be changed for next release.
1997-09-16 16:12:55 +00:00
Thomas G. Lockhart 43163cf5d6 Fix string conversions for operators in DEFAULT and CHECK clauses. 1997-09-16 16:11:20 +00:00
Bruce Momjian 0829d2dba8 Remove uint32 from inet_aton file. 1997-09-16 16:09:59 +00:00
Bruce Momjian 604ce32e46 Add .eo to pgbuiltin. 1997-09-16 03:01:43 +00:00
Bruce Momjian 8c09eded1a Remove NO_MK_LORDER from Solaris. 1997-09-16 02:53:24 +00:00
Bruce Momjian 84ad06dd78 Manual cleanup for textcat. 1997-09-16 02:49:23 +00:00
Vadim B. Mikheev f3e9cf9c6b Fix pfree problem. 1997-09-15 14:29:01 +00:00
Vadim B. Mikheev feb78cda0c -S need in optarg... 1997-09-15 14:28:16 +00:00
Bruce Momjian 9b7f362d0a -Linux configure additoin, libtcl Makefile patch. 1997-09-14 23:34:16 +00:00
Bruce Momjian 90bcec36c1 To find uint32 on AIX. 1997-09-14 04:06:20 +00:00
Bruce Momjian 0a3cee72ac Add mention of heap_getattr() compiler warning. 1997-09-14 03:59:44 +00:00
Marc G. Fournier ba0b03de2e Let's hope this fixes the "bug" that was introduced 1997-09-13 16:27:13 +00:00
Bruce Momjian 48fd8b3e8f Cleanup of use of settings as pointer and structure, and ps. 1997-09-13 13:03:41 +00:00
Bruce Momjian 3a1cc07769 Cleanup for cash patch . 1997-09-13 12:05:32 +00:00
Bruce Momjian d88ff48045 Added pgindent/README file. 1997-09-13 11:55:12 +00:00
Bruce Momjian b3b0f20412 Cleanup from patch applied. 1997-09-13 11:45:50 +00:00
Bruce Momjian e0a4c7acaa configure cleanup. 1997-09-13 04:43:53 +00:00
Bruce Momjian 48d0db968f Fix for copy to stdout for cash. 1997-09-13 04:39:08 +00:00
Thomas G. Lockhart ebb000f805 Add results from Vadim's new tables. 1997-09-13 03:21:05 +00:00
Thomas G. Lockhart 05428ada1d Add tests for unary minus. 1997-09-13 03:20:18 +00:00
Thomas G. Lockhart e4b27f2acd Make tests match with modified error messages. 1997-09-13 03:19:43 +00:00
Thomas G. Lockhart aeecb4e505 Add a few tests for unary minus syntax. 1997-09-13 03:16:53 +00:00
Thomas G. Lockhart bc85dbf893 Remove backdoor strings from scan.l for DEFAULT and CHECK.
Reconstruct string input for DEFAULT and CHECK.
Add DOUBLE PRECISION, CHARACTER (VARYING) SQL-92 data types.
1997-09-13 03:15:46 +00:00
Thomas G. Lockhart 9ea74630fc Add a few keywords for SQL-92 support. 1997-09-13 03:13:37 +00:00
Thomas G. Lockhart 0fbfba11f6 Use exclusive state to help fix unary minus parsing.
Remove "backdoor" for DEFAULT and CHECK.
1997-09-13 03:12:55 +00:00
Thomas G. Lockhart c1d3c04d38 Fix up error messages. 1997-09-13 03:11:51 +00:00
Thomas G. Lockhart 2d2562e90d Fix up error messages to remove extra newline. Use "zero" rather than "0.0". 1997-09-13 03:10:11 +00:00
Bruce Momjian ff4722cf77 Solaris does not have lorder/tsort. 1997-09-13 02:27:06 +00:00
Bruce Momjian 26a1956f8c pg_version Makefile was not being processed. 1997-09-12 23:24:25 +00:00
Bruce Momjian aa0bad9638 Remove that 5 from MESSAGE SIZE that no one understands. 1997-09-12 22:26:13 +00:00
Bruce Momjian 1d0085e47a Dec alphaserver patch from Malcolm Beattie 1997-09-12 22:22:12 +00:00
Bruce Momjian fe54c54da3 Allow SELECT NULL as EMPTY_FIELD, Patrick. 1997-09-12 22:14:48 +00:00
Bruce Momjian 4213e44a0b Fix for select null, "fail" from pg_am from Patrick van Kleef 1997-09-12 22:07:59 +00:00
Bruce Momjian 2d7023c8fb No \\connect with usernames AND passwords. 1997-09-12 21:58:03 +00:00
Bruce Momjian cf5a8723dd Increase default geqo parameter to 8. 1997-09-12 21:25:10 +00:00
Bruce Momjian 7044dd7ec8 Fix heap_getattr bug I just added. 1997-09-12 14:29:04 +00:00
Vadim B. Mikheev 4379ce8380 Quick hack to get CHECK working for incoming betta. 1997-09-12 09:01:46 +00:00
Vadim B. Mikheev 4587547f13 Added: SPI_copytuple() & SPI_modifytuple() 1997-09-12 08:37:52 +00:00
Vadim B. Mikheev a40a546e47 RelationBuildRuleLock(): char* --> Datum for ruleaction and
rule_evqual_string.
1997-09-12 06:57:04 +00:00
Bruce Momjian b6bd3da520 Macro cleanup of heap_getattr. 1997-09-12 05:58:18 +00:00
Vadim B. Mikheev fd3ad7d765 Allow to call utility funcs without SPI_connect. 1997-09-12 05:11:14 +00:00
Vadim B. Mikheev 7f97e05b09 char* --> Datum 1997-09-12 04:58:59 +00:00
Bruce Momjian 1ea01720d5 heapattr functions now return a Datum, not char *. 1997-09-12 04:09:08 +00:00
Vadim B. Mikheev 6e04b4b20f Use strcasecmp in SPI_fnumber(TupleDesc tupdesc, char *fname). 1997-09-12 02:42:40 +00:00
Bruce Momjian c853ca05a4 Update pgpatch for GNU. 1997-09-11 21:29:11 +00:00
Bruce Momjian c8bc4a4e63 Add new pgindent directory and diff file. 1997-09-11 17:22:35 +00:00
Vadim B. Mikheev ba247bd649 Tests for spi/triggers 1997-09-11 09:14:12 +00:00
Vadim B. Mikheev a74613f478 Cleanups. 1997-09-11 07:24:37 +00:00
Bruce Momjian 8ec7eef93d Cleanup for array fix patch. 1997-09-10 23:57:49 +00:00
Bruce Momjian efd3b39029 Fix for arrays. 1997-09-10 23:30:45 +00:00
Bruce Momjian b1f3f446af Cleanup. 1997-09-10 20:19:23 +00:00
Bruce Momjian 59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian 075cede748 Add typdefs to pgindent run. 1997-09-08 20:59:27 +00:00
Bruce Momjian 4f523a6f92 Manual page updates. 1997-09-08 17:49:43 +00:00
Bruce Momjian 108baf70e5 Developer reorganization. 1997-09-08 04:19:50 +00:00
Bruce Momjian 125079e6d7 Reorganize developers files. 1997-09-08 04:14:01 +00:00
Bruce Momjian 23db70bf73 Lex/yacc source cleanup like indent. 1997-09-08 03:20:18 +00:00
Bruce Momjian 319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian a90f12fd9d Modifications for indenting. 1997-09-08 01:53:56 +00:00
Bruce Momjian 1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian 8fecd4febf Cleanup. 1997-09-07 04:20:30 +00:00
Bruce Momjian 31afe7c069 Cleanup. 1997-09-07 04:17:39 +00:00
Bruce Momjian c51d81376f Cleanup. 1997-09-07 04:03:55 +00:00
Bruce Momjian b3652d2cca cleanup. 1997-09-07 03:26:12 +00:00
Bruce Momjian 70b990fa58 Cleanup for indent. 1997-09-06 19:51:44 +00:00
Bruce Momjian b72e62374d More cleanups for indent. 1997-09-06 18:27:11 +00:00
Vadim B. Mikheev bf1d9aeb97 Cleanups. 1997-09-06 11:23:05 +00:00
Bruce Momjian 5d68d3e957 New entab version. 1997-09-06 03:14:38 +00:00
Bruce Momjian b71fba22e3 New entab version. 1997-09-06 02:46:43 +00:00
Bruce Momjian 723f66076e Update entab version. 1997-09-06 01:46:25 +00:00
Bruce Momjian 2718f3097f Fix for entab. 1997-09-06 01:37:01 +00:00
Bruce Momjian 268b8be814 Cleanup needed for indent. 1997-09-06 00:22:44 +00:00
Bruce Momjian ec05063be0 Cleanups needed for indent. 1997-09-05 20:20:56 +00:00
Bruce Momjian 240a018176 Cleanups needed for indent. 1997-09-05 19:59:11 +00:00
Bruce Momjian 40e5588115 Cleanups needed for indent. 1997-09-05 19:38:42 +00:00
Bruce Momjian ae50c8d84b Cleanups needed for indent. 1997-09-05 19:32:44 +00:00
Bruce Momjian a1635450b3 Cleanups needed for indent. Remove }; 1997-09-05 18:13:45 +00:00
Bruce Momjian fe97d58051 cleanup. 1997-09-05 17:04:22 +00:00
Vadim B. Mikheev c753a6a1e2 Restore CurScanPosition() for flex.
Fix it for lex.
1997-09-05 09:05:48 +00:00
Bruce Momjian ce5ea7f381 Cleanup. 1997-09-05 04:29:56 +00:00
Bruce Momjian dfc2d35943 Better error reporting. 1997-09-05 04:18:36 +00:00
Bruce Momjian 868d708188 Add // comments. 1997-09-05 00:09:47 +00:00
Bruce Momjian b45311e016 More tab cleanup. 1997-09-04 18:50:28 +00:00
Thomas G. Lockhart b647a27cf5 Add comparision routines to support indices on datetime and timespan. 1997-09-04 18:44:29 +00:00
Thomas G. Lockhart 7c243f83e8 Add comparision routines and catalog entries to support indices on
datetime and timespan.
1997-09-04 18:43:59 +00:00
Bruce Momjian bb77313a0a Tabs in comments fix. 1997-09-04 18:34:59 +00:00
Bruce Momjian 18bb25bdf1 Fix for dashes in comments. 1997-09-04 16:36:32 +00:00
Bruce Momjian 9fcd4c25bc Fix conditional casting. 1997-09-04 16:20:55 +00:00
Bruce Momjian 33b028b5b0 Fix syntax error in psql help. 1997-09-04 15:02:56 +00:00
Vadim B. Mikheev 444369e7b2 struct Trigger changed 1997-09-04 13:26:45 +00:00
Vadim B. Mikheev 9ba606cd24 Prototypes, definitions... 1997-09-04 13:26:19 +00:00
Vadim B. Mikheev 989ab6b1e7 pg_trigger changed 1997-09-04 13:25:14 +00:00
Vadim B. Mikheev bad4bc40b9 CREATE/DROP TRIGGER syntax 1997-09-04 13:24:26 +00:00
Vadim B. Mikheev 0badb77e73 Fixed _copyRangeTblEntry 1997-09-04 13:24:01 +00:00
Vadim B. Mikheev 78d74e32fb execMain.c: little changes in trigger interface...
spi.c: functions to prepare/run and preserve plans for
       duration of transaction/session. Some data utilities.
1997-09-04 13:22:39 +00:00
Vadim B. Mikheev dc13d5d307 Before row insertion triggers call. 1997-09-04 13:19:01 +00:00
Vadim B. Mikheev 8d6e5f07ff heap_destroy:RelationRemoveTriggers() 1997-09-04 13:17:59 +00:00
Bruce Momjian 35378a4efc Fix syntax error. 1997-09-03 16:48:59 +00:00
Thomas G. Lockhart ec70b3c07c Remove comment line in rules section. Keith reports trouble on Solaris
and O'Reilly "lex & yacc" book claims ATT-lex has trouble with comments.
1997-09-02 02:32:35 +00:00
Vadim B. Mikheev 6084c915d0 Triggers added to Relation 1997-09-01 08:13:22 +00:00
Vadim B. Mikheev b69b815e3a + Member for actions in CreateTrigStmt. 1997-09-01 08:11:57 +00:00
Vadim B. Mikheev 2ca45d5729 Function prototypes. 1997-09-01 08:10:12 +00:00
Vadim B. Mikheev 38f0ffd36c #define TriggerRelationName "pg_trigger" 1997-09-01 08:09:09 +00:00
Vadim B. Mikheev b9188c3065 trigger_dynamic()->handle_load() func for loading SPI-triggers 1997-09-01 08:06:17 +00:00
Vadim B. Mikheev c67208b3bb Calls of RelationBuildTriggers() & FreeTriggerDesc() 1997-09-01 08:04:38 +00:00
Vadim B. Mikheev 283e18ab0e BEFORE/AFTER ROW INSERT/DELETE/UPDATE triggers startup. 1997-09-01 08:01:46 +00:00
Vadim B. Mikheev 8c798538b8 BEFORE/AFTER ROW INSERT triggers startup from CopyFrom()
RelationBuildTriggers() & FreeTriggerDesc() in trigger.c
1997-09-01 07:59:06 +00:00
Thomas G. Lockhart c2efeafe9c Update information and query results for upcoming v6.2 release. 1997-09-01 06:21:00 +00:00
Thomas G. Lockhart bebfe968e3 Test new intersection and closest point operators.
Fix up results labels on queries.
Update existing queries which now return good results.
1997-09-01 06:19:43 +00:00
Thomas G. Lockhart 2d0e6b0ff7 Test new intersection and closest point operators.
Fix up results labels on queries.
1997-09-01 06:18:45 +00:00
Thomas G. Lockhart f2a9e203e8 Test for "current" time by comparing against "now". 1997-09-01 06:16:08 +00:00
Thomas G. Lockhart 98462b73f8 Shift time zone to GMT to correctly evaluate "current" time. 1997-09-01 06:13:21 +00:00
Thomas G. Lockhart b776831e8b Rearrange scanning code to support extended comments.
Use #define symbols rather than integers for scanning states.
1997-09-01 06:09:53 +00:00
Thomas G. Lockhart 1bf90bc7d3 Add structure for subselects.
Add field to support "WITH TIME ZONE".
1997-09-01 06:04:59 +00:00
Thomas G. Lockhart 570620c569 Add SQL92 string handling features (SUBSTRING, TRIM, EXTRACT).
Add parsing for UNION and outer JOINs.
Implement SQL92 "WITH TIME ZONE".
Allow some reserved words as identifiers and column labels.
Clean up indentation and "orphan spaces and tabs".
1997-09-01 06:00:35 +00:00
Thomas G. Lockhart 05cdb99bfb Add detection and warnings for UNION and HAVING clauses.
Generate non-fatal warning only and proceed by ignoring clauses.
1997-09-01 05:56:34 +00:00
Thomas G. Lockhart 05eb632864 Add more reserved words, mostly for SQL92 compliance.
Include reserved words for string handling, outer joins, and unions.
1997-09-01 05:53:31 +00:00
Thomas G. Lockhart 559a28747a Use exclusive states for parsing quoted strings.
Implement extended comments ("/* ... */") using exclusive states.
Modify definitions of operators to remove some restrictions on characters
 and character order.
1997-09-01 05:51:52 +00:00
Thomas G. Lockhart 1370a08746 Fix return value data type declarations for box_circle() and poly_circle(). 1997-09-01 05:46:09 +00:00
Vadim B. Mikheev 8dd090f6da CREATE/DROP TRIGGER statement nodes 1997-08-31 11:43:09 +00:00
Vadim B. Mikheev bcf03a7ed6 CREATE/DROP TRIGGER functions 1997-08-31 11:42:21 +00:00
Vadim B. Mikheev 502f6f3889 CREATE/DROP TRIGGER 1997-08-31 11:41:55 +00:00
Vadim B. Mikheev d65584d297 Get rid of #include "../backend/parser/parse.h 1997-08-31 11:41:20 +00:00
Vadim B. Mikheev 4e9a3f4ef0 Workplace for CREATE/DROP TRIGGER 1997-08-31 11:40:13 +00:00
Vadim B. Mikheev f2cc46dd54 Indexing of pg_trigger 1997-08-31 09:56:18 +00:00
Vadim B. Mikheev 2d7b93c0ca Welcome, triggers 1997-08-31 09:55:24 +00:00
Marc G. Fournier 6a061da272 Update patch from Peter <patches@maidast.demon.co.uk> 1997-08-31 08:15:13 +00:00
Vadim B. Mikheev 0b6dc93b32 Add spi.o 1997-08-30 10:28:47 +00:00
Bruce Momjian 65191fabfd indent flag change. 1997-08-29 21:41:33 +00:00
Bruce Momjian 0aea0f2063 Cleanup. 1997-08-29 21:20:09 +00:00
Bruce Momjian fddc57bfcd Add PGINDENT and support program. 1997-08-29 21:13:00 +00:00
Vadim B. Mikheev 448332a769 TupleUpdatedByCurXactAndCmd () changed due to
Fix very old bug which made tuples changed/inserted by a commnd
visible to command itself (so we had multiple update of updated tuples,
etc).
1997-08-29 09:12:20 +00:00
Vadim B. Mikheev d8933d5cff New results destination for SPI manager. 1997-08-29 09:06:27 +00:00
Vadim B. Mikheev 0d0254d1fb SPI manager. 1997-08-29 09:05:57 +00:00
Vadim B. Mikheev 3152996ffb Fix very old bug which made tuples changed/inserted by a commnd
visible to command itself (so we had multiple update of updated tuples,
etc).
1997-08-29 09:05:25 +00:00
Bruce Momjian e06099c607 heap_getattr fix for aix. 1997-08-29 00:44:55 +00:00
Vadim B. Mikheev 8fd0898814 Fix time_cmp 1997-08-28 05:06:29 +00:00
Vadim B. Mikheev ed118276e3 Clean CommandInfo after posting to client. 1997-08-28 05:05:43 +00:00
Vadim B. Mikheev becd2f9b82 Fix for "default = '...'" in CREATE TYPE 1997-08-28 05:02:01 +00:00
Vadim B. Mikheev 174bc0c1e7 Tests for CHECK/DEFAULT 1997-08-28 04:49:34 +00:00
Vadim B. Mikheev 3751b49545 Number of tuples inserted/affected by INSERT/UPDATE/DELETE... 1997-08-27 09:05:24 +00:00
Vadim B. Mikheev 40ac5a692b heap_delete returns int now (for non-functional deletes). 1997-08-27 09:03:47 +00:00
Marc G. Fournier ceac1d5a4e Only need to check for strerror once :) 1997-08-27 05:06:20 +00:00
Bruce Momjian ed7a17dca0 Remove unneeded stat calls. 1997-08-27 03:48:50 +00:00
Bruce Momjian 75c6c2b608 Inlined heap_getattr(). 1997-08-26 23:31:58 +00:00
Bruce Momjian 20afa04d03 Fix for pointer arithmetic. 1997-08-26 19:24:36 +00:00
Bruce Momjian 6451b04a08 rename sections. 1997-08-26 17:39:32 +00:00
Bruce Momjian ed626314e6 unix.1 renamed to pgintro.1. 1997-08-26 17:30:09 +00:00
Bruce Momjian 99e9deac73 Manual page renaming. 1997-08-26 17:00:23 +00:00
Bruce Momjian 5927d47b4f Change void * to Dllist*. 1997-08-26 14:05:47 +00:00
Bruce Momjian 0bdd6d1e00 pg_passwd cleanup. 1997-08-25 23:28:04 +00:00
Bruce Momjian 86062218da pg_passwd cleanup. 1997-08-25 23:11:21 +00:00
Bruce Momjian c6e7baa7e1 pg_passwd cleanup 1997-08-25 20:00:03 +00:00
Bruce Momjian f8fda03d12 pg_password utility. Cleanup for psql passwords. New datetime contrib stuff for new version. Fix for strutils needing config.h. 1997-08-25 19:41:52 +00:00
Bruce Momjian 8d0e658d06 Small cleanup. 1997-08-25 04:15:40 +00:00
Bruce Momjian c4cb617504 Major patch to speed up backend startup after profiling analysis. 1997-08-24 23:08:01 +00:00
Bruce Momjian 281ba3f40d Update .similar version file. 1997-08-22 18:48:25 +00:00
Bruce Momjian e045278e7e Fix for no NULL in CREATE TABLE. 1997-08-22 17:15:41 +00:00
Bruce Momjian 50881e336b Remove compile warning. 1997-08-22 16:48:14 +00:00
Bruce Momjian 0a50d30bd7 Warning in makefile added from DArcy. 1997-08-22 16:38:33 +00:00
Vadim B. Mikheev c16d29f990 + ExecConstraints () 1997-08-22 14:39:33 +00:00
Vadim B. Mikheev c0784f6d96 Restore CONSTRAINT keyword (was lost ... by unknown way) 1997-08-22 14:33:21 +00:00
Vadim B. Mikheev d40885cc40 + ExecConstraints() 1997-08-22 14:28:20 +00:00
Vadim B. Mikheev faebf2f8a2 Turn constraints off for sequences & views
elog(WARN,"ADD ATTRIBUTE: DEFAULT is not implemented, yet");
Call ExecConstraints in CopyFrom
1997-08-22 14:22:14 +00:00
Vadim B. Mikheev 530876fea5 Remove DEFAULT/CHECK infos from catalog on DROP TABLE
Store CHECK infos on CREATE TABLE
1997-08-22 14:10:26 +00:00
Bruce Momjian 021778eed3 We store Cash/money as int of size 4, so make it an int rather than a long. 1997-08-22 07:13:01 +00:00
Bruce Momjian 7515bb484e Fix for psql pager when no tty, cleanup for vacuum attdisbursion type. 1997-08-22 04:13:18 +00:00
Vadim B. Mikheev 5f7f236ba4 ConstraintDef changed 1997-08-22 04:05:27 +00:00
Vadim B. Mikheev d67547d82d Set attbyval for attdisbursion to FALSE
Set atttype for relchecks to 21 (int2)
Set relkind for pg_attrdef & pg_relcheck to 'n'
1997-08-22 04:04:19 +00:00
Vadim B. Mikheev ee5f09f07c + CreateTupleDescCopyConstr
+ FreeTupleDesc
1997-08-22 03:55:39 +00:00
Vadim B. Mikheev ac0029aa0b Fetch information about DEFAULT/CHECK while openning a relation. 1997-08-22 03:35:44 +00:00
Vadim B. Mikheev 9b6d8878fd There is no NULL constraint in CREATE TABLE - only NOT NULL one. 1997-08-22 03:17:55 +00:00
Vadim B. Mikheev ed2c54b240 DEFAULT handling
Use  for 'selct .. into ..' copy of TupleDesc (without constraints)
#ifdef NOT_USED for resetVarAttrLenForCreateTable (just free tupdesc copy)
1997-08-22 03:12:19 +00:00
Vadim B. Mikheev b5b3e03e34 DefineRelation: DEFAULT/CHECK handling 1997-08-22 03:03:56 +00:00
Vadim B. Mikheev 9e9584cc99 Store attr DEFAULT info in heap_create 1997-08-22 02:58:51 +00:00
Vadim B. Mikheev 55f7d4ea7d CreateTupleDescCopy don't copy constraints now!
+ CreateTupleDescCopyConstr to copy them too.
+ FreeTupleDesc
1997-08-22 02:55:39 +00:00
Bruce Momjian 76501c8aed Make psql use pager only when it has a tty. 1997-08-22 00:17:26 +00:00
Bruce Momjian 3dd23aadf0 Allow functions and operators on internally-identical types to succeed. 1997-08-22 00:02:19 +00:00
Bruce Momjian 0ab2921290 Change time function names to be more consistent, and check for zero divides, from Michael Reifenberg. 1997-08-21 23:57:00 +00:00
Bruce Momjian 23cce4ad4f Name change cleanup. 1997-08-21 14:33:05 +00:00
Bruce Momjian 671c4ea6f5 Remove unused spin function when no spinlocks. 1997-08-21 13:43:46 +00:00
Vadim B. Mikheev d37e93aafd #definitions for pg_attrdef & pg_relcheck names 1997-08-21 04:33:20 +00:00
Vadim B. Mikheev cc332d612b AttrConstr --> TupleConstr 1997-08-21 04:10:25 +00:00
Bruce Momjian e482462960 Rename pg_attribute.attnvals to attdisbursion. 1997-08-21 03:02:13 +00:00
Bruce Momjian f1edf02cc1 Change pg_attribute.attnvals to float4, change #ifdef 0 to #if 0, fix aix call to strNcpy, fix pg_super_user_id in pg_dumpall, change pg_database.dtadba from oid to int4. 1997-08-21 02:28:55 +00:00
Vadim B. Mikheev ac3d7b3146 + extern double *box_area(BOX *box); 1997-08-21 01:40:30 +00:00
Vadim B. Mikheev f2dd89b6fa + struct ConstaintDef - for constraints. 1997-08-21 01:39:25 +00:00
Vadim B. Mikheev 25aa0f8d04 New system relations to store DEFAULT/CHECK expressions. 1997-08-21 01:37:55 +00:00
Vadim B. Mikheev 197ced5923 Read info for DEFAULT from pg_attrdef. 1997-08-21 01:36:09 +00:00
Vadim B. Mikheev e3accffe66 Syntax for [CONSTRAINT name] CHECK ... 1997-08-21 01:34:44 +00:00
Vadim B. Mikheev e4247023f1 Get rid of attproc, atttyparg, attcanindex, attdefrel, attbound
from pg_attribute. atthasdef added.
1997-08-21 01:32:19 +00:00
Bruce Momjian 63fbdd358f Portability fix for pg_dumpall. 1997-08-20 15:06:48 +00:00
Bruce Momjian 11ac1bf268 More NOT_USEDs 1997-08-20 14:54:35 +00:00
Bruce Momjian 36c9c968c0 Add static finding script. 1997-08-20 02:10:47 +00:00
Vadim B. Mikheev 4a132abf6c HTNegate/HTCommute/HTNegateCommute are not used. 1997-08-20 02:01:42 +00:00
Vadim B. Mikheev 0c001f080b CHECK/DEFAULT syntax (some tricks to get current scan position). 1997-08-20 01:50:06 +00:00
Vadim B. Mikheev 4527172b80 CHECK/DEFAULT syntax 1997-08-20 01:12:38 +00:00
Marc G. Fournier bb951c6cb4 Changes for Digital Unix 1997-08-20 00:50:11 +00:00
Bruce Momjian 4e9e00cb68 Fix for sunos4 difftime() call. 1997-08-19 21:47:07 +00:00
Bruce Momjian 1d8bbfd2e7 Make functions static where possible, enclose unused functions in #ifdef NOT_USED. 1997-08-19 21:40:56 +00:00
Vadim B. Mikheev b992e200b8 NOT NULL implementation (submitted by Robson Paniago de Miranda). 1997-08-19 04:46:15 +00:00
Bruce Momjian b99c63cfc0 Now that names are null terminated, no need to do all that NAMEDATALEN stuff. 1997-08-18 20:53:48 +00:00
Bruce Momjian 022903f22e Reduce open() calls. Replace fopen() calls with calls to fd.c functions. 1997-08-18 02:15:04 +00:00
Marc G. Fournier eaae21fb4d Fixes for alphalinux port by abrams@philos.umass.edu 1997-08-17 02:40:00 +00:00
Marc G. Fournier 9d90de5de7 Changes so that it actually checks for <readline/history.h>, instead
of assuming it does exist
1997-08-17 00:48:51 +00:00
Marc G. Fournier 5410203949 Make sure that LIBPQDIR points to the right directory 1997-08-17 00:39:02 +00:00
Marc G. Fournier 9093238c7e Fix up paths to $(SRCDIR) 1997-08-17 00:33:28 +00:00
Marc G. Fournier f63f5680e3 Add appropriate links into the interfaces directory, as well as a Makefile
covering the interfaces directory
1997-08-16 20:56:28 +00:00
Marc G. Fournier ff246d7b64 Bring in Adrian's JDBC driver as an interface 1997-08-16 20:51:53 +00:00
Bruce Momjian fd86ae151a Cleanup global variables, remove stable memory stuff. 1997-08-14 16:11:41 +00:00
Vadim B. Mikheev e99e4ba833 sprintf "...%d...", ... (int)getpid(), ...
^^^^^
1997-08-14 05:04:38 +00:00
Vadim B. Mikheev ccc77423db _hash_checkpage: cleanup for CASSERT 1997-08-14 05:01:32 +00:00
Bruce Momjian 0b2eb99f01 These changes allow the module to compile quietly when assert checking is
not being done.
1997-08-12 23:03:50 +00:00
Bruce Momjian ea5b5357cd Remove more (void) and fix -Wall warnings. 1997-08-12 22:55:25 +00:00
Bruce Momjian 0f6a961e29 cleanup of patch 1997-08-12 20:39:16 +00:00
Bruce Momjian edb58721b8 Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary. 1997-08-12 20:16:25 +00:00
Bruce Momjian 4b851b1cfc Add bsdi gcc2 options. 1997-08-08 03:51:33 +00:00
Bruce Momjian dc374505fa Fix for psort again. 1997-08-06 17:11:20 +00:00
Bruce Momjian 677efc7679 Another psort fix. 1997-08-06 07:39:20 +00:00
Bruce Momjian 42c0cd33a2 I think I finally got psort working for all cases. 1997-08-06 07:02:49 +00:00
Bruce Momjian cc24b846dd psort cleanups. 1997-08-06 05:38:46 +00:00
Bruce Momjian 8fd7db8163 Another fix. 1997-08-06 05:08:37 +00:00
Bruce Momjian ead219384f Fix for palloc(0) in new code 1997-08-06 04:45:39 +00:00
Bruce Momjian f5f366e188 Allow internal sorts to be stored in memory rather than in files. 1997-08-06 03:42:21 +00:00
Bruce Momjian 3bea7b138b Add developers help file. 1997-08-06 03:37:34 +00:00
Bruce Momjian 1ebc1280e8 Fix for os version handling. 1997-08-06 03:33:45 +00:00
Vadim B. Mikheev b3d8beaa1a Catch non-functional delete attempts. 1997-08-06 02:08:39 +00:00
Bruce Momjian 6ed1715b1f Cleanup for NAMEDATALEN use. 1997-08-03 02:38:47 +00:00
Bruce Momjian ea210dc611 Comment out code that makes no sense, and Purify complains about. 1997-08-03 02:28:10 +00:00
Bruce Momjian 8015ba0836 Prevent relname unallocated string length from being copied into database. 1997-08-02 19:09:33 +00:00
Bruce Momjian 105889e1d8 Makei configure less os-version specific, were possible. 1997-08-02 16:32:51 +00:00
Bruce Momjian 4b965f5758 Fix stout/stderr paging. Do not page \h select, but page \h *. 1997-08-01 04:07:55 +00:00
Bruce Momjian da76711714 FIx solaris template finding. 1997-08-01 03:49:22 +00:00
Bruce Momjian a67fd49091 Fix psql error output. 1997-08-01 03:33:02 +00:00
Bruce Momjian f5f18af02b Configure cleanup for /usr/ucb patch. 1997-07-31 01:37:56 +00:00
Bruce Momjian aff479b4d1 Look in /usr/ucb first for install. 1997-07-30 19:16:23 +00:00
Bruce Momjian cdc2c06386 configure.in cleanup for tr and strerror2. 1997-07-30 18:27:18 +00:00
Bruce Momjian 775098bd28 Add -o to psql manual page. 1997-07-30 17:21:29 +00:00
Bruce Momjian 1b20f8ac11 Fix c++ copy example code. 1997-07-30 15:53:57 +00:00
Marc G. Fournier ecefacd07d Due to BIND 8.1.1, my Solaris 2.5.1 machine doesn't define MAXHOSTNAMELEN...
so, add a check that basically says if it isn't defined, set it to 256...
1997-07-30 14:08:11 +00:00
Marc G. Fournier 5089f6ce87 Check for and use <netdb.h> for postmaster.c, instead of checking if
MAXHOSTNAMELEN is defined.  For some reason, my 2.5.1 Solaris box at
work fails on that check...
1997-07-30 14:03:33 +00:00
Vadim B. Mikheev ac994a69d6 Allow use parameters in target list having aggregates in functions. 1997-07-30 04:42:26 +00:00
Bruce Momjian 6c93fe8f9d configure.in cleanup from sco install. 1997-07-30 01:32:44 +00:00
Bruce Momjian bcc883fed3 Remove HAVE_USAGE because it is no longer used. 1997-07-30 00:09:42 +00:00
Bruce Momjian c86e85df92 Update COPY manual page to remove unneeded warnings. 1997-07-29 21:43:40 +00:00
Bruce Momjian 9db76f384d Update configure after sunos4 update. 1997-07-29 21:16:52 +00:00
Bruce Momjian 461f80cf9a Add strerror to pg_version for sunos4. 1997-07-29 16:36:43 +00:00
Thomas G. Lockhart 622af87fd2 Results from initial changes to add new functions and for bug fixes.
Not all cleaned up yet.
1997-07-29 16:24:04 +00:00
Thomas G. Lockhart 3d5dd9bdd9 Start adding tests for new geometry functions.
Not all cleaned up yet.
1997-07-29 16:22:48 +00:00
Thomas G. Lockhart c5035643af Use better routines from geometry library. 1997-07-29 16:21:12 +00:00
Thomas G. Lockhart 840ea2497d Change call definition for isreltime(). 1997-07-29 16:19:26 +00:00
Thomas G. Lockhart 3c2d74d2af Add new operators and functions for geometric types.
Add text concatenation operator and function.
Add text trim function for SQL92 support.
1997-07-29 16:17:52 +00:00
Thomas G. Lockhart e89d139dbe Add new routines.
Change definition for isreltime().
Change some names of #define constants to avoid conflicts with the yacc parser.
1997-07-29 16:16:14 +00:00
Thomas G. Lockhart e1d9cf096c Remove some unnecessary include statements (comment out with #ifdef FALSE). 1997-07-29 16:14:40 +00:00
Thomas G. Lockhart bf138e2139 Add routines for text trimming on both ends, substring, and string position.
Used to support SQL92 compatibility.
1997-07-29 16:12:07 +00:00
Thomas G. Lockhart d95c93bf99 Fix bug to allow hh:mm:ss time entry for timespan/reltime types. 1997-07-29 16:09:38 +00:00
Thomas G. Lockhart 215bc83d75 Remove #ifdef'd support for old i/o styles.
Change box terminology from "length" to "width".
 Use length terminology in common with other geometric types (usually perimeter).
Fix bugs in line arithmetic which resulted in bad intersection calculations.
Deprecate temporary unstored slope fields.
Check explicitly for intersections at endpoints to avoid rounding ugliness.
Add center() routines for lseg, path, polygon.
Add distance() routines for circle-polygon, polygon-polygon.
Check explicitly for points and polygons contained within polygons
 using an axis-crossing algorithm. (Old code just checked bounding boxes).
Add routine to convert circle-box.
*whew*
1997-07-29 16:08:18 +00:00
Thomas G. Lockhart 1ba73ed3a0 Update some reltime code to use new common routines.
Use standard decoder for isreltime().
1997-07-29 15:54:49 +00:00
Thomas G. Lockhart 9d8ae79774 Add debugging statements. 1997-07-29 15:51:33 +00:00
Bruce Momjian 8d25436d70 mkLinux patches from Tatsuo Ishii. 1997-07-29 14:09:11 +00:00
Bruce Momjian 7c5afb87c3 Makefile fix from Tatsuo Ishii. 1997-07-28 23:57:20 +00:00
Bruce Momjian fd6b3c26ef fix small memory free error. 1997-07-28 23:53:54 +00:00
Bruce Momjian 8338f90d4e Add SCO files. 1997-07-28 01:34:24 +00:00
Bruce Momjian 79e78f0b80 Added SCO support, from Daniel Harris. 1997-07-28 00:57:08 +00:00
Bruce Momjian 5a38a119b2 Remove sparc dir, add difftime macro for sunos. 1997-07-28 00:13:39 +00:00
Bruce Momjian cfd15d16fa Rename sparc to sunos4 directory. Was misnamed. 1997-07-28 00:08:41 +00:00
Bruce Momjian d5e21e0924 HPUX 10 patches from Vladimir Turin 1997-07-27 18:52:43 +00:00
Bruce Momjian 3ac9d2fff3 Various compile errors concerning overflow due to shifts, unsigned, and bad prototypes, from Solaris, from Diab Jerius 1997-07-24 20:19:10 +00:00
Bruce Momjian 8447148aad psql: Add PAGER for \h and \?,\C fix, indices spell fix. 1997-07-24 20:01:33 +00:00
Bruce Momjian 4d8a5efcef Add single quotes to \\h set help 1997-07-24 19:11:53 +00:00
Bruce Momjian 9ad6e0db30 More pg_dump patch cleanups. 1997-07-23 17:42:25 +00:00
Bruce Momjian a7d417cc2f Fix problems with pg_dump for iheritance, sequences, archive tables. 1997-07-23 17:15:13 +00:00
Bruce Momjian 41b805b913 Solaris .similar update. 1997-07-16 02:25:16 +00:00
Marc G. Fournier 012cb6d8c8 Search for ginstall before the other installs...
As requested by Dr. Andrew C.R. Martin
1997-07-15 23:11:38 +00:00
Bruce Momjian 441648d955 .similar patch for irix 1997-07-15 17:16:46 +00:00
Bruce Momjian 5eb4fadeaa Prevent psql optarg free-ing 1997-07-14 22:08:56 +00:00
Bruce Momjian 31fba1d974 Mips sysv4 support. 1997-07-14 16:52:13 +00:00
Bruce Momjian 10da89c1fb Add sysv4 support to configure and docs. 1997-07-14 16:47:36 +00:00
Bruce Momjian e3be2f9dd7 Update supported ports for 6.1.1 release. 1997-07-14 16:37:36 +00:00
Bruce Momjian 69e5d63839 AIX nm fix from Gerhard 1997-07-13 19:52:10 +00:00
Bruce Momjian 0fca4afbf4 Change char to int as used in EOF compare, Gerhard 1997-07-12 20:31:47 +00:00
Bruce Momjian a89f9731e9 Have pg_dumpall return proper status on exit 1997-07-12 15:57:31 +00:00
Thomas G. Lockhart e66f5c05eb Remove endian information which is now in port-specific header files.
Note that this version is probably identical to two versions ago.
1997-07-11 14:09:00 +00:00
Thomas G. Lockhart c6df30edb9 Modify port-specific definitions to support missing endian information.
Add extra include file for aix to find endian information.
1997-07-11 14:03:01 +00:00
Bruce Momjian a11ad874e4 Fix for assembler from Yoshihiko ICHIKAWA 1997-07-10 02:32:51 +00:00
Bruce Momjian 3b7ee8f5f9 Allow underscores in user names. 1997-07-10 02:27:27 +00:00
Bruce Momjian 35a952a2ed Fixes from Jody Winston 1997-07-10 01:15:11 +00:00
Bruce Momjian a5d80cb0cf Date-type fixes from Tatsuo Ishii 1997-07-08 22:06:46 +00:00
Thomas G. Lockhart 75ebaa748e Add information regarding date and time types and functions,
including arguments allowed.
1997-07-02 14:13:14 +00:00
Thomas G. Lockhart 54c38a95ee Add test results for "SET DateStyle" alternative datetime formats. 1997-07-02 01:34:24 +00:00
Thomas G. Lockhart 48b5432769 Include tests for DateStyle output format variations. 1997-07-01 00:34:34 +00:00
Thomas G. Lockhart 3ded6fd511 Fix code to do the right thing with mixed-endian clients and servers. 1997-07-01 00:32:27 +00:00
Thomas G. Lockhart bf3bcb6a6d Include definitions for endian info if not in system includes. 1997-07-01 00:31:10 +00:00
Thomas G. Lockhart 7bdf9ba35b Add flags to allow dynamic loader to find Postgres sharable libraries without
having to modify the system-wide library database.
1997-07-01 00:29:40 +00:00
Thomas G. Lockhart 495fdfba98 Rearrange DTK_x constants.
Define constants to allow day of week decoding.
Add new datetime and timespan routines.
1997-07-01 00:25:30 +00:00
Thomas G. Lockhart 8507ddb9c6 Use common parser and encoder for timestamp data type.
Remove older date and time code (retain NEW_DATE_CODE and NEW_TIME_CODE).
Use common encoder for date and time.
Fix datetime +/- timespan math bug.
1997-07-01 00:22:46 +00:00
Bruce Momjian 43deb7a45f Fox case-sensitivity for \d and allow trailing ; on backslash commands. 1997-06-29 17:29:28 +00:00
Bruce Momjian 1952f15c5c Fix memory leak in psql. 1997-06-29 05:06:43 +00:00
Vadim B. Mikheev eb9c8e0a59 _hash_first: release buf & metabuf if no tuples found for a key. 1997-06-28 05:45:40 +00:00
Bruce Momjian fc96d50a5c lextest cleanup. 1997-06-25 22:21:29 +00:00
Bruce Momjian 7e75f5e8b3 Small pg_dumpall cleanup. 1997-06-25 21:24:57 +00:00
Bruce Momjian c2010d8e4d fix for initdb --debug core dump, from Tatsuo Ishii 1997-06-25 21:12:19 +00:00
Bruce Momjian c666255112 Typo changes in tests/ examples. 1997-06-25 19:59:57 +00:00
Thomas G. Lockhart c05a7bd972 Test "SET DateStyle TO..." output options. 1997-06-23 15:08:59 +00:00
Thomas G. Lockhart 3267b4b767 Adapt expected output to drop ".00" from datetime seconds field.
This is compatible with abstime formats.
1997-06-23 15:07:54 +00:00
Thomas G. Lockhart 89abee4691 Test the "SET DateStyle TO..." date formatting modes. 1997-06-23 15:05:52 +00:00
Thomas G. Lockhart 45409f0cdd Remove code not previously enabled with USE_NEW_DATE and USE_NEW_TIME
#defines.
1997-06-23 15:03:45 +00:00
Thomas G. Lockhart 742425447d Drop internal routines for formatting time output. Use default formatter.
Add timezone info to abstime2tm().
1997-06-23 14:58:51 +00:00
Thomas G. Lockhart 1f4f4534a0 Use the standard date/time encoder rather than strftime() for output.
This allows use of the DateStyle session variable.
1997-06-23 14:56:15 +00:00
Thomas G. Lockhart 01264e84ba Modify EncodeDateTime() to suppress trailing ".00" in seconds field.
This matches the behavior of the original formatting for abstime.
Repair datetime + timespan date arithmetic for year boundaries.
 From patch submitted by Dave Skinner.
1997-06-23 14:50:56 +00:00
Thomas G. Lockhart d9bccec0d2 Expunge code not enabled with USE_NEW_DATE and USE_NEW_TIME #defines. 1997-06-23 14:47:26 +00:00
Bruce Momjian a53d85404e pg_dump, pg_dumpall cleanups. 1997-06-21 16:08:17 +00:00
Thomas G. Lockhart 374b0009fd Fix predicted output for month boundary arithmetic problems in
datetime +/- timespan. Only manifested when date is at end of month
 and time pushes the date into the next month.
1997-06-20 17:20:55 +00:00
Thomas G. Lockhart 2f09dd9958 Fix broken parsing for lists of options. Apparently broken when support was
added for keyword=value options.
1997-06-20 17:17:03 +00:00
Thomas G. Lockhart 9af564ada6 Add parser category for "DST" Daylight Savings Time qualifier on time zones. 1997-06-20 17:15:00 +00:00
Thomas G. Lockhart 3cef45d330 Fix leap year and month boundary arithmetic for datetime +/- timespan;
the problem only manifests itself when adding years/months and hours
 when the hours:minutes:seconds pushes over midnight.
Fix interpretation of times with explicit timezone when the timezone is
 in daylight savings time and is not the default timezone.
Allow interpretation of explicit timezone when it is specified as two words:
 <standard time> DST". For example, "MET DST" (Middle European Time Daylight
 Savings Time). This syntax is found in the zic package on Linux boxes at least.
1997-06-20 17:12:54 +00:00
Bruce Momjian a75d6aaa41 Check pgdump return request. 1997-06-20 16:37:10 +00:00
Bruce Momjian dd2c410616 Allow pg_dump to preserve owners of all objects. 1997-06-20 02:20:26 +00:00
Vadim B. Mikheev 41882fde34 setVarAttrLenForCreateTable(): use varnoold/varoattno instead of
varno/varattno.
1997-06-13 03:24:26 +00:00
Thomas G. Lockhart 380eaaa139 Add a few words from Vadim and an example on explain output.
Update the update date.
1997-06-12 23:45:54 +00:00
Vadim B. Mikheev 0f576413bc Fix replace_agg_clause() for unary operators. 1997-06-12 17:26:15 +00:00
Bruce Momjian 8f846a321c Update psql EXPLAIN help description, from Thomas. 1997-06-12 16:43:08 +00:00
Vadim B. Mikheev 7540eda8f4 Someone forgot about aligning in fastgetiattr()... 1997-06-12 15:41:52 +00:00
Vadim B. Mikheev 9392a19196 Datum *idatum;
^
1997-06-12 15:39:44 +00:00
Vadim B. Mikheev 1561684a2d Compare 'char' and 'text' lexicographically. 1997-06-11 05:20:05 +00:00
Vadim B. Mikheev 0346ab7175 Lexicographically compare 'char' and 'text'. 1997-06-11 05:18:02 +00:00
Vadim B. Mikheev dee872de5c geqo_rel_paths(): compute_joinrel_size() shouldn't be called
for non-JoinPath path! So now we have:
    if ( IsA_JoinPath (cheapest) )
        rel->size = compute_joinrel_size(cheapest);
1997-06-11 02:44:12 +00:00
Marc G. Fournier 5c2649b616 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PORTS] Makefile.aix patch.

Have to add libc.a to the link when making a shared lib.
1997-06-11 01:14:49 +00:00
Marc G. Fournier 90d0cf0000 From: Robert Bruccoleri <bruc@bms.com>
Subject: [PORTS] Patches for Irix 6.4

I have worked out how to compile PostgreSQL on Irix 6.4 using the -n32 compiler
mode and version 7.1 of the C compiler. (The n32 compiler use 32 bits
addressing,
but allows access to all the instructions in the MIPS4 instruction set.)
There were several problems:

1) The ld command is not referenced as a macro in all the Makefiles. On
this platform, you have to include -n32 on all the ld commands. Makefiles
were changed as needed.

3) Lots of warnings are generated from the compiler. Since the regression
tests worked OK, I didn't attempt to fix them. If anyone wants the compilation
log, please let me know, and I'll email it to you.

The version of postgresql was 970602. Here is Makefile.custom:

CUSTOM_COPT = -O2 -n32
MK_NO_LORDER = 1
LD = ld -n32
CC += -n32
1997-06-11 01:13:10 +00:00
Marc G. Fournier 4ea3844680 From: "Brian E. Gallew" <geek+@cmu.edu>
Subject: Re: [PORTS] Re: [PATCHES] DG/UX 5.4R11 patches

Comments in boot.sed break DG/UX port
1997-06-11 01:05:48 +00:00
Marc G. Fournier 735bf0b7f2 From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] sequences display in psql

Well, I am away at Progress training (not Postgres!!) and desided to do
this patch during a break. This will allow listing of sequences in
addition to listing of tables and indicies:
\d would should indicies, tables, and sequences
\ds would show sequences only.
1997-06-11 01:03:38 +00:00
Marc G. Fournier 65c4a526fe From: "Eric H. Raskin" <ehr@listworks.com>
Subject: [PATCHES] DG/UX 5.4R11 patches

1) config.guess -- it doesn't understand that the new default
                   "TARGET_BINARY_INTERFACE" (m88kdgux) is now an ELF
                   format, not BCS.
1997-06-11 01:02:01 +00:00
Bruce Momjian fb5be867ef LO patches for loimport/loexport from Raymond Toy 1997-06-10 13:01:32 +00:00
Vadim B. Mikheev f4161503e6 if ( rel->size <= 0 )
rel->size = compute_rel_size(rel);
1997-06-10 07:55:47 +00:00
Vadim B. Mikheev cbb4213af4 if ( new_rel->size <= 0 )
new_rel->size = compute_rel_size(new_rel);
1997-06-10 07:53:55 +00:00
Vadim B. Mikheev 71b3e93c50 Duplicates handling... 1997-06-10 07:28:50 +00:00
Bruce Momjian 858f35510e Cleanup on xinv# table names. 1997-06-07 17:34:35 +00:00
Bruce Momjian 5c34462d9c Make LO patter consistent with psql. 1997-06-07 05:29:22 +00:00
Bruce Momjian 51b03770d7 avoid xinv* table name conflict with large objects. 1997-06-07 05:19:06 +00:00
Marc G. Fournier 0105b79f4f From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] destroydb.1 patch

This is a patch to destroydb man page so that it shows and explains "-i"
option.
1997-06-06 22:08:04 +00:00
Marc G. Fournier e721e58c03 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] psql and large objects fix

Psql was broken by using "Inv[0-9]+" instead of "xin[xv][0-9]+" to not
show large object files.  Been this way for a long time too. Relic of
an older naming convention, perhaps?
1997-06-06 22:05:23 +00:00
Marc G. Fournier e318022e1a From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [PATCHES] backend/storage/ipc/shmem.c

  - strname is only used if assert checking is on
1997-06-06 22:04:04 +00:00
Marc G. Fournier 0f94738c33 From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [PATCHES] backend/lib/fstack.c

  - The FixedStackIsValid so obviously needs to be a macro
  - FixedStackContains only called if assert checking on
1997-06-06 22:02:37 +00:00
Thomas G. Lockhart 20e71222ea Change one date away from PST to avoid trouble after daylight savings time. 1997-06-06 06:13:10 +00:00
Thomas G. Lockhart e7044d70ef Change one date away from PST to avoid trouble after daylight savings time. 1997-06-06 06:05:53 +00:00
Bruce Momjian a089cdd9d3 lowercase large object table name fix. 1997-06-06 03:41:16 +00:00
Vadim B. Mikheev e3d2f1f35d gimme_tree(): got rid of compute_rel_size() -
compute_joinrel_size already called by geqo_rel_paths.
1997-06-06 03:18:02 +00:00
Vadim B. Mikheev c8a38d5d97 Added check is new item successfuly inserted to a page or not. 1997-06-06 03:11:46 +00:00
Marc G. Fournier 8d1f52ef24 From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] More psql and libpq patches

Well..these would be the last patches until the release (I hope)...
I ran the regression tests while watching psql under purify, and it did
not leak even one byte.

In this patch:

* Plugged a major leak when PSQL reads files for input (either through
  \i options or through -f option)
* Fixed the one remaining leak in PSQL in not clearing PGresult *results
  everywhere it is supposed to. (Thanks Tymm)
* Fixed A small leak in PSQL not clearing all the PGsettings correctly.
* A not-so-obvious (but small) leak in Libpq when PQsetdb fails for any
  reason.
* Added \n to some Libpq error messages to make them easier to digest..
* Finally, added /* PURIFY */ comment to some of the code indicating
  the reason for why it was added/changed...for future developers.
1997-06-06 01:42:02 +00:00
Marc G. Fournier 442306fe36 From: "Brian E. Gallew" <geek+@cmu.edu>
Define USE_POSIX_TIME for dgux port
1997-06-06 01:39:24 +00:00
Marc G. Fournier 11c7d75560 From: Phil Nelson <phil@cs.wwu.edu>
Subject: [PATCHES] Patches to allow generic NetBSD support
1997-06-06 01:38:24 +00:00
Marc G. Fournier 15da18508f From: Phil Nelson <phil@cs.wwu.edu>
Subject: [PATCHES] Added support for NetBSD/pc532.
1997-06-06 01:37:23 +00:00
Marc G. Fournier 355d6a2767 From: PortSite <info@portsite.nl>
The GNUmakefile in src/test/regress uses `gmake' for
the make program. This should be $(MAKE)
1997-06-06 01:35:57 +00:00
Marc G. Fournier c0178f27a2 From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] src.original/./backend/lib/fstack.c

Another change I suggested.  I bracket an unused function and add a
return to quiet the compiler.  In addition I added an internal
consistency check.
1997-06-06 00:38:17 +00:00
Marc G. Fournier f50b103ce1 From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] backend/optimizer/geqo/geqo_erx.c

I sent these changes in with a bunch of others.  Some were folded in but
others, like these, were not.  I am not sure why so I am resending this
to the developers list by itself for discussion.

The readon why I suggest these changes is that the compiler can't tell
that minimum_count is initialized before it is used.  The tests that I
add in here will cause an immediate error if it doesn't.  As the comments
below suggest, if it is 100% guaranteed that the variable will always
be initialized then how this is so should be commented here.  I don't
know how much strain the actual test puts on the performance but if it
isn't too much then maybe leave it in for absolute safety anyway.

There are also a few returns just to stop warnings.
1997-06-06 00:37:23 +00:00
Bruce Momjian a668b7ac2d Fix for large objects and case sensitivity, from Raymond Toy. 1997-06-05 22:59:45 +00:00
Bruce Momjian ce2fcd0180 bsdi configure detection fix. 1997-06-05 17:36:43 +00:00
Vadim B. Mikheev 11073bee5c allpaths.c:find_join_paths(): compute_rel_size() shouldn't be called
for join-relations. Sizes already computed by
prune_rel_paths():compute_joinrel_size().

joinrels.c:
<                   if ( _use_right_sided_plans_ )
---
>                   if ( _use_right_sided_plans_ &&
>                               length (outer_rel->relids) > 1 )

 - r_plans are useful when outer_rel is join-relation... It
decreases the size of search space...
1997-06-05 09:33:52 +00:00
Vadim B. Mikheev 39c73eff63 Definition for RelationForgetRelation(). 1997-06-04 09:01:49 +00:00
Vadim B. Mikheev 9c6cdb4d7b heap_destroy() now calls RelationForgetRelation() to really flush
the relation from the relcache.
1997-06-04 08:59:22 +00:00
Vadim B. Mikheev ded4650642 New func RelationForgetRelation();
*         RelationFlushRelation + if the relation is local then get rid of
 *         the relation descriptor from the newly created relation list.
1997-06-04 08:56:51 +00:00
Bruce Momjian 21437b747b Add bsdi to template detection. 1997-06-03 20:08:06 +00:00
Thomas G. Lockhart 98b56067ed Use error message syntax consistant with other messages from the same
reference platform (Linux/gcc-lib/i686).
1997-06-03 14:34:51 +00:00
Thomas G. Lockhart e6924c9750 Update to reflect new "drop aggregate" syntax and messages. 1997-06-03 14:31:46 +00:00
Thomas G. Lockhart 8aefe09731 Update to show new path and polygon syntax. 1997-06-03 14:29:51 +00:00
Thomas G. Lockhart 3d9584c9d9 Update path and polygon syntax to new conventions. 1997-06-03 14:24:12 +00:00
Thomas G. Lockhart ad7952aae3 Update to use new path geometric type syntax.
Order in streets.data changed and is now alphabetical (sorry).
1997-06-03 14:21:36 +00:00
Thomas G. Lockhart dc5bcc8621 Modify banner to suggest using PST8PDT time zone rather than full specifier
string.
1997-06-03 14:19:28 +00:00
Thomas G. Lockhart 066fce7bf9 Update to suggest using PST8PDT time zone rather than full time zone string.
Include section on error message differences.
1997-06-03 14:18:38 +00:00
Thomas G. Lockhart 4bd4a55b98 Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow
upgrading from existing pre-v6.1 path and polygon geometric data types.
1997-06-03 14:11:28 +00:00
Thomas G. Lockhart 3887d41b13 Put parens around macro arguments for safety per D'Arcy's suggestion. 1997-06-03 14:07:24 +00:00
Thomas G. Lockhart 06ea3c9a24 Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow
migration from pre-v6.1 geometric data types.
Only allow new input syntax for paths and polygons.
1997-06-03 14:01:22 +00:00
Thomas G. Lockhart fe74581fa0 Use finite() macro if available to check returns from pow() and exp(). 1997-06-03 13:58:06 +00:00
Thomas G. Lockhart 93ac35f06c Fix a few DATEDEBUG print statements. 1997-06-03 13:56:32 +00:00
Vadim B. Mikheev fa940fda67 cc1: warnings being treated as errors
dt.c: In function `timespan2tm':
dt.c:1722: warning: unused variable `funit'
dt.c:1722: warning: unused variable `iunit'

-> got rid of them.
1997-06-03 06:32:56 +00:00
Vadim B. Mikheev b46e5b5281 SET geqo TO 'on' restores _use_geqo_rels_ to GEQO_RELS, not
to last specified with 'on' #.
What is better ?
1997-06-03 06:29:31 +00:00
Vadim B. Mikheev f1cf69c080 cc1: warnings being treated as errors
remove.c: In function `RemoveAggregate':
remove.c:413: warning: unused variable `typename'

-> got rid of it.
1997-06-03 06:23:24 +00:00
Vadim B. Mikheev 9d14ef9465 SET var TO '...'
^^ - added
1997-06-03 06:19:11 +00:00
Vadim B. Mikheev cd3f1bcab0 cc1: warnings being treated as errors
psql.c: In function `HandleSlashCmds':
psql.c:1141: warning: `optarg3' might be used uninitialized in this function
psql.c:1157: warning: `optarg3' might be used uninitialized in this function

-> char           *optarg3 = NULL;
1997-06-03 06:17:34 +00:00
Vadim B. Mikheev 2c7e2851d7 Cleanups. 1997-06-03 04:14:31 +00:00
Bruce Momjian 3fd9a62088 Add \dt and \di to psql help. 1997-06-03 03:35:46 +00:00
Vadim B. Mikheev 3afafc8c69 New description of currval. 1997-06-03 03:19:08 +00:00
Vadim B. Mikheev 9c0d64c21c #define GEQO_RELS 6 (not 7) 1997-06-03 03:15:50 +00:00
Vadim B. Mikheev 2f8c2e997b Fix deleted tuples re-incarnation possible when vacuum transaction
start time equal to tuple->t_tmax.

Privent shrinking if there are tuples modifyed by running transactions
(it concerns system relations only, currently).
1997-06-03 01:29:26 +00:00
Edmund Mergl 234776dbbc *** empty log message *** 1997-06-02 19:42:14 +00:00
Bruce Momjian 09e41a037e Update man and psqlHelp for new SET GEQO=# option. 1997-06-02 14:12:40 +00:00
Bruce Momjian 290bef4e05 Allow for EOF or \0 as input() return from lex. 1997-06-02 13:55:19 +00:00
Vadim B. Mikheev 5b5c83f9e7 Oracle like currval behaviour. 1997-06-02 11:22:52 +00:00
Vadim B. Mikheev 465047d604 #define GEQO_RELS 7
moved from geqo.h to internal.h.
1997-06-02 11:19:33 +00:00
Vadim B. Mikheev 05404562fb Use GEQO if _use_geqo_ is TRUE and # of relations is >= _use_geqo_rels_
(both are settable via SET geqo TO ...).
1997-06-02 11:14:40 +00:00
Vadim B. Mikheev cda886fd06 SET var TO 'a=b'
^^ is supported by get_token now.
(SET geqo TO 'on=XXX' works now).
1997-06-02 11:00:57 +00:00
Marc G. Fournier 541f18558d From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] patch for a memory leak

Well...I screwed up and posted the wrong patch for psql originally..
The patch for that patch wposted below will fix it..
1997-06-02 03:04:50 +00:00
Marc G. Fournier 8445ccd57a From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] Another destroydb patch

This is a patch to my previous destroydb patch cause some people wanted
slightly different behavior. After this patch is applied, destroydb
will destroy a database as usual, but if added -i flag (which could be
aliased like rm -i) would ask for confirmation.
1997-06-02 02:53:00 +00:00
Marc G. Fournier f9f98e3aff From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] pg_dump memory leak patch

This patch fixes a HUGE memory leak problem in pg_dump.
Pretty much anything that was allocated was never freed and Purify
reported about 40% possible memory leak and 6% actual leak. I added
functions to clear out all the allocated structures. After the patch
Purify returns 0 for number of bytes leaked...
1997-06-02 02:52:06 +00:00
Marc G. Fournier a27fafecc5 Ordering of libraries changed so that -lbsd is *after* -lm
Fixes a problem Darren reports with AIX, and doesn't seem to break either
FreeBSD or Linux(David?)...
1997-06-01 16:25:34 +00:00
Marc G. Fournier ff038a5b97 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] psql - \dt,\di commands.

I sent this a couple of months ago in re a request by Maxim
Kozin, but I had the patch reversed, creating some confusion
over applying it.

Here's a more complete version.

Adds \dt to list only tables/views and \di to list only
indicies.  \d will still work as before.
1997-06-01 15:53:24 +00:00
Marc G. Fournier 187e0f2405 From: Phil Nelson <phil@cs.wwu.edu>
Subject: [PATCHES] Support for NetBSD/sparc

The following is a patch to allow BSD44_derived to support NetBSD/sparc.
1997-06-01 15:51:10 +00:00
Marc G. Fournier b3db8ee0b2 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] aix.h needs POSIX...
1997-06-01 15:50:08 +00:00
Marc G. Fournier ad8d504f90 From: Robert Bruccoleri <bruc@bms.com>
One more Irix related patch for Dynamic Linking
1997-06-01 15:41:40 +00:00
Marc G. Fournier 3903296b2a From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] destroydb patch

I am including a patch for destroydb to ask for confirmation before
deleting databases (after I accidentally deleted mine)...destroydb -y
would force delete without any confirmation.
1997-06-01 15:40:08 +00:00
Marc G. Fournier 9a5529f4d1 From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] memory leak patches in libpq and psql

A couple of small memory leak patches (detected with Purify) primarily
in libpq.

* Fixed (NULL) border problem in psql (run psql, do \m, then select
  something from a table...row separators will be nulls)
* Fixed memory leak with the abovementioned border not being freed
  properly.
* Fixed memory leak in freePGconn() not freeing conn->port
* Fixed up PQclear() to free parts of PGresult only if these
  parts are not null.
* Fixed a decent memory leak that occured after executing every command
  in psql. PGresult *results was not freed most of the time.

There is still a leak being detected (2 bytes) in readline functions, but
I think this is old readline library. I will install new one and test it.
1997-06-01 15:39:08 +00:00
Bruce Momjian d95572767e Added \n to error message. 1997-06-01 04:59:25 +00:00
Bruce Momjian 6c82ae2c02 Add R_PLANS to psql help, and SET cleanup. 1997-06-01 04:53:44 +00:00
Bruce Momjian 6ed9f2f17b DROP agg psql help change from Darren. 1997-06-01 04:32:41 +00:00
Bruce Momjian 195d7dea00 SET R_PLANS added to manual page. 1997-06-01 04:23:12 +00:00
Bruce Momjian afb089d4a4 Put back old lines. 1997-06-01 04:16:16 +00:00
Bruce Momjian f93bd64504 Add bsdi 3.0 to configure. 1997-06-01 04:05:26 +00:00
Bruce Momjian 93b03649d4 Cleanup for AIX from Darren. 1997-06-01 03:39:28 +00:00
Bruce Momjian 35717aa24f Escape newline in select output, from A. Duursma. 1997-06-01 03:18:32 +00:00
Bruce Momjian 8bc7439ccf Enable GEQO for more than six tables, from Martin. 1997-06-01 02:56:00 +00:00
Bruce Momjian 4d9b4dc973 Changed 1943 to 1947 to fix, other cleanups. 1997-06-01 02:30:25 +00:00
Bruce Momjian c3a960ad8a Fix for SELECT * INTO TABLE for char(), varchar() fields. 1997-05-31 16:52:19 +00:00
Vadim B. Mikheev ad01dd270d If there is no table in RangeTable for colname then
elog (WARN, "attribute %s not found", colname);
1997-05-31 07:10:25 +00:00
Vadim B. Mikheev 139858e699 If we have to split leaf page in the chain of duplicates
then we try to look at our right sibling first, but not farther,
as it was in yesterday fix.
1997-05-31 06:35:56 +00:00
Vadim B. Mikheev 5cf55737a4 Added: new BTP_CHAIN flag (if hikey == firstkey then it's not
last page in chain of duplicates).
1997-05-30 18:40:02 +00:00
Vadim B. Mikheev 3f5834fb8c Fix duplicates handling. 1997-05-30 18:35:40 +00:00
Thomas G. Lockhart 43b6f1e678 Clean up support for USE_POSIX_TIME, ! HAVE_INT_TIMEZONE machines.
Remove references to modf() which is buggy on some platforms (Sparc/Linux).
1997-05-30 15:02:51 +00:00
Thomas G. Lockhart 07f0647808 Ensure double alignment for time and arrays of circles. 1997-05-26 16:55:23 +00:00
Marc G. Fournier cf88367751 From: David Friend <dfriend@atlsci.atlsci.com>
Subject: [PATCHES] pqcomprim.c patch

This is the patch by Robert Bruccoleri to fix the endian problem.
(Actually, it's the reverse of his patch.  He must have gotten the
order wrong.)
1997-05-26 00:26:56 +00:00
Marc G. Fournier ca746f512d -m <arg> -M weren't setup properly in getopts()...
These are undocumented in the man pages though...should they be removed?

Reported by: "A. Duursma" <it@portsite.nl>
1997-05-25 15:37:15 +00:00
Bruce Momjian 098dea8633 Fix core dump on \c. 1997-05-24 14:38:05 +00:00
Bruce Momjian 656d88c611 Fix \c option after breaking it. 1997-05-24 01:45:17 +00:00
Thomas G. Lockhart ac534bee01 Clean up redundant tests for valid pointers in geometric types.
Fix up decoder field masks for timespan and reltime.
1997-05-23 05:24:53 +00:00
Thomas G. Lockhart 0828204538 Enable new date and time definitions to allow Solaris and Irix -O2 compilation.
Move date and time field type labels to less than 32 to allow use as masks.
1997-05-23 05:10:03 +00:00
Vadim B. Mikheev d865228807 AllocateFile():
fdleft = pg_nofile() - allocatedFiles - nfile;
looks more realistic, but too noisy -
   fdleft = pg_nofile() - allocatedFiles;
restored.
1997-05-23 02:56:48 +00:00
Bruce Momjian 449e575595 Only free memory if environment value is replaced. 1997-05-23 01:53:42 +00:00
Bruce Momjian 658f229ac6 Comment on fix added. 1997-05-23 00:20:20 +00:00
Bruce Momjian 148f7203fa Preserve putenv() memory in psql \connect user fix. 1997-05-22 23:57:27 +00:00
Bruce Momjian 65ff0feacf Fix backslash commands broken when \connect user added. 1997-05-22 18:55:40 +00:00
Vadim B. Mikheev c9be1bccc1 RelationPurgeLocalRelation():
/*
             * RelationFlushRelation () below will flush relation information
             * from the cache. We must call smgrclose to flush relation
             * information from SMGR & FMGR, too. We assume that for temp
             * relations smgrunlink is already called by heap_destroyr
             * and we skip smgrclose for them.          - vadim 05/22/97
             */
            smgrclose(reln->rd_rel->relsmgr, reln);

 - it avoids memory leaks in SMGR & VFD.

RelationFlushRelation():
   there is no more call FileInvalidate(RelationGetSystemPort(relation));
   - invalid (FileInvalidate() expects File, not SMGR' fd)
   - unuseful anyway.
1997-05-22 17:24:20 +00:00
Vadim B. Mikheev 19269069dc 1. Fix md memory leak:
mdunlink() and mdclose() (too !!!) now free MdfdVec for relation
   and add it to free list, so it may be re-used for another relation
   later.
2. Fix VFD-manager memory leak (found by Massimo ... and me):
   mdunlink() has to call FileUnlink() to free allocation for fileName
   and add the Vfd slot to the free list.
1997-05-22 17:08:35 +00:00
Vadim B. Mikheev ff8ce5230d 1. Cleanup (no more FreeFd - unuseful; others).
2. FreeFile() has to do nothing with nfile (# of files opened
   by VFD manager).
1997-05-22 16:51:19 +00:00
Vadim B. Mikheev 12d9a12eda gist.h:
/*
** You can have as many strategies as you please in GiSTs, as
** long as your consistent method can handle them
*/
#define GISTNStrategies                 100
                                        ^^^
- too big number:

strat.h->StrategyEvaluationData->StrategyExpression  expression[12]
                                                                ^^
 - so 12 is real max # of strategies, or StrategyEvaluationIsValid
crashes backend (called if CASSER defined).
1997-05-22 16:09:57 +00:00
Vadim B. Mikheev 737ab85cc0 1. Pass GISTENTRYs to giststate->penaltyFn by pointers, not by vals.
2. Re-initialize keys in gistrescan (if gist used in inner scan).
1997-05-22 16:01:33 +00:00
Marc G. Fournier 4800abc7c1 From: Darren King <aixssd!darrenk@abs.net>
To: pgsql-patches@postgreSQL.org
Subject: [PATCHES] DROP AGGREGATE gram.y typo...


Somehow I dropped a comma in the gram.y part (line 129) of my
patch for drop aggregate.  Here's a correct patch for gram.y.

PS. I hope I got the right comma, manually applied :) (scrappy)
1997-05-22 00:24:07 +00:00
Marc G. Fournier 5e7c0a0b9a From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] DROP AGGREGATE patch/fix.


Here's a patch that fixes the DROP AGGREGATE command to delete
the desired aggregate for a specific type.
1997-05-22 00:17:24 +00:00
Marc G. Fournier 021ccf0b8c Oops, missed the commit on this one by Darren King also...new Makefile.aix 1997-05-22 00:12:03 +00:00
Marc G. Fournier 24ed6d604d From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] AIX make patch resubmitted.

Misc patches for AIX from Darren:

1)  New src/makefiles/Makefile.aix  This patch should only be
    applied if the following patch (4) is applied to backend/Makefile!
    Still looking into having configure determine the last line to do
    the shared link.  The 325 code will work for 41, so I put that in
    as the default.  Included a commented out 41 line for completeness.

*and*

4)  Patch the backend Makefile.  I've reviewed this patch with respect to the
    other ports that use MAKE_EXPORTS (svr4 and univel) as closely as I could
    and I don't see where it will break them.  If it does, please let me know
    and I'll rework it somehow.
1997-05-22 00:11:29 +00:00
Marc G. Fournier 3e871388b5 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] Re: [PORTS] AIX 6.1 fixes...

Here are the patches for the two things that wouldn't make it thru the AIX
compiler.  The geo_ops.c change is harmless I believe.  The nbtcompare.c patch
fixes me, but I don't know about any other ports.  Maybe wait on that one
until Vadim decides what to do about the unsigned vs signed chars varlena
issue.
1997-05-22 00:07:30 +00:00
Bruce Momjian fce2c41b6c Updated pg_dumpall and psql to preserve database owners. 1997-05-21 03:12:23 +00:00
Bruce Momjian cb8396d9fc Add SRCDIR to lextest 1997-05-21 00:45:24 +00:00
Bruce Momjian ca56c2a311 Fix for lextest return value. 1997-05-20 21:35:16 +00:00
Vadim B. Mikheev 92ab5dc2b5 Little memmory leak in RelationFlushRelation() in freeing
relation->rd_att (relation' TupleDesc).
1997-05-20 11:41:38 +00:00
Vadim B. Mikheev b0dfe8e38e Define FREE(x) as pfree. 1997-05-20 11:37:33 +00:00
Vadim B. Mikheev 5f893a1e32 Shouldn't we use palloc instead of malloc ?
Because of
 *      resetpsort  - resets (frees) malloc'd memory for an aborted Xaction
 *
 *      Not implemented yet.
1997-05-20 11:35:50 +00:00
Vadim B. Mikheev e7f7cf4a1c 1. LocalBufferSync(): set nextFreeLocalBuf to 0 - we're freeing
all local buffers @ xact commit, so accordingly nextFreeLocalBuf
   is first local buffer now.
   It helps to avoid unnecessary local buffer allocations in LocalBufferAlloc()
   latter ("memmory leaks" in 'order by').
2. ResetLocalBufferPool() lost allocated local buffers:

   memset(LocalBufferDescriptors, 0, sizeof(BufferDesc) * NLocBuffer);

   (local buffers leak @ xact aborts).
1997-05-20 11:30:32 +00:00
Vadim B. Mikheev 4a8c3dddc3 Consider right-sided plans if _use_right_sided_plans_ is true. 1997-05-20 10:37:26 +00:00
Vadim B. Mikheev c4ab256383 New VAR r_plans added to enable turn ON/OFF
using right-sided plans.
1997-05-20 10:31:42 +00:00
Vadim B. Mikheev 0f67fb46f6 Initialize internal keys if rtree used in inner scan. 1997-05-20 10:29:30 +00:00
Bruce Momjian a1157deb57 Added fcvt() prot for bsdi.
Made PQsetdb() and PQfnumber() case-insensitive.
Removed attempt to set table ownership via pg_dumpall.
1997-05-20 03:39:02 +00:00
Marc G. Fournier 9860926148 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] AIX 6.2 make patch.

New template files to replace the old AIX template
1997-05-20 03:00:17 +00:00
Bruce Momjian 8073af5267 Remove create_database interactive prohibition from manual. 1997-05-19 14:23:08 +00:00
Bruce Momjian b1ae7aac93 Add Makefile.global to lextest makefile. 1997-05-19 14:19:13 +00:00
Marc G. Fournier 6ea80b470b From: Olaf Mittelstaedt <MSTAEDT@va-sigi.va.fh-ulm.de>
Minor patches to geo_ops.c to clean up compile under AIX 4.1.3
1997-05-19 03:49:39 +00:00
Marc G. Fournier 500b17eadf These two files got reversed somehow... -K PIC is a cc'ism and -fPIC is a
gcc'ism
1997-05-19 03:21:55 +00:00
Edmund Mergl 33a629cfef added const declaration in form() E.Mergl 1997-05-17 16:25:57 +00:00
Edmund Mergl 0c67d28a08 added const declaration E.Mergl 1997-05-17 16:23:06 +00:00
Thomas G. Lockhart 5bc1024225 Remove troublesome type coersions from the char8 return statements.
Noted in trying to port to AIX.
1997-05-17 06:20:34 +00:00
Thomas G. Lockhart 99643abec7 Spiff up description of the regression tests and outcomes. 1997-05-17 06:17:45 +00:00
Thomas G. Lockhart 02233addcc Include information for reset, set, and show commands. 1997-05-17 06:16:34 +00:00
Marc G. Fournier e454d8a116 From: David Friend <dfriend@atlsci.atlsci.com>
Add an entry for the Sparc/Linux port in .similar
1997-05-17 03:02:04 +00:00
Thomas G. Lockhart 51e0fe5c88 Improve informational messages for "show" command responses. 1997-05-16 07:24:13 +00:00
Thomas G. Lockhart f8d4b3cf40 Fix expected output for datetime and abstime to/from date conversions.
This results from improvements in datetime.c which ensures that the
 conversions are done in local time rather than GMT.
1997-05-16 07:22:28 +00:00
Thomas G. Lockhart e35b759fed Fix datetime and abstime conversions to and from date.
Bring optional new-storage date and time up to date and test.
This new storage format should fix the "Sparc gcc -O2 bug".
(Enable new code with USE_NEW_DATE and USE_NEW_TIME in dt.h)
1997-05-16 07:19:50 +00:00
Thomas G. Lockhart 07f01fc274 Add documentation for reset, set, and show, and cross-reference in built-in. 1997-05-16 07:13:54 +00:00
Marc G. Fournier d7a85cb2c9 Modify lextest and GNUmakefile so that if the test does fail, the
make doesn't proceed
1997-05-16 02:00:03 +00:00
Marc G. Fournier 718adf8bf7 Have Make process exit if lextest fails 1997-05-16 01:09:39 +00:00
Marc G. Fournier cc349d2c87 From: Robert E. Bruccoleri <bruc@bms.com>
Fixes:

	Shared objects are not linked correctly
1997-05-15 22:55:35 +00:00
Bruce Momjian 2fc04874a6 Allow pg_dumpall to preserve database ownership. 1997-05-14 19:49:34 +00:00
Bruce Momjian 029873a109 Remove README.flex and make lextest point to INSTALL. 1997-05-14 17:12:30 +00:00
Bruce Momjian bb50eeb740 lextest Makefile cleanup 1997-05-14 04:46:47 +00:00
Thomas G. Lockhart 9fd868d16a Rename new float and int conversion routines to avoid conflicts with
system calls on AIX (and probably other machines too).
1997-05-14 04:35:10 +00:00
Bruce Momjian d906936e0e Add test for flex bug as part of make, and point them to README.flex. 1997-05-14 03:32:40 +00:00
Vadim B. Mikheev 073adc5a25 Added:
Note: currently, only btree access method supports  multi-
       attribute indices.  Up to 7 keys may be specified.
1997-05-14 01:38:34 +00:00
Marc G. Fournier 45165538c5 From: "Brian E. Gallew" <geek+@cmu.edu>
Subject: [PORTS] minor fix for DGUX port

src/include/port/dgux.h needs the following three lines appended:

#ifndef         BYTE_ORDER
#define         BYTE_ORDER      BIG_ENDIAN
#endif


I believe this to be correct for DG/UX on M88k processors.  I don't have one of
the new Intel-based boxes to check on.
1997-05-13 22:13:33 +00:00
Bruce Momjian f22f57ca35 Update manual pages for vacuum and create index for Vadim. 1997-05-13 04:41:54 +00:00
Thomas G. Lockhart 1e790e207f Fix return value for tm2datetime to properly indicate failure. 1997-05-13 04:26:07 +00:00
Bruce Momjian b6b41172f6 fix for sizeof pointed out by Ed Buddington 1997-05-13 01:46:00 +00:00
Vadim B. Mikheev 3e248edf43 Added _readAggreg() to work with T_Aggreg type. 1997-05-12 07:17:23 +00:00
Thomas G. Lockhart 8ce8d6550f Update to current information for upcoming v6.1 production release. 1997-05-11 15:46:19 +00:00
Thomas G. Lockhart cc25efef92 More tables are listed in the user-defined relations from other regression
tests, including new tests.
1997-05-11 15:45:10 +00:00
Thomas G. Lockhart 83b8cf5b6b Add inter-type regression tests for geometry, date/time, and numbers.
Add regression tests for circles, line segments, and paths.
Modify regression tests to allow GEQ optimizer (order results).
1997-05-11 15:42:09 +00:00
Thomas G. Lockhart 57f55032ff Add type conversion functions between floats and integers.
Include some additional path functions which were coded but omitted here.
Add translation and rotation/scaling operators for some geometric types.
Fix bugs in some geometry comparison operator declarations.
1997-05-11 15:19:33 +00:00
Thomas G. Lockhart 407cd4ee24 Add a few type conversion functions.
Pass an additional argument for date/time formatting to better handle timezones.
1997-05-11 15:13:49 +00:00
Thomas G. Lockhart 64d9b50893 Fix timezone manipulation code to avoid crashes on some machines.
Add type conversion functions for floating point numbers.
Check for zero in unary minus floating point code (IEEE allows an
 explicit negative zero which looks ugly in a query result!).
Ensure circle type has non-negative radius.
1997-05-11 15:11:47 +00:00
Marc G. Fournier 498d2d1edc From: Edmund Mergl <E.Mergl@bawue.de>
Subject: [PATCHES] libpq patch

Hi,

here is a small patch which fixes two problems:

1. libpq/libpq-fe.h:

somehow disappeared the line

#define DefaultOption ""

now compilation stops with an error complainig an
unknown DefaultOption (970508).


2. Same patch as I sent already twice, but it never made it
  into the source tree:  there is no default value for
  AuthType and Password. This way any libpq-application
  (i.e. perl-scripts) which use the function PQconnectdb
  will break with PostgreSQL-6.1. The patch simply uses
  an empty string as default value.
1997-05-09 03:28:54 +00:00
Marc G. Fournier 6ef382c621 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: [PATCHES] Patches for boolean, timespan and reltime regression tests.

Hi All,

Here are a couple of patches to the regression tests to introduce
some specific ordering to the results.

I've only made changes to the queries that were exhibiting differences
on my regression runs.

This will also have the side effect of testing the ordering code for
the boolean and some of the time types.
1997-05-09 03:26:56 +00:00
Bruce Momjian 91f4df2f2c Fix typechecking problem pointed out by Thomas. 1997-05-08 02:45:53 +00:00
Bruce Momjian ffb38bd3ae Update for bsdi 1997-05-08 02:30:23 +00:00
Marc G. Fournier 8217202134 From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [PATCHES] libpq SET var TO patch

  One last, I hope. This one corrects a bogus format string, and
actually sends the contents of PG_DATESTYLE to the backend. That
means, you can do a setenv PG_DATESTYLE 'iso', and your libpq
will pick that up and tell the backend.
1997-05-07 03:13:50 +00:00
Marc G. Fournier 9f2d714620 From: "Paul M. Aoki" <aoki@CS.Berkeley.EDU>
Subject: [PATCHES] port patch: ultrix4

ultrix4 doesn't compile without this.  this also fixes a problem
with dynamic loading (ultrix relocatable objects must be loaded
with -G 0).
1997-05-07 03:12:46 +00:00
Marc G. Fournier a5d7eb90a8 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: [PATCHES] Three small patches.

Hi,

Here are 3 small patches to the postgreSQL source sup'd on
the 6th May 1997.

The 1st 2 fix the shell backslash "c" handling used to suppress
the newline on some unix shells. (The \c needs to be inside quote.)

The 3rd may or may not be the correct way to fix the missing
define of INDEX_MAX_KEYS in pg_dump.h
1997-05-07 02:59:59 +00:00
Marc G. Fournier 505a4709e2 From: Erich Stamberger <eberger@gewi.kfunigraz.ac.at>
Subject: [PATCHES] oracle_compat functions core dumping on NULL-fields
1997-05-07 02:46:45 +00:00
Thomas G. Lockhart d464e31593 Remove valid pointer checks for returns from palloc() since palloc() will not
return if storage is not allocated. Ref: Vadim 97/05/01
1997-05-06 07:27:51 +00:00
Thomas G. Lockhart 36d18351aa Change dummy array dimensions from [0] to [1] to keep non-gcc compilers happy.
No real change in the support code is required since the actual size
 of the structures is calculated using offsetof() rather than sizeof().
1997-05-06 07:24:42 +00:00
Thomas G. Lockhart 6e27af13eb Rename LOread() and LOwrite() to loread() and lowrite() to allow use by
case-insensitive SQL parser.
1997-05-06 07:20:53 +00:00
Thomas G. Lockhart ef2821d0d6 Change LOread() and LOwrite() to loread() and lowrite() to allow use
with case-insensitive SQL parser.
1997-05-06 07:19:04 +00:00
Thomas G. Lockhart fad56c5211 Change LOread() and LOwrite() to loread() and lowrite() to allow use
by case-insensitive SQL parser.
1997-05-06 07:16:21 +00:00
Thomas G. Lockhart 94123219bf Rename LOread() and LOwrite() to be lower case to allow use
in case-insensitive SQL. Define LOread() and LOwrite() as macros
 to avoid having to update calls everywhere.
1997-05-06 07:14:34 +00:00
Vadim B. Mikheev a65dd5290e 1. Multi-column indices support.
2. Fix for function indices with more than 1 attrs.
1997-05-06 05:20:21 +00:00
Vadim B. Mikheev 13f41aa90b mdcreate():
fd = FileNameOpenFile(path, O_RDWR|O_CREAT|O_EXCL, 0600);

    /*
     *  If the file already exists and is empty, we pretend that the
     *  create succeeded.  During bootstrap processing, we skip that check,
     *  because pg_time, pg_variable, and pg_log get created before their
     *  .bki file entries are processed.
     *
>    *  As the result of this pretence it was possible to have in
>    *  pg_class > 1 records with the same relname. Actually, it
>    *  should be fixed in upper levels, too, but... -  vadim 05/06/97
>    */
1997-05-06 02:03:20 +00:00
Vadim B. Mikheev b45128f1c3 Kill re-incarnated bug arround
Assert ( --Vnpages > 0 );
	and
Assert ( --Fnpages > 0 );
1997-05-05 10:01:02 +00:00
Vadim B. Mikheev 3e1933bc05 There is no more _CWD_ tag in sources... 1997-05-05 06:53:36 +00:00
Vadim B. Mikheev 7cbfb19c46 WARN:parser: parser error ...
changed to
WARN:parser: syntax error ...
1997-05-05 06:50:28 +00:00
Vadim B. Mikheev 62d1d23b6b If SELECT uses index (btree) then ordered results are returned. 1997-05-05 06:47:47 +00:00
Vadim B. Mikheev fb100e6bf2 There is no partial index onek2_u1_prtl in tests... 1997-05-05 06:43:59 +00:00
Vadim B. Mikheev c3b51e0d67 Bug: backend crashes in btbeginscan()->btrescan()->_bt_orderkeys()
when btree used in innerscan with run-time key which value
passed by pointer.

Fix: keys ordering stuff moved to _bt_first().

Pointed by Thomas Lockhart.
1997-05-05 03:41:19 +00:00
Thomas G. Lockhart 917abdd140 Add substitution from output/.. to input/.. to match templates from inputs. 1997-05-02 13:43:14 +00:00
Thomas G. Lockhart 50f058e26f Update to work with new regression tests and directory structure. 1997-05-02 13:13:44 +00:00
Thomas G. Lockhart f550efa237 New test data for aggregate functions. 1997-05-02 13:08:11 +00:00
Vadim B. Mikheev fe91ceb62b Fix old bug in _hash_first() for scan without keys:
if 1st bucket chain is empty then need to continue scan in the rest buckets.
1997-04-30 06:31:16 +00:00
Vadim B. Mikheev 3055eeff93 More informative NOTICEs in tuple checks. 1997-04-30 03:05:43 +00:00
Edmund Mergl 0aba92a2c5 creation for postgresql-6.1 1997-04-29 19:37:10 +00:00
Thomas G. Lockhart a2fd844c3b Reorder tests and move aggregate table data to data/. 1997-04-29 14:29:16 +00:00
Thomas G. Lockhart 1594bf2a93 Added initial set of expected outputs for new regression testing.
Modified a few tests to match results on RedHat Linux/gcc for v6.1beta.
1997-04-29 14:23:51 +00:00
Vadim B. Mikheev de97e7fae8 SET geqo TO ON|OFF 1997-04-29 04:38:58 +00:00
Vadim B. Mikheev a4792bd3d6 #ifdef GEQO
bool _use_geqo_ = true;
#else
bool _use_geqo_ = false;
#endif

_use_geqo_ is settable via SET var TO ...
1997-04-29 04:37:22 +00:00
Vadim B. Mikheev a1fbd470a9 Fix GroupBy: enable functions over aggregates and GroupBy-ed fields
in target list.
1997-04-29 04:32:50 +00:00
Marc G. Fournier f4279c46e7 Fix configure so that installbsd gets -c also
From: Lee Roth <roth@tpusa.com>
1997-04-28 22:40:35 +00:00
Marc G. Fournier 81acad4932 Add a netbsd template file and update linux-elf and .similar 1997-04-28 16:19:50 +00:00
Marc G. Fournier d938b755dc From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] Inputting money

I notice that I have to put single quotes around money amounts if there
is a decimal point in the value.  I appears to be happening because there
is something changing things like "123.45" to "123.450000" and the code
has a problem with that.  There may be a better way to fix this but here
is a simple change to cash.c that lets it accept trailing zeroes.
1997-04-28 16:15:13 +00:00
Thomas G. Lockhart 36712e8808 Provide template for the misc tests which contain path names. 1997-04-27 19:28:23 +00:00
Thomas G. Lockhart 9cdc80899a Fix path name templates. 1997-04-27 19:27:34 +00:00
Thomas G. Lockhart ff5edbd9e6 Update SQL query results for lists of operators and functions.
Add a little info on count().
1997-04-27 19:26:24 +00:00
Thomas G. Lockhart 0a95a17da2 Change mixed-case routines to lower-case for case-insensitive SQL.
Add mixed-case #define synonyms to avoid changing more source code.
Add comparison operators for boolean.
Add aggregate min() and max() for datetime and timespan.
1997-04-27 19:24:16 +00:00
Thomas G. Lockhart 1d1c9ff211 Change mixed-case routines to lower-case in pg_proc.h
Add comparison operators for boolean.
Add aggregate min() and max() for datetime and timespan.
Fix duplicate OID in pg_proc.h
1997-04-27 19:22:45 +00:00
Thomas G. Lockhart d831e9ce19 Change mixed-case routines to lower-case if referenced in pg_proc.h 1997-04-27 19:21:06 +00:00
Thomas G. Lockhart 812d5c9b68 Change mixed-case routines to lower-case if referenced in pg_proc.h
Add comparison operators to boolean and smaller/larger operators to datetime
and timespan. Fix int4 overflow math problem in timespan comparison operators.
1997-04-27 19:20:16 +00:00
Thomas G. Lockhart ee2f8e0472 Modify references to function manager to use lower-case calls. 1997-04-27 19:16:44 +00:00
Marc G. Fournier 65973e3f35 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: [PATCHES] to make regress.sh shell friendly to echo.

Hi,

I needed to make the following change to regress.sh to make it more
shell friendly.

The Solaris /bin/sh, and others, use \c to supress the newline.
1997-04-27 18:55:37 +00:00
Marc G. Fournier a426ff583d There, I'll leave this alone until Thomas catchs up *grin* 1997-04-27 18:13:54 +00:00
Marc G. Fournier 832c0a4ff1 split out a bunch more tests from misc.source so that the tester knows
what's being tested :)
1997-04-27 17:40:13 +00:00
Marc G. Fournier 557e0ed206 Alot of regression test fixes, mainly to compensate for moving
the DROP TABLE calls from the destroy.sql file to the 'types' .sql files,
so that they are self-contained

btree_index, hash_index and misc all fail as there seems to be missing
a 'misc.out' expected file...have asked Thomas for one...
1997-04-27 07:45:49 +00:00
Marc G. Fournier a475d4d89c Get first four tests to pass:
=============== destroying old regression database... =================
=============== creating new regression database...   =================
=============== running regression queries...         =================
create_function_1 .. ok
create_type .. ok
create_table .. ok
create_function_2 .. ok
1997-04-27 04:50:06 +00:00
Marc G. Fournier 3451abf632 Make these self-contained tests...they are testing types, so the tables
that are created should only exist as long as the test requires them...

things are just toooooo spread around
1997-04-27 04:36:10 +00:00
Marc G. Fournier b29c2da7dd Trying to continue breaking down the large files into smaller tests so that
debugging is a little (well, alot!) easier
1997-04-27 04:04:31 +00:00
Marc G. Fournier f9526f886a clean up misc.source and create *individual test* files ... trying to move
away from one big massive confusing file
1997-04-27 04:03:50 +00:00
Marc G. Fournier b63e57bea8 *shrug* I don't know anymore... 1997-04-27 03:57:34 +00:00
Marc G. Fournier 78454c2744 *shrug* 1997-04-27 03:56:23 +00:00
Marc G. Fournier df77071773 Massive regression test patches from Thomas *woo hoo!* 1997-04-27 02:58:38 +00:00
Marc G. Fournier a902829a66 A few changes to reflect things properly suggested by David 1997-04-26 18:43:40 +00:00
Marc G. Fournier f522a32ceb Reverse check for TR so that trbsd gets checked for first
Pointed out by: adrian@waltham.harvard.net
1997-04-26 13:36:38 +00:00
Marc G. Fournier afb539c25a Add a results directory and a Makefile so that 'make clean' cleans it out 1997-04-26 06:31:55 +00:00
Marc G. Fournier e52b943fdb Missed an -I directive 1997-04-26 06:13:31 +00:00
Marc G. Fournier b2f2e0316e More misc patches from Thomas for regression tests and linux templates 1997-04-26 05:50:25 +00:00
Marc G. Fournier ba1a58919c Clean out/up some files that are causing me great headaches since I didn't
do this completely last time and Thomas is creating patches on files that
aren't supposed to exist :(
1997-04-26 05:45:48 +00:00
Marc G. Fournier c2ae467300 clean up the bin/*/Makefiles...up version.h to v6.1 instead of v6.0
Remove bin/Makefile.global since it wasn't actually *doing* anything
that Makefile.global hadn't already done
1997-04-26 05:07:12 +00:00
Marc G. Fournier bcd0fae871 Fix for bootstrap.c problem (F_* values missing from fmgr.h) 1997-04-26 04:40:00 +00:00
Marc G. Fournier 094ec2d3f3 More timezone patches by Thomas:
Here are patches which should help fix timezone problems in the
datetime and abstime code. Also, I repatched varlena.c to add in
some comments and a little error checking on top of Vadim's earlier
repairs. There are slight mods to the circle data type to have the
distance operator between circles measure the distance between
closest points rather than between centers.
1997-04-25 18:40:50 +00:00
Marc G. Fournier b8e376ceb9 From: "Pedro J. Lobo" <pjlobo@euitt.upm.es>
Subject: [PATCHES] Patches for compiling 6.1 on Digital Unix 3.2c

Attached to this message are the patches I needed to compile 6.1 cleanly
under Digital Unix 3.2c with DEC cc.

I hope these are the last ones. At least, the number of files needing a
patch has decreased noticeably since I sent my previous patches. Nice work
:-)

One of the patches is a bug fix, but I'm including it here anyway.

With these patches applied, the beast seems to work properly. However,
I've done only some preliminary tests. More on this later (but hopefully
before the April 30 deadline... :-)
1997-04-24 20:30:41 +00:00
Marc G. Fournier 79ee06c186 Fixes:
postgres backend processes end up as so called zombies. It seems that
only Linux a.out (libc.4.6.27) systems are affected.


By:

Wolfgang Roth <roth@statistik.uni-mannheim.de>
1997-04-24 20:27:46 +00:00
Marc G. Fournier 87fffc4342 Various bug fixes based on a bug report submitted by
Doug Neuhauser <doug@seismo.berkeley.edu> on April 15th
1997-04-24 20:02:02 +00:00
Vadim B. Mikheev 2bbc2e2c0d Added comments about FASTBUILD.
Added #define BTREE_VERSION_1.
1997-04-24 16:21:46 +00:00
Vadim B. Mikheev 67712200f1 * Hack for non-functional btree npages estimation:
* npages = index_pages * selectivity_of_1st_attr_clause(s)
1997-04-24 16:07:14 +00:00
Vadim B. Mikheev 72d271177c Have to copyObject((void*)clauseinfo) for a relation'
joininfo (in add_join_clause_info_to_rels()) : clause may be
commutted later.
1997-04-24 16:04:23 +00:00
Vadim B. Mikheev e349eb6e2c Bug (yet unfixed but not fatal) found: Re-moving index clauses from the
nestloop's join clauses doesn't work in some cases:
         *    1. fix_indxqual_references may change varattno-s in
         *       inner_indxqual;
         *    2. clauses may be commuted
1997-04-24 15:59:58 +00:00
Vadim B. Mikheev a1ac1989cf Save Var' order in index_outerjoin_references(). 1997-04-24 15:54:52 +00:00
Vadim B. Mikheev 4ec8a148ed Add innercost to result in cost_hashjoin. 1997-04-24 15:49:30 +00:00
Vadim B. Mikheev 72b523d055 _bt_endpoint fixed: set currentItemData to Invalid if no result. 1997-04-24 15:46:44 +00:00
Vadim B. Mikheev cd7206b2ab Enable to set _cpu_page_wight_ & _cpu_index_page_wight_ via
SET cost_heap(cost_index) TO ...
1997-04-24 15:41:37 +00:00
Vadim B. Mikheev 0a08f2b22d #define _CPU_PAGE_WEIGHT_: 0.065 --> 0.033
#define _CPU_INDEX_PAGE_WEIGHT_: 0.033 --> 0.017
1997-04-24 15:38:34 +00:00
Marc G. Fournier 66d8e423b9 Set SRCDIR=.. 1997-04-24 14:30:09 +00:00
Marc G. Fournier 29a31fb7bc -Wno-error should only be enabled for gcc compilers, it seems 1997-04-24 13:25:07 +00:00
Marc G. Fournier e9f37a7410 Somewhat backwards #ifdef's for HAVE_GETRUSAGE 1997-04-24 03:39:09 +00:00
Marc G. Fournier 08a5901ba1 Various patches not commited, plus a linux/sparc patch from
Satoshi Ishikawa <power@sekine.densi.gifu-u.ac.jp>
1997-04-24 02:35:39 +00:00
Marc G. Fournier 7a7a9b1a04 Change HAVE_RUSAGE to HAVE_GETRUSAGE, which is the more appropriate 1997-04-23 18:02:43 +00:00
Vadim B. Mikheev 7a2b417d15 Vacuum help changed (ANALYZE). 1997-04-23 06:41:56 +00:00
Vadim B. Mikheev 3c461c8397 Analyze data only if specified and specified attrs only. 1997-04-23 06:28:48 +00:00
Vadim B. Mikheev 2fac94ec1a 1. SHOW/RESET var fixed.
2. vacuum() call changed (ANALYZE).
1997-04-23 06:09:36 +00:00
Vadim B. Mikheev 24d48db32d 1. SHOW/RESET var fixed.
2. New VACUUM syntax (ANALYZE ...).
1997-04-23 06:04:46 +00:00
Vadim B. Mikheev bc67a4617d 1. VariableShowStmt and VariableResetStmt added.
2. VacuumStmt changed (for VACUUM ANALYZE...).
1997-04-23 05:58:06 +00:00
Vadim B. Mikheev 72fcb4ee91 There were too many comments. 1997-04-23 05:52:32 +00:00
Marc G. Fournier 4b5319129c To: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [PATCHES] SET DateStyle patches

On Tue, 22 Apr 1997, Thomas Lockhart wrote:

> Some more patches! These (try to) finish implementing SET variable TO value
> for "DateStyle" (changed the name from simply "date" to be more descriptive).
> This is based on code from Martin and Bruce (?), which was easy to modify.
> The syntax is
>
> SET DateStyle TO 'iso'
> SET DateStyle TO 'postgres'
> SET DateStyle TO 'sql'
> SET DateStyle TO 'european'
> SET DateStyle TO 'noneuropean'
> SET DateStyle TO 'us'         (same as "noneuropean")
> SET DateStyle TO 'default'    (current same as "postgres,us")
>
> ("european" is just compared for the first 4 characters, and "noneuropean"
> is compared for the first 7 to allow less typing).
>
> Multiple arguments are allowed, so SET datestyle TO 'sql,euro' is valid.
>
> My mods also try to implement "SHOW variable" and "RESET variable", but
> that part just core dumps at the moment. I would guess that my errors
> are obvious to someone who knows what they are doing with the parser stuff,
> so if someone (Bruce and/or Martin??) could have it do the right thing
> we will have a more complete set of what we need.
>
> Also, I would like to have a floating point precision global variable to
> implement "SET precision TO 10" and perhaps "SET precision TO 10,2" for
> float8 and float4, but I don't know how to do that for integer types rather
> than strings. If someone is fixing the SHOW and RESET code, perhaps they can
> add some hooks for me to do the floats while they are at it.
>
> I've left some remnants of variable structures in the source code which
> I did not use in the interests of getting something working for v6.1.
> We'll have time to clean things up for the next release...
1997-04-23 03:18:27 +00:00
Marc G. Fournier cf398593fd From: System Administrator <igor@sba.miami.edu>
Subject: [PORTS] Configure for DEC-Alpha

Configure script properly detects alpha-dec-osf4.0 machine, but
sets a default GENERIC template for it. I modified tempplate/.similar to
add alpha-dec-osf4.0=alpha. Then configure properly set the template to
alpha.
1997-04-22 17:55:20 +00:00
Marc G. Fournier 5514c1fa23 Add fcvt() as a check to configure so that we can get rid of the BSD44_derived
type check in numutils.c:ftoa()

Pointed out by: "Martin J. Laubach" <mjl@emsi.priv.at>
1997-04-22 17:47:42 +00:00
Marc G. Fournier 2de10b0b01 From: adrian@waltham.harvard.net
Subject: [PATCHES] Patch for configure.in to not ask for CASSERT

The following patch defaults to CASSERT, so it doesn't ask you.  You can
still use --enable-cassert and --disable-cassert to do it explicitly.

Default: disabled
1997-04-22 17:41:15 +00:00
Marc G. Fournier 7c82b2e9c3 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [PATCHES] date/time timezone patches (mail bounced?)

Here are some hacks to get timezone behavior for the various time
data types to be compatible with v6.0. Although we have some hooks
already installed to get timezone info from the client to the
server, it still isn't clear if that can correctly transfer enough
timezone info to make the behavior the same as if timezone info
were derived from the server as is now the case. We certainly
won't resolve it in a day, so I think we are stuck with server-only
timezones for v6.1.
1997-04-22 17:36:57 +00:00
Marc G. Fournier 9e2a87b62d Major patch from Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
OK, here are a passel of patches for the geometric data types.
These add a "circle" data type, new operators and functions
for the existing data types, and change the default formats
for some of the existing types to make them consistant with
each other. Current formatting conventions (e.g. compatible
with v6.0 to allow dump/reload) are supported, but the new
conventions should be an improvement and we can eventually
drop the old conventions entirely.

For example, there are two kinds of paths (connected line segments),
open and closed, and the old format was

'(1,2,1,2,3,4)' for a closed path with two points (1,2) and (3,4)
'(0,2,1,2,3,4)' for an open path with two points (1,2) and (3,4)

Pretty arcane, huh? The new format for paths is

'((1,2),(3,4))' for a closed path with two points (1,2) and (3,4)
'[(1,2),(3,4)]' for an open path with two points (1,2) and (3,4)

For polygons, the old convention is

'(0,4,2,0,4,3)' for a triangle with points at (0,0),(4,4), and (2,3)

and the new convention is

'((0,0),(4,4),(2,3))' for a triangle with points at (0,0),(4,4), and (2,3)

Other data types which are also represented as lists of points
(e.g. boxes, line segments, and polygons) have similar representations
(they surround each point with parens).

For v6.1, any format which can be interpreted as the old style format
is decoded as such; we can remove that backwards compatibility but ugly
convention for v7.0. This will allow dump/reloads from v6.0.

These include some updates to the regression test files to change the test
for creating a data type from "circle" to "widget" to keep the test from
trashing the new builtin circle type.
1997-04-22 17:35:09 +00:00
Vadim B. Mikheev 051b4210e3 Fix for Hash and arrays 1997-04-22 03:32:38 +00:00
Vadim B. Mikheev 9f42a56a02 Fix for text_lt/text_le to avoid warnings if not def USE_LOCALE. 1997-04-21 04:31:53 +00:00
Vadim B. Mikheev 42e72503a1 #include <string.h> 1997-04-21 04:28:59 +00:00
Vadim B. Mikheev f3054b24c2 Fix for -Wno-error 1997-04-21 04:26:47 +00:00
Marc G. Fournier 85a95b9b0d Here is the Mismatched input/output patch for tintervals as reported over
the last week on Hackers...(A coulpe of clippings of the final
verdict are included below + the diff).

From: Wayde Nie <niew@phoenix.cis.mcmaster.ca>
1997-04-20 21:49:17 +00:00
Marc G. Fournier fd8e90a848 Add a --with-compiler switch that allows someone to specify:
--with-compiler=xlc

Requested by: Darren King <aixssd!darrenk@abs.net>
1997-04-18 18:43:28 +00:00
Marc G. Fournier 49153540da From: adrian@waltham.harvard.net
Subject: [HACKERS] Another patch to configure.in

I heard very little in objections/approvals to defaulting some of the
parameters to configure.  Enclosed is a patch to configure.in which
removes the questions for

        PGPORT
        USE_LOCALE
        NOHBA

By default (i.e. assuming you don't put anything extra in the configure
command line), it assumes PGPORT=5432, USE_LOCAL=no and NOHBA=no (i.e.
HBA is turned on)

        --with-pgport=PGPORT_NO         Over-rides the PGPORT value
        --enable-locale                 enables USE_LOCALE
        --disable-hba                   disables HBA

Just for completeness:

        --prefix=BASEDIR                Defaults to /usr/local/pgsql
        --with-template=TEMPLATE        Defaults to asking you
1997-04-18 18:34:11 +00:00
Vadim B. Mikheev 8466811335 Fix for -Wno-error 1997-04-18 08:57:39 +00:00
Vadim B. Mikheev d6b8f637f9 CommitInfoNeedsSave[buffer - 1] = 0
added to WriteBuffer(), FlushBuffer(), WriteNoReleaseBuffer().
1997-04-18 08:30:08 +00:00
Vadim B. Mikheev 538f58c04c #ifdef BTREE_BUILD_STATS enables to get executor stats for btree
building.
1997-04-18 03:37:57 +00:00
Vadim B. Mikheev d94c7fc4c5 1. Declaration
static const char *num_word(Cash value);
moved to cash.c.
2. 'extern ' added to funcs prototypes.
1997-04-18 02:59:26 +00:00
Vadim B. Mikheev 949ab57c7a Declaration
static const char *num_word(Cash value);
moved here from cash.h
1997-04-18 02:55:54 +00:00
Vadim B. Mikheev d3dfc664d0 PrintBufferUsage() changed to report about shared, local and direct
blocks transfferes.
1997-04-18 02:53:37 +00:00
Vadim B. Mikheev 55f5354380 Fix bttextcmp() to use unsigned char*.
#ifdef USE_LOCALE added.
1997-04-18 02:48:05 +00:00
Marc G. Fournier cbaa98835c From: Raymond Toy <toy@rtp.ericsson.se>
Subject: [PATCHES] 970417:  some large object patches


Two patches here, made against 970417.  Both have to do with large
objects:

        1.  lobjfuncs was not initialized in PQconnectdb.  This causes
            failure later if large objects are used.  (Someone already
            caught this error in PQsetdb.)

        2.  Postgres functions lo_import and lo_export sometimes
            produce garbage for the file names because the filename
            strings aren't always terminated by \0.  (VARDATA isn't
            necessarily null terminated.)
1997-04-17 20:39:31 +00:00
Marc G. Fournier 8834795ebf From: Raymond Toy <toy@rtp.ericsson.se>
Subject: [PATCHES] 970417:  two more patches for large objects

Here are two more patches:

        1.  pg_getint doesn't properly set the status flag when
            calling pqGetShort or pqGetLong.  This is required when
            accessing large objects via libpq.  This, combined with
            problem 1 above causes postgres to crash when postgres
            tries to print out the message that the status was not
            good.

        2.  ExceptionalCondition crashes when called with detail =
            NULL.  This patch prevents dereferencing the NULL.
1997-04-17 20:38:26 +00:00
Marc G. Fournier a1f229b19e From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch: set date to euro/us postgres/iso/sql

  Here a patch that implements a SET date for use by the datetime
stuff. The syntax is

        SET date TO 'val[,val,...]'

  where val is us (us dates), euro (european dates), postgres,
iso or sql.

  Thomas is working on the integration in his datetime module.
I just needed to get the patch out before it went stale :)
1997-04-17 13:50:57 +00:00
Marc G. Fournier cfe0d67dc1 Some slight changes to the Wisconsin Benchmark tests since postgres requires
a -D<datadir> option
1997-04-17 13:48:52 +00:00
Vadim B. Mikheev a0d63ac98c The patch fixes a rare bug that may occur when one tries to vacuum a single
table. The table name is de-allocated by the CommitTransactionCommand()
in vc_init() before it is copied in VacRel.data and sometimes this causes
a SIGSEGV. My patch simply moves the strcpy before vc_init.

Submitted by Massimo Dal Zotto <dz@cs.unitn.it>.
1997-04-17 01:45:36 +00:00
Marc G. Fournier ba697c8c0b Fix a problem with Linux where yacc is *really* bison -y 1997-04-16 14:13:51 +00:00
Vadim B. Mikheev be0e8f7fb0 connectDB(): setsockopt (..., TCP_NODELAY, ...) added. 1997-04-16 06:29:19 +00:00
Vadim B. Mikheev 4d985ea96b StreamConnection(): setsockopt (..., TCP_NODELAY, ...) added. 1997-04-16 06:25:13 +00:00
Vadim B. Mikheev 329fb11262 1. BTREE_VERSION_1: using bti_itup->t_tid as unique identifier for a given
index tuple (logical position within A LEVEL). bti_oid & bti_dummy
taken off from BTItemData.
2. Fix for multi-column indices (nbtsearch.c):
   _bt_binsrch() - for searches on internal pages having keysize <
	number of attrs we point at the last item < the scankey, not at the
	first item = the scankey;
   _bt_moveright() - if keysize < number of attrs we compare scankey with
	_last_ item on current page to decide should we move right or
	not.
1997-04-16 01:48:29 +00:00
Vadim B. Mikheev afd9295786 BTREE_VERSION_1: using bti_itup->t_tid as unique identifier for a given
index tuple (logical position within A LEVEL). bti_oid & bti_dummy
taken off from BTItemData.
1997-04-16 01:21:59 +00:00
Marc G. Fournier cacaaed62b A couple of cleanups from Scott Harrison <Scott_Harrison@next.com> 1997-04-15 19:08:13 +00:00
Marc G. Fournier 94893bb962 Oops, don't forget to remove the CASSERT=true line 1997-04-15 18:36:45 +00:00
Marc G. Fournier f9d2ec0eba Have CASSERT enabled/disabled via configure, and passed through config.h
instead of as a -D
1997-04-15 18:35:50 +00:00
Marc G. Fournier 5dcc9bef6e Patch for Solaris 2.5 from: adrian@waltham.harvard.net 1997-04-15 18:18:45 +00:00
Marc G. Fournier 6fd4e2b414 Various minor HP related patches from:
Morten Kjeldgaard <mok@monster.kemi.aau.dk>
1997-04-15 17:55:37 +00:00
Marc G. Fournier 9778b946e5 A small fix, where default: condition in case had not 'break;'...not required,
but, IMHO, cleaner
1997-04-15 17:46:52 +00:00
Marc G. Fournier 88d740462f From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Money integration patches

Here are patches to integrate the money data type. I have included
some math and aggregate functions and have made the locale support optional
by #ifdef USE_LOCALE bracketing of functions.

Modules affected are:
builtins.h.patch
cash.c.patch
cash.h.patch
main.c.patch
pg_aggregate.h.patch
pg_operator.h.patch
pg_proc.h.patch
pg_type.h.patch

I changed the data type to be pass-by-reference rather than by-value
to pave the way for a larger internal representation (64-bit ints?).
Also, I changed the tabbing of cash.c and cash.h to match most of
the other Postgres source code files (4 space indent, 8 spaces == 1 tab).

The locale stuff should be tested under another convention (Russian?)
but I don't know what the correct results should be so perhaps someone
else can give them a try. Will update docs and regression tests in
the next few days.
1997-04-15 17:41:44 +00:00
Marc G. Fournier d8a300d867 2. The file /usr/local/pgsql/src/backend/lipq/pgcomprim.c has two
invalid macro definitions, the compiler complains about:

"pqcomprim.c", line 48.9: 1506-275 (S) Unexpected text ';' ignored.
"pqcomprim.c", line 61.9: 1506-275 (S) Unexpected text ';' ignored.

The ';' terminating the macro definition ntoh_s(n) on line 27 and
ntoh_l(n) on line 28 should be removed.


Pointed out by: Olaf Mittelstaedt <MSTAEDT@va-sigi.va.fh-ulm.de>
1997-04-15 17:25:47 +00:00
Marc G. Fournier 953ac7b55a Fix up the -Wno-error problem for non-gcc compilers
Pointed out by many many ppl
1997-04-15 17:24:26 +00:00
Marc G. Fournier a69c5fc81a Add ccsym to tools to determine OS/compiler specific symbols
Change BSD44_derived to __FreeBSD__ in numutils.c (need to know what
NetBSD is referred to as...someone?)
1997-04-13 17:09:45 +00:00
Marc G. Fournier f2b98c4624 Fixes for [] escaping pointed out by Adrian 1997-04-12 13:56:44 +00:00
Marc G. Fournier 32523e4cb8 scripts required by configure to bypass its inabilty to use []'s inside of
configure ([] have special means to m4 *sigh*)
1997-04-12 13:22:04 +00:00
Marc G. Fournier cecfd642f5 Make sure that Makefile.${PORTNAME} is link'd and that teh port/*.h
file that has moved to include is also link'd properly
1997-04-12 10:35:49 +00:00
Marc G. Fournier 09a5dabc30 Remove port specific Makefile 'targets' (ie. shared libraries) from
Makefile.global and move them to seperate 'include' makefiles

Over time, should become even more port specific:

	ie. Makefile.BSD44_derived should be broken down into netbsd/freebsd
specific ports
1997-04-12 10:33:10 +00:00
Marc G. Fournier 7113e880b8 More more of the include files under the include directory 1997-04-12 10:21:55 +00:00
Marc G. Fournier 9956fa056a remove the port related .h files from the top level directory.
Moved to include/port
1997-04-12 10:20:20 +00:00
Marc G. Fournier 02fa41951b Fix detection of install vs installbsd
Submitted by: adrian@waltham.harvard.net
1997-04-12 09:39:56 +00:00
Marc G. Fournier df2374f024 Make sure postgres.h is included before we start checking #ifdef's for other
header files.

Pointed out by: Edmund Mergl <E.Mergl@bawue.de>
1997-04-12 09:37:31 +00:00
Marc G. Fournier fcf7d45b36 Get rid of the .sql files out of the Makefile
Pointed out by: afc@teri.superlink.net
1997-04-12 09:34:31 +00:00
Marc G. Fournier 1e9b80a2fd modifications to pg_dump towards supporting dumping of ACLs (doesn't work yet!)
modification to c.h so that bool isn't typedef'd under __cplusplus
1997-04-12 09:24:23 +00:00
Marc G. Fournier bb0a17412d Change BACKEND to CFLAGS 1997-04-11 18:55:10 +00:00
Marc G. Fournier bc97905a15 Finish removing the TEST_MAIN stuff, which was mean for standalone
testing
1997-04-10 20:51:13 +00:00
Marc G. Fournier fac81b448c Fix #include "cash.h" to be #include <utils/cash.h>
Remove the TEST_MAIN stuff at the top...
1997-04-10 20:42:35 +00:00
Marc G. Fournier 02d55fc6ca Update man page, listing new \z value 1997-04-10 11:58:59 +00:00
Marc G. Fournier f986173e35 Add a \z command to psql that lists off grant/revoke permissions
- if someone can pick a better \? for this, plesae let me know...all
	  the good ones seem taken :(
1997-04-10 11:54:29 +00:00
Vadim B. Mikheev 81489528d0 Copy indexkeys in _copyIndexPath. 1997-04-10 07:59:09 +00:00
Marc G. Fournier e6dfee305c Much improved configure that integrates the build script right into it
Submitted by: adrian@waltham.harvard.net
1997-04-09 08:55:32 +00:00
Marc G. Fournier b5183bf64b remove the old regression test files. have copies saved in my directory here,
but it gets rid of the temptation to modify the old source files :)
1997-04-09 08:48:14 +00:00
Marc G. Fournier 4999f002e6 Add in D'Arcy's cash code
pg_proc.h still needs modifying, but this gets it in there so that we can
get around any compiler bugs.  Will try and get the pg_proc.h entries done
up later tonight...
1997-04-09 08:36:21 +00:00
Marc G. Fournier 1c688d1bbe From: "Martin S. Utesch" <utesch@aut.tu-freiberg.de>
Subject: Re: [HACKERS] GEQO and views (rules)


Oke, this was caused by a classic bug :-/
I thougth, root->base_relation_list_ could be
represented as relid string 1-2-3-4- etc.

Instead, in case of views, the count of relids doesn't start with "1" but
maybe 4-5-6- etc . :-(

GEQO patch follows ... views are now all right.
1997-04-09 08:31:29 +00:00
Marc G. Fournier aaeef4dae8 GNUmakefile.in - remove backend/utils/Gen_fmgrtab.sh on distclean
varlena.c - part of Thomas' most recent patch
1997-04-09 08:29:35 +00:00
Vadim B. Mikheev 75e2370cc8 Now we have #define _CPU_INDEX_PAGE_WEIGHT_ 0.033 (/* CPU-index-to-page cost
weighting factor */) in addition to
#define _CPU_PAGE_WEIGHT_  0.065 (/* CPU-heap-to-page cost weighting factor
*/).
1997-04-09 02:24:19 +00:00
Vadim B. Mikheev 2fd9273d97 getattnvals(): if attnvals in pg_attribute is 0 then use
ATTNVALS_SCALE/reltuples (instead of reltuples).
1997-04-09 02:20:32 +00:00
Vadim B. Mikheev 610d0d00ed 1. Enable to have different _CPU_PAGE_WEIGHT_ for heap and index.
2. PageWeights are variables now.
3. Fixed using ceil((double)selec*indextuples) as estimation
for expected heap pages: ceil((double)selec*relpages) now.
1997-04-09 02:13:41 +00:00
Vadim B. Mikheev fa2629b7ea Fix (hack) IndexSelectivity():
use sum(npages)/((nkeys == 1) ? 1 : nkeys + 1) as expected index page
estimation for multi-key quals - instead of sum(npages).
In old code npages for x > 10 and x < 20 is twice as for x > 10 - cool ?
1997-04-09 01:52:04 +00:00
Marc G. Fournier b30aa6ecb8 Slight mods to explain (or try to) the new regression tests 1997-04-08 19:34:58 +00:00
Vadim B. Mikheev c56b20eee9 Fix btabstimecmp (). 1997-04-07 06:45:41 +00:00
Marc G. Fournier ee0a61ab62 Get rid of queries.source...its all in the sql directory.
regress.sh modified to get rid of queries.sql tests, as they are
performed vis sql/*.sql
1997-04-06 08:53:34 +00:00
Marc G. Fournier e31cb4be3a More splits and cleanups...
Its starting to actually take shape and look as expected...
1997-04-06 08:29:57 +00:00
Marc G. Fournier 588ae64c44 More splits and cleanups... 1997-04-06 06:07:13 +00:00
Marc G. Fournier 063190a5fa Add in support so that build will at least guess which template file
should be used :)
1997-04-06 04:43:28 +00:00
Marc G. Fournier 23733026ee remove create.{source,sql} as they are now down in the 'sql' directory
partially split
1997-04-05 21:33:26 +00:00
Marc G. Fournier 1452327c66 Change Postgres95 to PostgreSQL
The whole file needs updating, but will work on that after finishing
with the splits
1997-04-05 21:28:46 +00:00
Marc G. Fournier 9c9e2dd4b5 More splits of the regression tests in order to make them more
user-friendly (and more useful)
1997-04-05 21:26:00 +00:00
Marc G. Fournier aa51d0d185 Purge out tests/expected that are now in sql/expected subdirectories from
'master' file

Commit mods to regress.sh so that split out tests are run...look forward
to finding out how to do a proper redirect to continue visual cleanup :)
1997-04-05 11:58:40 +00:00
Marc G. Fournier 04688df668 Again, add more tests 1997-04-05 11:26:55 +00:00
Marc G. Fournier 7956e606d6 Add more expected.out results 1997-04-05 11:24:54 +00:00
Marc G. Fournier d108a31082 There are the broken out 'sql' queries from queries.source
tests allows us to have a 'for...done' loop inside of regress.sh for
both doing the tests, and determining fail/ok results
1997-04-05 11:08:30 +00:00
Marc G. Fournier 9607e69c24 These are the broken down 'expected.output' files created so far 1997-04-05 11:06:04 +00:00
Vadim B. Mikheev 0762deacec Print 'Group' as name of Group plan. 1997-04-05 06:42:32 +00:00
Vadim B. Mikheev d12e27a5f3 Changes for GROUP BY func_results:
AddGroupAttrToTlist() is not called from anywhere now.
1997-04-05 06:39:58 +00:00
Vadim B. Mikheev c50d8474d3 Changes for GROUP BY func_results. 1997-04-05 06:37:37 +00:00
Vadim B. Mikheev cc11cfdd46 Now we can GROUP BY func_results. 1997-04-05 06:29:03 +00:00
Vadim B. Mikheev 803a2b13f2 Fix for 'SET var_name TO var_value': var_name already defined. 1997-04-05 06:25:59 +00:00
Vadim B. Mikheev bd511f268a Put resdom into GroupClause (GROUP BY func_results) 1997-04-05 06:19:22 +00:00
Vadim B. Mikheev 50faf40903 Check for attributeList is NULL in ConstructTupleDescriptor ().
Submitted by Raymond Toy.
1997-04-05 03:36:21 +00:00
Marc G. Fournier 3ded1cc530 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Fix for European dates

This apparently fixes the European date reading problem reported
by several (European) bleeding edge adopters. I tried a few test
cases and it doesn't break the non-EuroDate cases in my test suite.
1997-04-05 02:51:41 +00:00
Marc G. Fournier eda9d69d6c Move YACC and YFLAGS into the template files
Clean up the .sample files...comment out all sample entries except for
the localhost one
1997-04-04 11:23:15 +00:00
Marc G. Fournier c7b40e6058 This commit represents a clean compile with the new templates under
FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
1997-04-04 10:43:16 +00:00
Marc G. Fournier e292a9d627 Got AROPT setting backwards...correct it 1997-04-04 09:02:34 +00:00
Marc G. Fournier bfbe25c395 Add distclean to target listing 1997-04-04 09:01:19 +00:00
Marc G. Fournier d2892913eb Again, needs float.h 1997-04-04 08:55:29 +00:00
Marc G. Fournier 18518c0147 needs float.h for DBL_MIN under FreeBSD 1997-04-04 08:53:08 +00:00
Marc G. Fournier 50db09185d Remove some files that were inadvertantly created
Clean up format of linux-elf
1997-04-04 08:16:37 +00:00
Marc G. Fournier f2eb14ad0d One helluva mess.
Further extended Makefile.global/build/configure so that we can
have a 'template' file for each OS (and each version of OS, as in BSDi)
which is used as much as possible to generate Makefile.global

	Any future ports should look at using the template file as a basis,
before moving over to Makefile.global.

	This will most probably break alot of the ports, atho I've tried to
be very neat about it...
1997-04-04 07:59:48 +00:00
Marc G. Fournier 82a27f230a Install os.h when we install the other headers...
Pointed out by: System Administrator <sysadmin@sba.miami.edu>
1997-04-04 02:53:14 +00:00
Marc G. Fournier 0213a81dca More modifications to make building more interactive:
Allow installer to change DEF_PGPORT
	Allow installer to disable HBA
1997-04-03 22:16:34 +00:00
Marc G. Fournier a03dc60508 Remove code associated with !ACLGROUP_PATCH, and appropriate #ifdef's 1997-04-03 21:31:57 +00:00
Marc G. Fournier e3649e9e52 Various improvements to reduce questions :)
Remove USE_LOCALE from Makefile.global.in
Add USE_LOCALE to build/configure/config.h

Add check for BUILDRUN in configure to make sure that build is run before
configure
1997-04-03 21:26:36 +00:00
Marc G. Fournier 4bc578eb83 From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] timestamp.c changes

I sent in changes previously and they were rejected because they didn't
follow ANSI spec.  Here is the input part of the changes again.  Even
though it allows more flexibility for inputting different formats, it
is also backwards compatible with the standard version.  I have also
not changed the output format so it will still output the ANSI forms.
Is this acceptable to everyone?
1997-04-03 19:58:11 +00:00
Marc G. Fournier 9d5c0af586 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Aggregate function patches

Here are the aggregate function patches I originally sent in last December.
They fix sum() and avg() behavior for ints and floats when NULL values are
involved.

I was waiting to resubmit these until I had a chance to write a v6.0->v6.1
database upgrade script to ensure that existing v6.0 databases which have
not been reloaded for v6.1 do no break with the new aggregate behavior.
These scripts are included below. It's OK with me if someone wants to do
something different with the upgrade strategy, but something like this
was discussed a few weeks ago.

Also, there were a couple of small items which cropped up in doing a clean
install of 970403 (actually 970402 + 970403 changes since the full 970403
tar file appears to be damaged or at least suspect). They are the first
two patches below and can be omitted if desired (although I think they
aren't dangerous :).
1997-04-03 19:56:47 +00:00
Marc G. Fournier 164cd7ab34 removed as already installed as part of system headers on NetBSD/FreeBSD 1997-04-02 18:49:24 +00:00
Marc G. Fournier 2ab34dfe1a From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] More date time functions

Here are some additional patches mostly related to the date and time
data types. It includes some type conversion routines to move between
the different date types and some other date manipulation routines such
as date_part(units,datetime).

I noticed Edmund Mergl et al's neat trick for getting function overloading
for builtin functions, so started to use that for the date and time stuff.
Later, if someone figures out how to get function overloading directly
for internal C code, then we can move to that technique.

These patches include documentation updates (don't faint!) for the built-in
man page. Doesn't yet include mention of timestamp, since I don't know
much about it and since it may change a bit to become a _real_ ANSI timestamp
which would include parser support for the declaration syntax (what do you
think, Dan?).

The patches were developed on the 970330 release, but have been rebuilt
off of the 970402 release. The first patch below is to get libpq to compile,
on my Linux box, but is not related to the rest of the patches and you can
choose not to apply that one at this time. Thanks in advance, scrappy!
1997-04-02 18:36:24 +00:00
Marc G. Fournier 920c58df71 From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] libpq variable set patch

  Just a small change, so the automatic variable setting on
connection startup actually works...
1997-04-02 18:26:25 +00:00
Marc G. Fournier a51df14a69 From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch: SET var TO 'val'

  Here is a patch that adds a "SET variable TO 'somevalue'" capability
to the parser, and then calls the SetPGVariable() function (which does
just issue a elog(NOTICE) to see whether it works).

  That's the framework for adding timezone/date format/language/...
stuff.
1997-04-02 18:24:52 +00:00
Marc G. Fournier 17b5bd33e4 From: Anton de Wet <adw@obsidian.co.za>
Subject: [HACKERS] Small patch to pgtclCmds.c

Hi I have made the following small change to the extensions I made to
pgtclCmds.c quite a while ago.

At the moment there is a -assignbyidx option to pg_result assigning the
returned tuples to an array by using the 1st field of the select statement
as the key to the array.
eg "select name,age from vitalstatistics" will result in an array with

myarray(peter) = 32
myarray(paul)  = 45

Often I need to have a pseudo-multi dimentional
array eg. "select name,age from vitalstatistics where occupation='plummer'

I would like to be able to generate an array
newarray(peter,overpaid) = 32

So to add a arbitrary string to the key value I have extended

  pg_result $res -assignbyidx $arrayname

to have an optional argument

  pg_result $res -assignbyidx $arrayname $appendstr

So that that string is appended to the key value.
1997-04-02 18:16:49 +00:00
Marc G. Fournier 5b1311acfb From: Oleg Bartunov <oleg@sai.msu.su>
Subject: [HACKERS] locale patches !

Hi there,

here are little patches to get Postgres 6.1 works with locale stuff.
This is a patch against 970402.tar.gz, there are no problem to apply them
by hand to 6.0 release. Collate stuff tested about 1-2 months in real
working database but I'm sure there must be no problem. US hackers
could vote against locale implementation ( locale for sure will affect to
speed of postgres ), so I introduce variable USE_LOCALE which
controls locale stuff. Non-US users now could use ~* operator
for searching and <order by> for strings with nation alphabet.
Please, don't forget, as I did first time, to set environment variable
LC_CTYPE and LC_COLLATE because backend get locale information from them.
I start postmaster from a little script, assuming that shell is Bash shell
it looks like:

#!/bin/sh

export LC_CTYPE=koi8-r
export LC_COLLATE=koi8-r
postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
1997-04-02 18:13:47 +00:00
Vadim B. Mikheev a10a951a46 New keyword: SEQUENCE. 1997-04-02 04:49:13 +00:00
Vadim B. Mikheev b5ee45e16d Manuals for SEQUENCEs. 1997-04-02 04:20:00 +00:00
Vadim B. Mikheev 2b788e0bf5 \h create/drop sequence. 1997-04-02 04:18:26 +00:00
Vadim B. Mikheev b259e454e7 Dumping sequence relations as 'CREATE SEQUENCE ...'. 1997-04-02 04:17:27 +00:00
Vadim B. Mikheev a15158bb55 Call DefineSequence () for T_CreateSeqStmt node. 1997-04-02 04:06:32 +00:00
Vadim B. Mikheev 41aeed4334 Can't INSERT/UPDATE/DELETE sequence relation. 1997-04-02 04:04:11 +00:00
Vadim B. Mikheev 9729f6ca0d CREATE/DROP SEQUENCE ...
Check nextval/currval permission in analyze.c.
1997-04-02 04:01:03 +00:00
Vadim B. Mikheev e276d8a1a6 Can't COPY TO sequence relation.
Can't inherits from ...
1997-04-02 03:57:06 +00:00
Vadim B. Mikheev e8647c45d6 Sequence numbers generators code. 1997-04-02 03:51:23 +00:00
Vadim B. Mikheev 1a3c7371e8 vc_getrels(p, VacRelP) returns NIL for special relations (indices,
sequences,...) and vc_delhilowstats(NULL->vrl_relid) ...
1997-04-02 03:48:01 +00:00
Vadim B. Mikheev 2030cbdf6c Hack for heap_creat to enable relkind to be 'S' for sequences. 1997-04-02 03:41:16 +00:00
Vadim B. Mikheev 076f7286be CloseSequences () at xact commit/abort. 1997-04-02 03:38:02 +00:00
Vadim B. Mikheev 6ec8d375f5 New node T_CreateSeqStmt. 1997-04-02 03:34:46 +00:00
Vadim B. Mikheev 46d11f314f New relkind ('S') for sequence relations.
New funcs (nextval & currval) in pg_proc.h
1997-04-02 03:29:37 +00:00
Vadim B. Mikheev 4d8e84155e Prototypes for sequence.c 1997-04-02 03:23:38 +00:00
Marc G. Fournier 80b618520e Use $(CC), not gcc, to compile
Pointed out by: igor@cs.cs.miami.edu
1997-04-02 00:34:23 +00:00
Marc G. Fournier 986bfc5053 Misc port related issues 1997-04-01 09:27:11 +00:00
Marc G. Fournier 4bd4ecf498 Slight Linux related bug pointed out by Gabriel Akos <gabriel@rocker.sch.bme.hu> 1997-03-28 09:43:53 +00:00
Marc G. Fournier 632a707fd1 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Small date patches (resubmitted)

Here a some small patches for the date/time code. They set the default
output format for the datetime type to the traditional Postgres
style, and fix a date debugging declaration. I submitted these
a couple of days ago, but they might have gotten lost...


NOTE: the second patch to dt.c is what I believe D'Arcy submitted as well,
      that I claimed was taken out...sorry D'Arcy, my fault :(
1997-03-28 07:18:06 +00:00
Marc G. Fournier 28454c216b From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [HACKERS] abstime "now" broken

Yes, I broke 'now' :( with an attempt at a bug fix involving
servers running in the UTC/GMT timezone. These patches fix
the problem, and have been tested in GMT (+00 hours),
PST (-08), and NZT (+12) timezones which exercized the code for
various cases including across day boundaries.  btw, this code
fixes the same type of problem for 'today', 'yesterday', 'tomorrow',
for DATETIME, ABSTIME, DATE and TIME types.

The bugfix itself is quite small, but I have accumulated other
changes in the datetime data type and include them here also.
One set of changes involves printing ISO-formatted dates and
is in response to the helpful information from Kurt Lidl regarding
ANSI SQL dates. I'll send another e-mail sometime soon discussing
more issues he has raised...
1997-03-28 07:13:21 +00:00
Marc G. Fournier 159f8c63ad From: Dan McGuirk <mcguirk@indirect.com>
Reply-To: hackers@hub.org, Dan McGuirk <mcguirk@indirect.com>
To: hackers@hub.org
Subject: [HACKERS] tmin writeback optimization

I was doing some profiling of the backend, and noticed that during a certain
benchmark I was running somewhere between 30% and 75% of the backend's CPU
time was being spent in calls to TransactionIdDidCommit() from
HeapTupleSatisfiesNow() or HeapTupleSatisfiesItself() to determine that
changed rows' transactions had in fact been committed even though the rows'
tmin values had not yet been set.

When a query looks at a given row, it needs to figure out whether the
transaction that changed the row has been committed and hence it should pay
attention to the row, or whether on the other hand the transaction is still
in progress or has been aborted and hence the row should be ignored.  If
a tmin value is set, it is known definitively that the row's transaction
has been committed.  However, if tmin is not set, the transaction
referred to in xmin must be looked up in pg_log, and this is what the
backend was spending a lot of time doing during my benchmark.

So, implementing a method suggested by Vadim, I created the following
patch that, the first time a query finds a committed row whose tmin value
is not set, sets it, and marks the buffer where the row is stored as
dirty.  (It works for tmax, too.)  This doesn't result in the boost in
real time performance I was hoping for, however it does decrease backend
CPU usage by up to two-thirds in certain situations, so it could be
rather beneficial in high-concurrency settings.
1997-03-28 07:06:53 +00:00
Marc G. Fournier d98f72e22f From: "D'Arcy J.M. Cain" <darcy@druid.net>
#ifdef is looking for the wrong value.
1997-03-28 06:55:58 +00:00
Marc G. Fournier 038e56c4df From: "D'Arcy J.M. Cain" <darcy@druid.net>
Some systems require limits.h to define DBL_MIN.
1997-03-28 06:54:51 +00:00
Marc G. Fournier 70a0237bed On some systems limits.h is needed to define DBL_MIN.
From: "D'Arcy J.M. Cain" <darcy@druid.net>
1997-03-28 06:53:50 +00:00
Vadim B. Mikheev b9fda39de3 Added call to heap_endscan in IndexIsUniqueNoCache - to release
our READ lock on pg_index and let others to create indices too !
1997-03-27 04:13:44 +00:00
Marc G. Fournier dd07f76658 turn GEQO code on by default 1997-03-27 01:00:41 +00:00
Marc G. Fournier e3e725a47d Remove customize in favor of 'build' 1997-03-26 07:10:03 +00:00
Marc G. Fournier 17c4321411 Add ability to change installation directory in build, prior to configure 1997-03-26 06:54:01 +00:00
Marc G. Fournier 7cbe19384f Add string.h for strerror() prototype 1997-03-26 03:27:04 +00:00
Marc G. Fournier 5b63c6b63a include float.h *after* postgres.h :( 1997-03-26 03:14:37 +00:00
Vadim B. Mikheev 3be7ecb2e4 Disallow to create multi-column indices using non-btree. 1997-03-26 03:05:28 +00:00
Marc G. Fournier d6b2f41c07 need float.h under FreeBSD for DBL_MIN 1997-03-26 03:02:15 +00:00
Vadim B. Mikheev 87bc5db412 '\h create index' shows that multi-column indices are available now. 1997-03-26 03:01:29 +00:00
Vadim B. Mikheev 7d336625c0 Added syntax for multi-column indices. 1997-03-26 02:52:49 +00:00
Vadim B. Mikheev 14ed5b3ecd Someone forgot about 'case sizeof(int32)' for
tupleDesc->attrs[i]->attlen in fastgetiattr.
1997-03-26 02:24:38 +00:00
Marc G. Fournier 64c82a5016 Add checs for float.h
Remove 'unused variable' from dt.c
1997-03-25 20:02:42 +00:00
Marc G. Fournier 719a413fd2 Add float.h for DBL_{MIN,MAX} under FreeBSD 1997-03-25 20:00:52 +00:00
Marc G. Fournier 0ccaaac169 another one missed 1997-03-25 09:44:33 +00:00
Marc G. Fournier 884d70edf0 MIssed adding a file to the repository 1997-03-25 09:44:00 +00:00
Marc G. Fournier 070381482f From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] backend/utils/adt/timestamp.c

Back to this timezone stuff.  The struct tm has a field (tm_gmtoff) which
is the offset from UTC (GMT is archaic BTW) in seconds.  Is this the
value you are looking for when you use timezone?  Note that this applies
to NetBSD but it does not appear to be in either ANSI C or POSIX.  This
looks like one of those things that is just going to have to be hand
coded for each platform.

Why not just store the values in UTC and use localtime instead of
gmtime when retrieving the value?

Also, you assume the time is returned as a 4 byte integer.  In fact,
there is not even any requirement that time be an integral value.  You
should use time_t here.

The input function seems unduly restrictive.  Somewhere in the sources
there is an input function that allows words for months.  Can't we do
the same here?

There is a standard function, difftime, for subtracting two times.  It
deals with cases where time_t is not integral.  There is, however, a
small performance hit since it returns a double and I don't believe
there is any system currently which uses anything but an integral for
time_t.  Still, this is technically the correct and portable thing to do.

The returns from the various comparisons should probably be a bool.
1997-03-25 09:25:33 +00:00
Marc G. Fournier c2e73db87a Various patches for shared libraries under i386-solaris by:
Christoph Kaesling <ck@dog.pfalz.sub.de>
1997-03-25 09:21:59 +00:00
Marc G. Fournier 6304e2c273 Here's two more diffs...
The first fixes a warning from gcc about the assignment within the condition.
The extra set of parens should not make a difference, but with -Werror, they
are necessary.

The second fixes an "ln -s" invocation that assumes the current directory is
implicitly the target if not specified.  Not true in all cases, and again, it
should not make a difference except to those implementation that it does.

From: "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>
1997-03-25 09:08:06 +00:00
Marc G. Fournier ea2fa32eff Rather than make this a Linux test, we should just test for the existence
of endian.h.  I figure that if it exists it's pretty sure that it has
the byte order information and we may catch some other ports without
any further testing.

From: "D'Arcy J.M. Cain" <darcy@druid.net>
1997-03-25 08:25:47 +00:00
Marc G. Fournier fcd65952fd Use $(LD_ADD) from Makefile.global instead of $(LDADD), which doesn't exist...
Pointed out indirectly by D'Arcy
1997-03-25 08:14:25 +00:00
Marc G. Fournier dfe0475362 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] More patches for date/time

I have accumulated several patches to add functionality to the datetime
and timespan data types as well as to fix reported porting bugs on non-BSD
machines. These patches are:

dt.c.patch              - add datetime_part(), fix bugs
dt.h.patch              - add quarter and timezone support, add prototypes
globals.c.patch         - add time and timezone variables
miscadmin.h.patch       - add time and timezone variables
nabstime.c.patch        - add datetime conversion routine
nabstime.h.patch        - add prototypes
pg_operator.h.patch     - add datetime operators, clean up formatting
pg_proc.h.patch         - add datetime functions, reassign conflicting date OIDs
pg_type.h.patch         - add datetime and timespan data types

The dt.c and pg_proc.h patches are fairly large; the latter mostly because I tried
to get some columns for existing entries to line up.
1997-03-25 08:11:24 +00:00
Marc G. Fournier d2a386d6e3 MOre univel port patches/files from:
"Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>
1997-03-25 07:54:53 +00:00
Marc G. Fournier 52ab6525fb Start of a univel port by "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com> 1997-03-25 07:16:36 +00:00
Vadim B. Mikheev 1a63f48b28 Free memory allocated by command in the BlankPortal' HeapMemory context
(#ifdef-ed).
1997-03-25 04:10:21 +00:00
Marc G. Fournier ef56e51cd3 - Renamed the variable names to something shorter, and I hope
nicer. Also, I grabbed my copy of the Informix manual, and
    added a couple of variables that make sense (formats for
    money, time, a language setting, a timezone).

  - New functions SetPGVariable() and GetPGVariable() in tcop/*.
    These don't actually do anything for the moment, but should
    be enough to implement the SET var_name TO var_val in the
    parser?

    SetPGVariable() expects just two strings, the var_name and
    the var_value from above, and is expected to do the right thing.
    Returns TRUE if  everything okay.


From: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-03-25 02:37:21 +00:00
Marc G. Fournier e16b43e2dc Add in alpha port 1997-03-25 02:29:08 +00:00
Marc G. Fournier 424e43326b I don't know whether this breaks what the previous person tried to
fix, but figure I"ll know soon enough, eh?

Patch submitted by Dan McGuirk
1997-03-25 00:54:15 +00:00
Marc G. Fournier 7fae43654b Needs USE_POSIX_SIGNALS
Pointed out by Dan McGuirk
1997-03-25 00:52:12 +00:00
Vadim B. Mikheev 14f6b387b1 + NULLs handling
Actually required by multi-column indices support.
	We still don't use btree for 'A is (not) null', but
	now btree keep items with NULL attrs using single rule
	for placing/finding items on pages:
	NULLs greater NOT_NULLs and NULL = NULL.
+ Bulkload code (nbtsort.c) support for multi-column indices
	building and NULLs.
+ Fix for btendscan()->pfree(scanopaque) from Chris Dunlop.
1997-03-24 08:48:16 +00:00
Vadim B. Mikheev 427a87911d New func _bt_checkkeys() added to let caller know number of keys
for which checking was TRUE.
1997-03-24 08:04:51 +00:00
Vadim B. Mikheev bdae359acc Setting index' attributes attcacheoff to -1 in index_create(). 1997-03-24 07:39:47 +00:00
Vadim B. Mikheev 5d4e3a7511 Added #define NullValueRegProcedure and #define NonNullValueRegProcedure -
is in use by btree now.
1997-03-24 07:32:38 +00:00
Marc G. Fournier ae93ad8511 Forgot to add an AC_SUBST(STRERROR) to configure.in for the strerror() test
Thanks to D'Arcy for pointing this one out
1997-03-21 18:58:23 +00:00
Marc G. Fournier 3589f71ebb From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] backend/utils/adt/nabstime.c

There is a problem with some of the calls to strftime.  The second arg is
missing.  In all cases the buffer is CTZName which, according to the
file init/globals.c, is char CTZName[8] so I have added this value.
I know there should be a #define set up for this but I wasn't sure
which header to put it in.
1997-03-21 18:53:28 +00:00
Marc G. Fournier 69c2c66196 change strtok(0.. to strtok(NULL..
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
1997-03-20 18:31:49 +00:00
Marc G. Fournier bf872f0aff From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] libpq/pqcomm stuff and Solaris byte order

I decided to go ahead with the required changes since no one else seems
to.  I don't guarantee that it is perfect but with these changes the
package actually compiles.  While I was at it I added to the Sparc
Solaris header to define the byte order.  Note that NetBSD sets this
in the system headers so it wasn't required there.

In particular, someone may want to check whether I removed the correct
84 lines from backend/libpq/pqcomprim.c.
1997-03-20 18:23:33 +00:00
Marc G. Fournier 7d5770eaf2 Check for and set HAVE_CRYPT_H if <crypt.h> exists
include crypt.h in password.c if crypt.h does exist
1997-03-20 18:04:32 +00:00
Marc G. Fournier 419b4304ba use autoconf 2.12 instead of 2.10 to gernate configure script...
*hopefully* will fix the linux configuration problem..?
1997-03-20 07:30:26 +00:00
Vadim B. Mikheev aa1a887185 Fix call to index_create in DefineIndex. 1997-03-19 07:52:03 +00:00
Vadim B. Mikheev d656e023a1 Fix index_create for multi-column indices 1997-03-19 07:44:45 +00:00
Vadim B. Mikheev 8157c833aa Fix index_create for multi-column indices 1997-03-19 07:36:35 +00:00
Marc G. Fournier 7acd9a3609 remove a double declaration/prototype 1997-03-19 03:56:50 +00:00
Marc G. Fournier 861cfd686d Remove port.c since it is redundant (well, empty, at least)
Change Makefile to refl removal of portc

Change dynloader.c so that its only used if PRE_BSDI_2_1 is defined
1997-03-19 03:01:32 +00:00
Marc G. Fournier 6ffd26d8eb Add a check for strerr, and add in D'Arcy's strerror() code in case not
found
1997-03-19 02:37:42 +00:00
Marc G. Fournier da9dcf826b there, that's fixed 1997-03-19 02:13:27 +00:00
Marc G. Fournier 8411931a59 Fixing a screw up 1997-03-19 02:12:15 +00:00
Marc G. Fournier 678cd5c6b6 From: Jun Kuwamura <juk@rccm.co.jp>
Subject: [HACKERS] auth.c for kerberos.

  I made pgsql with eBones(international version of Kerberos4).  The
following modification was needed.  And I added read permition for
group to srvtab instead of running postmaster as root.
1997-03-18 21:46:31 +00:00
Marc G. Fournier 3bc07104ae Replace strsep() by strtok()
By: Dan McGuirk <mcguirk@indirect.com>
1997-03-18 21:43:06 +00:00
Marc G. Fournier d611b07dd7 This is an attempt to get rid of some cruft...
According to man page under FreeBSD for sys_errlist[], strerror() should be
used instead...not sure if this will break other systems, so only changing
two files for now, and we'll see what "errors" it turns up
1997-03-18 21:40:41 +00:00
Marc G. Fournier dcd2332a4d Patch from Sven Verdoolaege <skimo@breughel.ufsia.ac.be> for large_objects 1997-03-18 21:30:41 +00:00
Marc G. Fournier 812a6c2b54 - Move most of the I/O in both libpq and the backend to a set
of common routines in pqcomprim.c (pq communication primitives).
    Not all adapted to it yet, but it's a start.

  - Rewritten some of those routines, to write/read bigger chunks of
    data, precomputing stuff in buffers instead of sending out byte
    by byte.

  - As a consequence, I need to know the endianness of the machine.
    Currently I rely on getting it from machine/endian.h, but this
    may not be available everywhere? (Who the hell thought it was
    a good idea to pass integers to the backend the other way around
    than the normal network byte order? *argl*)

  - Libpq looks in the environment for magic variables, and upon
    establishing a connection to the backend, sends it queries
    of the form "SET var_name TO 'var_value'". This needs a change
    in the backend parser (Mr. Parser, are you there? :)

  - Currently it looks for two Env-Vars, namely PG_DATEFORMAT
    and PG_FLOATFORMAT. What else makes sense? PG_TIMEFORMAT?
    PG_TIMEZONE?

From: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-03-18 20:15:39 +00:00
Marc G. Fournier d146305065 Patches for Vadim's multikey indexing... 1997-03-18 18:41:37 +00:00
Marc G. Fournier b5e16b1869 Resync the source tree, commit some things that were missing (pqcomprim.c) and
bring in Thomas's updates for the date/time code...
1997-03-18 16:36:50 +00:00
Marc G. Fournier 7d02575ad1 Fixes for libpgtcl from Massimo 1997-03-17 22:05:08 +00:00
Marc G. Fournier c9ba25eb6d Add in a check for libcrypt.a
Pointed out by Martin
1997-03-17 19:03:05 +00:00
Marc G. Fournier 4b4ac7c159 oracle_compat.c fixed for function overloading...
By: From: Edmund Mergl <mergl@nadia.s.bawue.de>
1997-03-16 20:40:52 +00:00
Marc G. Fournier 5ea01d62ef Don't forget the fe-connect.h include file 1997-03-16 19:06:04 +00:00
Marc G. Fournier 7cd394dc43 From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Patches for 970316 compilation

I made a small pre-emptive change in the new datetime code to eliminate
calls to infnan(). Hopefully this will make Solaris (and probably other
non-GNUlib) systems happier. Didn't find fe-connect.h in the 970316
distribution, so made one up. Also, one of the test routines needs an
update for the geo-decls.h -> geo_decls.h name change.
Patches appear below...
1997-03-16 19:05:00 +00:00
Marc G. Fournier ea58f28ee8 om: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch for io routines

  I am currently trying to improve on the front-backend communication
routines; and noticed that lots of code are duplicated for libpq and
the backend. This is a first patch that tries to share code between
the two, more to follow.

        mjl
1997-03-16 18:51:29 +00:00
Marc G. Fournier a9049a4a28 Header file fixes for MINDOUBLE 1997-03-16 05:32:03 +00:00
Marc G. Fournier cddd68eb27 Add a conditional for <values.h> vs <limits.h> 1997-03-16 05:12:08 +00:00
Marc G. Fournier 7e8ee18346 Remove extra functions temporarily while a proper fix is found... 1997-03-16 01:17:49 +00:00
Marc G. Fournier bd2c53c2a9 Remove overloaded functions until we can figure out how to get them to work
properly...
1997-03-16 01:16:31 +00:00
Marc G. Fournier 3031ec7c72 NetBSD Shared Library Patch from Martin J. Laubach 1997-03-15 19:17:03 +00:00
Marc G. Fournier 078633e729 Re-oid the oracle_compat functions
Add new "overloaded" oracle_compat functions (see man oracle_compat)
1997-03-15 06:13:12 +00:00
Marc G. Fournier 9e4798ea0d A couple of development scripts by Dan to detect unused and duplicate
oids
1997-03-15 06:03:08 +00:00
Marc G. Fournier e8466b034a Update oracle_compat.c 1997-03-15 06:00:19 +00:00
Marc G. Fournier 064466ad55 From: Massimo Dal Zotto <dz@cs.unitn.it>
Subject: [HACKERS] lock debug trace

This is an update to my previous patches for lock debugging, already applied
to the current sources. It adds some improvements in the output messages and
some more output in WaitOnLock(). I have used with success to trace a nasty
deadlock condition on pg_listener.
1997-03-15 01:23:58 +00:00
Marc G. Fournier c4bf011e45 From: Andrew Martin <martin@biochemistry.ucl.ac.uk>
Just noticed that the psql man page is missing the -T option for specifying
HTML table options.
1997-03-15 01:11:54 +00:00
Marc G. Fournier 791c075852 Date/Time updates from Thomas... 1997-03-14 23:34:16 +00:00
Marc G. Fournier 53d8be3bbf Date/Time updates from Thomas... 1997-03-14 23:21:12 +00:00
Marc G. Fournier 71fd8d4a4b > There are some minor fixes to the GEQO.
> Please apply them to the direcory "backend/optimizer/geqo".
> Two new files with different crossover techniques are included.
> Standard procedure is optimization by means of "geqo_erx.c"
> (Edge Recombination Crossover).

From: "Martin S. Utesch" <utesch@aut.tu-freiberg.de>
1997-03-14 16:03:02 +00:00
Marc G. Fournier f749fe4934 Last of Dan's hidden tar balls :) 1997-03-14 06:01:40 +00:00
Marc G. Fournier 94094c0569 Missed another tar file... :( 1997-03-14 05:58:13 +00:00
Marc G. Fournier 0889b17444 Missing bits from Dan's patches...sorry :( 1997-03-14 05:56:27 +00:00
Marc G. Fournier 071484c5d8 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] timestamp type

OK, last one.  This patch adds an ANSI SQL 'timestamp' type.
1997-03-12 21:28:14 +00:00
Marc G. Fournier 3a7c93e7f3 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] password authentication

This patch adds support for plaintext password authentication.  To use
it, you add a line like

host         all         0.0.0.0       0.0.0.0           password  pg_pwd.conf


to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing
the usernames and password hashes in the format of the first two fields
of a Unix /etc/passwd file.  (Of course, you can use a specific database
name or IP instead.)

Then, to connect with a password through libpq, you use the PQconnectdb()
function, specifying the "password=" tag in the connect string and also
adding the tag "authtype=password".

I also added a command-line switch '-u' to psql that tells it to prompt
for a username and password and use password authentication.
1997-03-12 21:23:16 +00:00
Marc G. Fournier 5dde558ce6 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches

These patches lay the groundwork for a Linux/Alpha port.  The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start.  It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.
1997-03-12 21:13:19 +00:00
Marc G. Fournier b66569e41f From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches

These patches lay the groundwork for a Linux/Alpha port.  The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start.  It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.
1997-03-12 21:00:17 +00:00
Marc G. Fournier 127826978a From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] equal column and table name patch

This fixes a bug where selects fail when there is a column with the same
name as the table it's a part of.
1997-03-12 20:51:33 +00:00
Marc G. Fournier e4949f9fe5 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] better access control error messages

This patch replaces the 'no such class or insufficient privilege' with
distinct error messages that tell you whether the table really doesn't
exist or whether access was denied.
1997-03-12 20:48:48 +00:00
Marc G. Fournier c00c511b7b From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] backend Makefile patch

This patch cleans up backend/Makefile a little bit, and prevents it from
relinking the backend binary when no changes have been made.
1997-03-12 20:44:57 +00:00
Marc G. Fournier 51844146e5 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] abort failed transaction patch

This patch allows you to end a transaction that has failed on an error
using the 'ABORT' statement without generating another error message.
(By default you get an error unless you use 'END' to terminate the
transaction, which has already been aborted anyway.)
1997-03-12 20:41:14 +00:00
Marc G. Fournier 336eb7056d Add in the sunos4 portname to configure detection 1997-03-11 02:12:17 +00:00
Bruce Momjian ea36b0d3cd Add missing paren. 1997-03-10 15:08:57 +00:00
Marc G. Fournier 977654d55b Massimo's Deadlock patches w/o the #ifdefs 1997-03-10 00:18:09 +00:00
Bruce Momjian 766bdd2bb5 Vacuum cleanups from Massimo. 1997-03-09 23:29:15 +00:00
Bruce Momjian b913dd1f9e Add prototypes for oracle-compat functions. Rename geo-*.c adt to geo_*.c 1997-03-09 20:41:02 +00:00
Bruce Momjian d8023a00bd Fix vacuum crash Vadim found. 1997-03-09 07:12:36 +00:00
Bruce Momjian 22cabc5514 Reverse patch for Vadims problem. 1997-03-07 00:59:05 +00:00
Marc G. Fournier e67e399fd9 Add man page for oracle compatibility functions
By Edmund
1997-03-07 00:47:41 +00:00
Bruce Momjian e2ab435e99 Move nextstep into problem/bug section. 1997-03-06 22:59:47 +00:00
Bruce Momjian da90363c12 Fix vacuum bug Vadim found with text fields. 1997-03-06 18:38:35 +00:00
Vadim B. Mikheev 74bd93d597 Not understandable fix of strange bug in vacuum statistic functions. 1997-03-06 11:41:09 +00:00
Marc G. Fournier 83978e1ea7 This is a set of single row character functions, defined for the datatype
text, which are supposed to behave exactly as their Oracle counterparts.

From: Edmund Mergl <E.Mergl@bawue.de>
1997-03-04 05:32:26 +00:00
Marc G. Fournier 497e3c9b5e Fix the prototype for on_exitpg() 1997-03-03 23:34:27 +00:00
Marc G. Fournier ed8b7bdff9 Patch from Martin due to changes in joinrels.c 1997-03-03 23:26:45 +00:00
Bruce Momjian 26eb44f202 Prevent SIGPIPE from crashing server, by Dan McGuirk. 1997-03-02 02:17:32 +00:00
Bruce Momjian 688aff37f9 Change debug to pretty-print tree, recommended by Darren King. 1997-03-02 02:12:49 +00:00
Bruce Momjian 3ce0236c69 Apply date patch from tiemann@cygnus.com,Michael Tiemann. 1997-03-02 02:05:33 +00:00
Bruce Momjian 162c2a6e4c Remove _PAGE_SIZE_ as recommended by Darren King. 1997-03-02 01:34:50 +00:00
Bruce Momjian 34fd62c512 Remove case-sensitive identifiers. Thanks for Dan McGuirk for a reversal patch. 1997-03-02 01:03:44 +00:00
Bruce Momjian a3a956bfe5 Change machine/limits.h to limits.h. 1997-03-01 22:22:21 +00:00
Bruce Momjian 872c708f8f Small regress cleanup. 1997-03-01 16:44:43 +00:00
Bruce Momjian 799755b30d Fix example so it works. 1997-03-01 15:26:42 +00:00
Bruce Momjian 7e6aeb5074 Substitute defines for numeric constants in type ids.
Use INT4OID instead of 23.
1997-03-01 15:24:51 +00:00
Marc G. Fournier a4c18f553c Make sure anything configure related is removed on a distclean 1997-02-28 18:45:17 +00:00
Marc G. Fournier 9b4b8e92eb Create a distclean make directive to handle cleaning out configure
generated files, that shouldn't be removed on a make clean

Pointed out by half the hackers mailing list :)
1997-02-28 18:34:58 +00:00
Marc G. Fournier 3ebe69c4c5 Remove second 'all' directive
Pointed out by Bruce
1997-02-28 15:35:50 +00:00
Bruce Momjian 38f4f67830 Allow update x =-3, not just x = -3. 1997-02-28 13:25:16 +00:00
Bruce Momjian 326d1568fd Remove old READMEs. 1997-02-28 11:58:04 +00:00
Bruce Momjian fc87230507 Remove SUBSYS.o in port/ on clean. 1997-02-28 10:57:47 +00:00
Bruce Momjian 317ea8bf39 Remove win32 port directory. Forgot to do it earlier. 1997-02-28 10:30:29 +00:00
Marc G. Fournier bb21784caa Fix, I think, the stdup.o problem reported on those systems without
it.
1997-02-25 18:14:43 +00:00
Marc G. Fournier 00bcb8a0ed Change "WARN" message generated if a unique index is attempted on a table/key
containing non-unique data
1997-02-25 03:38:23 +00:00
Vadim B. Mikheev 36058981a4 Added: UNIQUE feature to bulkload code. 1997-02-22 10:08:27 +00:00
Marc G. Fournier 2280e62d39 Make the error message output by AllocateFile() if failes to
open Nulldev a *bit* more user friendly...or, at least, admin
friendly...have it print strerror(errno) as well
1997-02-20 22:54:18 +00:00
Marc G. Fournier 069b71d721 Add in port hpux to configure
Pointed out by: Mark Hollomon <mhh@nortel.ca>
1997-02-20 18:29:45 +00:00
Vadim B. Mikheev 4de2f24895 Fix for queries with 3 or more relations participating in
one clause.
1997-02-20 02:54:09 +00:00
Bruce Momjian 6eb0525185 Prevent under/over flow of float8 constants in parser. Small regression fix. 1997-02-19 20:11:05 +00:00
Marc G. Fournier 5b5bbdb161 Disable GEQO...it seems to be broken as shown by the message to
bugs@postgresql.org concerning updates
1997-02-19 19:25:42 +00:00
Marc G. Fournier ee6d3a7326 Various cleanups to satisfy -Werror, but there are some errors that I'm
not certain how to fix, so left them there and enabled -Wno-error for
this directory for now
1997-02-19 14:52:06 +00:00
Marc G. Fournier 950c57600e rearrange ordering of headers os that postgres.h is first 1997-02-19 14:29:22 +00:00
Marc G. Fournier 517c8db869 Remove WIN32 stuff, and improve conformance to configure 1997-02-19 14:26:42 +00:00
Marc G. Fournier f6c4d9142a Didn't *quite* work the way I thought it would...default'd to clean,
not make all :(  Fixed...
1997-02-19 14:14:40 +00:00
Marc G. Fournier d250ead654 Add a clean target so that the root directory gets cleared of all
the "configure" related files on a make clean
1997-02-19 14:03:28 +00:00
Marc G. Fournier 2407a0473a Removed a ',' that didn't belong in the timezone test case
Pointed out by: afc@teri.superlink.net
1997-02-19 13:55:13 +00:00
Marc G. Fournier ebdd6aa78b And, make sure that initdb.sh copies the pg_geqo.sample file to
${DATADIR}.  The file is left as pg_geqo.sample, since, unlike
pg_hba.conf, it isn't a required file...but this way ppl know that
its there, and that its where it is required, if they choose to
use it
1997-02-19 13:11:58 +00:00
Marc G. Fournier 23513b47b9 Add and install the pg_geqo.sample file 1997-02-19 13:09:34 +00:00
Marc G. Fournier 29138eeb3c Merge in GEQO Optimizer
From: "Martin S. Utesch" <utesch@aut.tu-freiberg.de>
1997-02-19 12:59:07 +00:00
Bruce Momjian 34f35a4c19 Delete -e option to postmaster, keep postgres -e option. 1997-02-19 01:31:30 +00:00
Bruce Momjian a17b01f320 Update btree patches that were missed. 1997-02-18 17:14:25 +00:00
Bruce Momjian e230c0b672 Clarify clearing of attribute stats memory. 1997-02-18 04:13:57 +00:00
Bruce Momjian b8518449a3 Oper_right added, broken with const. conversion. 1997-02-14 23:02:29 +00:00
Bruce Momjian d38767fcb5 Add prototypes and remove unused variables from btree Fastbuild patch. 1997-02-14 22:47:36 +00:00
Bruce Momjian 3eba7651f3 Remove hardcoded 20000 and change to BootstrapObjectIdData. 1997-02-14 04:52:59 +00:00
Bruce Momjian 31c8e94b34 Remove WIN32 defines. They never worked. 1997-02-14 04:19:07 +00:00
Bruce Momjian aaaba5a048 Fix naming from proc to prio to fix previous patch. 1997-02-13 15:55:01 +00:00
Bruce Momjian cf2403896d Only allow NULL in the prpoer places. 1997-02-13 15:40:03 +00:00
Marc G. Fournier eacd0fd938 Bring in Leo's <lsh@lubrizol.com> massive changes to libpq++ 1997-02-13 10:01:05 +00:00
Marc G. Fournier d62267c707 Improvements to the ultrix port, in particular a bunch of compiler
quieting prototyping in port/ultrix4.h

Submitted by: Erik Bertelsen <erik@sockdev.uni-c.dk>
1997-02-13 09:54:14 +00:00
Marc G. Fournier aa7dbd0b95 Had configure check for strdup, but didn't have it set HAVE_STRDUP
Fixed
1997-02-13 08:33:28 +00:00
Marc G. Fournier a5494a2d92 Various patches for nextstep by GregorHoffleit
Replaced NEED_STRDUP by !HAVE_STRDUP
1997-02-13 08:32:20 +00:00
Marc G. Fournier 809ae06ab2 Patch for:
The following patch to src/backend/libpq/pqpacket.c provides additional
checking for bad packet length data. It was tested with the Linux telnet
client, with netcat using the numbers.txt and by dumping random numbers
into the port.

Patch by: Alvaro Martinez Echevarria <alvaro@lander.es>
1997-02-13 08:06:36 +00:00
Marc G. Fournier d937b4efdb Removed a reference to DATADIR that still existed 1997-02-12 11:05:10 +00:00
Marc G. Fournier fb70587c1d Patch from Massimo Dal Zotto <dz@cs.unitn.it>
The following patches add to the backend a new debugging flag -K which prints
a debug trace of all locking operations on user relations (those with oid
greater than 20000). The code is compiled only if LOCK_MGR_DEBUG is defined,
so the patch should be harmless if not explicitly enabled.
I'm using the code to trace deadlock conditions caused by application queries
using the command "$POSTMASTER -D $PGDATA -o '-d 1 -K 1'.
The patches are for version 6.0 dated 970126.
1997-02-12 05:25:13 +00:00
Marc G. Fournier ba82bb3eac Make sure we have an irix port
Pointed out by: Dave Morrison  (mirrison@mail.phy.ornl.gov)
1997-02-12 05:17:19 +00:00
Marc G. Fournier 5d9f146c64 What looks like some *major* improvements to btree indexing...
Patches from: aoki@CS.Berkeley.EDU (Paul M. Aoki)

i gave jolly my btree bulkload code a long, long time ago but never
gave him a bunch of my bugfixes.  here's a diff against the 6.0
baseline.

for some reason, this code has slowed down somewhat relative to the
insertion-build code on very small tables.  don't know why -- it used
to be within about 10%.  anyway, here are some (highly unscientific!)
timings on a dec 3000/300 for synthetic tables with 10k, 100k and
1000k tuples (basically, 1mb, 10mb and 100mb heaps).  'c' means
clustered (pre-sorted) inputs and 'u' means unclustered (randomly
ordered) inputs.  the 10k table basically fits in the buffer pool, but
the 100k and 1000k tables don't.  as you can see, insertion build is
fine if you've sorted your heaps on your index key or if your heap
fits in core, but is absolutely horrible on unordered data (yes,
that's 7.5 hours to index 100mb of data...) because of the zillions of
random i/os.

if it doesn't work for you for whatever reason, you can always turn it
back off by flipping the FastBuild flag in nbtree.c.  i don't have
time to maintain it.

good luck!

baseline code:

time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest
real   8.6
time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest
real   9.1
time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest
real   59.2
time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest
real   652.4
time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest
real   636.1
time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest
real   26772.9

bulkloading code:

time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest
real   11.3
time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest
real   10.4
time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest
real   59.5
time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest
real   63.5
time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest
real   636.9
time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest
real   701.0
1997-02-12 05:04:52 +00:00
Bruce Momjian d5a3f52d62 Assign priorities when creating jobs in lock queue. 1997-02-11 23:05:38 +00:00
Bruce Momjian 4331b16320 Add comment for questionable 5 padding. 1997-02-11 15:37:18 +00:00
Bruce Momjian ec4ca05c12 Fix \? syntax for copy command. 1997-02-11 03:11:33 +00:00
Marc G. Fournier 86c28441b4 Remove machine.h, since it wasn't doing anything that config.h wasn't
already doing

Removed only reference to a machine.h I could find in c.h, to win32/machine.h
1997-02-09 04:50:25 +00:00
Marc G. Fournier e7c767b477 Try to further reduce the PORT dependencies.
Essentially, config.h now includes an 'os.h', which is created via
configure by linking a "port.h" file from the port directory to the
include directory.

Going to try to merge backend/port in similar ways
1997-02-09 04:34:07 +00:00
Marc G. Fournier d557375d61 Remove NO_{SIGPROCMASK,SETSID,WAITPID} from nextstep port, since they
aren't doing anything anyway
1997-02-09 03:36:08 +00:00
Marc G. Fournier 171e0c27e4 Changes to configure/config.h.in to check for:
sigprocmask, setsid and waitpid

Especially for nextstep systems

Awaiting for a context diff from Gregor to complete changes for the nextstep
port
1997-02-09 03:33:38 +00:00
Marc G. Fournier ad6bfe67bd Various fixes suggested by Gregor Hoffleit
Add a check to configure for strdup
Remove all the '-ltermcap' checks from psql/Makefile
Have {psql,pg_dump}/Makefile modified if strdup doesn't exist on the system
1997-02-09 03:23:52 +00:00
Marc G. Fournier fd84cafb69 |I took a look at this and I think pg_dump mishandles arrays of ints and floats
|by neglecting to quote them.
|
|I have made a minor change to pg_dump.c that will fix this.
|
|Dates are dumped and restored OK with pg_dump in V6
|
|We'll still need to fix the dump in both cases if the original dump is from V1.09.

From Keith Parks
1997-02-09 03:00:09 +00:00
Bruce Momjian e2292e0c0c Add missing paren for hpux. 1997-02-08 20:39:50 +00:00
Marc G. Fournier f3ceb0a144 Oops, the port is ultrix4, not ultrix
Pointed out by: Erik Bertelsen
1997-02-08 03:29:31 +00:00
Marc G. Fournier 37e7e77c33 Add in netbsd*) to configure
Pointed out by D'Arcy
1997-02-07 17:49:50 +00:00
Bruce Momjian 2300ac0dc4 Add attribute optimization statistics. 1997-02-07 16:24:12 +00:00
Marc G. Fournier 4c0faba0fe Add ultrix to configure 1997-02-07 11:07:43 +00:00
Marc G. Fournier cfd9f6e7a9 Add in the nextstep port so that configure will (should?) run on it 1997-02-07 10:18:35 +00:00
Marc G. Fournier 1ce7b0c808 The test for union semun requires <sys/ipc.h>
Pointed out by Bruce
1997-02-06 20:55:03 +00:00
Bruce Momjian 89868af425 Remove extra paren in ifdef. 1997-02-06 19:27:22 +00:00
Marc G. Fournier 2c9dbc57e5 Various changes to improve/support Mklinux
Submitted by: Tatsuo Ishii
1997-02-06 08:40:16 +00:00
Marc G. Fournier 9b9141245c Make sure all changes are committed... 1997-02-06 06:33:58 +00:00
Marc G. Fournier a7257ff41f autoconf test for and set HAVE_VFORK 1997-02-06 06:15:49 +00:00
Marc G. Fournier e72b1ccd30 Add test for union semun to configure
Remove references to NEED_UNION_SEMUN from include/config.h.in and
from include/storage/ipc.h, replacing it with a single HAVE_UNION_SEMUN
1997-02-06 05:30:50 +00:00
Marc G. Fournier 321d42c6d0 Change ordering of libraries 1997-02-06 05:05:04 +00:00
Bruce Momjian e9e86aa59d Include main Makefile.global first so variables are not over-written. 1997-02-06 02:31:52 +00:00
Marc G. Fournier d04500743b Oops, just about forgot to commit this one too :( 1997-02-05 21:28:22 +00:00
Marc G. Fournier b78a3de9a1 Get in there... 1997-02-05 21:27:04 +00:00
Marc G. Fournier 4001a8c7d3 Add Makefile.in so that configure can determine if inet_aton.o is required
Add CFLAGS= @CPPFLAGS@ to Makefile.global and configure so that build is
	useful for finding extra header files

Split header files from libraries in build.  Doesn't make much sense to
	look for a header file in /usr/local/lib, nor to look for a library
	in /usr/local/include :)
1997-02-05 21:22:07 +00:00
Bruce Momjian 0d5f773b72 Update to handle include search paths. 1997-02-05 04:47:20 +00:00
Marc G. Fournier 4506116db8 Add in appropriate checks for inet_aton, and modifications to backend/port/Makefile
to include inet_aton.c if required
1997-02-04 22:39:56 +00:00
Marc G. Fournier 50b618a049 Test for existence of inet_aton on the system, and only include inet_aton.c if
required

Pointed out by Brian E. Gallew
1997-02-04 22:36:30 +00:00
Marc G. Fournier 5c117403e0 Add in a check for AIX port and set PORTNAME accordingly
Pointed out by: Darren King
1997-02-04 22:24:40 +00:00
Marc G. Fournier 20c20b8018 Remove a library check that isn't used right now 1997-02-04 22:17:23 +00:00
Marc G. Fournier b17a92f5e6 Add a 'build' script. All it currently does is prompts the user for additional 'lib'
directories to search to find libraries, and then runs ./configure directly
1997-02-04 22:14:24 +00:00
Marc G. Fournier b8ddf4425d Add conditional for port to bsdi 1997-02-04 21:40:54 +00:00
Marc G. Fournier 4aff83181a Fix for echo newline suppression detection
Submitted by: Keith Parks
1997-02-04 09:16:08 +00:00
Marc G. Fournier 14be8d35b5 Remove default GNUmakefile and Makefile.global
Change reference to Postgres95 to PostgreSQL in GNUmakefile
1997-02-04 09:13:59 +00:00
Marc G. Fournier 63c28920ab remove old non-autoconf config.h
clean up some of the readline code in config.h.in
1997-02-04 09:08:56 +00:00
Marc G. Fournier a20440b210 Final file required for autoconf, so far... 1997-02-04 08:54:47 +00:00
Marc G. Fournier bc564084a3 Bring back in the autoconf files - work in progress 1997-02-04 08:53:45 +00:00
Marc G. Fournier 9cabea224c Change references to NEED_RUSAGE to HAVE_RUSAGE
Pointed out by:" Tatsuo Ishii <t-ishii@sra.co.jp>
1997-02-03 04:43:31 +00:00
Marc G. Fournier a1019b6ca7 AIX *does* have <sys/select.h>
Pointed out by Darren King
1997-01-30 16:02:38 +00:00
Marc G. Fournier 3facbfc28e Revisions to customize for READLINE support
From Andrew Martin
1997-01-30 03:56:53 +00:00
Marc G. Fournier 6791355823 aix does have <termios.h>
pointed out by Darren King
1997-01-30 03:54:13 +00:00
Marc G. Fournier abd38d8b22 Linux doesn't have sys/select.h... 1997-01-29 04:49:14 +00:00
Vadim B. Mikheev daf75276d4 New func _vc_scanoneind: scan one index relation to update statistic
in pg_class if no one page was reapped by vacuum.
1997-01-29 02:59:03 +00:00
Bruce Momjian 35e2d29c2b Added comment to readline defines. 1997-01-28 13:53:50 +00:00
Bruce Momjian 9c931e08ba Moved readline stuff into Makefile.global. 1997-01-28 03:47:01 +00:00
Marc G. Fournier 6ab9db7b78 Apply usage patches for European Dates patch from Keith 1997-01-27 22:37:52 +00:00
Marc G. Fournier 83d7b271db Quick patch from Andrew to recognize nextstep vs next as a port 1997-01-27 20:31:47 +00:00
Marc G. Fournier 8d3d5d2e2f Slight change to nabstime.c so that configure is able to handle a system
whereby timezone isn't an int, but tzset() exists...

This isn't a definitive fix, as there is probably an easier way of
fixing the bug...
1997-01-27 01:51:26 +00:00
Marc G. Fournier a246e87d12 Convert MISSING_SYSCONF to !HAVE_SYSCONF for autoconf
From: Keith Parks
1997-01-27 00:09:47 +00:00
Bruce Momjian 197c7f5486 More removals for next/nextstep. Fix IPC lib for them. 1997-01-26 20:22:33 +00:00
Bruce Momjian 1836ce2c81 Change next to nextstep where missed. 1997-01-26 20:15:26 +00:00
Marc G. Fournier 427a964c30 |From: Keith Parks <emkxp01@mtcc.demon.co.uk>
|Subject: [PATCH] adding SYS_TIME just for fun.
|
|Hi,
|
|Whilst I was playing round with the European dates patch I noticed the sysfunc()
|that allows you to do :-
|
|create table test ( da date);
|insert into test values (SYS_DATE);
|
|and have the current system date inserted.
|
|So I thought it would be nice to have the SYS_TIME facility too.
|
|I've cloned the function and changed a few things and there you have it,
|you can now do:
|
|create table test2 ( ti time);
|insert into test2 values (SYS_TIME);
1997-01-26 17:28:48 +00:00
Marc G. Fournier 1d8a696fd5 Remove #include "rlstubs.h", since it doesn't exist anymore 1997-01-26 17:27:32 +00:00
Marc G. Fournier d90a426e35 Linux defines MAXINT in values.h, which causes an error when compiling.
Wrap it in an #ifndef to prevent this
1997-01-26 16:06:42 +00:00
Marc G. Fournier 632c44d829 Bring in a patch from Keith Parks to move the use of European dates
from a #define to a run-time option '-e'

Man page was updated to reflect new option
1997-01-26 15:32:28 +00:00
Bruce Momjian ac3c926c42 Fix typo in struct name. 1997-01-26 00:45:25 +00:00
Marc G. Fournier 917042f1c6 Remove rlstubs.[ch], since they weren't actually doing anything that couldn't
be #ifdef'd into psql.c itself

From what I can tell, if USE_READLINE is true or false, psql works under
FreeBSD, without configure.  Now to test it *again* under sparc_solaris
with configure and see if it works...
1997-01-25 23:54:08 +00:00
Marc G. Fournier aa46d53fa4 Okay, this should pretty much clean up the psql/readline/history mess.
Added a README.readline file until configure is integrated to *try* and
explain the way things stand.

Removed a stray configure .in file
1997-01-25 22:52:08 +00:00
Marc G. Fournier 374b2b0639 Why can't everyone be standard? :(
Add some code to make psql happy with a system where there is *no*
history code available, but there is readline code...
1997-01-25 22:16:43 +00:00
Marc G. Fournier d049cec4f5 Modifications to handle the situation where readline.h exists, but
history.h doesn't...previously, it was assumed that both existed, or
didn't exist...but this assumption fails on the one sparc_solaris box
that I have access to, and could exist in other circumstances
1997-01-25 21:58:08 +00:00
Marc G. Fournier 49f30e80fc Some fixes for using configure under sparc_solaris 1997-01-25 21:55:37 +00:00
Bruce Momjian 311c521d96 would you mind committing the following changes for me? (the first
bug causes compilation to fail on alpha, the second causes a compiler
in this environment
1997-01-25 21:09:20 +00:00
Bruce Momjian 4eadf2d6cd More autosize structure error checks. 1997-01-25 21:01:16 +00:00
Marc G. Fournier 37e8621623 The check should be for getrusage(), not rusage() ... change the defines
to reflect what configure is going to define when the time comes
1997-01-25 19:29:47 +00:00
Marc G. Fournier 378a2c1102 Remove -lsocket -lnsl from X11_LIB, since it should be added on a port-by-port
basis, as its only specific to certain OSs
1997-01-25 19:25:05 +00:00
Marc G. Fournier c7b5159713 Disable -Werror by default.
Developers can add it to their Makefile.custom...again, it causes sooooo many
more problems then its worth, from an end-user standpoint.
1997-01-25 19:23:43 +00:00
Marc G. Fournier b1fd1f6998 remove asm/bitops.h, as its causing more problems then it fixes. 1997-01-25 19:22:27 +00:00
Marc G. Fournier 9921eae7a5 Add YACC= bison -y as per Andrew's request... 1997-01-25 19:19:35 +00:00
Marc G. Fournier f389e9dfc2 Change how readline support is included in psql.c ...
See message to hackers@ mailing list concerning this...
1997-01-25 03:51:59 +00:00
Bruce Momjian 6dbe1be690 Restructure padding to handle structure already 128 bytes(alpha). 1997-01-25 03:09:33 +00:00
Marc G. Fournier 60265ee651 Switch over NEED_RUSAGE to HAVE_RUSAGE for configure 1997-01-24 23:48:32 +00:00
Marc G. Fournier 970e3f69b7 I reversed a bunch of the #define's inadvertantly...
Fixed them, and am re-committing
1997-01-24 23:36:33 +00:00
Marc G. Fournier a961613f49 Missed this when I removed the rest of the configure stuff 1997-01-24 23:35:16 +00:00
Marc G. Fournier c19b247aec Change NEED_SIG_JMP to HAVE_SIGSETJMP in preparation for configure 1997-01-24 22:42:35 +00:00
Marc G. Fournier f12c5f898c Another switch for configure: NEED_SYS_SELECT_H to HAVE_SYS_SELECT_H 1997-01-24 18:27:32 +00:00
Marc G. Fournier 0a16069901 Convert NEED_{RINT,CBRT,ISINF} to HAVE_* in prepration for configure... 1997-01-24 18:17:37 +00:00
Marc G. Fournier 3ffd5694dd Replace occurances of USE_{LIMITS,VALUES}_H with HAVE_* in preparation
for switch over to configure
1997-01-24 18:00:48 +00:00
Marc G. Fournier cfe18a8e3f Remove from include/config.h:
#if defined(aix)
#define TERMIOS_H_LOCATION <termios.h>
#else
#define TERMIOS_H_LOCATION <sys/termios.h>
#endif

libpq/fe-exec.c modified so that location of termios.h is determined
by whether HAVE_TERMIOS_H is defined or not, in preparation for switch
to configure
1997-01-24 17:47:39 +00:00
Marc G. Fournier 1ac3ea9dcf This should clean everything up back to pre-configure status 1997-01-24 17:32:34 +00:00
Marc G. Fournier 03f0136990 Remove all the configure related stuff... 1997-01-24 17:09:11 +00:00
Marc G. Fournier 29d3deb3e8 Slight oops...Makefile.global generated by configure *wasn't* supposed
to be committed...
1997-01-24 16:18:50 +00:00
Marc G. Fournier a245ba7cb7 Okay, that does it for tonight...
Cleaned out alot of the #define that can be auto-detect'd by
configure from config.h...
1997-01-24 04:09:41 +00:00
Marc G. Fournier ca6da613cd Have configure auto-detect more of the libraries, and shorten out
the ports section of Makefile.global as a result.
1997-01-24 03:57:14 +00:00
Marc G. Fournier de2003c450 Add in the code required to auto-detect the OS and to set PORTNAME...
Right now, it only auto-detects FreeBSD, and the rest still get set
to UNDEFINED, but its a step in the right direction, no?
1997-01-24 03:19:48 +00:00
Marc G. Fournier 18d245cda4 Auto-sense lib{readline,history,curses,termcap}
Autoconf bin/psql/Makefile
1997-01-24 02:35:31 +00:00
Marc G. Fournier cb31156b86 Have Makefile autoconf'd according to whether the system has
readline and associated libraries...
1997-01-24 02:35:27 +00:00
Marc G. Fournier d22b65d73c Stray endif prevents compile 1997-01-24 01:23:23 +00:00
Marc G. Fournier e736ca3113 Slowly building up config.h so that it is pretty much generated by
configure, thereby reducing the ports dependencies in it :)
1997-01-24 00:42:22 +00:00
Marc G. Fournier ef239de03f Makefile.global.in currently should reflect what Makefile.global
in v6.0 does...
1997-01-23 23:48:08 +00:00
Marc G. Fournier 83267ffa4f Okay, GNUmakefile.in == GNUmakefile, except for the stuff that
configure is auto-finding
1997-01-23 23:36:41 +00:00
Marc G. Fournier 36f7766a18 Add config.h to configure 1997-01-23 23:31:39 +00:00
Marc G. Fournier 792913f415 Forgot, we don't use Makefile anymore.
Mv Makefile.in to GNUmakefile.in and reflect the change in the
configure script
1997-01-23 23:24:14 +00:00
Marc G. Fournier 2732075b78 Bring in Nat' preliminary work at autoconf'ng PostgreSQL...I imagine
it still needs lots of work, but, hey, at least this way there are more
ppl working off the same "Source"...
1997-01-23 22:50:14 +00:00
Marc G. Fournier fdaf47f9f4 The last patch fixes some incongruences in the #define used to compile the
Tcl arrays support. Here are the correct values to be defined in config.h
and pgtclCmds.c.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1997-01-23 19:47:18 +00:00
Marc G. Fournier 37a8bdba43 The second patch adds a more explicative error message to BufferPoolCheckLeak.
It should be completely harmless.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1997-01-23 19:43:23 +00:00
Marc G. Fournier 5184bd7cb3 Document and enable ACLGROUP_PATCH submitted by Massimo 1997-01-23 19:39:40 +00:00
Marc G. Fournier 1e5755cf73 Patch from Massimo Dal Zotto <dz@cs.unitn.it>
The first patch changes the behavior of aclcheck for groups. Currently an user
can access a table only if he has the required permission for ALL the groups
defined for that table. With my patch he can access a table if he has the
permission for ONE of the groups, which seems to me a more useful thing.
If you think this should be the correct behavior of the acl group check feel
free to remove the #ifdef, if not please add a commented line to config.h.
1997-01-23 19:33:31 +00:00
Bruce Momjian fa937b5e6b Remove SB_PAD. Compute padding at compile time. 1997-01-23 18:15:29 +00:00
Marc G. Fournier f0ff9ac0c2 Fix from Andrew for compiling libpgtcl...basically, switch off -Werror,
which probably isn't needed, since we are going to take off -Werror
anyway, right?
1997-01-23 16:04:25 +00:00
Marc G. Fournier e1e8301cdf Small fixes for SVR4 port by Frank Ridderbusch 1997-01-23 15:58:34 +00:00
Bruce Momjian 57148f657f Added EXAMPLES section. 1997-01-23 06:01:07 +00:00
Bruce Momjian 94515e3522 Removed unlinked patch that is not neede now that Vadim has properly fixed it. 1997-01-23 05:59:47 +00:00
Bryan Henderson 6e725b2986 Add "else true" to make it magically work on Ultrix. 1997-01-23 05:16:13 +00:00
Vadim B. Mikheev fb24bfa3ce INDEXSCAN_PATCH changes: should work for (Param OP VAR) too
(but I didn't test FUNC OP PARAM and PARAM OP FUNC - no time)
1997-01-22 06:30:57 +00:00
Vadim B. Mikheev 1aa1827d64 1. INDEXSCAN_PATCH changes: (op Param Var) should work too
2. IndexScanableOperand now uses match_indexkey_operand
instead of equal_indexkey_var (if we have some index on attribute X
then we shouldn't use it for 'where some_func(X) OP CONST').
1997-01-22 06:25:42 +00:00
Vadim B. Mikheev 8e90978146 Fixing bug in INDEXSCAN_PATCH:
ExecInitIndexScan now works with operands of Param type and
(!!!) postquel_execute() now substitutes param values
before calling postquel_start().
1997-01-22 05:26:50 +00:00
Marc G. Fournier 6850a96933 Another change from /usr/include/machine/limits.h to just limits.h 1997-01-22 04:56:34 +00:00
Marc G. Fournier c1392c57cf Another one that should be including limits.h vs machine/limits.h 1997-01-22 04:45:45 +00:00
Marc G. Fournier f504e5a253 Taking a chance here. Under both Solaris and FreeBSD, there is a
/usr/include/limits.h (which quiets the costsize.c warnings)...under
FreeBSD, /usr/include/limits.h *includes* machine/limits.h, while under
Solaris, there is no such things as /usr/include/machine...

Problem with Solaris pointed out by Mark Wahl
1997-01-22 04:41:45 +00:00
Marc G. Fournier 0aa4cfca5d the i386_solaris port requires inet_aton.o
Pointed out by Mark Wahl
1997-01-22 04:15:53 +00:00
Bruce Momjian 84876289cc Cast constants to the type of the other binary operand.
Invalidate vacuum relation cache to use new row counts from vacuum.
1997-01-22 01:44:02 +00:00
Bryan Henderson a4ee68d1d4 Add link options for libpq library search. 1997-01-21 05:16:38 +00:00
Bruce Momjian 0f90c7a009 Rename GNUMakefile to GNUmakefile so gmake finds it. 1997-01-21 01:27:18 +00:00
Marc G. Fournier b7d6e8ac92 Made the patch, but forgot to commit it... 1997-01-20 14:23:03 +00:00
Vadim B. Mikheev 9ff69034b2 Fixing possible losing data changes:
1. New flag - BM_JUST_DIRTIED - added for BufferDesc;
2. All data "dirtiers" (WriteBuffer and WriteNoReleaseBuffer)
   set this flag (and BM_DIRTY too);
3. All data "flushers" (FlushBuffer, BufferSync and BufferReplace)
   turn this flag off just before calling smgr[blind]write/smgrflush
   and check this flag after flushing buffer: if it turned ON then
   BM_DIRTY will stay ON.
1997-01-20 04:36:48 +00:00
Vadim B. Mikheev deef313fd0 New flag for BufferDesc - BM_JUST_DIRTIED, - to prevent
losing data changes.
1997-01-20 04:06:13 +00:00
Vadim B. Mikheev 9d1879388f 1. Setting rdesc->rd_tmpunlinked to FALSE in heap_creatr () just after
smgrcreate ().
2. Checking rdesc->rd_tmpunlinked in heap_destroy () & heap_destroyr ()
   before calling smgrunlink ().
1997-01-20 04:01:50 +00:00
Bryan Henderson 52052f3a19 Use gcc to make Linux ELF shared library, instead of ld. 1997-01-20 00:51:38 +00:00
Bryan Henderson c7375c799a Change "ld" program back to ld from gcc for Linux. Backend make files need ld.
Must find alternate solution to libpq shared library build problem.
1997-01-19 22:12:18 +00:00
Bruce Momjian 604f4a6928 Update handling of backslashes, and pg_user dump. 1997-01-19 10:15:59 +00:00
Bruce Momjian 6ffae202a9 Add missing #. 1997-01-18 17:36:02 +00:00
Bruce Momjian 5fefb9f8e7 Add include files needed for stat(). 1997-01-18 16:14:04 +00:00
Bryan Henderson 9010e0e686 Rename Makefile to GNUMakefile and add a "use GNU Make" Makefile so people
don't accidentally use non-GNU make.
1997-01-18 08:01:32 +00:00
Bryan Henderson fdcf8b62bc Set LD = gcc for Linux so shared libpq build works. 1997-01-18 07:56:52 +00:00
Bruce Momjian bc18c38d1a Prevent UNIQUE indexes for non-btree access methods. 1997-01-18 05:48:07 +00:00
Bruce Momjian 3827f4e7f0 Remove blank lines. 1997-01-18 03:26:08 +00:00
Bruce Momjian aa91f930a4 Removed unneeded custom shell script call. 1997-01-17 23:48:50 +00:00
Bruce Momjian 4defb8f393 Add pg_dump's option meanings to the manual page. 1997-01-17 18:36:32 +00:00
Marc G. Fournier 1760f08616 Unapply a patch that wasn't a patch... 1997-01-16 18:05:12 +00:00
Marc G. Fournier 64836996f9 Minor change to file point out by Andrew 1997-01-16 16:13:40 +00:00
Marc G. Fournier f8a41a0b91 This is one of those patches that obviously fixes something, just not
sure exactly what it is it fixes...
1997-01-16 16:11:09 +00:00
Bruce Momjian 3d97a61a60 Added pg_dumpall to source tree. 1997-01-16 15:28:34 +00:00
Bruce Momjian 3a02ccfa1d Change EXPLAIN options to just use VERBOSE. 1997-01-16 14:56:59 +00:00
Vadim B. Mikheev b00c2c1d3f FlushLocalBuffer () releases buffer only if required
by caller.
1997-01-16 08:13:14 +00:00
Vadim B. Mikheev eb08b3ce4f No more LateWrite, but there is WriteMode;
SetBufferWriteMode () added;
FlushBuffer () fixed: now directly calls smgrflush () and
	releases buffer only if required by caller.
1997-01-16 08:11:41 +00:00
Vadim B. Mikheev 1c297d429e No more LateWrite. 1997-01-16 08:04:30 +00:00
Vadim B. Mikheev cbc7af81f3 VariableRelationPutNextXid () now flushes variable relation
after writing next free XID.
1997-01-16 07:59:11 +00:00
Vadim B. Mikheev 5abfe1484a SetBufferWriteMode () added; FlushLocalBuffer () fixed (shouldn't
release buffer if called from WriteNoReleaseBuffer ())
1997-01-16 07:53:27 +00:00
Bryan Henderson 9e41af2e74 Add inet_aton() prototype. 1997-01-16 06:32:17 +00:00
Vadim B. Mikheev 3677e86f7f textin fixed: no more zero-byte (thanks, Erich) 1997-01-16 03:53:51 +00:00
Marc G. Fournier f02bd93350 Added postgres.h include to quiet down the HPUX ports...
POinted out by: Martin S. Utesch <utesch@aut.tu-freiberg.de>
1997-01-15 08:21:14 +00:00
Marc G. Fournier f413385f07 Comment out LD_ADD and DPADD 1997-01-15 05:58:47 +00:00
Bruce Momjian a514dded2a DEC Alpha fix. Missing #. 1997-01-14 23:06:01 +00:00
Bruce Momjian 68de42dff3 Change to handle bsdi 3.0. 1997-01-14 22:58:10 +00:00
Bruce Momjian 60e6d6fe0f Added lines and comments. 1997-01-14 16:10:54 +00:00
Bruce Momjian 755b1f6561 Re-add -lipc to bsdi port after erroneous removal. 1997-01-14 16:06:03 +00:00
Bryan Henderson 182052767a Put back -lm for non-nextstep ports. 1997-01-14 08:19:41 +00:00
Bryan Henderson 05b0f22900 Eliminate dupliclate definition of external variables reldesc and DataDir.
Some compilers recognize this error.
1997-01-14 08:05:36 +00:00
Marc G. Fournier 025f281dca I'm going t take a chance that this was a mis-spelling, since
all the other port related dependencies are ifeq, not ifneq..

If I'm wrong, someone tell me or change it back...
1997-01-14 06:41:51 +00:00
Vadim B. Mikheev 2ca05fe45d ReleaseTmpRelBuffers is ReleaseRelationBuffers now. 1997-01-14 05:40:45 +00:00
Vadim B. Mikheev 791e9973ab heap_destroy () releases dirty buffers of a relation to be
destroyed.
1997-01-14 05:38:23 +00:00
Vadim B. Mikheev cbac986736 There is no more ReleaseTmpRelBuffers, but ReleaseRelationBuffers. 1997-01-14 05:36:15 +00:00
Bruce Momjian f56b4f1d59 Cleanup for DEBUG: removal in initdb.sh. 1997-01-14 03:07:15 +00:00
Bruce Momjian 6fafb4d370 Prevent initdb from showing vacuum statistics. 1997-01-14 03:02:06 +00:00
Bruce Momjian 3a646df4c0 Remove CFLAGS_SL from lib/Makefile 1997-01-14 02:35:34 +00:00
Bruce Momjian 42efa28cf7 There are two prototypes for inet_aton, one in include/inet_aton.h, and
another one in Solaris' port-protos.h.

The following patch will bring inet_aton's prototype into scope for
Ultrix to silence a compilation warning.

If the intention is to have inet_aton's prototype in its own header
filer, the declaration in Solaris' port-protos.h should be removed.
If the declaration in port-protos.h is deemed to be the correct
place, a declaration should be added in Ultrix' port-protos.h

regards
Erik Bertelsen
1997-01-14 01:56:44 +00:00
Bruce Momjian e3c4ac15d3 Another compilation error has surfaced on Ultrix. In spin.c, sem.h must be
included after storage/ipc.h like other similar cases that were changed
recently.

This one has popped up during the last few days.

My sources are sup'ed today, 13. jan 1996.

regards
Erik Bertelsen.
1997-01-14 01:53:11 +00:00
Bruce Momjian abeaabef2e Restored original pg_type/pg_attribute defaults. Regression fixes. 1997-01-14 01:42:38 +00:00
Marc G. Fournier 40f4a330b7 Andrew's Makefile.custom generation program...hopefully should
reduce *some* confusion, eh? :)

From: Andrew Martin <martin@biochemistry.ucl.ac.uk>
1997-01-13 18:54:30 +00:00
Bruce Momjian 949cfe5271 Update create_index manual page to have unique section. 1997-01-13 17:22:25 +00:00
Bruce Momjian 2d04411bea Re-add -lm link flag 1997-01-13 17:07:45 +00:00
Bruce Momjian a53f72e38b Change -lIPC to -lipc. 1997-01-13 17:04:04 +00:00
Bruce Momjian ed3db60321 Fix typo in findstring use. 1997-01-13 16:47:52 +00:00
Bryan Henderson 6ece8a8d0b Part of patch to make a working nextstep port. 1997-01-13 03:54:48 +00:00
Bruce Momjian 0d3bf78e0b Added VERBOSE option to vacuum command. 1997-01-13 03:45:33 +00:00
Bruce Momjian febfe447a7 Oops, introduced a bug in EOF handling. Fix it. 1997-01-13 02:35:32 +00:00
Bruce Momjian cac3463649 No EOF from psql when quiet mode. 1997-01-13 02:03:31 +00:00
Bryan Henderson 2de3d96f69 Add nextstep port, courtesy of Ovidiu Predescu. 1997-01-13 01:26:29 +00:00
Marc G. Fournier ef228cb170 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
OK, The votes are in for the NOFILES limit.

With the exception of Next, for which I've not yet heard, all supported platforms
seem to have the sysconf() call.


port           supported	default	Source.
aix            yes		2000	darrenk@insightdist.com
alpha          yes		4096	mjl@wwx.vip.at
BSD44_derived  yes		64	scrappy@hub.org
bsdi           yes		???	maillist@candle.pha.pa.us
dgux           yes		???	geek@andrew.cmu.edu
hpux           yes		60	emkxp01@mtcc.demon.co.uk
i386_solaris   yes		64	emkxp01@mtcc.demon.co.uk
irix5          yes		200	martin@biochem.uc.ac.uk
linux          yes		256	emkxp01@mtcc.demon.co.uk
next           ????		???
sparc_solaris  yes		64	emkxp01@mtcc.demon.co.uk
sunos4         yes		64	emkxp01@mtcc.demon.co.uk
svr4           yes		64	chicks@chicks.net
ultrix4        yes		64	erik@sockdev.uni-c.dk

So here's a patch that I think will do the job.
(I assume Next will have sysconf() but if not just add MISSING_SYSCONF to
 the config.h file )

Thanks,
Keith.
1997-01-13 01:25:29 +00:00
Bruce Momjian 2595785b9b Shared library cleanup for -fpic. 1997-01-12 04:25:23 +00:00
Marc G. Fournier e2e6b2d730 Fixes:
I forgot to clear out the variable created and the memory used.

From: darcy@druid.net (D'Arcy J.M. Cain)
1997-01-11 14:28:51 +00:00
Marc G. Fournier 8738e47d03 From: darcy@druid.net (D'Arcy J.M. Cain)
Fix for libpgtcl:

I forgot to clear out the variable created and the memory used.
1997-01-11 14:24:40 +00:00
Bruce Momjian ce02ccf43d I've noticed that \i filename in 6.0beta prints the input file double-spaced.
Here is a trivial patch to get back the 1.09 behavior; it just removes trailing
newlines before printing the line out with a newline rather than after...


Thomas Lockhart
1997-01-10 20:52:32 +00:00
Bruce Momjian 0567d7edb0 Remove octal character constants and convert to decimal constants 1997-01-10 20:44:41 +00:00
Bruce Momjian a5dd06f763 include sem.h added, include string.h neede, from Erik Bertelsen for Ultrix 1997-01-10 20:19:49 +00:00
Bruce Momjian ccaf3854d7 Irix fixes from Martin 1997-01-10 19:30:27 +00:00
Bruce Momjian 63b22d8aa9 cleanup for LINUX_ELF 1997-01-10 18:55:24 +00:00
Bruce Momjian 37c168f6ba timeb.h only used when not using POSIX_TIME 1997-01-10 18:22:41 +00:00
Bruce Momjian 59dcac1e5d Makefile's -fpic only for gcc 1997-01-10 18:19:02 +00:00
Bruce Momjian a0d9bdd99b Massimo fix for non-existant file copy error. 1997-01-10 17:46:33 +00:00
Bruce Momjian 90ff767d14 I found the following bugs in the version 6.0 (dated 961229).
At least the first two should be fixed before the final release of 6.0.

1)      There is a mismatch between the type declared in the catalog for
        the input/output attributes of pg_type and the actual type of
        values stored in the table.  The type of typinput, typoutput,
        typsend and typreceive are declared oid (26) while the values are
        regproc (24).  The error was there also in previous versions but
        nobody noticed it until an Assert has been added in ExecEvalVar.
        The effect is that it is now impossible to replace the typoutput
        of existing data types with new procs.

2)      The identd hba fails after the first time because the data read
        from the identd socket is not zero-terminated and strlen reports
        an incorrect length if the stack contains garbage, which usually
        happens after the first connection has been made.

3)      The new initdb wants to create itself the data directory. This
        implies that the parent directory must be writable by postgres and
        this may not always be desirable.  A better solution would be to
        allow the directory to be created by root and then filled by initdb.
        It would also nice to have some reasonable default for PGLIB and
        PGDATA like the previous version did.  This applies also to the
        postmaster executable.
1997-01-10 17:40:07 +00:00
Vadim B. Mikheev daec84f09d Fixed (I hope) unique btree index implementation. 1997-01-10 10:06:20 +00:00
Vadim B. Mikheev c6a605705c index_insert has now HeapRelation as last param (for unique index
implementation).
1997-01-10 10:00:39 +00:00
Vadim B. Mikheev f48936e8ef index_insert has now HeapRelation as last param (for unique index
implementation).
1997-01-10 09:51:40 +00:00
Vadim B. Mikheev 675457d6ab index_insert has now HeapRelation as last param (for
unique index implementation).
1997-01-10 09:46:33 +00:00
Vadim B. Mikheev c7990b35f7 index_insert has now HeapRelation as last param (for
unique index implementation).
1997-01-10 09:36:34 +00:00
Vadim B. Mikheev 41857f3ca2 Additional fixes for shared library (BSD44_Derived port). 1997-01-10 04:01:09 +00:00
Vadim B. Mikheev f91b26a5da #include <postgres.h> moved upper 1997-01-09 03:38:14 +00:00
Marc G. Fournier 389e336ca9 From: wieck@sapserv.debis.de
Hi,

    counting the empty dummy queries in libpq isn't everything.
    If the backend sends an error, the I returns from the dummies
    still come. So we must eat them up in any case, not just
    returning on the occurence of an E reply.

Until later, Jan
1997-01-08 23:25:32 +00:00
Bruce Momjian 16293d05e0 Removed equals sign from examples. 1997-01-08 22:37:23 +00:00
Vadim B. Mikheev ce5009f99b #include "postgres.h"
moved upper.
1997-01-08 10:33:46 +00:00
Bryan Henderson 3c4b21493d Use proper types so it compiles on DEC C89. Thanks Erik Bertelson. 1997-01-08 08:39:10 +00:00
Bryan Henderson 5e98c40129 Change the way ipc.h is included because sys/ipc.h on Ultrix is broken. 1997-01-08 08:33:07 +00:00
Bryan Henderson e5ff0b930a Add include of port-protos.h so it works on Ultrix. Thanks Erik Bertelson. 1997-01-08 08:31:07 +00:00
Bryan Henderson 76981276b0 Fix syntax error 1997-01-08 08:30:21 +00:00
Marc G. Fournier 5aea6a0bca minor path problem fix by tgl@mythos.jpl.nasa.gov 1997-01-08 07:32:58 +00:00
Marc G. Fournier d02015d1cc Typo: Change Postgres95 to PostgreSQL
By: tgl@mythos.jpl.nasa.gov
1997-01-08 07:32:15 +00:00
Marc G. Fournier 73b6ffbf76 Improvements to pg_dump to:
- dump Views

Submitted by: Keith Parks <emkxp01@mtcc.demon.co.uk>
1997-01-07 00:04:19 +00:00
Bryan Henderson 14800311d2 Fix mismatching prototype (const int vs int) 1997-01-06 10:11:11 +00:00
Bryan Henderson 2091345297 Add Irix stuff. 1997-01-06 10:10:43 +00:00
Marc G. Fournier 046873ac90 REmove pg4_dump...its old stuff that is sooo out of date as to be useless... 1997-01-06 03:25:40 +00:00
Marc G. Fournier 5b104c30e9 NeXT port specific changes by: Ovidiu Predescu <ovidiu@bx.logicnet.ro> 1997-01-06 00:24:24 +00:00
Marc G. Fournier a9bfcf459e PORT NeXT requires an isascii() define...put it in config.h, most likely
*should* have gone into the ports directory, but hopefully *someday* we'll
be able to get rid of that?
1997-01-06 00:22:55 +00:00
Marc G. Fournier 151d484ca5 Minor changes for NeXT compile
Submitted by: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
1997-01-06 00:20:13 +00:00
Marc G. Fournier 3d53b87369 More config.h syncing for limits.h 1997-01-06 00:15:26 +00:00
Marc G. Fournier 8ec5bd06b7 Add NeXT port submitted by: Ovidiu Predescu <ovidiu@bx.logicnet.ro> 1997-01-06 00:12:34 +00:00
Marc G. Fournier 1321fe1a81 Clean up 'if defined()' for header files... 1997-01-06 00:08:31 +00:00
Marc G. Fournier 5f5958cb98 add define for USE_LIMIT_H into NeXT port...
Pointed out by: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
1997-01-06 00:08:07 +00:00
Marc G. Fournier 8251ce7d10 final fix for shared library under BSD44_derived
Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-01-05 23:53:57 +00:00
Marc G. Fournier 0865f587ea Shared library fixes for BSD44_Derived port
Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>

NOTE: The following patch I was uncertain of, but applied it...will end up
	testing the compile on my machine later tonight anyway, but if anyone
	knows why this *shouldn't* have been done, please change it. (CC -> LD)

***************
*** 61,68 ****
  ../backend/lib/dllist.o:
        $(MAKE) -C ../backend/lib dllist.o

! libpq.so.1: $(OBJS)
!       $(CC) $(LDFLAGS) -shared $(OBJS) -o libpq.so.1

  c.h: ../include/c.h
        rm -f c.h
--- 66,73 ----
  ../backend/lib/dllist.o:
        $(MAKE) -C ../backend/lib dllist.o

! $(shlib): $(OBJS)
!       $(LD) $(LDFLAGS) -shared $(OBJS) -o $(shlib)

  c.h: ../include/c.h
        rm -f c.h
1997-01-05 23:52:21 +00:00
Marc G. Fournier ea7a26c84b Fixes:
This corrects the newline handling when using the readline library.

Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-01-05 23:46:17 +00:00
Marc G. Fournier 3bfbe9a7fd Fixes:
First, this is because of dlopen() and dlsym() having a char *
in the system prototype.

Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-01-05 23:43:58 +00:00
Marc G. Fournier d57d3626cb Just reviewed what I changed as far a dlopen/etc are concerned, and determined
that the "fix" is wrong...
1997-01-05 23:41:43 +00:00
Bryan Henderson 7bfb924aea Silence compiler warnings, fix error in complex compare function. 1997-01-05 21:20:34 +00:00
Bryan Henderson 227015b08e Standardize all LDADD to LD_ADD. 1997-01-05 21:17:45 +00:00
Vadim B. Mikheev 068a4c53af Closing opened indices. 1997-01-05 10:58:15 +00:00
Vadim B. Mikheev 8fa5394c49 Releasing empty root page in _bt_endpoint () to avoid
buffer leak.
1997-01-05 10:56:36 +00:00
Marc G. Fournier b5164666a3 someone added pg_listen and pg_notifies to libpgtcl. But first
these routines try to use the old pointer casting stuff to get
    the connection id, second the notification hash table should
    be part of the cliendData. Otherwise, one interpreter might
    eat up the notifies for another one.

    Please apply the patch below to the current 6.0 tree.

Submitted by: wieck@sapserv.debis.de
1997-01-03 18:48:31 +00:00
Bruce Momjian 461d22206f documentation updating to 6.0 release 1997-01-03 06:08:21 +00:00
Marc G. Fournier 4f8db3eb4c FreeBSD doesn't require the dl{open,close,sym,error} functions, as they are
already included in the system libraries.

Used if !defined(__FreeBSD__) to single FreeBSD out from the other BSD44
derived OSs
1997-01-03 04:59:01 +00:00
Bruce Momjian 24632b0ee0 fix for previous fix 1997-01-02 07:07:32 +00:00
Bruce Momjian 6e2341a48e psql paren. with \r fix. 1997-01-02 06:45:25 +00:00
Bruce Momjian 1a395b7256 ALTER TABLE (text) fix 1997-01-02 06:18:25 +00:00
Bruce Momjian 6da0055274 Fix for SELECT INTO ... GROUP/ORDER BY where table already exists unlink error. 1997-01-01 06:01:16 +00:00
Bryan Henderson 8fb0ac8898 Make error messages more explicit, PQtrace() output more readable. 1996-12-31 07:29:17 +00:00
Bryan Henderson e2da92f1c3 Rename Makefile to GNUmakefile to catch people using other makes. 1996-12-31 07:26:27 +00:00
Vadim B. Mikheev 7266928e77 Fixed realloc for increasing tempRels list. 1996-12-31 06:58:27 +00:00
Vadim B. Mikheev ae753b86b5 ReleaseTmpRelBuffers () releases buffers in LOCAL buffer pool now
(if rd_islocal is true).
1996-12-31 06:47:30 +00:00
Bryan Henderson 9b94bcea21 Put $(CURSES_LIB) in Makefile.global to replace similar thing in psql/Makefile. 1996-12-30 23:19:48 +00:00
Bryan Henderson 7ab0ceb824 Check that PQendcopy succeeded. Issue error message if not. 1996-12-30 23:05:16 +00:00
Bruce Momjian 765dd2a4c0 explain change 1996-12-29 19:31:16 +00:00
Bruce Momjian bf6fdeebb5 typo fix 1996-12-29 03:55:36 +00:00
Bruce Momjian b0030c6c42 New EXPLAIN manual page. 1996-12-29 00:58:32 +00:00
Bruce Momjian 2d291ab093 Changed EXPLAIN option names. 1996-12-29 00:53:59 +00:00
Bruce Momjian 4415e481ef Improved EXPLAIN option handling. 1996-12-29 00:53:20 +00:00
Bruce Momjian e981bcb0c3 Fix expected regression output. 1996-12-28 23:07:54 +00:00
Bruce Momjian 8cc2eb66ec Fixed errors in create statement. 1996-12-28 22:46:40 +00:00
Bruce Momjian bbc0d47773 Fixed error where = should be ==. 1996-12-28 22:44:58 +00:00
Bruce Momjian fd12c8f85e Fixed Assert check where ! should be !=. 1996-12-28 22:44:14 +00:00
Bruce Momjian 221d7296aa Here is a bug fix and some spelling changes for the complex number tutorial
code. I have also written a complete complex number package based on this
tutorial; I will submit this as a contribution soon. Is there a particular
format for contributed tar files? I have a C source file, two SQL files, and a
Makefile.

Thomas Lockhart
1996-12-28 02:22:12 +00:00
Bruce Momjian cb6cb7745d Here's the final set of patches to 6.0 (sup'd on 27/12/96) that allow a full
gmake of the code without interruption.

There's also some tidy-up of the MAXPATHLEN stuff based on the assumption that
all supported platforms have MAXPATHLEN defined in <sys/param.h>.

(The only unknowns for the above are AIX and IRIX5.)
1996-12-28 02:13:05 +00:00
Bruce Momjian d4dbfdb4c0 Patch for copy from stdin. 1996-12-28 01:57:13 +00:00
Bryan Henderson 15526ff0ac Add messages to assist in problem diagnosis. Eliminate lines > 80 characters. 1996-12-27 23:12:57 +00:00
Bryan Henderson 634b38aa86 Add asserts to check for file descriptor ring corruption. 1996-12-27 22:57:51 +00:00
Vadim B. Mikheev 4a5135c34e There was JMP_BUF defined in config.h. And SIGJMP_BUF later.
And now - JMP_BUF again. Is it enough, folks ?

Fixed again:
cc1: warnings being treated as errors
exc.c: In function 'ExcRaise':
exc.c:187: warning: passing arg 1 of 'Longjmp' from incompatible pointer type
gmake[3]: *** [exc.o] Error 1
1996-12-27 13:13:58 +00:00
Bryan Henderson 645b587788 Remove use of "bool", which user program may not have defined. This .h file
gets included by libpq-fe.h, and thus is part of the API.
1996-12-26 23:28:27 +00:00
Bryan Henderson af30fe7852 Remove use of "bool", which user program may not have defined. 1996-12-26 23:27:16 +00:00
Bruce Momjian e8f43854ac pq/signal() portability patch. Also psql copy prompt fix. 1996-12-26 22:08:34 +00:00
Bryan Henderson 7f00f11c01 Fix syntax of \copy in \? display. 1996-12-26 20:56:40 +00:00
Bruce Momjian 9643e8ba37 Added needed prototype.
Bruce Momjian
1996-12-26 17:53:40 +00:00
Bruce Momjian 0cb22cb7ef Removal of unused CppConcat defines.
Bruce Momjian
1996-12-26 17:53:24 +00:00
Bruce Momjian b1765f4637 Note the => changes to == after a connect and stays that way on subsequent
database changes.

To fix, apply the following patch:-

Keith Parks.
1996-12-26 17:52:46 +00:00
Bruce Momjian 89b2807170 Added include files needed for getpid prototype.
Bruce Momjian
1996-12-26 17:50:26 +00:00
Bruce Momjian d419e11cb6 Change %ud to %u
Darren King.
1996-12-26 17:49:56 +00:00
Bruce Momjian 0681513693 In file: .../src/backend/postmaster/postmaster.c I found 3 leaks and
probably a bug.
To find code added/modifyied, search "Fixed".

Gianluca Puggelli
1996-12-26 17:49:05 +00:00
Bruce Momjian 28a08fd4ac I have this annoying habit (among others) of putting
%ud in a printf format strings instead of just %u.

There were three occurances of this in catalog_utils.c,
two in parser.c and one in rewriteSupport.c in the oid
patch that I submitted and was applied.  They won't crash
anything, but the error messages will have a 'd' after the
Oid.  Annoying, but none are db-threatening.

Sorry about that folks...I'll be more careful in the future...

Darren King
1996-12-26 17:47:42 +00:00
Bruce Momjian c5aaba2c34 In src/backend/catalog/pg_operator.c in OperatorDef, there
are three SearchSysCacheTuple(PRONAME,...) calls that use three
different macros to convert the typeId array of Oids.

Darren King
1996-12-26 17:46:07 +00:00
Bruce Momjian df0eee9963 Removal of CppConcat from indexam.c.
As an example I sent a bug-report on 26 Nov to tell that the fix included
below is necessary to compile pg95-current on Ultrix with Digital's
standard C compiler c89. In fact I think that this fix is needed
for any C compiler sticking very close the standard, see my discussion
in the original bug report.

Erik Bertelsen
1996-12-26 17:44:46 +00:00
Bruce Momjian 0fde972e25 Added mention of CUSTOM_COPT to file. 1996-12-26 17:39:58 +00:00
Bryan Henderson 9b55904647 Clarify error message about trying to PQgetvalue() nonexistent row. 1996-12-24 09:03:16 +00:00
Bryan Henderson ab90c18d12 Fix Solaris stuff so it compiles. Thanks Keith Parks. 1996-12-23 10:16:54 +00:00
Bryan Henderson d9e10180ee Add some quotes so it works on more shells. 1996-12-23 08:50:27 +00:00
Bryan Henderson d6c06feb18 Add cast to quiet compiler warning. 1996-12-23 08:39:27 +00:00
Bruce Momjian 4540a8bd5c Fix multiple "C" from backend. 1996-12-20 20:34:38 +00:00
Bruce Momjian a952d67296 Remove NOTIFY_PATCH. 1996-12-20 20:33:46 +00:00
Bruce Momjian 4371756f16 Improve handling of semicolons ending statements. 1996-12-20 20:33:12 +00:00
Bruce Momjian 231e1e70d8 Rename parameter. 1996-12-20 20:31:31 +00:00
Bryan Henderson 64e45b0ebc Make sure user is running GNU make. 1996-12-19 08:03:46 +00:00
Marc G. Fournier 56e8243d22 Add two new comments to pglibtcl...
From: Massimo Dal Zotto <dz@cs.unitn.it>
1996-12-19 05:02:51 +00:00
Marc G. Fournier 194ed4efe5 More patches/documentation from: Massimo Dal Zotto <dz@cs.unitn.it> 1996-12-19 05:01:17 +00:00
Marc G. Fournier 07c8d9f0f3 COPY_PATCH...
Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-12-19 04:58:24 +00:00
Marc G. Fournier dc97a7b90e Add various comments to explain #define's and add a few extra #define's
Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-12-19 04:56:35 +00:00
Marc G. Fournier f0bcb1762d #ifdef ASYNC_DEBUG various sections of async.c
Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-12-19 04:54:56 +00:00
Bruce Momjian db7a90f1d9 Make GROUP BY work with aliases, ORDER BY with column numbers 1996-12-17 01:53:43 +00:00
Bryan Henderson ec105b6026 Put sys/types.h before sys/timeb.h so Ultrix compiles. 1996-12-16 03:34:52 +00:00
Bryan Henderson fa9c0fff36 Remove __P macro usage so it compiles without cdefs.h. 1996-12-15 09:21:37 +00:00
Bryan Henderson 9fc7250d3a Make compile on AIX, Alpha OSF. Thanks Darren King, Igor Notanzon. 1996-12-15 09:05:53 +00:00
Vadim B. Mikheev 290d3b5198 Fix over fix: JMP_BUF gone away and we have SIGJMP_BUF now.
Excuse me.
1996-12-14 08:26:34 +00:00
Vadim B. Mikheev cbb131570e if (settings->opt.fieldSep);
^ - deleted
                free(settings->opt.fieldSep);
1996-12-14 08:20:18 +00:00
Vadim B. Mikheev 4556a50cf8 Avoiding:
cc1: warnings being treated as errors
datum.c: In function `DatumGetSize':
datum.c:57: warning: unsigned value >= 0 is always 1
gmake[3]: *** [datum.o] Error 1

There was:
    if (byVal) {
        if (len >= 0 && len <= sizeof(Datum)) {

but len has type Size (unsigned int) and so now there is:
    if (byVal) {
        if (len <= sizeof(Datum)) {
1996-12-14 07:56:05 +00:00
Vadim B. Mikheev 14ad435294 const register ... --> register const ... 1996-12-14 06:08:14 +00:00
Vadim B. Mikheev 25eb9e2a66 Avoiding
cc1: warnings being treated as errors
exc.c: In function 'ExcRaise':
exc.c:186: warning: passing arg 1 of 'Longjmp' from incompatible pointer type
gmake[3]: *** [exc.o] Error 1

Now we have:
#if defined (JMP_BUF)
        longjmp(efp->context, 1);
#else
        siglongjmp(efp->context, 1);
#endif
1996-12-14 05:55:27 +00:00
Vadim B. Mikheev 02ba3cf871 Avoiding
cc1: warnings being treated as errors
transsup.c: In function `TransBlockGetLastTransactionIdStatus':
transsup.c:122: warning: unsigned value >= 0 is always 1
gmake[3]: *** [transsup.o] Error 1
...
1996-12-14 05:20:39 +00:00
Vadim B. Mikheev b555822fed Unuseful tupDesc = CreateTupleDesc(attr_count, attr); in CopyFrom
is eliminated (now I can copy 2000000-table from file without memmory
exhausting).
1996-12-14 04:58:20 +00:00
Bryan Henderson 255363f859 Clean up. Get rid of tabs and overly long lines. 1996-12-13 09:25:08 +00:00
Bruce Momjian ea8b5196ff Small regression and doc patch 1996-12-13 02:39:00 +00:00
Bruce Momjian 1b929d1749 Postgres95 to PostgreSQL. 1996-12-11 22:58:16 +00:00
Bruce Momjian 7af262d2a7 Require seimcolons between statements. 1996-12-11 22:55:53 +00:00
Bryan Henderson 7439ba64b1 Use "Oid" type where applicable and %ud instead of %d. Thanks Darren King. 1996-12-11 03:18:12 +00:00
Bruce Momjian 9b41da6ce4 Rename postgres95 to PostgreSQL. Add comment for SELECT NULL 1996-12-11 00:28:15 +00:00
Bryan Henderson 7f36a2a718 Fix bug: libpq clients (which include libpq-fe.h) won't compile. 1996-12-10 07:05:12 +00:00
Bryan Henderson 2697c27923 sigjmp_buf/jmp_buf is backwards, so backend doesn't compile. 1996-12-10 07:04:22 +00:00
Bryan Henderson 7492fb165f Fix bug: libpq clients (which include libpq-fe.h) won't compile.
Plus: sigjmp_buf/jmp_buf is backwards, so backend doesn't compile.
1996-12-10 07:03:43 +00:00
Bryan Henderson 41b3674754 Add empty "dep:" target. 1996-12-10 03:40:23 +00:00
Marc G. Fournier 0861594cb3 No change...just a test to make sure I didn't screw anything up 1996-12-10 03:03:36 +00:00
Bryan Henderson 9e60c1711d Monitor has been obsoleted by psql. 1996-12-09 01:55:51 +00:00
Bryan Henderson 33edbdb59b Remove include of libpq-fe.h. This file has nothing to do with libpq. 1996-12-09 01:24:53 +00:00
Bryan Henderson 79729c0e5e Add comments defining "typelem" column of pg_type. 1996-12-09 01:23:51 +00:00
Bryan Henderson b36e3042e7 Add comments describing interface to heap_getattr(). 1996-12-09 01:22:17 +00:00
Bryan Henderson 6cfb12e0cf Add CUSTOM_CC variable for Makefile.custom. Thanks Kurt Lidl. 1996-12-09 01:16:51 +00:00
Bruce Momjian 8cedf57eb1 Reduce printing from debug level 2 ande layout change. 1996-12-07 04:39:38 +00:00
Bruce Momjian 2e20099e32 Reduce printing from deub level 2 ande layout change. 1996-12-07 04:38:40 +00:00
Bruce Momjian c0941ab7f0 Remove Dan's fix of SELECT NULL to fix INSERT NULL. 1996-12-07 04:38:11 +00:00
Bruce Momjian 7f8b8b9e42 Fix for SELECT NULL. 1996-12-07 04:37:06 +00:00
Bruce Momjian c90c058bf0 Fix from Jan agreed with by Massimo. 1996-12-07 04:36:38 +00:00
Vadim B. Mikheev 4e064c0560 _bt_updateitem is returned in code, but works only if sizes of keys
are equal.
1996-12-06 09:45:30 +00:00
Vadim B. Mikheev c3e10a4caf 1. _bt_compare fixed to work properly with new code in _bt_insertonpg
(old _bt_compare always returned >= 0 while comparing with P_HIKEY
   on root page - it breaks root page when _bt_insertonpg tries insert
   new minimal key into root page).
2. Fixed bug concerns "empty" pages: non-rightmost pages with only P_HIKEY
   present on it. Such pages appear after vacuum.
1996-12-06 09:41:45 +00:00
Bruce Momjian 64397b758f Remove duplicate patch for COUNT fix. 1996-12-04 14:23:16 +00:00
Bryan Henderson 9005a38bdb Change portname "sparc" to "sunos4" and change some portname dependencies to
feature dependencies.  Thanks Kurt J. Lidl.
1996-12-04 03:06:33 +00:00
Bruce Momjian 071797f539 Change tests to lowercase for esthetics. 1996-12-03 17:01:35 +00:00
Vadim B. Mikheev e5fbe3017c pname=NULL -> pname="" (stringinfo.c:appendStringInfo doesn't like NULL). 1996-12-03 05:50:11 +00:00
Bruce Momjian f2af019645 Make COUNT,SUM case insensitive. 1996-12-03 05:06:35 +00:00
Bryan Henderson 514d69bdbf Remove #if defined(bsdi) define SIGJMP_BUF, per Kurt Lidl. 1996-12-03 00:11:07 +00:00
Bruce Momjian 58193362bd Reduce regression diffs 1996-12-02 14:17:59 +00:00
Bruce Momjian 5f9bdb7641 Reduce regression diff size with timezone changes and cleanup. 1996-12-02 06:31:20 +00:00
Bruce Momjian 7980b8a5cc Fix for inclusion of new prompt output. 1996-12-01 20:28:39 +00:00
Bruce Momjian 1eae8e1228 Fix compiler warning about unitialized variables. 1996-12-01 19:48:39 +00:00
Bruce Momjian 63df35e249 This patch changes quite a few instances of references of Oid's
as ints and longs.  Touches on quite a few function args as
well.  Most other files look ok as far as Oids go...still checking
though...

Since Oids are type'd as unsigned ints, they should prolly be used
with the %ud format string in elog and sprintf messages.  Not sure
what kind of strangeness that could produce.

Darren King
1996-11-30 18:07:02 +00:00
Bruce Momjian f0a9e64afd As someone asked for this feature - patch for 1.09 follows.
Now You can do queries like

select sum(some_func(x)) from ...
select min(table1.x + table2.y) from table1, table2 where ...

and so on.

Vadim
1996-11-30 17:49:02 +00:00
Bruce Momjian 87352726b2 Change end-of-line comma to semicolon. 1996-11-30 17:47:07 +00:00
Bruce Momjian d3e0860d25 Aded mention that != maps to <>. 1996-11-30 04:56:18 +00:00
Bruce Momjian 440279e803 Add indicator for in quote or in query to prompt. 1996-11-30 03:41:20 +00:00
Bruce Momjian 2d7aacb052 Added BETWEEN and IN to grammar. Map != to <>. 1996-11-30 03:38:09 +00:00
Bruce Momjian a3d773a693 Allow select oid,* from table. Allow * anywhere in target list. 1996-11-29 15:56:18 +00:00
Vadim B. Mikheev a962c6128f vrl_min_tlen added to VRelListData. 1996-11-29 10:29:45 +00:00
Vadim B. Mikheev 03659a262e Added: dynamic re-moving page from list of pages usable for shrinking
if its free-space < min_tuple_len.
1996-11-29 10:27:59 +00:00
Bryan Henderson 7b4426eaea Throw some double quotes on the pile! 1996-11-29 06:24:14 +00:00
Bruce Momjian 316e81cf22 Fix for BSDI compile. 1996-11-29 04:49:46 +00:00
Bruce Momjian ba876c150a Changed saved_relname size to save memory. 1996-11-28 05:46:08 +00:00
Vadim B. Mikheev c7cba5780f Fix for "might be used uninitialized" warnings. 1996-11-28 04:37:38 +00:00
Bryan Henderson f0e7004d29 Make strdup work for Ultrix. Thanks Erik Bertelsen 1996-11-28 03:32:18 +00:00
Vadim B. Mikheev 0667fd9491 TransactionIdIsInProgress is commented out 1996-11-27 15:15:54 +00:00
Bruce Momjian 6450bef6ec Convert ' to " in dates. Update example code to show empty query as "". 1996-11-27 13:49:46 +00:00
Bruce Momjian c9ec45062a Remove unused define's. 1996-11-27 13:48:58 +00:00
Bruce Momjian 134c35c761 no change 1996-11-27 13:48:23 +00:00
Bruce Momjian 79b1a0ff35 Allow all empty queries to return EMPTY. 1996-11-27 13:47:05 +00:00
Bryan Henderson 9c0afeabb7 More stuff to make it compile on various ports. 1996-11-27 08:16:44 +00:00
Vadim B. Mikheev a38365e0eb New structures for new vacuum. 1996-11-27 07:35:06 +00:00
Vadim B. Mikheev 948720ee94 New mdtruncate() & smgrtruncate() funcs. 1996-11-27 07:33:42 +00:00
Vadim B. Mikheev b41aa3903c TransactionIdIsInProgress moved to shmem.c 1996-11-27 07:32:10 +00:00
Vadim B. Mikheev f0c5a6c614 Shrinking and other things. 1996-11-27 07:27:20 +00:00
Vadim B. Mikheev 3385497228 New smgrtruncate smgr' interface func. 1996-11-27 07:25:52 +00:00
Vadim B. Mikheev a2a33e1344 New mdtruncate() func for single segment relations (< 2Gb). 1996-11-27 07:24:02 +00:00
Vadim B. Mikheev 3643248ae2 TransactionIdIsInProgress is here now and gives quality answer
by scanning PROC structures of all running backend.
1996-11-27 07:20:07 +00:00
Vadim B. Mikheev 47312ec134 Setting MyProc->xid to InvalidTransactionId while creating
PROC structure (it's for new TransactionIdIsInProgress func).
1996-11-27 07:17:48 +00:00
Vadim B. Mikheev 713b65e19c Setting MyProc->xid to current transaction' id in StartTransaction
and to InvalidTransactionId in CommitTransaction & AbortTransaction
(it's for new TransactionIdIsInProgress func).
1996-11-27 07:14:51 +00:00
Vadim B. Mikheev 1db76d708c TransactionIdIsInProgress moved to shmem.c 1996-11-27 07:10:59 +00:00
Bryan Henderson 89c7e18b3f Forgot in yesterday's Ultrix compile work. 1996-11-27 01:46:52 +00:00
Bryan Henderson 8cfe27dff0 OK, I think I've got the postconfig thing right now. 1996-11-26 08:12:39 +00:00
Bryan Henderson 93f722536f Whoops, redo Ultrix patch so the other ports still compile. 1996-11-26 07:39:11 +00:00
Bryan Henderson c118543186 Fix double-colon syntax error on fe-lobj.o. 1996-11-26 06:33:18 +00:00
Bryan Henderson 46d58fba33 Make it compile on Ultrix. Thanks Erik Bertelson. 1996-11-26 03:20:35 +00:00
Bryan Henderson 02c0eb6549 Properly structure ProcedureNameIndexScan so it doesn't generate
"may be used before being set" warnings.
1996-11-26 02:45:05 +00:00
Bryan Henderson bf14017220 Put in #include <fcntl.h> for those systems that don't have it included by something else. 1996-11-26 01:17:56 +00:00
Bryan Henderson f93f780269 -Werror fixes from D'Arcy. 1996-11-26 01:14:38 +00:00
Bryan Henderson 46c4e6f626 Include fcntl.h, which is not automatically included by sys/file.h on all systems. 1996-11-25 06:33:51 +00:00
Bryan Henderson 1d84088f50 Go back to $(postconfig...) from $(exec postconfig...) so it works on non-bash. 1996-11-25 05:51:50 +00:00
Bruce Momjian 6c2925b884 Prevent empty queries from crashing server. 1996-11-25 03:03:48 +00:00
Bryan Henderson 02db1f58cb Fix access through null pointer info->rule_action. Thanks Darren King. 1996-11-24 05:58:57 +00:00
Bryan Henderson 9602150a04 Fix syntax error: missing argument to elog(). Thanks Darren King. 1996-11-24 05:46:12 +00:00
Bryan Henderson 092c7a6be5 Typecasts, etc. to make compile work on AIX. Thanks Darren King.. 1996-11-24 04:44:24 +00:00
Bryan Henderson d3f9d6ad4f Move include of signal.h inside pqsignal.h so it's always where it's needed. 1996-11-24 04:07:17 +00:00
Bryan Henderson 7e499bd112 Add dep: rule. 1996-11-24 03:55:19 +00:00
Bryan Henderson 5c410fa0b9 First pass at getting shared libraries on AIX properly built. 1996-11-23 09:51:57 +00:00
Bryan Henderson 45f1d32bf1 Eliminate pesky "postconfig not found" message. 1996-11-23 09:42:51 +00:00
Bruce Momjian eda3771290 Fix for \g strdup error. 1996-11-22 06:45:14 +00:00
Bryan Henderson 25fe3c7098 Include ctype.h to fix Kurt Lidl's compile problem. 1996-11-22 04:43:48 +00:00
Bryan Henderson 4da9c597af Include stdio.h to fix Craig Anderson's compile problem. 1996-11-22 04:39:53 +00:00
Bryan Henderson 86ab9a5118 Fix bug: No -D option to postgres 1996-11-22 04:33:34 +00:00
Bryan Henderson e67cc8a346 Fix bug: -D options implies -d option. 1996-11-22 04:32:41 +00:00
Vadim B. Mikheev 8c2f099ab5 Fix memory overhelding while forming index' result:
memory allocation for ItemPointerData of heap' tuple is useless
because of FormRetrieveIndexResult makes neccessary palloc.
1996-11-21 06:13:43 +00:00
Vadim B. Mikheev 5d7e44fc8e Fix memory overhelding while forming index' result:
memory allocation for ItemPointerData of heap' tuple is useless

because of FormRetrieveIndexResult makes neccessary palloc.
1996-11-21 06:06:52 +00:00
Vadim B. Mikheev 05b3b8613d Fix memory overhelding while forming index' result:
memory allocation for ItemPointerData of heap' tuple is useless
because of FormRetrieveIndexResult makes neccessary palloc.
1996-11-21 06:02:56 +00:00
Bruce Momjian 58802bf39a Can't add a keyword without making it a keyword. :-)
D'Arcy J.M. Cain                           |  Democracy is three wolves
1996-11-20 22:58:22 +00:00
Bruce Momjian cd743f8388 Otherwise "gmake install" fails.
D'Arcy J.M. Cain                           |  Democracy is three wolves
1996-11-20 22:53:49 +00:00
Bruce Momjian c4d6bda2c5 There is a bug in aclinsert3 in the code which update the acl arrays.
When an acl item is added or updated the new entry is deleted if it has no
permissions and the acl array is shrinked. This is is done by decrementing
the number of items without updating the corresponding array size.
The array with the incorrect size is later read by pg_aclcheck and the entry
count is used to allocate a new array while the array size is used to copy
the old one. This causes a memory corruption and a backend crash.
This happens only to normal user as the administrator bypasses acl checks.
Massimo Dal Zotto
1996-11-20 22:53:10 +00:00
Bruce Momjian 8299e75577 following is a little fix for libpq.
PQexec  handles  the possibility of multiple results from one
    query by simply submitting an empty  query  after  the  first
    result and waiting for an 'I' message.

    Rules  can  generate  errors with transaction abort after the
    first 'C' message was recieved (e.g. if a C-language function
    used  in  a rule calls elog(WARN, ...)). Thus we have to look
    for.

Jan(wieck@sapserv.debis.de)
1996-11-20 22:35:19 +00:00
Bruce Momjian 6399c74f17 Fix \g filename. Free allocated memory and don't use memory that has
been freed.
1996-11-20 22:34:36 +00:00
Bruce Momjian 9d45f22e38 Here is the patch for pg_dump not handling NULL values in 'insert'
mode properly.  This will apply correctly to 1.09 & 2.0 sources.
From David H. Bennett
1996-11-20 22:32:55 +00:00
Bruce Momjian bdb25dbad6 Fix for man Makefile. Added 'all'. 1996-11-20 01:54:13 +00:00
Bruce Momjian 9529238d78 Make install change for man files 1996-11-19 22:23:13 +00:00
Bruce Momjian 2abbf392bd Removed old Assert's used during development. 1996-11-19 05:06:39 +00:00
Bryan Henderson 81f5c669e9 This file has not been part of the regression test for many releases. 1996-11-19 02:57:10 +00:00
Bryan Henderson 13312a007d The routines in magic.c have moved to the more accessible version.c. 1996-11-19 02:55:37 +00:00
Bryan Henderson b8eb6400de Eliminate mk/ directory. The tyranny of the included make file templates is
ended!
1996-11-19 02:52:21 +00:00
Bryan Henderson be421b9b9a Build man/ instead of ../doc. Man pages have moved there. 1996-11-19 02:43:46 +00:00
Bruce Momjian c6453ea75f Added DLSUFFIX to bsdi. 1996-11-18 16:32:53 +00:00
Bruce Momjian 317f375bb2 Rename SLSUFF to DLSUFFIX 1996-11-18 06:07:56 +00:00
Bryan Henderson 4a820de1f2 Include some macros that used to be -D options in Makefile.global. 1996-11-18 02:27:27 +00:00
Bryan Henderson e2a8163c40 Remove linux define of __USE_POSIX, which doesn't appear to do anything. 1996-11-18 02:26:57 +00:00
Bryan Henderson b55d49f5fe Add comments about the diversity of signal functionality. Came from
Makefile.global.
1996-11-18 02:25:09 +00:00
Bryan Henderson 87f5fda6b9 Make port-specific link libraries defined for linking backend more global
so you can also link pgtclsh.
1996-11-18 02:23:41 +00:00
Bryan Henderson bd57c3afe5 Quiet compiler warnings about missing prototypes in Linux's bitops.h. 1996-11-18 01:45:44 +00:00
Bryan Henderson 435d4f4a79 Quiet compiler warnings, ignore the ones we can't. 1996-11-18 01:44:28 +00:00
Bryan Henderson e780f0fef3 Ignore compiler warnings, because we can't escape "abstract declarator used
as declaration".
1996-11-18 01:43:55 +00:00
Bruce Momjian 529189f407 Renamed file. Restored SLSUFF to .so. 1996-11-17 20:30:32 +00:00
Bruce Momjian 99a4dc0598 Copy needed include files into standard directory. 1996-11-17 19:27:38 +00:00
Bruce Momjian b715c3ad96 Change SLSUFF from .so to .o as default. 1996-11-17 19:26:44 +00:00
Bruce Momjian 75f58aef7c New backend directory description file. 1996-11-17 05:26:57 +00:00
Bruce Momjian ca1a20eba4 Fix for -da option of pg_dump. 1996-11-17 04:56:16 +00:00
Bruce Momjian cc7f032289 Fix for return code of psql in manual. 1996-11-17 04:27:34 +00:00
Bruce Momjian 003b76f9ac Fix for error when viewing group access privs. 1996-11-17 04:26:59 +00:00
Bruce Momjian 4b130b2209 Fix for Alter TABLE add column varchar(). Was causing zero length. 1996-11-17 04:23:10 +00:00
Bryan Henderson 620f014621 Fix syntax errors so it runs without error messages. 1996-11-17 03:55:07 +00:00
Bryan Henderson aef6163388 Remove old GetPGData reference that causes warning. 1996-11-16 09:03:44 +00:00
Bryan Henderson 7bf3bae1a4 Add #include <sys/types.h> so it works with Ultrix's in.h 1996-11-16 08:09:16 +00:00
Bruce Momjian 5dd3c5620c Added documentation on new unique index capability. 1996-11-16 05:45:56 +00:00
Bruce Momjian 4024d43069 Added include file needed by memset(). 1996-11-16 05:18:58 +00:00
Bruce Momjian b3ce105b31 Add prototype for new datetime functions. 1996-11-16 04:59:10 +00:00
Bruce Momjian 7085aba53c Remove quote removal. Moved to parser. 1996-11-15 18:38:55 +00:00
Bruce Momjian 36aaf2505d Correct permissions on lo_export(). Open up permissions. 1996-11-15 18:38:20 +00:00
Bruce Momjian 3f53311088 Fix quote/doublequote handling. 1996-11-15 18:37:37 +00:00
Bruce Momjian b847d29785 Remove PERFECT_MEM
Unallocate opaque.
1996-11-15 18:37:10 +00:00
Bruce Momjian f8e02c192a Unallocate opaque. 1996-11-15 18:36:31 +00:00
Bruce Momjian a180738ddd Changed " to '. Removed bug section from psql. added reminder for log call
in built-in.  fixed backslases in source for libpq.
1996-11-15 17:55:31 +00:00
Marc G. Fournier 54c9905d6e Mulitple inclusion of sys/socket.h
Pointed out by: Erik Bertelsen <erik@sockdev.uni-c.dk>
1996-11-15 09:54:28 +00:00
Marc G. Fournier 8abc490181 Features added:
* Wrote max(date) and min(date) aggregates
* Wrote operator "-" for date; date - date yields number of days
  difference
* Wrote operator+(date,int) and operator-(date,int); the int is the
  number of days.  Each operator returns a new date.


By: Tom Tromey <tromey@creche.cygnus.com>
1996-11-14 21:39:14 +00:00
Marc G. Fournier eedc75bfe1 Bring in Randy's NOROOT patch 1996-11-14 20:49:09 +00:00
Marc G. Fournier 2081153e69 Fix a comment...was going to fix the <sys/types.h> problem, but
Randy is submitting a more comprehensive patch :)
1996-11-14 20:27:06 +00:00
Marc G. Fournier d84057db71 Couple of Ultrix4 related patches submited by:
Erik Bertelsen <erik@sockdev.uni-c.dk>
1996-11-14 20:08:58 +00:00
Marc G. Fournier fb3b9d7661 Fix a comment that wasn't commente'd out
Pointed out by: Erik Bertelsen <erik@sockdev.uni-c.dk>
1996-11-14 20:06:39 +00:00
Bruce Momjian fdcf5ff79c Remove comments psql was putting in output, typo's.
psql now returns error from queries and errors files, so ignore return code.
1996-11-14 16:09:28 +00:00
Bruce Momjian 0365c51e30 Overhaul MainLoop input processing for quotes, comments, backslashes. 1996-11-14 16:08:05 +00:00
Bryan Henderson f64b840387 Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR.  Commands
that need them need either invocation options or environment variables.
PGPORT default is hardcoded as 5432, but overrideable with options or
environment variables.
1996-11-14 10:25:54 +00:00
Marc G. Fournier 7ac541daf1 moved man pages here, as requested by Bryan 1996-11-14 10:18:14 +00:00
Bryan Henderson 65a10b1be6 Missed this part when I eliminated $(srcdir); src/bin stuff won't compile. 1996-11-14 09:24:39 +00:00
Bryan Henderson 6b135c9391 Use port-protos.h instead of trying to declare random() and srandom()
explicitly.
1996-11-14 08:23:31 +00:00
Bryan Henderson 902d2b8bac Use -Wno-error option only if compiler is gcc. 1996-11-14 07:33:34 +00:00
Bryan Henderson b4d689070e Use -W options only if compiler is gcc. 1996-11-14 07:19:26 +00:00
Bryan Henderson 200d4a4ec3 Include stdlib.h to gives its NULL, etc. definitions precedence over ours. 1996-11-14 06:06:39 +00:00
Bruce Momjian 25b4ca4284 Added percentage to CASSERT comment. 1996-11-14 00:26:23 +00:00
Marc G. Fournier 07a65b2255 Commit of a *MAJOR* patch from Dan McGuirk <djm@indirect.com>
Changes:

        * Unique index capability works using the syntax 'create unique
          index'.

        * Duplicate OID's in the system tables are removed.  I put
          little scripts called 'duplicate_oids' and 'find_oid' in
          include/catalog that help to find and remove duplicate OID's.
          I also moved 'unused_oids' from backend/catalog to
          include/catalog, since it has to be in the same directory
          as the include files in order to work.

        * The backend tries converting the name of a function or aggregate
          to all lowercase if the original name given doesn't work (mostly
          for compatibility with ODBC).

        * You can 'SELECT NULL' to your heart's content.

        * I put my _bt_updateitem fix in instead, which uses
          _bt_insertonpg so that even if the new key is so big that
          the page has to be split, everything still works.

        * All literal references to system catalog OID's have been
          replaced with references to define'd constants from the catalog
          header files.

        * I added a couple of node copy functions.  I think this was a
          preliminary attempt to get rules to work.
1996-11-13 20:56:15 +00:00
Bryan Henderson 0cec8fe26c Fix syntax error introduced in last update. 1996-11-13 11:43:04 +00:00
Bryan Henderson b20766ccc4 Eliminate MKDIR, srcdir, objdir. Centralize setting of LIBPQDIR. 1996-11-13 10:36:36 +00:00
Bryan Henderson fdc1cf2434 Make shared library builds work for BSD44_derived. 1996-11-13 08:36:31 +00:00
Bryan Henderson b269793975 Forgot in yesterday's make file blitz. 1996-11-13 06:36:38 +00:00
Bryan Henderson d7dd9295b7 End of the make file simplifications. 1996-11-12 11:43:32 +00:00
Bryan Henderson 594525aec1 Put shared libraries in main directory, not obj/ 1996-11-12 11:41:27 +00:00
Marc G. Fournier c8708c5f9b Fix for finding the include files 1996-11-12 11:16:44 +00:00
Bryan Henderson b5499249e5 Quiet compiler warnings. 1996-11-12 11:09:13 +00:00
Bryan Henderson 17befd6c69 Use new utils/version.c instead of backend/utils/init/magic.c. 1996-11-12 06:47:10 +00:00
Bryan Henderson bbe89089c8 Add dependency for install. 1996-11-12 06:11:52 +00:00
Bryan Henderson f45b50cfe0 Add install dependency. 1996-11-12 06:10:10 +00:00
Bryan Henderson 4f1e59f72b Fix bug where it tries to do a cleardbdir when you make install. 1996-11-12 02:54:30 +00:00
Marc G. Fournier c7ce63e04c Add include file postgres.h 1996-11-11 16:33:12 +00:00
Marc G. Fournier 39b4a0505f Add a blank install target so that 'make install' works 1996-11-11 16:30:07 +00:00
Marc G. Fournier 64f80c76d8 fix 'conflicting types' errors 1996-11-11 14:55:49 +00:00
Marc G. Fournier b99e3b0ccc Add missing include errno.h 1996-11-11 14:44:04 +00:00
Bryan Henderson b0961b3974 Goes with the recently added src/utils/version.c, will replace some stuff in
miscadmin.h.
1996-11-11 14:24:38 +00:00
Bruce Momjian a157098f7c Fixed double pfree on opaque. 1996-11-11 14:02:10 +00:00
Bryan Henderson bf80f41ec1 Add utils directory for cross-subsystem tools to keep make files from having
to be sleazy and reach into other subsystems' directories.  First entry in
this directory is the PG_VERSION file interface, which must be used by the
backend and also the pg_version program (which is used by initdb).
1996-11-11 13:51:57 +00:00
Bryan Henderson 6f708e42d1 Makefile simplification: the "bin" chapter 1996-11-11 13:41:36 +00:00
Bryan Henderson a7511908e1 Add DASH_N, BACKSLASH_C variables, moved from postgres.shell.mk. 1996-11-11 13:24:43 +00:00
Marc G. Fournier 58413fd9fc -----
|After sending my previous changes I found one more thing in Makefile.global.
|Any tests should be done after including Makefile.custom or else there
|won't be anything, particularly the port name, to base the tests on.
|
-----

more changes to makefile.global from D'Arcy
1996-11-11 12:19:05 +00:00
Marc G. Fournier 41b8c2c849 As proposed,
following is the patch to libpq's large object interface that
    removes the requirement to  include  fmgr.h  into  fe-lobj.c.
    The  large object interface now ask's the backend to tell the
    OID's of all the required functions in pg_proc.

From: wieck@sapserv.debis.de (Jan Wieck)
1996-11-11 12:16:57 +00:00
Marc G. Fournier 2bdded3540 Various cleanups from D'Arcy 1996-11-11 12:14:45 +00:00
Marc G. Fournier 6913c8b4a4 Add an abort() call to ExceptionalCondition so that is Assert is
called, it dumps core...

ABORT_ON_ASSERT must be defined, as I don't know if this is the correct
way to do this...
1996-11-11 11:49:40 +00:00
Marc G. Fournier 9fc64aefe1 change include c.h to postgres.h 1996-11-11 11:29:15 +00:00
Bruce Momjian 42a344683a Remove warnings when readline is not used. 1996-11-11 05:55:33 +00:00
Bruce Momjian 13d44b4aac Warning removal cleanup 1996-11-11 04:54:54 +00:00
Bruce Momjian 8d9be647dc Moved -Werror to COPT. 1996-11-11 03:12:00 +00:00
Bruce Momjian 1a5b4b9ffe Removed -Wmissing-declaration. 1996-11-10 17:35:58 +00:00
Bryan Henderson 60915ed2c2 Change gmake to $(MAKE) so backend compiles on system with no "gmake". 1996-11-10 04:09:51 +00:00
Bruce Momjian 77f8dff617 prototype cleanup 1996-11-10 03:30:46 +00:00
Bryan Henderson 08029facb3 Recognize dependencies more reliably. 1996-11-10 03:13:59 +00:00
Bruce Momjian aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Bryan Henderson bf5cbbf789 Quiet compiler warnings. 1996-11-10 02:27:15 +00:00
Bryan Henderson 2e21b7e4bc Add #include <ctype.h> to quiet compiler about missing declaration of isspace(). 1996-11-10 01:46:14 +00:00
Bryan Henderson 9f1b6bf7db Add #include <unistd.h> to quiet compiler warning about missing getopt() declaratoin. 1996-11-10 01:37:48 +00:00
Bryan Henderson 4e70c05979 Add #include <unistd.h> to quiet warning about missing getopt() declaration. 1996-11-10 01:35:39 +00:00
Bryan Henderson 0e5ab3655c Remove #include <regex.h> so it compiles on systems with GNU regex library. 1996-11-10 01:20:44 +00:00
Bryan Henderson 5d9e25c5ff Add USE_POSIX_TIME, HAVE_TZSET for Linux so backend compiles. 1996-11-10 00:50:54 +00:00
Bryan Henderson d7806dc5ee Make it find inet_aton.h so backend compiles on Solaris. 1996-11-10 00:38:38 +00:00
Marc G. Fournier 4aa1734f36 Added in PQconnectdb() function
Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-11-09 10:39:54 +00:00
Bruce Momjian a0990e1884 Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
Bruce Momjian 1d0e308395 Added new include file. 1996-11-09 05:48:28 +00:00
Marc G. Fournier 757b829ea8 A few more sparc_solaris cleanups from keith parks 1996-11-09 01:48:32 +00:00
Bruce Momjian 78078236ea Fix typo in file name found during install. 1996-11-08 21:40:11 +00:00
Bruce Momjian c9c0e111b8 More compile cleanups 1996-11-08 20:46:33 +00:00
Marc G. Fournier 8006c6f52f Somehow PORTNAME keeps getting changed to BSD44_derived :( 1996-11-08 07:47:52 +00:00
Marc G. Fournier cecf081aba Change includes from "" to <> 1996-11-08 06:43:28 +00:00
Bryan Henderson 7886d7351e Fix perbyte_cpu thing 1996-11-08 06:24:58 +00:00
Bruce Momjian 4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Marc G. Fournier 026387013e Secondly, small problem when trying to create a MAX/MIN aggregate in 1.09.
>From the create_aggregate man page...

"The arguments to state-transition-function-1 must be
(stype1,basetype), and its return value must be stype1."

create aggregate MIN (sfunc1 = int2smaller,
                      basetype = int2,
                      stype1 = int2);

will fail becase int2smaller and int2larger are in pg_proc
as returning an int4.  Can't happen since both args have to
be int2.

From: Darren King <aixssd!ceodev!darrenk@abs.net>
1996-11-08 01:08:37 +00:00
Marc G. Fournier ad6ca0c3af Another patch to quiet the compiler from D'Arcy 1996-11-08 00:59:10 +00:00
Marc G. Fournier 2768f391a4 There is a problem in the Makefile of libpgtcl on linux (and maybe also on
other platforms).  If I do the standard make + make install the shared library
is not linked with the the libpq library and when I try to load it in the
standard Tcl or Tk shell I get a lot of unresolved symbols.  The bug doesn't
affect pgtclsh because it is linked also with libpq. The problem exists only
when using the dynamic load feature of Tcl7.5.


From: Massimo Dal Zotto <dz@cs.unitn.it>
1996-11-08 00:58:07 +00:00
Marc G. Fournier 7d8b794a9a Add some missing includes
From: Randy Terbush <randy@zyzzyva.com>
1996-11-08 00:56:17 +00:00
Marc G. Fournier b38d565fc3 D'Arcy's recent cleanups 1996-11-08 00:46:14 +00:00
Bryan Henderson 00b1fb07f0 Try to fix mode. 1996-11-07 05:15:31 +00:00
Bryan Henderson 33b433b1af Try to fix mode. 1996-11-07 05:10:17 +00:00
Bruce Momjian 388c0d81da Change instructions for 1.*. 1996-11-06 22:32:18 +00:00
Marc G. Fournier 0020e8790d Another directory that compiles with no errors, and few warnings 1996-11-06 10:32:10 +00:00
Marc G. Fournier 1d0dd471fa Okay...this pretty much cleans out the include files.
I'm able to get through a 'make' of the backend with no errors except
the occasional 'might not be initialized error', which is nothing major,
just annoying.

Have a few patches from D'Arcy to incorporate, but am waiting until I can
get a clean compile first, which I'm hoping to have before bed, or sometime
tomorrow.
1996-11-06 10:31:02 +00:00
Marc G. Fournier b6e640f829 Make sure that #include <postgres.h> is included in fmgrtab.c 1996-11-06 10:22:13 +00:00
Marc G. Fournier b49d41884f Add prototype for: int DebugFileOpen() 1996-11-06 10:15:25 +00:00
Marc G. Fournier 9f5eac1f97 ...same... 1996-11-06 09:56:47 +00:00
Marc G. Fournier 58a0150f64 More files cleaned out 1996-11-06 09:29:26 +00:00
Marc G. Fournier be9197320a One by one, file by file 1996-11-06 09:27:29 +00:00
Marc G. Fournier 3f07f6bab2 Another 1996-11-06 09:24:57 +00:00
Marc G. Fournier 7d5e795596 Getting there, one by one... 1996-11-06 09:21:42 +00:00
Marc G. Fournier 92ec7b5812 And another 1996-11-06 09:19:16 +00:00
Marc G. Fournier 8b6b4d063a another one bites the dust 1996-11-06 09:17:31 +00:00
Marc G. Fournier 83d93d437b Just a couple of small mods 1996-11-06 08:54:17 +00:00
Marc G. Fournier e0b772cc00 another gone 1996-11-06 08:52:04 +00:00
Marc G. Fournier a472a29bb4 I'm getting there, slowly :) 1996-11-06 08:48:33 +00:00
Marc G. Fournier e232909157 Slowly getting faster to make sure it compiles...still needs cleaning
up, but one thing at a time :)
1996-11-06 08:27:16 +00:00
Marc G. Fournier 7385619f14 Clean it up so that it compiles 1996-11-06 08:21:43 +00:00
Marc G. Fournier 33a8df7edd Another one cleaned up 1996-11-06 08:07:45 +00:00
Marc G. Fournier 98f72c28dc Oops, two includes unrequired 1996-11-06 08:05:02 +00:00
Marc G. Fournier 08905a7406 Another one bite sthe dust 1996-11-06 08:02:40 +00:00
Marc G. Fournier 6508241acb another include cleaned out 1996-11-06 07:50:12 +00:00
Marc G. Fournier 87b07a3974 Further include file cleanups 1996-11-06 07:44:18 +00:00
Marc G. Fournier 9e3d4c43a7 Another directory cleaned up 1996-11-06 07:31:26 +00:00
Marc G. Fournier 8544daf645 Another one bites the dust 1996-11-06 07:05:18 +00:00
Marc G. Fournier ce4c0ce1de Some compile failure fixes from Keith Parks <emkxp01@mtcc.demon.co.uk> 1996-11-06 06:52:23 +00:00
Marc G. Fournier e4725ee76a Makes it compile...still needs work 1996-11-05 11:57:55 +00:00
Marc G. Fournier 90113e2847 another one quickly done up 1996-11-05 11:29:45 +00:00
Marc G. Fournier dc0e256902 clean this one 1996-11-05 11:23:43 +00:00
Marc G. Fournier 225a224792 Missed a file...
access now compile with -Wall -Werror
1996-11-05 11:17:47 +00:00
Marc G. Fournier 03eb5a50e7 There, that cleans *that* out 1996-11-05 11:12:33 +00:00
Marc G. Fournier 050d148295 One more to go 1996-11-05 10:54:20 +00:00
Marc G. Fournier 6608278ea4 these ones have their dependencies cleaned up 1996-11-05 10:37:16 +00:00
Marc G. Fournier 500ce42f37 Almost done access... 1996-11-05 10:35:38 +00:00
Marc G. Fournier 4fa90e38d5 More cleanups 1996-11-05 10:02:06 +00:00
Marc G. Fournier 466f5fd729 More cleanups 1996-11-05 09:53:03 +00:00
Marc G. Fournier 4312192e6b another directory cleaned of extraneous #includes
makefile fixed for fmgr.h
1996-11-05 09:40:25 +00:00
Marc G. Fournier 0cf60fb718 More cleaned out #include files
Makefile fixed for fmgr.h
1996-11-05 08:19:01 +00:00
Marc G. Fournier d1e9a76131 Another run through.
This gets us a clean compile of 'common' and 'gist' with *clean* #include
files
1996-11-05 08:18:44 +00:00
Marc G. Fournier 1c3a7767ca Re-add -I../.. for fmgr.h
Change #include "" to #include <>

Remove a few unused #includes

Make sure it compiles with -Wall -Werror
1996-11-05 07:42:46 +00:00
Marc G. Fournier efef619b83 And double check changes 1996-11-05 07:41:13 +00:00
Marc G. Fournier 6c8482c970 Make sure all changes commited 1996-11-05 07:38:17 +00:00
Marc G. Fournier 51716fdd8d Another 1996-11-05 07:24:03 +00:00
Marc G. Fournier 9ec5e78613 And another one 1996-11-05 07:22:50 +00:00
Marc G. Fournier bc711a3f54 Another one bits the dust... 1996-11-05 07:20:09 +00:00
Marc G. Fournier 54c2aa99bd And another... 1996-11-05 07:18:05 +00:00
Marc G. Fournier 8202bce9ba And another.. 1996-11-05 07:15:58 +00:00
Marc G. Fournier 7585d25185 Another one cleaned out 1996-11-05 07:07:22 +00:00
Marc G. Fournier d2125805d1 Another directory totally cleaned out 1996-11-05 06:11:08 +00:00
Marc G. Fournier abf578ac6c Fix c.h for sparc_solaris
Pointed out by Keith Parks
1996-11-05 05:28:20 +00:00
Marc G. Fournier fd569a2308 Clean up a few of the #include files 1996-11-05 05:26:32 +00:00
Marc G. Fournier 48a7170a71 Added missing #includes pointed out by Keith Parks 1996-11-05 05:25:44 +00:00
Marc G. Fournier d2746c65b5 Make sure all the cleaned includes are commited 1996-11-04 12:12:52 +00:00
Marc G. Fournier 0e2822072c Make sure all the cleaned up includes are commited 1996-11-04 12:11:44 +00:00
Marc G. Fournier dc037969ad Another one completely cleaned up 1996-11-04 12:07:05 +00:00
Marc G. Fournier 0b3cb80e03 finally, this directory is (should be!) totally clean 1996-11-04 11:51:27 +00:00
Bryan Henderson 7870c5a0d3 Add frontend \copy command. 1996-11-04 09:17:55 +00:00
Marc G. Fournier 434201d8d7 another pass through.
Note.  all include files that have been hit so far have had extraneous
       include files cleaned out and are reduced to...the lowest common
       "include file", based on 'cc -Wall -I. test.c', where test.c is:

#include "postgres.h"
#include "<top of branches>" (ie. top of branches this time was utils/fcache2.h)
1996-11-04 08:53:07 +00:00
Marc G. Fournier 63482946c7 More cleanups (this one will most likely break under Win32, if anyone is
working on it)
1996-11-04 08:14:05 +00:00
Marc G. Fournier 82400d4c50 Next, based on utils/catcache.h 1996-11-04 07:59:39 +00:00
Marc G. Fournier 5a5f9420e5 Another series started from utils/builtins.h 1996-11-04 07:46:06 +00:00
Marc G. Fournier d93d3c843a -Wall based cleanup of include files, based from acl.h, and everything
that it depends on
1996-11-04 07:18:46 +00:00
Marc G. Fournier 796aca3916 include utils/palloc.h as a default include, as its used more often then
not
1996-11-04 06:35:36 +00:00
Bryan Henderson 089dfb61f0 Add ability to deal with the fmgr.h dependency. 1996-11-04 06:32:59 +00:00
Bruce Momjian 5061c23ac2 Rename CDEBUG to COPT 1996-11-04 05:15:07 +00:00
Bruce Momjian de3286ce3a Remove AMERICAN STYLE. Not used. 1996-11-04 05:02:44 +00:00
Bruce Momjian f95322d9ef Remove optimization-specific stuff from OS sections. Use CDEBUG. 1996-11-04 05:01:47 +00:00
Bruce Momjian 18bbad7696 Remove OPENLINK define 1996-11-04 04:53:51 +00:00
Bruce Momjian 0108fddf13 Remove NULL_PATCH define 1996-11-04 04:35:48 +00:00
Bruce Momjian 8edbc3bde4 Remove ARRAY_PATCH define 1996-11-04 04:19:55 +00:00
Bruce Momjian e43dfad289 Remove ESCAPE_PATCH define 1996-11-04 04:05:16 +00:00
Bruce Momjian 7e42f4814d Removed PORTNAME_. Use OS version only. 1996-11-04 04:00:56 +00:00
Marc G. Fournier 510ebf75a1 Another first pass at cleaning up the #includes 1996-11-03 23:57:43 +00:00
Marc G. Fournier d46d53387f Not sure if this is the right place, but add a prototype for
Bryan's superuser() function
1996-11-03 23:49:07 +00:00
Marc G. Fournier d2aa40517a Cleaned up include headers 1996-11-03 23:46:28 +00:00
Marc G. Fournier 4029fb52c6 first pass at cleaning up include files 1996-11-03 23:27:08 +00:00
Marc G. Fournier ca112038ab More include file cleanups 1996-11-03 22:58:26 +00:00
Marc G. Fournier 302b809793 Changes required so that access/* compiles cleanly...
cleaning up behind myself before *yawn* bed :)
1996-11-03 12:35:27 +00:00
Marc G. Fournier ff36ebc922 More cleans of the inter-dependencies in the #include files 1996-11-03 12:13:35 +00:00
Marc G. Fournier 71cd646a34 More include file cleanups 1996-11-03 12:11:19 +00:00
Marc G. Fournier dd71c36933 That pretty much totally cleans up the includes files here. 1996-11-03 10:57:24 +00:00
Bryan Henderson 5a58dabbbc Include Makefile.global so fmgrtab.c compiles properly. Thanks Keith Parks. 1996-11-03 09:28:31 +00:00
Bryan Henderson 8ac872b26d Fix bogus format in two error messages. 1996-11-03 09:24:04 +00:00
Marc G. Fournier 66a518735f Finish cleaning up -I lines 1996-11-03 09:07:03 +00:00
Bryan Henderson a7a0b3ba30 Keep the generated .h files in the local directory, like other object files,
rather than in src/include with normal header files.  Necessary to make
dependancies work out so they don't keep getting rebuilt for no reason.
1996-11-03 09:05:30 +00:00
Bryan Henderson a505db6f33 Create TAGS file for emacs. Like MAKE_CTAGS for vi. 1996-11-03 09:03:30 +00:00
Marc G. Fournier 0c960e7fc0 More include file cleanups 1996-11-03 08:17:38 +00:00
Marc G. Fournier 4bdf308bdf shared build fails, but the rest compiles...formatting error in the
cc -shared, I believe...
1996-11-03 07:14:32 +00:00
Marc G. Fournier aed384f12d Quiet a compiler warning (see line 729+, retvalue) 1996-11-03 07:00:57 +00:00
Marc G. Fournier dd5b78f1c1 Remove 'unused variable `open_errno'' 1996-11-03 06:56:52 +00:00
Marc G. Fournier c9002ecb21 Produce a clean compile of backend... 1996-11-03 06:54:38 +00:00
Marc G. Fournier 3cf53c1d8a Change default install directories to /usr/local/pgsql
Add CFLAGS+= -Wall -Werror (should only affect developers, not users)
1996-11-03 06:54:10 +00:00
Marc G. Fournier 6fac4602ae Clean up Makefile(s)
Add #include "postgres.h" as required

Remove #include "c.h" *and* "utils/elog.h" as applicable
1996-11-03 05:08:01 +00:00
Marc G. Fournier 66637f4a2f Clean up Makefile
Add #include "postgres.h" as required

Remove #include "utils/elog.h"
1996-11-03 04:57:03 +00:00
Marc G. Fournier c4edfb4667 Clean up Makefile, add #postgres.h as required 1996-11-03 04:51:51 +00:00
Marc G. Fournier daa93cf5c5 Clean up Makefile, make sure that postmaster.c compiles 1996-11-03 04:48:27 +00:00
Bryan Henderson b216c1eac6 Continuation of make file simplification; deal with header file shuffle. 1996-11-02 09:54:44 +00:00
Bryan Henderson 31e8156fad Continuation of make file simplification; handle libpq.a dependancy. 1996-11-02 09:53:15 +00:00
Bryan Henderson c5c8983ef7 Add complete setting of AROPT 1996-11-02 09:49:57 +00:00
Bryan Henderson 763adb5235 Convenience routine for checking superuser status. 1996-11-02 02:06:47 +00:00
Bryan Henderson 675740a8f3 Add misc subdirectory. 1996-11-02 02:03:50 +00:00
Bryan Henderson fa608ad2a6 Fix bug in checking permissions on table being COPY'd. 1996-11-02 02:03:13 +00:00
Bryan Henderson d27c28fdc0 Allow only superuser to do backend copy. 1996-11-02 02:01:48 +00:00
Bruce Momjian c9b05e55ac Comment changes. 1996-11-01 21:04:48 +00:00
Marc G. Fournier a95674269f More intelligent #include cleanups, as pointed out by Bryan...
Compiled with -Wall -Werror
1996-11-01 09:41:41 +00:00
Marc G. Fournier 3516eda61c Okay, following Bryan's (and others) suggestions...cleaning up the
include files properly...yet, slowly...
1996-11-01 09:31:17 +00:00
Marc G. Fournier f44acab12c Include dependencies based on tupdesc.h, as:
access/tupdesc.h
	catalog/pg_attribute.h
	nodes/pg_list.h
		nodes/nodes.h
	access/attnum.h
1996-11-01 09:22:37 +00:00
Marc G. Fournier 6d4c760eb5 Include file cleanup:
Based on include files require by htup.h, as:

	access/htup.h
		storage/itemptr.h
			storage/block.h
			storage/off.h
		utils/nabstime.h
			<time.h>
1996-11-01 09:19:11 +00:00
Marc G. Fournier ea94d639d0 Okay, so I was going backwards on my include cleanup...
Pointed out by Bryan (in a subtle way *grin*)
1996-11-01 09:12:18 +00:00
Bruce Momjian dd10d0de23 More chanes for bsdi_2_1 removal 1996-11-01 03:36:16 +00:00
Bruce Momjian fba75d0fdc Decoupled ASSERT and DEBUG options. 1996-11-01 02:32:16 +00:00
Bruce Momjian c3b9c520be FIx for bsdi. 1996-11-01 02:21:15 +00:00
Bruce Momjian 3a4c2888a1 Removal of bsdi_2_1 port. 1996-11-01 01:47:23 +00:00
Bruce Momjian 727c840754 typo fix on include file. 1996-10-31 18:33:09 +00:00
Bruce Momjian 69dfa71bc3 Fix prototype. 1996-10-31 18:27:54 +00:00
Bruce Momjian 3ce9ccff7c Fix for gmake clean. 1996-10-31 17:27:58 +00:00
Marc G. Fournier b17c49e95d Add #include "postgres.h" 1996-10-31 11:09:44 +00:00
Marc G. Fournier 76294e1d38 Cleanup Makefiles
Add #include "postgres.h"
	and
    #include <sys/types.h>
1996-10-31 10:59:42 +00:00
Marc G. Fournier eb501f1cd3 More Makefile cleanups
Add #include "postgres.h" as required
1996-10-31 10:42:56 +00:00
Marc G. Fournier ae1d931e88 clean up makefile
add #include "postgres.h"
1996-10-31 10:37:53 +00:00
Marc G. Fournier ffaff3dcd4 Clean out makefile
add #include "postgres.h"
1996-10-31 10:26:33 +00:00
Marc G. Fournier df6a9e633c more removal of PORTNAME_* 1996-10-31 10:23:28 +00:00
Marc G. Fournier 4df1a41478 more removals of PORTNAME_* 1996-10-31 10:20:09 +00:00
Marc G. Fournier bdd07411b4 remove use of PORTNAME_* 1996-10-31 10:17:09 +00:00
Marc G. Fournier 3df33180a1 add #include "postgres.h", as required by all .c files 1996-10-31 10:12:26 +00:00
Marc G. Fournier 99412aef23 remove:
#include "postgres.h"
	#include "c.h"
1996-10-31 09:51:30 +00:00
Bryan Henderson 3341750769 Require superuser privilege to create C function. 1996-10-31 09:08:10 +00:00
Marc G. Fournier b13f5c25e2 More of the same...clean Makefile, add include files 1996-10-31 08:52:54 +00:00
Marc G. Fournier ab2444032a Same clean up of Makefile, and addition of include files 1996-10-31 08:32:23 +00:00
Marc G. Fournier f578f8fb68 Cleaned out -I../.. -I../../include from Makefile
Added missing include files
1996-10-31 08:28:53 +00:00
Marc G. Fournier 367ade186f Remove -I../.. and -I../../include from Makefile
Add some missing include files
1996-10-31 08:24:47 +00:00
Marc G. Fournier ea04818002 Add a couple of missing includes 1996-10-31 08:09:47 +00:00
Marc G. Fournier ba4ad2c71a Added misc include files 1996-10-31 07:48:38 +00:00
Marc G. Fournier 14352a3ef6 .h files shouldn't include .h files, .c files should contain .h files...
remove postgres.h from fmgr.h creation
1996-10-31 07:37:57 +00:00
Marc G. Fournier 081fd70d92 Even compile generated .h files should be in ${SRCDIR}/include... 1996-10-31 07:25:15 +00:00
Marc G. Fournier c59b3afbf1 Well, normally there wouldn't be anything in -I../.., and in a minute, there
won't be...
1996-10-31 07:22:07 +00:00
Marc G. Fournier 83311355d7 Add these files to ${SRCDIR}/include 1996-10-31 07:10:14 +00:00
Marc G. Fournier 0a761375e9 Move these files to ${SRCDIR}/include 1996-10-31 07:09:33 +00:00
Marc G. Fournier 5565d32e10 There is no -I../.. include files... 1996-10-31 07:04:50 +00:00
Marc G. Fournier 5cbff9a020 USE of PORTNAME_* should be discouraged wherever possible. The code
*should* be intelligent enough that:

#if defined(__FreeBSD__) works, where __FreeBSD__ is actually defined
by the compiler itself.

Makefile.global used to have -DPORTNAME_<port> -D<port> as part of the flags
for gcc while all occurances of PORTNAME_<port> slowly get removed from
the source tree...
1996-10-31 06:55:15 +00:00
Bruce Momjian d91cc297bb Changed include path. 1996-10-31 05:58:32 +00:00
Bruce Momjian 3d7fe6c97c Added needed include file. 1996-10-31 05:58:01 +00:00
Bruce Momjian 7a93da98af Missing from parser patch.
Added needed include file.
1996-10-31 05:57:23 +00:00
Bruce Momjian 3eb6cc491d changed define(port) to define(PORTNAME_port)
Added needed include file.
1996-10-31 05:56:27 +00:00
Bruce Momjian 34945055a8 Changed make to gmake.
Added needed include file.
1996-10-31 05:55:24 +00:00
Bruce Momjian 4cf9d03ec7 Added prototypes missing from parser patch.
Added needed include file.
1996-10-31 05:54:27 +00:00
Bruce Momjian 08554e4abb Removed false and changed to a commented true. 1996-10-31 05:53:10 +00:00
Marc G. Fournier f1c95ed41e Fix memset() call, variables being passed in wrong order.
Pointed out by: wieck@sapserv.debis.de
1996-10-30 21:18:22 +00:00
Marc G. Fournier 552620c8b2 Changes to libpgtcl submitted by: wieck@sapserv.debis.de (Jan Wieck)
Adds:

    -lAttributes

        Returns another format of the results attribute list. Per
        attribute a sublist  of  {{attname}  atttype  attlen}  is
        returned  and  an  empty  string  if  no attributes where
        received.

    -numAttrs

        Returns the number of attributes in the result.
1996-10-30 06:18:42 +00:00
Marc G. Fournier 69c7f25bed Fixes:
I found another bug in btree index.  Looking at the code it seems that NULL
keys are never used to build or scan a btree index (see the explain commands
in the example).  However this is not the case when a null key is retrieved
in an outer loop of a join select and used in an index scan of an inner loop.
This bug causes at least three kinds of problems:

1)  the backend crashes when it tries to compare a text string with a null.

2)  it is not possible to find tuples with null keys in a join.

3)  null is considered equal to 0 when the datum is passed by value, see
    the last query.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-10-30 06:08:10 +00:00
Bruce Momjian f59a46a8c8 Parser Overhaul 1996-10-30 02:02:41 +00:00
Bryan Henderson 1dfe4eaeb1 Fix small syntax error. 1996-10-30 00:36:59 +00:00
Bryan Henderson aa71f918c3 Fix sigaction again to try for portability. 1996-10-29 21:53:48 +00:00
Bryan Henderson 71c1d59d1a Remove another snprintf() for Solaris. 1996-10-29 21:51:13 +00:00
Bryan Henderson 63481f0b92 Use strncpy() and local buffers instead of snprintf(), since not everyone
has snprintf().
1996-10-28 09:05:29 +00:00
Bryan Henderson aa1eac7979 Make a local isblank() function, since not all standard C libraries have it.
For sparc_solaris, add inet_aton prototype, since it isn't in the header
files included for the standard C library functions.
1996-10-28 09:03:50 +00:00
Bryan Henderson b13ffd34b3 Add our own copy of inet_aton() for sparc_solaris, which doesn't have it in
the standard C library.
1996-10-28 09:00:54 +00:00
Bryan Henderson b0d6f0aa63 Simplify make files, add full dependencies. 1996-10-27 09:55:05 +00:00
Bryan Henderson 1e39d14ff3 Correct #if statement so it compiles on Solaris. Thanks Keith Parks. 1996-10-26 05:03:24 +00:00
Marc G. Fournier 87b48ff032 D'Arcy's cleanups 1996-10-26 04:15:05 +00:00
Marc G. Fournier 716d506a81 Make sure the btree patch gets into 2.0 as well...
Still submitted by:  Massimo Dal Zotto <dz@cs.unitn.it>
1996-10-25 09:55:36 +00:00
Bryan Henderson e18d49d82a Add CFLAGS+=-DPOSTPORT=... so we can take it out of the global CFLAGS. 1996-10-25 09:22:30 +00:00
Bryan Henderson ec86e4b95b Use EUROPEAN_DATES instead of EUROPEAN_STYLE 1996-10-25 06:02:52 +00:00
Bryan Henderson 3010f46d2a E Use EUROPEAN_DATES from config.h instead of -D option 1996-10-25 06:00:49 +00:00
Marc G. Fournier f6f8ca4970 Fixes: Growing backend when using nested function calls
Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-10-24 07:59:46 +00:00
Marc G. Fournier 20b4c46e26 Fixes: Errors when PQexec() in backend creates temp
relations and transaction is aborted

Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-10-24 07:55:54 +00:00
Marc G. Fournier e152661200 Fixes:
It's bug in nodeAgg.c on lines 241, 242:

                null_array = malloc(nagg);
                for (i=0;i<nagg;i++)
                    null_array[i] = 'n';
                oneTuple = heap_formtuple(tupType, tupValue, null_array);

- your query has not only aggregates but also 'group by-ed' fields and so
null_array should contain tupType->natts elements (tupType->natts > nagg in
your case).

Patch follows and it's very simple.

VAdim
1996-10-24 06:32:01 +00:00
Marc G. Fournier c471d2bdeb Take out the PERFECT_MMGR #ifdefs:
My guess is that the thing had bugs, and the pfree was commented out.
The thing is probabally free'ed anyway at the end, so it was not a bad
thing.

If it does cause a bug, it will generate an error when hit, so I say
unless someone else knows, let's remove it and run the regression test.

-Bruce
1996-10-24 06:30:40 +00:00
Marc G. Fournier 7f76072d81 Bruce...does this fix it once and for all? *grin* 1996-10-24 06:25:34 +00:00
Marc G. Fournier f36b2560a4 Major code cleanups from D'arcy (-Wall -Werror) 1996-10-23 07:42:13 +00:00
Marc G. Fournier 29a0fb84fc |I have moved things around so that things happen in the following order:
|
|  1. Set default variables
|  2. Include Makefile.custom to override defaults
|  3. Set CFLAGS, etc. with variables
|
|This fixes the problem of Makefile.custom changes not taking effect.

Submitted by: D'Arcy Cain
1996-10-23 07:33:04 +00:00
Bryan Henderson 2db54b8e4f Update "planner" directory to "optimizer" in include paths in this dead code. 1996-10-23 07:14:43 +00:00
Marc G. Fournier 82b83f6f71 Cosmetic changes to ordering of #include files 1996-10-21 11:49:41 +00:00
Marc G. Fournier 9a7fda57ee -Wall'd 1996-10-21 09:37:26 +00:00
Marc G. Fournier aa907f7d0c -Wall'd 1996-10-21 08:31:23 +00:00
Marc G. Fournier 8385d557d1 -Wall'd ... I missed a subdir under access :( 1996-10-21 07:38:20 +00:00
Marc G. Fournier f47ffc9a4e Make line 159:bp = NULL, to quiet compiler
Suggested by: Randy Terbush <randy@zyzzyva.com>
1996-10-21 07:18:08 +00:00
Marc G. Fournier c9f8bad182 -Wall'd
That finishes access/*
1996-10-21 07:15:18 +00:00
Bryan Henderson 1363ca1d52 Force user to set PORTNAME. Remove NAMEDATALEN from CFLAGS (don't need it
there because it's in config.h, which is cleaner).
1996-10-21 06:56:57 +00:00
Marc G. Fournier b446f38510 -Wall'd 1996-10-21 05:59:49 +00:00
Marc G. Fournier ede7e6b045 -Wall'd 1996-10-21 05:45:21 +00:00
Marc G. Fournier 0452227989 -Wall Cleanup of gist subdirectory 1996-10-21 05:14:02 +00:00
Marc G. Fournier 95874fa034 -Wall cleanup of gist subdirectory:
- cleaned out unused variables
	- added missing prototype headers

One outstanding -Werror failure:

/home/staff/scrappy/postgres/2.0/cvs/postgres95/src/backend/access/gist/giststra
t.c:117: warning: missing braces around initializer for `GISTEvaluationData.expr
ession'
1996-10-21 05:11:00 +00:00
Marc G. Fournier 8325d9fc3b Define prototypes from giststrat.c required in gistscan.c 1996-10-21 05:05:42 +00:00
Marc G. Fournier d458a1c747 Other then:
indextuple.c:159: warning: `bp' might be used uninitialized in this function

this directory passes -Wall -Werror under FreeBSD
1996-10-20 22:04:49 +00:00
Marc G. Fournier 597a1de903 remove an #ifdef/#else/#endif that doesn't actually have anything inside
of it
1996-10-20 21:51:45 +00:00
Marc G. Fournier 2217b1ccd8 Make default HAVE_MEMMOVE defined, undef inside of definitions for sparc 1996-10-20 20:58:14 +00:00
Marc G. Fournier 331bb53b0f change '#if defined(PORTNAME_sparc)' to '#if !defined(HAVE_MEMMOVE)' 1996-10-20 20:57:06 +00:00
Marc G. Fournier 925ea01ed6 Add #define HAVE_MEMMOVE for systems that do have it. 1996-10-20 20:40:17 +00:00
Marc G. Fournier 7b58bb0088 Clean up comments (-Wall -Werror) 1996-10-20 20:34:06 +00:00
Marc G. Fournier 13cd836d62 #include file cleanup 1996-10-20 10:53:18 +00:00
Marc G. Fournier e1220b7c21 More #include cleanups
Once access/* is cleaned out, will redo using -Wall on compile to
make sure that all prototyping is correct
1996-10-20 09:27:24 +00:00
Marc G. Fournier 5a0b450c78 First pass at fixing my own mistakes
Mainly...fix up the includes I removed, as well as prototypes

Pointed out by D'Arcy
1996-10-20 08:32:11 +00:00
Marc G. Fournier dd007d4c39 Another directory cleaned out 1996-10-20 06:56:04 +00:00
Marc G. Fournier 2b5a8bc38b More include files cleaned up 1996-10-20 06:35:27 +00:00
Marc G. Fournier 3cb7ff8db2 Okay...another directory cleaned out and compilable 1996-10-20 06:34:30 +00:00
Marc G. Fournier 5eee45ea05 Add HAVE_Cplusplus= true to BSD44_derived Makefile.inc, as I know that
FreeBSD/NetBSD both ship with gcc 2.7.x
1996-10-19 06:36:52 +00:00
Marc G. Fournier 2a23c4e724 Not quite the cleanest way to do it, but add an option to Makefile.global
that allows one to compile libpq++

this should be set on a port-by-port basis
1996-10-19 06:33:55 +00:00
Marc G. Fournier 0eac5b0ed5 Welp, another subdirectory cleaned out of redundant/unused #include
files
1996-10-19 06:27:33 +00:00
Marc G. Fournier e77f64af62 There...that pretty much cleans up redundant/unused #includes in
access/common...how many more directories to go? :)
1996-10-19 04:51:44 +00:00
Marc G. Fournier f4ba64a0ac Almost have access/common cleaned up... 1996-10-19 04:49:29 +00:00
Marc G. Fournier 23f444f64d A few more yet... 1996-10-19 04:48:30 +00:00
Marc G. Fournier 6592bbaf08 wish there was an easier way to clean this up... 1996-10-19 04:46:28 +00:00
Marc G. Fournier 4c9309a8d5 another small one 1996-10-19 04:36:08 +00:00
Marc G. Fournier 42dd813494 Hopefully that cleans up the cruft from rel.h 1996-10-19 04:31:45 +00:00
Marc G. Fournier 1d5c3ec010 another... 1996-10-19 04:25:53 +00:00
Marc G. Fournier c6979925ea its coming... 1996-10-19 04:24:57 +00:00
Marc G. Fournier 7bb98fd618 step by step...file by file... 1996-10-19 04:16:04 +00:00
Marc G. Fournier 7260183685 ...same 1996-10-19 04:09:32 +00:00
Marc G. Fournier d0bfb6b78d slow work... 1996-10-19 04:08:58 +00:00
Marc G. Fournier f697bf3b85 and another 1996-10-19 04:06:48 +00:00
Marc G. Fournier 6fd191c899 another one cleaned up 1996-10-19 04:05:44 +00:00
Marc G. Fournier 9b6b82b91d and another one.. 1996-10-19 04:03:29 +00:00
Marc G. Fournier f3671cc910 another another one 1996-10-19 04:02:39 +00:00
Marc G. Fournier c2c618fada anothre one reduced to its component parts 1996-10-19 04:01:41 +00:00
Marc G. Fournier d9ebe7711f clean out include files of including other includes files except those
absolutely required
1996-10-19 03:58:34 +00:00
Marc G. Fournier d7dd05db55 Another cleaned up 1996-10-19 03:39:04 +00:00
Marc G. Fournier 5dedad99a1 One at a time...another one is complete... 1996-10-19 03:28:20 +00:00
Marc G. Fournier 69b42eb1a3 another one with #include file clean'd up 1996-10-19 03:12:50 +00:00
Marc G. Fournier 9834913cd0 All #include's removed from *.h files, so cleaning up the .c #includes...
First file of, what...1000's?
1996-10-18 19:01:16 +00:00
Marc G. Fournier 9caf84bc00 #include "postgres.h" is a standard include for all .c files, auto-including
config.h, c.h *and* elog.h...added elog.h
1996-10-18 18:28:33 +00:00
Marc G. Fournier 1c5fa955cd Add prototype for heap_getattr() to quiet compiler 1996-10-18 17:58:33 +00:00
Vadim B. Mikheev c8fc4c9607 Reap deleted/unused tuples on page-base 1996-10-18 08:15:58 +00:00
Vadim B. Mikheev bc50067426 1. Reap deleted/unused tuples on page-base
2. Reap unused tuples too
3. Reap empty pages
4. Check if a page is initialized, initialize it if not
   and reap it
5. Binary search in list of reapped pages/tids to check
   is the heap' tid pointed by a index' tuple on this list
   (it's mu-u-uch faster)
1996-10-18 08:13:36 +00:00
Vadim B. Mikheev 327d900b51 Move #define PageIsNew (true if page is not initialize) to bufpage.h 1996-10-18 07:43:43 +00:00
Vadim B. Mikheev 57de92c648 Move definition of PageIsNew from hio.c to here 1996-10-18 07:39:07 +00:00
Marc G. Fournier 46606ab077 Document some more #ifdef's 1996-10-18 05:59:52 +00:00
Marc G. Fournier 94e825145d Document more #ifdef's into config.h
Get rid of ESCAPE_PATCH ifdef, as its on by default, and there is no
apparent reason for turning it off...it fixes a bug
1996-10-18 05:59:17 +00:00
Marc G. Fournier 1c00e68fad Moved definition of MAXPATHLEN to config.h 1996-10-18 05:50:04 +00:00
Marc G. Fournier 927e5887a0 Added a #define NEED_SIG_JMP to config.h
Removed #ifdef's for OPENLINK_PATCH.  We enable it by default, and nobody
*has* to enable the functionality, but no reason to retain the "old code"
1996-10-18 05:47:12 +00:00
Marc G. Fournier 6c3dff4245 Document #ifdef's from backend/access subdirs so that we know what
features(?) are available
1996-10-18 05:22:24 +00:00
Marc G. Fournier 2ecb7e5e2c Moved '#define *DEBUG' defines to config.h, and document where first
found.

Document any '#ifdef' segments found in config.h
1996-10-18 05:21:27 +00:00
Marc G. Fournier 6e420677dd Moved '#define *DEBUG' defines to config.h, and document where first
found.

Document any '#ifdef' segments found in config.h

Remove gistold.c, since it was older copy of gist.c
1996-10-18 05:21:09 +00:00
Marc G. Fournier 6c8465f69b #define cleanup: moved #define IPORTAL_DEBUG to config.h 1996-10-18 04:54:47 +00:00
Marc G. Fournier 2d8ffead24 Moved all the CFLAG -D's from the makefiles to config.h towards better
centralized configurations/porting...
1996-10-18 04:49:09 +00:00
Marc G. Fournier 1b6322a9c0 Moved more -D's out of the port specific Makefiles straight into the
config.h file
1996-10-18 04:45:54 +00:00
Marc G. Fournier d16bc9ce37 Centralize more of the defines from backend/port under config.h
Further ports should *really* avoid backend/port and make use of
config.h
1996-10-18 00:33:41 +00:00
Marc G. Fournier a839456c41 Move "port specific" #ifdefs out of here and into config.h
- created a HAVE_TZSET define for this purpose
1996-10-17 23:59:45 +00:00
Marc G. Fournier c39857925b Add a HAVE_TZSET define to clean up defines in backend/utils/adt/nabstime.c 1996-10-17 23:55:27 +00:00
Bryan Henderson 6cbaa93b82 Change treatment of sigaction structure again to include even more platforms.
Thanks D'Arcy.
1996-10-16 09:41:13 +00:00
Bryan Henderson ec610a7696 Remove 4th element of sigaction structure so it works on more platforms. 1996-10-15 07:16:41 +00:00
Bruce Momjian 83cb729887 More closing of relations left open by parser. 1996-10-14 03:53:53 +00:00
Bruce Momjian 1a865b8338 Change display of char(5) to (bp)char 5 so psql \d can
distinguish between char and char(1).
1996-10-14 00:33:47 +00:00
Bruce Momjian 81f2f81960 Removed const warning. 1996-10-13 18:39:41 +00:00
Bruce Momjian 54612f5141 D'Arcy change. 1996-10-13 18:38:51 +00:00
Bruce Momjian baf9a6e24c Added include needed for recent addition.
I hope everyone has sys/socket.h.
1996-10-13 18:38:04 +00:00
Bruce Momjian e6cacf9211 Added include needed for recent addition. 1996-10-13 18:37:19 +00:00
Bruce Momjian d31909be6c Fix structure member name from previous patch. 1996-10-13 17:13:58 +00:00
Bruce Momjian 44bf483446 Removed duplicate MAXNAMELEN define I accidentally added. 1996-10-13 13:46:20 +00:00
Bruce Momjian 86be8677a9 Added consistent include file handling for MAXHOSTNAMELEN.
If I have introduced any syntax errors with this, I will patch them in
the morning, and Marc will have a good laugh.
1996-10-13 04:50:27 +00:00
Bruce Momjian abb1b3e770 I checked the alter table code, and started suspecting the relation
cache.  I found if I manually added a line to flush the whole relation
cache, the assert error disappeared.  Looking through the code, I found
that the relation cache is flushed at the end of each query if the
reference count is zero for the relation.  However, printf's showed that
the rd_relcnt(reference count) for the accessed query was not returning
to zero after each query.

It turns out the parser was doing a heap_ropen in parser/analyze.c to
get information about the table's columns, but was not doing a
heap_close.

This was causing the query after the ALTER TABLE ADD to see the old
table structure, and the executor's assert was reporting the problem.
1996-10-13 04:26:39 +00:00
Bryan Henderson bef3c89a1c Fix prototypes so postmaster.c will compile. 1996-10-13 04:01:05 +00:00
Bryan Henderson 369848857e New host-based authentication -- set up pg_hba.conf instead of pg_hba 1996-10-12 07:49:56 +00:00
Bryan Henderson 785234d6ca New host-based authentication -- send error message when authentication fails 1996-10-12 07:48:49 +00:00
Bryan Henderson 4b5c977782 New host-based authentication with ident 1996-10-12 07:47:12 +00:00
Bryan Henderson 57026d6009 New host-based authentication -- install pg_hba.conf instead of pg_hba 1996-10-12 07:44:39 +00:00
Bryan Henderson 09bb369d23 Separate general purpose functions from portal functions so they may be
used in test drivers.
1996-10-11 09:47:14 +00:00
Bryan Henderson 6d70d550e6 Prepare for new host-based authentication 1996-10-11 09:12:18 +00:00
Marc G. Fournier 81cda65f74 Add a MIPS/NetBSD port... 1996-10-11 03:56:41 +00:00
Marc G. Fournier b7559f94cd This change should have no practical effect but it is the more
correct way to do this.  Theoretically you could have a NULL
pointer that isn't represented internally as all 0 bits.  This
guarantees that it convert correctly.

Submitted by: darcy@druid.com (D'Arcy J.M. Cain)
1996-10-11 03:25:00 +00:00
Marc G. Fournier 2663dfd94e I have written some patches to the postgres lock manager which allow the
use of long term cooperative locks managed by the user applications.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-10-11 03:22:59 +00:00
Marc G. Fournier 97906ac697 Reinstituted NAMEDATALEN OIDNAMELEN in Makefile.global so that initdb
works again...
1996-10-11 02:38:16 +00:00
Bryan Henderson 329b38eebb Add PGUSER environment variable for client to specify Postgres username. 1996-10-10 08:20:11 +00:00
Bruce Momjian ca5f6dba0f Comment cleanup. 1996-10-10 00:18:52 +00:00
Bruce Momjian 9b1e61b7e9 Changed psql \h command to print commands in three columns.
No more scrolling off the screen.
1996-10-09 00:15:44 +00:00
Bruce Momjian c306d06cf9 Change sh-style comments to C comments. 1996-10-08 22:23:19 +00:00
Bruce Momjian dd09982f3e Add execute permission. 1996-10-08 04:09:50 +00:00
Bruce Momjian dcef39f03b Add execute permits. 1996-10-08 04:04:38 +00:00
Bruce Momjian 5fb8eaa592 Add execute permission. 1996-10-08 03:53:10 +00:00
Marc G. Fournier d6dfbecb07 Moved the following definitions to include/config.h from Makefile.global:
NAMEDATALEN
	OIDDATALEN
	EUROPEAN_DATES
	HBA
	DEADLOCK_TIMEOUT
	OPENLINK_PATCHES
	NULL_PATCH
	ARRAY_PATCH

Attempting to document and centralize as many of the "defines" as possible...
kinda useless to have defines if nobody knows they exist, eh?
1996-10-08 00:09:05 +00:00
Marc G. Fournier 87bb8daab8 Move the NAMEDATALEN/OIDNAMELEN defines to include/config.h 1996-10-07 23:57:01 +00:00
Marc G. Fournier 6470d5b1c1 Fix handling of no '../doc' directory in compile procedure... 1996-10-07 23:53:47 +00:00
Marc G. Fournier 4e8f5c337c Well I haven't received any feedback pro or con re my suggested new Tcl
function so I am going to assume that it is such a good idea that no
one sees any point in discussing it.  :-)  I have made two changes -
I have merged this into pgtclCmds.c and I have taken out any code for
updating tuples after the loop body runs.  See comments for discussion
of this.

I have also fixed up the error checking stuff so that break, continue
and syntax errors have the expected result.

Submitted by: D'Arcy Cain
1996-10-07 21:19:09 +00:00
Marc G. Fournier ea733aa997 Fix a couple of small things from D'Arcy's last patch
Submitted by: D'Arcy Cain
1996-10-07 21:17:01 +00:00
Bruce Momjian a409f40ea8 Modified Assert to be more selective. 1996-10-07 19:53:15 +00:00
Marc G. Fournier 3dc0c8e4e5 Fixed a missed change from Carsten Heyl <heyl@nads.de> 1996-10-07 07:18:34 +00:00
Marc G. Fournier de466eb8f4 Mostly adding "const" keyword and making some functions static.
Submitted by: D'Arcy Cain
1996-10-07 03:30:40 +00:00
Bruce Momjian 257b4d090c Change new assert so it generates assert message rather than SIGSEG. 1996-10-07 02:50:19 +00:00
Bruce Momjian f6792efcc7 Remove sytax errors from file. 1996-10-07 02:33:25 +00:00
Bruce Momjian 3a56b21832 Update help for alter table. remove EXTEND function. 1996-10-07 02:32:39 +00:00
Bruce Momjian e8e78f4c7b Fix typo in help text. 1996-10-05 21:34:33 +00:00
Bruce Momjian 3a0bace14f Renamed file. 1996-10-05 21:16:34 +00:00
Marc G. Fournier 50e708ef88 Stylistic cleanups... 1996-10-05 20:39:05 +00:00
Bruce Momjian 8999ce097f Add comment about possible zero value. 1996-10-05 20:33:45 +00:00
Bruce Momjian efac791640 Change shell-style comments to C-style. 1996-10-05 20:33:10 +00:00
Bruce Momjian 47279960a0 Fix assert to allow zero. OK'ed by Bryan. 1996-10-05 20:31:38 +00:00
Bruce Momjian a433f22c24 Fix args to match prototype. 1996-10-05 20:30:31 +00:00
Bruce Momjian f29e02017a Replace double // with /. THis confuses mkid. 1996-10-05 20:29:57 +00:00
Bruce Momjian a974522f5f Added single-letter options and case statement. 1996-10-05 03:24:47 +00:00
Bruce Momjian 2d456c473d Improved creation of mkid files. 1996-10-05 03:23:49 +00:00
Marc G. Fournier 4feb696be7 Here the fix for the first assertion failure I had which killed
my postmaster 1.07.
It's really simple, the loop dealing with all sockets
can't handle more than one ready socket :-)
A simple logic error dealing with lists.
OR IS THERE ANY REASON FOR SETTING curr TO 0?

Submitted by:  Carsten Heyl <Heyl@nads.de>
1996-10-04 20:32:07 +00:00
Marc G. Fournier 002be14c45 And bring in change from 1.0.7 tree to here... 1996-10-04 20:29:35 +00:00
Marc G. Fournier ff25e44d03 Moved the define of SIGNAL_ARGS that D'Arcy just created to config.h so that
hopefully this sort of thing can eventually be determined using configure?
1996-10-04 20:20:57 +00:00
Marc G. Fournier f8009e1786 The remainder of D'Arcy's changes, most notibly the usage of SIGNAL_ARGS 1996-10-04 20:17:11 +00:00
Marc G. Fournier 27bccb9db3 This patch fixes problems in initdb, including that it doesn't run
with some versions of sh, and a bug in the master make file that
causes it to issue the message "postgres has been built" at the wrong
time.

Submitted by: bryanh@giraffe.netgate.net (Bryan Henderson)
1996-10-04 20:07:10 +00:00
Marc G. Fournier c61d606a15 Added dlfcn.h to dl.c in BSD44_derived port 1996-10-03 22:41:42 +00:00
Bruce Momjian aefb294e13 Added restriction to tables vacuum'able.
Added NOTICE messages for bad table names.
1996-10-03 20:11:41 +00:00
Bruce Momjian 487e91484d Added chown to Makefile to set files to Postgres user.
Does not display and generates no error messages on failure.
1996-10-03 20:09:48 +00:00
Bruce Momjian f5316239b8 Moved them. 1996-10-03 17:27:01 +00:00
Bruce Momjian 4bec96f16f Brought psql help up to date with syntax and manual. 1996-10-03 15:46:31 +00:00
Bruce Momjian 75e2cbcec3 New vacuum option. 1996-10-03 04:20:41 +00:00
Bruce Momjian fedb734df9 Fixes extra space in printing. 1996-10-03 04:20:11 +00:00
Bruce Momjian 267ef0a642 Allow vacuum to run for only one table. Fixes allocation bug. 1996-10-03 04:19:29 +00:00
Bruce Momjian dbc268ca15 Fixed file to properly do SEMUN for BSDI.
Grouped some PORTNAME's for SEMUN.
1996-10-03 01:14:37 +00:00
Bruce Momjian a14bf40b88 Added new single-letter options to initdb.sh.
Removed long-option names that used ${#} shell feature which
was a compatability problem.
1996-10-03 00:23:42 +00:00
Marc G. Fournier 67e8736348 change stdout to fout
Submitted by: Carsten Heyl <heyl@nads.de>
1996-10-02 21:38:35 +00:00
Marc G. Fournier 0fadfc00ad Added NEED_UNION_SEMUN to config.h 1996-10-02 20:42:20 +00:00
Marc G. Fournier 22ef6d06fc Moved whether to define union semun from include/storage/ipc.h to
a define in include/config.h
1996-10-02 20:40:17 +00:00
Bruce Momjian 8f7756d796 palloc() finfo memory. From Kurt. 1996-09-26 16:29:05 +00:00
Bruce Momjian adc98c0b35 Fix cluster finfo problem Kurt reported. 1996-09-26 15:43:35 +00:00
Bruce Momjian 2baf2150e9 Fixed YACC depenencies and 'make clean' now cleans totally. 1996-09-26 15:40:45 +00:00
Bruce Momjian f8a84c947a This should cause 'make clean' to clean up bki files. Looks like a typo. 1996-09-26 04:22:49 +00:00
Bruce Momjian deaaecdf2e Prevents possible packet loss from SIGCHLD. 1996-09-26 03:17:44 +00:00
Bruce Momjian fd067981be Fix location of include files to match postgres.h includes. 1996-09-25 19:37:31 +00:00
Bruce Momjian 0d83b86720 Changed gawk to awk. 1996-09-25 19:24:58 +00:00
Marc G. Fournier b12fb0e6b5 Patch for:
#     _fUnKy_POSTPORT_sTuFf_    -  port to run the postmaster on

Submitted by: D'Arcy
1996-09-24 01:57:01 +00:00
Marc G. Fournier 4ca1e1300c Change the comments pertaining to Makefile.custom
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-23 18:17:42 +00:00
Marc G. Fournier 87799e38f1 Prototype setMaxOid()
Submitted by: Bruce
1996-09-23 18:15:41 +00:00
Marc G. Fournier afcbce5c22 CFLAGS +- -I... got messed by one of Bryan's patches
Fix Submitted by: Bryan himself :)
1996-09-23 18:14:08 +00:00
Marc G. Fournier 0da293f868 Fix for using Makefile.custom
Suggested/Submitted by: darcy@druid.druid.com
Cleaner Method Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-09-23 08:43:40 +00:00
Marc G. Fournier 9c6135fb15 From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Postgres95-development <pg95-dev@ki.net>
Subject: [PG95-DEV] postgres.h patch

This removes the parameters from the func_ptr prototype in postgres.h in
2.0.
1996-09-23 08:38:45 +00:00
Marc G. Fournier 32620c222e From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Postgres95-development <pg95-dev@ki.net>
Subject: [PG95-DEV] Makefile.global patch

Can we apply the following patch to make EUROPEAN_DATES consistent with
other parameters?
1996-09-23 08:37:41 +00:00
Marc G. Fournier 3bf2b361f0 Date: Sun, 22 Sep 1996 13:47:39 -0400 (EDT)
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Postgres95-development <pg95-dev@ki.net>
Subject: [PG95-DEV] 2.0 patch for fastgetattr
1996-09-23 08:36:39 +00:00
Marc G. Fournier d00f621d7b diff -ru ../../../orig/postgres95/src/backend/utils/adt/varlena.c
./utils/adt/varlena.c
- --- ../../../orig/postgres95/src/backend/utils/adt/varlena.c    Mon Jul 22
23:56:04 1996
+++ ./utils/adt/varlena.c       Tue Sep 17 15:12:55 1996
@@ -166,7 +166,7 @@

     if (inputText == NULL)
        return(NULL);
- -    len = strlen(inputText) + VARHDRSZ;
+    len = strlen(inputText) + VARHDRSZ + 1 /* terminating 0 */;
     result = (struct varlena *) palloc(len);
     VARSIZE(result) = len;
     memmove(VARDATA(result), inputText, len - VARHDRSZ);


Submitted by: skimo@breughel.ufsia.ac.be (Sven Verdoolaege)
1996-09-23 08:31:01 +00:00
Marc G. Fournier fb7f8e7655 diff -ru ../../../orig/postgres95/src/backend/libpq/be-fsstubs.c
./libpq/be-fsstubs.c
- --- ../../../orig/postgres95/src/backend/libpq/be-fsstubs.c     Tue Jul  9
08:21:30 1996
+++ ./libpq/be-fsstubs.c        Tue Sep 17 15:30:09 1996
@@ -241,7 +241,7 @@
      */
     fd = open(VARDATA(filename), O_RDONLY, 0666);
     if (fd < 0)  {   /* error */
- -       elog(WARN, "lo_import: can't open unix file\"%s\"\n", filename);
+       elog(WARN, "lo_import: can't open unix file \"%s\"\n",
VARDATA(filename));
     }

     /*


Submited by: skimo@breughel.ufsia.ac.be (Sven Verdoolaege)
1996-09-23 08:29:52 +00:00
Marc G. Fournier ff4d0d435e Here's a patch that I discussed recently on pg95-dev that changes the
way one creates a database system.  Parts that were in "make install"
are not either in "make all" or initdb.  Nothing goes in the PGDATA
directory besides user data.  Creating multiple database systems is
easier.

In addition to applying the patch, it is necessary to move the file
libpq/pg_hba to backend/libpq/pg_hba.sample.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-09-23 08:24:13 +00:00
Marc G. Fournier e7c3adcd94 *** src/backend/storage/file/fd.c.orig Thu Sep 12 17:17:21 1996
--- src/backend/storage/file/fd.c       Thu Sep 12 17:23:38 1996
***************
*** 262,268 ****
      Delete(file);

      /* save the seek position */
!     fileP->seekPos = lseek(fileP->fd, 0L, SEEK_CUR);
      Assert( fileP->seekPos != -1);

      /* if we have written to the file, sync it */
--- 262,268 ----
      Delete(file);

      /* save the seek position */
!     fileP->seekPos = (long) lseek(fileP->fd, 0L, SEEK_CUR);
      Assert( fileP->seekPos != -1);

      /* if we have written to the file, sync it */


Submitted by: Randy Terbush <randy@zyzzyva.com>
1996-09-22 01:30:52 +00:00
Marc G. Fournier 5774d080a7 Turned off EUROPEAN_DATES as default...
Pointed out by Bruce
1996-09-21 19:12:11 +00:00
Marc G. Fournier 7efc8ef1a1 |For starters, here's a small patch that removes a compiler warning in that
|regex stuff on Linux.
|
|--
|Bryan Henderson                                    Phone 408-227-6803
|San Jose, California
|
1996-09-21 06:31:13 +00:00
Marc G. Fournier ee420c049f |This fixes the bug introduced yesterday that causes "not found" errors
|with gram.c and parser.h.
|
|--
|Bryan Henderson                                    Phone 408-227-6803
|San Jose, California
|
1996-09-21 06:29:09 +00:00
Marc G. Fournier 83298ee312 Nothing patched...just testing something with CVS... 1996-09-21 06:27:11 +00:00
Marc G. Fournier 04b55fc4a4 Patches to make POSTPORT changes in scripts
Originally submitted by: ernst.molitor@uni-bonn.de
resubmitted by: D'Arcy Cain
1996-09-21 06:24:41 +00:00
Marc G. Fournier 1a003fbcc2 Various patches from Bryan that *should* clean up the compile problems
ppl are seeing with v2.0
1996-09-20 08:34:39 +00:00
Marc G. Fournier 985acb8ea0 Add the regex include files to the repository...
In my cvs source tree, tihs directory existed, which is why it compiled
on my system, but nobody elses...
1996-09-20 05:29:31 +00:00
Marc G. Fournier 3c237e7347 I have two small patches which correct some very obscure bug in the parser
of the array constants and in one of the loadable modules I posted some time
ago.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-19 20:05:59 +00:00
Marc G. Fournier 8594ade7b0 Another small change. Added the void keyword to an empty arg list.
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-19 20:02:53 +00:00
Marc G. Fournier b19b90d706 Just a small change to flesh out the func_ptr typedef declaration.
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-19 20:01:40 +00:00
Marc G. Fournier 3023dc6af0 A few changes to cleanup the code.
- Added the header access/heapam.h.
  - Changed all instances of "length" to "data_length" to quiet
    the compiler.
  - initialized a few variables.  The compiler couldn't see that
    the code guaranteed that these would be initialized before
    being dereferenced.  If anyone wants to check my work follow
    the usage of these variables and make sure that this true
    and wasn't actually a bug in the original code.
  - added a missing break statement to a default case.  This
    was a benign error but bad style.
  - layed out heap_sysattrlen differently.  I think this way
    makes the structure of the code crystal clear.  There should
    be no actual difference in the actual behaviour of the code.

Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-19 20:00:37 +00:00
Marc G. Fournier efebd7b7aa Cleanup patch of pg_version
Submitted by:  darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-19 19:58:27 +00:00
Marc G. Fournier ea8adfc435 Added querylimit patch...
Submitted by:  Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-19 19:57:18 +00:00
Marc G. Fournier aceac3a927 Fix for pg_log bug
Submitted by: "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
1996-09-19 19:50:48 +00:00
Marc G. Fournier 0318f227ac Add missing includes to silence compile
Submitted by: D'Arcy Cain
1996-09-16 06:34:40 +00:00
Marc G. Fournier 95251f458c Various standardizations and fixes submitted by D'Arcy Cain
NOTE: Makefile.custom is commented out, since it isn't there by default.
      If you read the section telling you about it to know to create it,
      you can uncomment it while you are there ...
1996-09-16 06:32:25 +00:00
Marc G. Fournier 40aade2c06 At Andrew's suggestion, upgrade the Version numbers to reflect the
current state of development...namely, we are on 2.0

NOTE:

BTW, the is also a check in postmaster which won't let you use an older
version of the database by checking the version number. The version number
of a database is in data/PG_VERSION (a plain ASCII file).

				- Andrew
1996-09-16 06:11:44 +00:00
Marc G. Fournier f589ca6800 The following diffs remove the various definitions of dupstr() and replace
all the calls with strdup.

Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-16 06:06:17 +00:00
Marc G. Fournier 24f0012268 I have made some corrections to my previous patches for retrieving array
attributes as tcl arrays.  The previous code had problems with some chars
used as delimiter by Tcl.  The new code should be more robust.

By: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-16 05:54:53 +00:00
Marc G. Fournier 33dccad831 enable PQ_NOTIFY_PATCH in config.h 1996-09-16 05:52:51 +00:00
Marc G. Fournier bbebcb125e Fixes:
Async notifies received while a backend is in the middle of a begin/end
transaction block are lost by libpq when the final end command is issued.

The bug is in the routine PQexec of libpq. The routine throws away any
message from the backend when a message of type 'C' is received. This
type of message is sent when the result of a portal query command with
no tuples is returned. Unfortunately this is the case of the end command.
As all async notification are sent only when the transaction is finished,
if they are received in the middle of a transaction they are lost in the
libpq library. I added some tracing code to PQexec and this is the output:

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-16 05:50:46 +00:00
Marc G. Fournier e3b41d40fa More code cleanups from "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-09-16 05:40:31 +00:00
Marc G. Fournier df6ca83a5b Enable FUNC_UTIL_PATCH by default 1996-09-16 05:39:04 +00:00
Marc G. Fournier 906651f663 There is a bug in the function executor. The backend crashes while trying to
execute an sql function containing an utility command (create, notify, ...).
The bug is part in the planner, which returns a number of plans different
than the number of commands if there are utility commands in the query, and
in part in the function executor which assumes that all commands are normal
query commands and causes a SIGSEGV trying to execute commands without plan.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-16 05:36:38 +00:00
Marc G. Fournier 475493130d |Subject: Postgres patch: Assert attribute type match
|
|Here's a patch for Version 2 only.  It just adds an Assert to catch some
|inconsistencies in the catalog classes.
|
|--
|Bryan Henderson                                    Phone 408-227-6803
|San Jose, California
|
1996-09-16 05:33:20 +00:00
Marc G. Fournier c5dd292007 Add use of INDEXSCAN_PATCH to config.h instead of putting it in Makefile.global 1996-09-10 06:51:28 +00:00
Marc G. Fournier 796f78998e Fixes:
The problem is that the function arguments are not considered as possible key
candidates for index scan and so only a sequential scan is possible inside
the body of a function.  I have therefore made some patches to the optimizer
so that indices are now used also by functions.  I have also moved the plan
debug message from pg_eval to pg_plan so that it is printed also for plans
genereated for function execution.  I had also to add an index rescan to the
executor because it ignored the parameters set in the execution state, they
were flagged as runtime variables in ExecInitIndexScan but then never used
by the executor so that the scan were always done with any key=1. Very odd.
This means that an index rescan is now done twice for each function execution
which uses an index, the first time when the index scan is initialized and
the second when the actual function arguments are finally available for the
execution.  I don't know what is the cost of an double index scan but I
suppose it is anyway less than the cost of a full sequential scan, at leat
for large tables. This is my patch, you must also add -DINDEXSCAN_PATCH in
Makefile.global to enable the changes.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-10 06:48:52 +00:00
Marc G. Fournier f2f53aee0f Fixes:
The comparison routines for text and char data type give incorrect results
if the input data contains characters greater than 127.  As these routines
perform the comparison using signed char variables all character codes
greater than 127 are interpreted as less than 0.  These codes are used to
encode the iso8859 char sets.
The other text-like data types seem to work as expected as they use unsigned
chars in comparisons.


Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-10 06:41:38 +00:00
Marc G. Fournier 1ba34d91fc Cleaned up a spurious '-' ...
Pointed out by: ernst.molitor@uni-bonn.de
1996-09-10 06:23:46 +00:00
Marc G. Fournier 28fad34c7b modifications required to reflect centralized include files 1996-08-28 23:02:43 +00:00
Marc G. Fournier 4978d3f4bb modifications required to reflect centralized include files 1996-08-28 22:50:24 +00:00
Marc G. Fournier 870be9fa8e Clean up th ecompile process by centralizing the include files
- code compile tested, but due to a yet unresolved problem with
          parse.h's creation, compile not completed...
1996-08-28 07:27:54 +00:00
Marc G. Fournier 907c884fe8 Went back one directory too far for the -I include 1996-08-28 02:18:00 +00:00
Marc G. Fournier f634c14c9e Path to pg_proc.h to create fmgrtab.c change to include/catalog 1996-08-28 02:13:10 +00:00
Marc G. Fournier 1054097464 More cleanups of the include files
- centralizing to simplify the -I's required to compile
1996-08-28 01:59:28 +00:00
Marc G. Fournier ca405ae4bf Moved the include files to src/include/regex 1996-08-28 01:55:44 +00:00
Marc G. Fournier 5c0d6ccdbf Redundant -I pointer to port/<portname> 1996-08-28 01:50:01 +00:00
Marc G. Fournier ad5a3141a2 c.h is included in postgres.h already 1996-08-28 01:23:59 +00:00
Marc G. Fournier b8a0bb68c9 Should finish cleaning out the machine.h includes 1996-08-27 22:21:34 +00:00
Marc G. Fournier 6196646291 Remove include of machine.h 1996-08-27 22:20:28 +00:00
Marc G. Fournier 3c0f8ed4ae Remove all traces of machine.h and redundant calls to c.h where
postgres.h already pulled in (postgres.h includes c.h)
1996-08-27 22:15:17 +00:00
Marc G. Fournier a88b72ea39 #ifndef the include file like the rest, so that it doesn't get pulled
in twice...
1996-08-27 22:09:10 +00:00
Marc G. Fournier 54223de000 Oops, win32 does have one more thing in its machine.h...move that
define to config.h
1996-08-27 22:07:59 +00:00
Marc G. Fournier 3a606407c7 We have a machine.h for each platform just because of BLCKSZ, and every
platform with a machine.h has the same BLCKSZ?

Consolidate machine.h into config.h
1996-08-27 22:06:30 +00:00
Marc G. Fournier eadf5dc754 #include "postgres.h" exists in most .c files in system, so adding
#include "config.h" here will (should?) ensure that any platform
dependencies defined in config.h should be reflected in all .c files...
1996-08-27 22:00:21 +00:00
Marc G. Fournier 5a8820efcd Moved from backend/access to include/access 1996-08-27 21:50:29 +00:00
Marc G. Fournier 9247b29228 The use of include files is a mess...alot of redundancy, it seems...
First Step: Centralize them under on src/include hierarchy
1996-08-27 21:49:14 +00:00
Marc G. Fournier e1f31a2bb6 added #include "config.h" for ESCAPE_PATCH define 1996-08-27 07:42:29 +00:00
Marc G. Fournier 43eeb64688 Removed -DESCAPE_PATCH ... moved to include/config.h 1996-08-27 07:41:17 +00:00
Marc G. Fournier 321b8c80fd At this rate, maybe next year sometime I'll get this done...
Goals: reduce the difficulty of porting from platform to platform,
       release to release, but moving as much as possible into config.h
1996-08-27 07:32:33 +00:00
Marc G. Fournier e733befeed One file at a time, one directory after the other...this is going
to be one helluva chore to clean up...
1996-08-27 07:30:55 +00:00
Marc G. Fournier 849292a188 first attempt at centralizing config information for ports 1996-08-27 06:56:08 +00:00
Marc G. Fournier c028568217 first pass...move some of the "Port" dependencies to src/include/config.h 1996-08-27 06:55:28 +00:00
Marc G. Fournier 672aec6ce3 Reduce -DPORTNAME_$(PORTNAME) down to just -D$(PORTNAME) 1996-08-27 06:52:34 +00:00
Marc G. Fournier 1da12ffb12 Its a start... 1996-08-27 06:14:29 +00:00
Marc G. Fournier 51b3f2d371 Create support for a "common" include directory for the source
tree, instead of having include files all over the place...

Immediate goal...a 'config.h' file so that we can make #ifdef's
being used throughout the code more a rarity as far as porting
is concerned
1996-08-27 06:10:50 +00:00
Marc G. Fournier bfc308d196 Damn, we really need to clean up this "include file" dilemna...
include files *everywhere* ;(
1996-08-26 23:04:07 +00:00
Marc G. Fournier 491b9b89c4 The patch that is applied at the end of the email makes sure that these
conditions are always met. The patch can be applied to any version
of Postgres95 from 1.02 to 1.05. After applying the patch, queries
using indices on bpchar and varchar fields should (hopefully ;-) )
always return the same tuple set regardless to the fact whether
indices are used or not.

Submitted by: Gerhard Reithofer <tbr_laa@AON.AT>
1996-08-26 20:38:52 +00:00
Marc G. Fournier e78fe652f4 Oops, thanks to Dan McGuirk for pointing out that I missed part of
the commit :(

Here's the rest of the GiST code thta was missing...
1996-08-26 20:02:12 +00:00
Marc G. Fournier 2fd6061e1c Quick fix of the PG-GiST import pointed out by Dan 1996-08-26 19:59:15 +00:00
Marc G. Fournier a2740a455f There, now we support GiST...now what? :) 1996-08-26 06:32:06 +00:00
Marc G. Fournier fe87dbb140 Roll in patch that fixes problem with sed 3.0
submitted by: Dan McGuirk
1996-08-26 06:04:49 +00:00
Marc G. Fournier c449668d3e Fix prototype for dumpClasses 1996-08-26 05:46:39 +00:00
Marc G. Fournier 61eaefe9a6 This patch for Versions 1 and 2 corrects the following bug:
In a catalog class that has a "name" type attribute, UPDATEing of an
instance of that class may destroy all of the attributes of that
instance that are stored as or after the "name" attribute.

This is caused by the alignment value of the "name" type being set to
"double" in Class pg_type, but "integer" in Class pg_attribute.
Postgres constructs a tuple using double alignment, but interprets it
using integer alignment.

The fix is to change the alignment to integer in pg_type.

Note that this corrects the problem for new Postgres systems.  Existing
databases already contain the error and it can't easily be repaired because
this very bug prevents updating the class that contains it.

--
Bryan Henderson                                    Phone 408-227-6803
San Jose, California
1996-08-24 20:56:16 +00:00
Marc G. Fournier 208a30f23d The patch does several things:
It adds a WITH OIDS option to the copy command, which allows
dumping and loading of oids.

        If a copy command tried to load in an oid that is greater than
its current system max oid, the system max oid is incremented.  No
checking is done to see if other backends are running and have cached
oids.

        pg_dump as its first step when using the -o (oid) option, will
copy in a dummy row to set the system max oid value so as rows are
loaded in, they are certain to be lower than the system oid.

        pg_dump now creates indexes at the end to speed loading


Submitted by:  Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-24 20:49:41 +00:00
Marc G. Fournier 2adb6d703b Here's the fix for the problem that Evan Champion reported today.
This presumably corrects a problem of initdb failing on systems that have
an awk that is sensitive to this.

--
Bryan Henderson                                    Phone 408-227-6803
San Jose, California
1996-08-24 20:38:56 +00:00
Marc G. Fournier e2c9fd8e87 |May I suggest to add access to the oid of an inserted
|record, by a small patch to libpq++? At least until the
|feature that will allow dumped oid's to be re-loaded into
|a database becomes available, I need access to the oids
|of newly created records... To this end, I have written a
|three-line wrapper for the PQoidStatus function in libpq and
|named this wrapper OidStatus() (I'd appreciate suggestions for
|a name that would better fit into the general naming scheme).
|
|Regards,
|
|Ernst
|
1996-08-21 04:32:09 +00:00
Marc G. Fournier 5e773a4f70 Here's a patch for Versions 1 and 2 that fixes the following bug:
When you try to do any UPDATE of the catalog class pg_class, such as
to change ownership of a class, the backend crashes.

This is really two serial bugs: 1) there is a hardcoded copy of the
schema of pg_class in the postgres program, and it doesn't match the
actual class that initdb creates in the database; 2) Parts of postgres
determine whether to pass an attribute value by value or by reference
based on the attbyval attribute of the attribute in class
pg_attribute.  Other parts of postgres have it hardcoded.  For the
relacl[] attribute in class pg_class, attbyval does not match the
hardcoded expectation.

The fix is to correct the hardcoded schema for pg_attribute and to
change the fetchatt macro so it ignores attbyval for all variable
length attributes.  The fix also adds a bunch of logic documentation and
extends genbki.sh so it allows source files to contain such documentation.

--
Bryan Henderson                                    Phone 408-227-6803
San Jose, California
1996-08-21 04:25:49 +00:00
Marc G. Fournier 93ad36fdc2 USE_TCL should default to false, ntot true... 1996-08-21 04:08:17 +00:00
Marc G. Fournier 2a23229cb3 BSD$$_derived needs -ltermcap for psql 1996-08-21 04:06:01 +00:00
Marc G. Fournier 4455ba2c88 Erk, missed adding the required ilbrary itself 1996-08-21 04:03:32 +00:00
Marc G. Fournier 41d0b14764 Quick fix for compiling psql... 1996-08-21 03:59:59 +00:00
Julian Assange 99dc4e3b43 command line flag for expanded display '-x' had logic reversed 1996-08-21 00:22:41 +00:00
Marc G. Fournier 1bdbf4092a Bring in changes to READLINE/HISTORY defines 1996-08-20 05:04:13 +00:00
Marc G. Fournier c801ca0982 Finish adding in svr4 port to v2.0 1996-08-19 13:58:23 +00:00
Marc G. Fournier 926a066d40 Added a SVR4 port
---

below my signature, there are a coupls of diffs and files in a shell
archive, which were needed to build postgres95 1.02 on Siemens Nixdorfs
MIPS based SINIX systems. Except for the compiler switches "-W0" and
"-LD-Blargedynsym" these diffs should also apply for other SVR4 based
systems. The changes in "Makefile.global" and "genbki.sh" can probably
be ignored (I needed gawk, to make the script run).

There is one bugfix thou. In "src/backend/parser/sysfunc.c" the
function in this file didn't honor the EUROPEAN_DATES ifdef.

---

Submitted by:  Frank Ridderbusch <ridderbusch.pad@sni.de>
1996-08-19 13:52:54 +00:00
Marc G. Fournier 0e9f4ceae0 Here's a minor fix that fixes a casting problem:
-Kurt
1996-08-19 13:38:42 +00:00
Marc G. Fournier c3673c0345 More run-time checking errors:
-Kurt
1996-08-19 13:37:50 +00:00
Marc G. Fournier 60b1123f5e Fixes:
Here's a couple more small fixes that I've made to make my runtime
checker happy with the code.  More along the lines of those that
I sent in the past, ie, a pointer to an array != the name of
an array.  The last patch is that I mailed about yesterday -- I got
two replies of "do it", so it's done.  As far as I can tell, however,
the function in question is never called by pg95, so either way
it can't hurt...

From:  "Kurt J. Lidl" <lidl@va.pubnix.com>
1996-08-19 13:32:14 +00:00
Marc G. Fournier 77e01653bc Fixes:
When you connect to a database with PQsetdb, as with psql, depending on
how your uninitialized variables are set, you can get a failure with a
"There is no connection to the backend" message.

The fix is to move a call to PQexec() from inside connectDB() to
PQsetdb() after connectDB() returns to PQsetdb().  That way a connection
doesn't have to be already established in order to establish it!


From:  bryanh@giraffe.netgate.net (Bryan Henderson)
1996-08-19 13:25:40 +00:00
Marc G. Fournier 3c47cdeb5a From: Dan McGuirk <mcguirk@indirect.com>
fixed the spelling of 'nonexistent' in a few places...
1996-08-19 01:53:39 +00:00
Marc G. Fournier f796387b60 |From: Dan McGuirk <mcguirk@indirect.com>
|
|This patch fixes a backend crash that happens sometimes when you try to
|join on a field that contains NULL in some rows.  Postgres tries to
|compute a hash value of the field you're joining on, but when the field
|is NULL, the pointer it thinks is pointing to the data is really just
|pointing to random memory.  This forces the hash value of NULL to be 0.
|
|It seems that nothing matches NULL on joins, even other NULL's (with or
|without this patch).  Is that what's supposed to happen?
|
1996-08-19 01:52:36 +00:00
Marc G. Fournier 1960a3b965 changed missed err() change to err_out()
Found/submittd by David Bennett
1996-08-17 06:41:10 +00:00
Marc G. Fournier a4402ecc8c Fixes a bug in 'create index'
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-15 07:42:52 +00:00
Marc G. Fournier d6fa4d95cd Fixes:
CLUSTER command couldn't rename correctly the new created heap relation.
The table base name resulted in some "temp_XXXX" instead of the correct
base name.

Submitted by: Dirk Koeser <koeser@informatik.uni-rostock.de>
1996-08-15 07:39:24 +00:00
Marc G. Fournier 4844adc888 Fixes;
Postgres is not able to cluster a relation on which an rtree index is
 defined. Postmaster gives the following error message:

 Too Large Allocation Request("!(0 < (size) && (size) <= (0xfffffff)):size=0
 [0x0]", File:"/export/home/postgres/src/backend/utils/mmgr/mcxt.c", Line: 220)
  !(0 <(size) && (size) <= (0xfffffff)) (0) [No such file or directory]

Submitted by: Dirk Koeser <koeser@informatik.uni-rostock.de>
1996-08-15 07:30:22 +00:00
Marc G. Fournier bde34552a2 |
|Here is a fix for the psql alignment problem.  It turns out that libpq
|was trying to determine if the column contained only numeric values so
|it could right justify it.  The 'e' values were taked as exponient
|values and all columns were considered numeric.
|
|The patch excludes 'e' and 'E' as being valid first-column numeric
|values.
|

Submitted by: Bruce...
1996-08-14 16:44:51 +00:00
Marc G. Fournier 476ef10913 This patch can be installed as part of 1.02.1 so people can properly
pg_dump and load to 2.0.  I haven't gotten any feedback on whether
people want it, so I am submitting it for others to decide.  I would
recommend an install in 1.02.1.

I had said that the 2.0 pg_dump could dump a 1.02.1 database, but I was
wrong.  The copy is actually performed by the backend, and the 2.0
database will not be able to read 1.02.1 databases because of the new
system columns.

This patch does several things.  It copies nulls out as \N, so they can
be distinguished from '' strings.  It fixes a problem where backslashes
in the input stream were not output as double-backslashes.  Without this
patch, backslashes copied out were deleted upon input, or interpreted as
special characters.  Third, input is now terminated by backslash-period.
This can not be part of a normal input stream.

I tested this by creating a database with all sorts of nulls, backslash,
and period fields and dumped the database and reloaded into a new
database and compared them.

Submitted by: Bruce
1996-08-14 05:44:25 +00:00
Marc G. Fournier e7a110b418 This patch can be installed as part of 1.02.1 so people can properly
pg_dump and load to 2.0.  I haven't gotten any feedback on whether
people want it, so I am submitting it for others to decide.  I would
recommend an install in 1.02.1.

I had said that the 2.0 pg_dump could dump a 1.02.1 database, but I was
wrong.  The copy is actually performed by the backend, and the 2.0
database will not be able to read 1.02.1 databases because of the new
system columns.

This patch does several things.  It copies nulls out as \N, so they can
be distinguished from '' strings.  It fixes a problem where backslashes
in the input stream were not output as double-backslashes.  Without this
patch, backslashes copied out were deleted upon input, or interpreted as
special characters.  Third, input is now terminated by backslash-period.
This can not be part of a normal input stream.

I tested this by creating a database with all sorts of nulls, backslash,
and period fields and dumped the database and reloaded into a new
database and compared them.

Submitted by: Bruce
1996-08-14 05:33:11 +00:00
Marc G. Fournier 15a645014a I grabbed the latest version of the source code via sup this morning,
and found out that one of the patches is a show stopper for
compiling under a strict ansi package.

Please make sure the following fix makes it into the 1.02.1
release...

Thanks.

-Kurt
1996-08-14 05:03:47 +00:00
Marc G. Fournier 988a9adfbd This is a fix to be included in 1.02.1. It adds a tip for people
getting semaphore or shared memory errors.

Submitted by: bryanh@giraffe.netgate.net (Bryan Henderson)
1996-08-14 05:01:53 +00:00
Marc G. Fournier 011ee13131 |
|We're all too familiar with psql's "no response from backend" message.
|Users can't tell what this means, and psql continues prompting for
|commands after it even though the backend is dead and no commands can
|succeed.  It eventually dies on a signal when the dead socket fills
|up.  I extended the message to offer a better explanation and made
|psql exit when it finds the backend is dead.
|
|I also added a short message and newline when the user does a ctl-D so
|it doesn't mess up the terminal display.
|
|

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:56:55 +00:00
Marc G. Fournier 6b9ecd8348 Here's a small makefile patch that corrects the following bug: The makefiles
don't indicate that the libpq.a library is a dependency of all the /bin
programs.  So if the library changes, the /bin programs don't get remade.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:54:45 +00:00
Marc G. Fournier 80d0c4ffd3 The following patch makes postmaster -D work. -D specifies a different PGDATA
directory.  The code that looks for the pg_hba file doesn't use it, though,
so the postmaster uses the wrong pg_hba file.  Also, when the postmaster
looks in one directory and the user thinks it is looking in another
directory, the error messages don't give enough information to solve the
problem.  I extended the error message for this.


Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:51:34 +00:00
Marc G. Fournier ca5db6cab1 I have attached a minor update for the Postgres make files. This update
does 2 things:

1) Make it hard to not notice the make failed.  (As you recall, someone on
   the mailing list had this problem.  I've had it to some extent myself).

    The 1.02 make files continue with the next subdirectory when a make
    in a subdirectory fails.  The patch makes the make stop in the
    conventional way when a submake fails.  It also adds a reassuring message
    when the make succeeds and adds a note to the INSTALL file to expect it.

2) Include loader flags on all invocations of the linker.

   The 1.02 make files omit the $(LDFLAGS) on some of the linker invocations.
   On my system, I need one of those flags just to make it invoke the proper
   version of the compiler/linker, so LDFLAGS has to be everywhere.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-13 07:48:33 +00:00
Marc G. Fournier a721c91ade More code cleanups
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-08-13 01:36:50 +00:00
Marc G. Fournier 9305fc748c Fixes:
Attached is a patch to allow libpq to determine if a field is null.

This is needed because text fields will return a PQgetlength() of 0
whether it is '' or NULL.  There is even a comment in the source noting
the fact.

I have changed the value of the 'len' field for NULL result fields.  If
the field is null, the len is set to -1 (NULL_LEN).  I have changed
PQgetlength() to return a 0 length for both '' and NULL.  A new function
PQgetisnull() returns true or false for NULL.

The only risk is to applications that do not use the suggested
PQgetlength() call, but read the result 'len' field directly.

As this is not recommended, I think we are safe here.

A separate documentation patch will be sent.


Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-13 01:34:29 +00:00
Marc G. Fournier 78d56d0bcb Small cleanup of the irix5 port
Submitted by: Andrew Martin <martin@biochemistry.ucl.ac.uk>
1996-08-13 01:33:27 +00:00
Marc G. Fournier 9da9c0915a Fixes:
Here's a small patch that my run-time checker whines about
incessantly.  The justification for the patch is along the
lines of passing a NULL is allowed if you have an
arguement that is a *POINTER* to something, but if
the arguement is an array reference, it's not really
a "pointer", so it can't be NULL.

If you question this, I refer you to
<URL:http://www.va.pubnix.com/staff/djm/lore/arrays-are-not-pointers>

Anyways, here's the patch:

-Kurt

Submitted by: "Kurt J. Lidl" <lidl@va.pubnix.com>
1996-08-13 01:32:26 +00:00
Marc G. Fournier 59f29714aa Fixes:
This patch forces postgres95 to assume any floating-point value is a
float8.  It removes the requirement that you cast all floating-point
constants to float8.

We can remove alot of casts in the regression test after we are sure
this works.

If I have missed anything, would someone let me know.  I have tested
inserts of floating-point values into float8 fields, and it worked well.
Casting the number to float4 showed the same precision loss as previous
uncast values showed.

Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-13 01:29:34 +00:00
Marc G. Fournier 9b7eb28ea5 Fixes:
There is a support routine in the standard 4.4BSD C library
called "err()".  There is also a utility routine in
.../src/backend/bootstrap/bootstrap.c
with the same name.

Here's a patch that renames the pg95 routine to something a little
more sane.  As a bonus, one more bit of system-specific code leaves
the system...

Submitted by: "Kurt J. Lidl" <lidl@va.pubnix.com>
1996-08-13 01:28:29 +00:00
Marc G. Fournier 5bd4485c8e More code cleanups
Submitted by:  darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-08-13 01:27:21 +00:00
Marc G. Fournier 1508feb283 Another small patch fix...
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-10 05:02:53 +00:00
Marc G. Fournier 4db7f15b2a Updates to libpq to fix breakage in previous patch...
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-08-10 00:22:48 +00:00
Marc G. Fournier ae4725295a Fix an Inccorect Error Message...
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-09 19:06:59 +00:00
Julian Assange dfca092633 applied kurt's patch to fix unlikely, but potential, string underflow
problem in psql
1996-08-06 20:23:14 +00:00
Marc G. Fournier ab57e09e1c Fixes:
Also, I think that an extra source of noise in the diff of regress.out and
expected.out is caused by not substituting the shared library file
extension in the regression.input file (much like the paths and the
usernames are sub'ed). This seems to be fixed with the following patches
to regression.input and the Makefile... If I'm off base here, please tell!

Submitted by:  Wayde Nie <niew@phoenix.cis.mcmaster.ca>
1996-08-06 16:51:35 +00:00
Marc G. Fournier bb0bdfd101 Fixes:
I've enclosed two patches.  The first affects Solaris compilability.  The
bug stems from netdb.h (where MAXHOSTNAMELEN is defined on a stock
system).  If the user has installed the header files from BIND 4.9.x,
there will be no definition of MAXHOSTNAMELEN.  The patch will, if all
else fails, try to include <arpa/nameser.h> and set MAXHOSTNAMELEN to
MAXDNAME, which is 256 (just like MAXHOSTNAMELEN on a stock system).

The second patch adds aliases for "ISNULL" to "IS NULL" and likewise for
"NOTNULL" to "IS NOT NULL".  I have not removed the postgres specific
ISNULL and NOTNULL.  I noticed this on the TODO list, and figured it would
be easy to remove.

The full semantics are:
        [ expression IS NULL ]
        [ expression IS NOT NULL ]

--Jason


Submitted by: Jason Wright <jason@oozoo.vnet.net>
1996-08-06 16:43:41 +00:00
Marc G. Fournier 6c684b1847 Fixes:
Previously Postgres95 wouldn't accept 'order by' clauses with fields
referred to as '<table>.<field>', e.g.:

        select t1.field1, t2.field2 from table1 t1, table2 t2
                order by t2.field2;

This syntax is required by the ODBC SQL spec.

Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-06 16:38:03 +00:00
Marc G. Fournier ab22b34891 Fixes:
While a normal SELECT statement can contain a GROUP BY clause, a cursor
declaration cannot. This was not the case in PG-1.0. Was there a good
reason why this was changed? Are cursors being phased out? Is there any way
to get data with just a SELECT (and without a DECLARE CURSOR ...)?

The patch below seems to fix things. If anyone can see a problem with it,
please let me know. Thanks.

Submitted by:  David Smith <dasmith@perseus.tufts.edu>
1996-08-06 16:27:59 +00:00
Marc G. Fournier c4e53a1411 Fixes for:
Here are a few minor fixes to Postgres95.  Mostly I have added const
to some of the char pointers.  There was also a missing header file
and a place where it looks like "==" was used when "=" was meant.
I also changed some variables from Pfin and Pfout tp pfin and pfout
because the latter shadow global variables and that just seems like
an unsafe practice which I like to avoid.

Submitted by:  "D'Arcy J.M. Cain" <darcy@druid.druid.com>
1996-08-06 16:16:50 +00:00
Marc G. Fournier fd3b829959 Had a space in CFLAGS+= -I ..
Submitted by:  Andrew Martin <martin@biochemistry.ucl.ac.uk>
1996-08-06 16:05:56 +00:00
Julian Assange 7ef04b25cc added patch from kurt that fixes memory leak (didn't free line buffer
for slash commands)
1996-08-06 00:40:12 +00:00
Marc G. Fournier 132e9159eb Fixes:
Someone asked me if the bpchar type could be extended to do
case-insensitive regular expression searches.


Submitted by: "Alistair G. Crooks" <azcb0@juts.ccc.amdahl.com>
1996-08-05 00:25:07 +00:00
Marc G. Fournier 54f69a954c Fix a bug in pg_class
submitted by: "Peter Daum" <gator@cs.tu-berlin.de>
1996-08-04 22:00:13 +00:00
Marc G. Fournier 423a715989 Quick patch for compiling under BSD/OS 2.0 from Bruce 1996-08-04 21:03:23 +00:00
Marc G. Fournier 7d1402d071 Okay...*last* commit, now to create a release...
README file for regresssion tests from Dr. George
1996-08-02 01:24:00 +00:00
Marc G. Fournier 642668c31d Update to expected.input from Dr. George 1996-08-02 01:18:05 +00:00
Marc G. Fournier 4fff70a819 Fixes:
make TCL conditinal compilation work

Submitted by: Dr_George_D_Detlefsen <drgeorge@madmax.ilt.com>
1996-08-01 19:46:46 +00:00
Marc G. Fournier 164ef6ff2b Fixes:
Originally, I thought the problem was caused by a function that gets
called as a normal function where we want to return a value, and as a
signal handler where we need to have it accept a parameter (the signal
number) and it returns nothing, I was going to case the function name in
the signal call as (void (*)(int)).

Looking at all the source, it turns out this function only gets used as
a signal handler, so I set an int parameter and return void.

I have removed the Linux defines because they are not needed.  BSD let
this sloppiness slide.  Linux gave a compile error.


Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-01 05:11:33 +00:00
Marc G. Fournier 4d837e370c Change the TEMPDIR to be obj instead of /tmp
Suggested by: Michael Babcock <michael@kanji.com>
1996-08-01 05:04:29 +00:00
Marc G. Fournier a82aa45a4d An actual README file for the regression tests
Submitted by: Dr. George
1996-08-01 04:53:22 +00:00
Marc G. Fournier ce48b4d5bd A newer expected.input file for the regression tests
Submitted by: Dr. Geoge
1996-08-01 04:51:49 +00:00
Marc G. Fournier cb34902cbd Move port includes from bin/pg_dump/Makefile to Makefile.global 1996-07-31 18:59:00 +00:00
Marc G. Fournier db174707ba Standardize locations of TCL related files
Submitted by: Dr_George_D_Detlefsen <drgeorge@madmax.ilt.com>
1996-07-31 18:52:38 +00:00
Marc G. Fournier 7bdd8dcac3 This prevent gcc from complaining about casting a short to a char * and
fixes another complaint.

More fixes from Bruce...
1996-07-31 18:48:16 +00:00
Marc G. Fournier 9c0f89c4a4 More patches for BSDi from Bruce 1996-07-31 18:43:58 +00:00
Marc G. Fournier 4e82924eac Row count patch from Bruce 1996-07-31 18:40:12 +00:00
Marc G. Fournier 7d2000e3a7 Fix for <machine.h> bug
Submitted by: Bruce
1996-07-31 17:35:13 +00:00
Marc G. Fournier c317bdc9fd Re-arrange KRBVERS postition
Suggested by: Daniel Kalchev <daniel@digsys.bg>
1996-07-31 17:19:49 +00:00
Marc G. Fournier c114bf330d A "lost in the archives" patch from Chris Dunlop <chris@atlas.onthe.net.au> 1996-07-31 06:09:46 +00:00
Marc G. Fournier dbf2a8c984 Everyone seems to suggestion this is something that should be there...
#include <sys/termios.h>

Submitted by: Dr. George
1996-07-31 06:05:46 +00:00
Marc G. Fournier 5eb17f53b6 Moved src/extend to contrib 1996-07-31 02:30:10 +00:00
Marc G. Fournier c6cf21825a already exists in the contrib directory 1996-07-31 02:28:22 +00:00
Marc G. Fournier 3881cbd2f6 Added <sys/termios.h> for i386_solaris port
Submitted by: Dr_George_D_Detlefsen <drgeorge@ilt.com>
1996-07-31 02:20:59 +00:00
Marc G. Fournier a05ed5bc11 Fixes:
In postgres95/src/backend/nodes/readfuncs, lines 1188 and 1189,
local_node->relname is taken to point to a NameType, while its
defined as a pointer to char. Both the casting to Name and the
call of namestrcpy should, IMHO, be changed appropriately (first
patch).

As far as I could see from the Linux signal header file,
a signal handler is declared as

        typedef void (*__sighandler_t)(int);

Few changes to postgres95/src/backend/storage/lmgr/proc.c seem
appropriate to comply with this.

Finally, postgres95/src/bin/pg_version/pg_version.c defines
a function GetDataHome (by default, returning an integer)
and returns NULL in the function, which isn't an integer...

Submitted by:  ernst.molitor@uni-bonn.de
1996-07-31 02:19:23 +00:00
Marc G. Fournier 4477b6f6c2 Fixes:
updates the psql.1 manual page for \ options
        add row count and ties it to the header option
        updated manual pages and comment for above change
        got \? to display in one screen-full (almost, \? scrolls off top)
        moved \r to \E, and \z to \r (for historical reasons with monitor)
        small code alignment cleanup

Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-31 02:11:23 +00:00
Marc G. Fournier 1af2cc0d58 Style didn't appeal to some...:)
Submitted by:  Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-31 02:07:25 +00:00
Marc G. Fournier e0d48c317c Fixes: Floating point exception in psql
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-07-31 02:06:00 +00:00
Marc G. Fournier 74cdf92868 Fixes:
>   INDEXED searches in some cases DO NOT WORK.
>   Although simple search expressions (i.e. with a constant value on
> the right side of an operator) work, performing a join (by putting
> a field of some other table on the right side of an operator) produces
> empty output.
>   WITHOUT indices, everything works fine.
>

submitted by: "Vadim B. Mikheev" <root@ais.sable.krasnoyarsk.su>
1996-07-30 07:56:04 +00:00
Marc G. Fournier e5e12f6405 More cleanups by "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-07-30 07:47:58 +00:00
Marc G. Fournier 519496b63e More cleandups from: "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-07-30 07:41:38 +00:00
Marc G. Fournier be19feb14a The decode function in psql.c doesn't return anything, so its
declaration is incorrect.

-Kurt
1996-07-29 20:58:42 +00:00
Marc G. Fournier c4ea55d2c9 clean up /tmp behind itself
submitted by: bruce
1996-07-29 20:52:24 +00:00
Marc G. Fournier 496b937dca Change ordering of "user modified variables" so that they are at
the top of th efile instead of scattered throughout

Turned off default behavior of compiling with -g enabled

submitted by; bruce
1996-07-29 20:51:41 +00:00
Marc G. Fournier 48cde8d83b fix a redeclaration error
submitted by Kurt
1996-07-29 20:49:02 +00:00
Marc G. Fournier 20f3236650 Modifications for bsdi from Kurt(sp?) 1996-07-29 06:54:01 +00:00
Marc G. Fournier 7450ea6dfb cosmetic changes: char* x changed to char *x
submitted by: bruce
1996-07-28 07:08:15 +00:00
Marc G. Fournier 0e887c541e reversed bruces patch to getopt() loop about optarg
submitted by: bruce
1996-07-28 06:59:43 +00:00
Marc G. Fournier 4b3cb03104 fixes: It appears several routines use lcons to store integers rather than
pointers.

submitted by: bruce
1996-07-28 06:56:28 +00:00
Marc G. Fournier b834d27bc9 small port fixes for sparc_solaris
submitted by: jason
1996-07-28 06:54:15 +00:00
Julian Assange ed3240d093 bugfix: if NOREADLINE was not defined and input was not from a tty, then
the getopt() was not executed.
1996-07-28 06:48:42 +00:00
Marc G. Fournier 64b130a8e7 Various fixes required for psql
Submitted by: Bruce
1996-07-27 04:38:22 +00:00
Marc G. Fournier edb519b14c and now, the long awaited PAGER patches from Bruce...
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-27 02:55:23 +00:00
Marc G. Fournier 6e077b0ae5 Further modifications for fixing createuser bug...
Submitted by: Rick Weldon <rick@wisetech.com>
1996-07-27 02:40:45 +00:00
Marc G. Fournier 22113f81fd This is a patch to pg_dump which fixes varchar and char printing in the
case where the attribute length is variable (stored as -1).  Previously,
you'd get output that looked like:

CREATE TABLE foo (bar varchar(-1));

Monitor and psql don't like this at all :).  Here is a fix:


Submitted by: Adam Sussman <myddryn@vidya.com>
1996-07-27 02:29:51 +00:00
Marc G. Fournier c13ef1afed My patch to fe-connect.c introduced a new bug which is triggered only, if
Kerberos is being used (attempt to free static memory).
The error was caused by a confusing doublespeak of fe_getauthname():
Returns a pointer to static memory, if you authenticate via Kerberos,
a pointer to dynamic memory otherwise.

Submitted by: Erich Stamberger <eberger@gewi.kfunigraz.ac.at>
1996-07-27 02:27:55 +00:00
Marc G. Fournier 1a675fe5b2 Fixed these script sonce and for all?
Submitted by: Rick Weldon <rick@wisetech.com>
1996-07-27 02:19:18 +00:00
Marc G. Fournier 32a3858add corrects the output for a 'SELECT DISTINCT ON ...' at line 2900
submitted by: Dr_George_D_Detlefsen <drgeorge@ilt.com>
1996-07-27 02:06:10 +00:00
Marc G. Fournier b141c5a973 Fix where 'make clean' wipes out everything if no obj directory
exists...

Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-27 02:04:12 +00:00
Marc G. Fournier 95b6f6ea33 Missed a small patch fro mBruce for BSDi 1996-07-26 20:39:04 +00:00
Marc G. Fournier f45dfa6174 should always take mail headers out of Makefile files befor ecommitting :) 1996-07-26 20:15:40 +00:00
Marc G. Fournier e4b2558fa3 Minor bug fix 1996-07-26 20:03:21 +00:00
Marc G. Fournier ba4b7f5021 regression Makefile, rev 2
Submitted by: Dr. George
1996-07-26 19:58:04 +00:00
Marc G. Fournier 8a372d202f Add in port to DG/UX
Submitted by: "Brian E. Gallew" <geek+@cmu.edu>
1996-07-25 20:45:05 +00:00
Marc G. Fournier 5315d37c20 Fix applied for NESTLOOP bug
submitted by: vadim@sable.krasnoyarsk.su (Vadim B. Mikheev)
1996-07-25 20:36:46 +00:00
Marc G. Fournier aac483943d fixed usuage of -ltermcap for psql
submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-25 20:01:51 +00:00
Marc G. Fournier 9e0a8d4b26 improvements to regression testing
submitted by: dr. george
1996-07-25 19:56:59 +00:00
Marc G. Fournier 14cd0ca3bd modified i386_solaris port
submitted by: dr. george
1996-07-25 19:48:24 +00:00
Marc G. Fournier 31cae34d07 multiple define of 'union semun' removed
submitted by: dr. george
1996-07-25 19:45:31 +00:00
Marc G. Fournier fd35587d4c moved the FLEX stuf from Makefile.global to here 1996-07-25 07:28:12 +00:00
Marc G. Fournier 10369ad7b2 removed tas.s refernce 1996-07-25 07:27:08 +00:00
Marc G. Fournier 65b4b39246 Dr George suggested removing Makefile.custom altogether, to reduce
any confusion...so its gone...
1996-07-25 07:26:37 +00:00
Marc G. Fournier ff50e5ab47 Switched from using monitor to using psql
Submitted by: Rick Weldon <rick@wisetech.com>
1996-07-25 06:55:49 +00:00
Marc G. Fournier 69ee15d663 Removed monitor from compile/install (will eventually be removed
completely)
1996-07-25 06:54:26 +00:00
Julian Assange 76bc8cb97f Large re-write/enhancement. In pg-101 Jolly only included a smaller part
of my (proff) patch. This is the rest of it, with a few, mainly aesthetic
changes. I've removed a lot of redundency from the original code,
added support for the new PQprint() routines in libpq, expanded tables,
and a few generally nifty ways of massaging data in and out of the
backend. Still needs some good stress testing.
1996-07-25 06:46:35 +00:00
Julian Assange 23c7ff0b3c PQprint() routines. The older code is still there for historical
compatibility. There isn't much difference here against my previous
PQprint() code, except that you can add optional arguments to the
<table args> in html.
1996-07-25 06:21:11 +00:00
Marc G. Fournier 98ae3fadd1 Ack, -I$(srcdir)/backend *is* required... 1996-07-25 01:11:15 +00:00
Marc G. Fournier 7920dce9f9 comment out USE_TCL...having USE_TCL=true seems to imply that you
have to have TCL to use postgres95, which you don't
1996-07-25 00:30:02 +00:00
Marc G. Fournier 2f19e28940 there are no includes files in backend, there should be, so why look
there?
1996-07-25 00:26:21 +00:00
Marc G. Fournier 0864a2ddae Fix compiler not finding libpgtcl.h header file 1996-07-25 00:22:19 +00:00
Marc G. Fournier 0ede7ca819 Added an empty Makefile.custom file... 1996-07-25 00:19:42 +00:00
Marc G. Fournier 18367ced1b Ack, missed two files from the merge...looks like a .11 is goin gto have
to go out after all :(
1996-07-23 05:51:29 +00:00
Marc G. Fournier b619cb09d9 iBrought in a fix for backend crashes
Submitted by: "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
1996-07-23 05:44:10 +00:00
Marc G. Fournier 00fe588fb0 comment out inclue of Makefile.custom, as i tbreaks compiling the
bin directory
1996-07-23 05:24:35 +00:00
Marc G. Fournier 83c9ec765e Last changes to src from Dr. George *wipes brow* 1996-07-23 03:38:44 +00:00
Marc G. Fournier 2206b5819d Alot of "changes" from Dr. George's source tree...
Most of the changes in here look to b epurely cosmetic, and don't
affect anything...

...and some stuff is completely questionable...in that I may have reversed
some of the stuf fwe already had :(
1996-07-23 03:35:14 +00:00
Marc G. Fournier 94e5642b87 More Merge's from Dr' sourec tree 1996-07-23 03:24:47 +00:00
Marc G. Fournier 245686d43a modifications to regressoin tests 1996-07-23 03:19:34 +00:00
Marc G. Fournier 668aa24fc4 More merge's from Dr. George's sourec tree 1996-07-23 03:13:58 +00:00
Marc G. Fournier 772ae267e3 spelling error...and correction 1996-07-23 03:05:23 +00:00
Marc G. Fournier be5bfd54f2 Put in a new FAQ
Merged in Dr. George's src/bin tree (possibly broke monitor/psql in process)
1996-07-23 03:03:43 +00:00
Marc G. Fournier d1724d65b7 reversed julian's patch back in again...othere things cause monitor
to not compile now...
1996-07-23 02:26:41 +00:00
Marc G. Fournier 7344d69898 Finished merging in src/backend from Dr. George's source tree 1996-07-23 02:23:54 +00:00
Marc G. Fournier e11744e164 More of Dr. George's changes...
- src/backend/catalog/*
                - no changes
        - src/backend/executor/*
                - change how nodeHash.c handles running out of memory
        - src/backend/optimizer/*
                - mostly cosmetic changes
1996-07-22 23:30:57 +00:00
Marc G. Fournier 5108a5b320 More merges from Dr. George's tree...
- src/backend/tcop/*
                - cosmetic changes to OPENLINK patches
        - src/backend/storage/*
                - more changes, mostly cosmetic
        - src/backend/ports/*
                - merge in patches for aix and i386_solaris
1996-07-22 23:00:26 +00:00
Marc G. Fournier 18a7989e1a - merging in Dr. George's tree with ours
- src/backend/access
                - no changes
        - src/backend/utils
                - mostly cosmetic changes
                - ESCAPE_PATCH Added
        - src/Makefile.global changes merged
1996-07-22 21:58:28 +00:00
Marc G. Fournier 672f6ece23 Brought in David Bennett's (dave@bensoft.com) changes to pg_dump 1996-07-22 08:37:00 +00:00
Marc G. Fournier 02bbd95a41 Backed out the changes to monitor.c that seem to be affecting the
ability for createuser to actually create one...
1996-07-22 05:59:53 +00:00
Marc G. Fournier 753631ac17 - added LD_ADD+=-ltermcap to postgres.mk.bsdi_2_1
- submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-22 05:13:32 +00:00
Marc G. Fournier 435d32cd25 quick fix to src/bin/Makefile.global so that compiling doesn't look for a
libpq that is already installed...

submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-22 04:51:05 +00:00
Marc G. Fournier df43edcf45 Fix for:
>
> We did some testing and found that if we name the table 'Inv' with
> anything appended to it, the table does not appear in the '\d' table list.
> It appears to be the capital I as a table named 'invItemsL' is created
> and displayed properly.
>


- submitted by: Jason Wright <jason@shiloh.vnet.net>
1996-07-20 08:44:45 +00:00
Marc G. Fournier ffae4ebde9 Brought in NEOSOFT's port to i386_solaris
Submitted by: Randy Kunkee <kunkee@Starbase.NeoSoft.COM>
1996-07-20 08:36:33 +00:00
Marc G. Fournier 544e802910 Fixes:
Hash indices for some data types don't work, for example for time and date.

- submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-20 08:19:13 +00:00
Marc G. Fournier 94215d51c8 Fixes:
The updating of array fields is broken in Postgres95-1.01, An array can
be only replaced with a new array but not have some elements modified.
This is caused by two bugs in the parser and in the array utilities.
Furthermore it is not possible to update array with a base type of
variable length.


- submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-20 07:59:41 +00:00
Marc G. Fournier baeb3aadc5 - fix installation not installing man pages
- submitted by: drgeorge@ilt.com (Dr_George_D_Detlefsen)
1996-07-20 07:52:36 +00:00
Marc G. Fournier 5feb9dc9df - extend conditional for use of -ltermcap in bsdi/bsdi_2_1 compiles
- submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-20 07:40:03 +00:00
Marc G. Fournier c777e8131e fixed a bug with not commenting out FSYNC= in initdb.sh 1996-07-20 07:33:36 +00:00
Marc G. Fournier 20288400f3 Fixes:
I have written some patches which add support for NULLs to Postgres95.
In fact support for NULLs was already present in postgres, but it had been
disabled because not completely debugged, I believe. My patches simply add
some checks here and there. To enable the new code you must add -DNULL_PATCH
to CFLAGS in Makefile.global. After recompiling you can do things like:

insert into a (x, y) values (1, NULL);
update a set x = NULL where x = 0;

You can't still use a "where x=NULL" clause, you must use ISNULL instead.
This could probably be an easy fix to do.




Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 07:24:11 +00:00
Marc G. Fournier 83adddfcc3 - improve date/time parsing routines
- submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 07:19:56 +00:00
Marc G. Fournier a7cfd65532 Fixes:
Select queries with an isnull or notnull clause, like "select * where
somefield isnull", crash the backend if the table has at least one index.
If the indices are deleted the queries work again. Also the explain
command fail in the same way.
The is caused by a bug in subroutine of the optimizer which doesn't check
null values in the clauses.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 07:14:14 +00:00
Marc G. Fournier 3704b99522 - libpq calls "fe_getauthname()" two times in "fe-connect.c", but
doesn't free the buffer allocated by this function.

- submitted by: Erich Stamberger <eberger@gewi.kfunigraz.ac.at>
1996-07-19 07:00:56 +00:00
Marc G. Fournier df1a06ed37 - added -ltermcap to LIBS in bin/psql/Makefile
- submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-19 06:53:40 +00:00
Marc G. Fournier 2ab6d1f125 Removed -I${HEADERFILE} from bin/Makefile.global 1996-07-19 06:47:51 +00:00
Marc G. Fournier de82ece8bd Fix PAGER bug in createuser/etc scripts
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-19 06:36:38 +00:00
Marc G. Fournier 6562fa851e Fixes:
'select distinct on' causes backend to crash

submitted by: Chris Dunlop    chris@onthe.net.au
1996-07-19 06:27:59 +00:00
Marc G. Fournier 9bffaade96 Fixes:
This is a patch to prevent an endless loop occuring in the Postgres backend
when a 'warning' error condition generates another warning error contition
in the handler code.

Submitted by: Chris Dunlop, <chris@onthe.net.au>
1996-07-19 06:13:58 +00:00
Marc G. Fournier 64bfa0487b fixes for textcat(), but headers were missing from archive :( 1996-07-19 06:08:21 +00:00
Marc G. Fournier 89ad633897 Fixes compile errors with irix5 port
Submitted by: Thomas van Reimersdahl <reimersd@dali.techinfo.rwth-aachen.de>
1996-07-19 05:54:17 +00:00
Marc G. Fournier 2771129c82 Fixes:
minor Makefile changes to force setting of SRCDIR and ordering of
	include files

Submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-19 05:32:42 +00:00
Marc G. Fournier 54857ad1a7 Fixes:
It is not possible to define attributes as arrays of date or time, the
type _time and _date are not defined.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 05:21:28 +00:00
Marc G. Fournier 1d4a115a37 Fixes:
The type _char16 (array of char16) is incorrectly defined as array of name
and values longer than 16 chars are stored as names and not truncated to 16
bytes as they should be.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 05:12:40 +00:00
Marc G. Fournier 72f76d38eb libpq and psql.c have been modified to do various things they didn't do
before (plus some optimisations/bug fixes et al).  I've included a small
demo transcript below. Note that all of of the display
functionality/intelligence you see here, can be had merely by calling
the new LIBPQ PQprint() routine with the appropriate arguments/options,
including the HTML3 output guff.


submitted by:  Julian Assange <proff@suburbia.net>
1996-07-18 05:48:57 +00:00
Marc G. Fournier bc0bd47c6a Fixes: In the solaris port the file descriptors are hard coded to 20 (from the
include file sys/param.h

Submitted by:  michael.siebenborn@ae3.Hypo.DE (Michael Siebenborn (6929))
1996-07-18 04:59:42 +00:00
Marc G. Fournier 55aab6a434 fix: BSDi 2.1 requires a port seperate from BSDi 2.0{.1}
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 07:13:58 +00:00
Marc G. Fournier bf2abf0dae fix: clean up formatting of \d tablename in psql
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 06:58:12 +00:00
Marc G. Fournier e5eb859446 fix: During a BSD/OS(BSDI) 2.1 compile, I got errors about undefined
S_LOCK_'s during the postgres link phase.

submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 06:53:41 +00:00
Marc G. Fournier 169a5b7670 applied fixes for psql
- \p produces traditional results
	- \r added

submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 06:37:28 +00:00
Marc G. Fournier d7a1ce7af7 adds: case insensitive regexp for varchar
From: azcb0@sde.uts.amdahl.com
1996-07-15 19:32:33 +00:00
Marc G. Fournier 350cb69aed fsync patch from openlink
NOTE: FSYNC needs to be set at top of initdb.sh to enable use of fsync
	patches...disabled by default
1996-07-15 19:22:58 +00:00
Marc G. Fournier faf21935d1 fsync patch from openlink 1996-07-15 19:22:17 +00:00
Marc G. Fournier d838e30f13 Submitted by Openlink, requires -DOPENLINK_PATCHES in Makefile.global
varchar.diff
------------
This patch was necessary for the OpenLink Postgres Database Agent.
I think this fixes a bug anyway.

The following query demonstrates this bug:

  create table foo (bar varchar);
  insert into foo values ('');          -- no problem
  select * from foo where bar = '';     -- fails
1996-07-15 19:11:23 +00:00
Marc G. Fournier 76145bd74b Makefile.global changes to show option -DOPENLINK_PATCHES 1996-07-15 19:10:32 +00:00
Marc G. Fournier 3a2a3689b8 Moved two defines required for FreeBSD into Makefile.global
The idea is that its right beside PORTNAME, so if it doesn't apply to
the OS in question, it can be rememberd to disable it...
1996-07-13 07:37:33 +00:00
Marc G. Fournier d602a35d37 Brought in extensions to pg_dump
Submitted by: david bennett <dave@bensoft.com>
	      marc g. fournier <scrappy@ki.net>
1996-07-12 05:39:39 +00:00
Marc G. Fournier e72ca17f77 fixes for several potential null pointer dereferences
submitted by: Paul "Shag" Walmsley <ccshag@cclabs.missouri.edu>
1996-07-12 04:53:59 +00:00
Marc G. Fournier 950b6ab022 Fixes: Using LIKE or ~ operator on text type files which are null valued
causes segmentation fault.

Thanks to: Salvador Ortiz Garcia, Robert Patrick, Paul 'Shag' Walmsley,
           and James Cooper for finding and fixing the problem.
1996-07-09 06:39:19 +00:00
Marc G. Fournier 25bb71835f Fix: Can't drop tables with names longer than 16 characters. 1996-07-09 06:35:38 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00