Commit Graph

7152 Commits

Author SHA1 Message Date
Tom Lane 712af72c77 Fix yacc failures in preproc.y. 2000-11-20 22:03:06 +00:00
Tom Lane 3568cf50e5 Silence gcc warnings. 2000-11-20 21:14:13 +00:00
Vadim B. Mikheev c07bb9e0ad No casting to LSN (XLogRecPtr) is required. 2000-11-20 21:12:26 +00:00
Tom Lane 5bb2300b59 Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list.  Support for oldstyle internal functions is gone
(no longer needed, since conversion is complete) and pg_language entry
'internal' now implies newstyle call convention.  pg_language entry
'newC' is gone; both old and newstyle dynamically loaded C functions
are now called language 'C'.  A newstyle function must be identified
by an associated info routine.  See src/backend/utils/fmgr/README.
2000-11-20 20:36:57 +00:00
Peter Eisentraut 99198ac6b8 Enable WAL in config.h, not Makefile.global. 2000-11-20 16:52:54 +00:00
Peter Eisentraut 2b1d8bd29a Include postgres.h before checking #ifdef XLOG. 2000-11-20 16:47:32 +00:00
Peter Eisentraut 9394d391b8 Add configure checks for strtoll, strtoull (or strto[u]q). Disable
'long long int' portions of ecpg if the type or these functions don't
exist.
2000-11-20 15:56:14 +00:00
Michael Meskes 2d248d6585 Parser synced. 2000-11-20 10:50:42 +00:00
Peter Mount 08ea624a06 Encoding patch to Connection by wrobell@posexperts.com.pl 2000-11-20 08:15:30 +00:00
Vadim B. Mikheev a221d95f28 Compile WAL by default. 2000-11-20 05:18:40 +00:00
Tom Lane f084a18af5 Eliminate unused-variable warning. 2000-11-20 03:51:33 +00:00
Tom Lane 3e09584fd3 Fix typo. 2000-11-19 22:11:56 +00:00
Tom Lane 959851272d Update README with proposed new method for determining calling convention
of user-defined functions (forget 'C' vs 'newC', instead require an info
function to be present for new-style functions).  Also update some other
out-of-date commentary.
2000-11-19 22:07:16 +00:00
Peter Eisentraut 714384a0b2 Polish error messages, help output, give marginal clue about command line
option conventions.  (E.g., "pg_passwd -?" should not write to a file named
"-?".)
2000-11-18 19:02:03 +00:00
Peter Eisentraut f999912658 Simplification: Build executable directly from .c file. 2000-11-18 19:00:23 +00:00
Peter Eisentraut bd9d9621dc Modify input and output routines to print plain binary strings without any
'b' prefixes.
2000-11-18 16:18:41 +00:00
Peter Eisentraut 0f3720edf6 Treat plain 'BIT' as 'BIT(1)'. 2000-11-18 16:17:20 +00:00
Tom Lane 0514ad126b Tweak AbsoluteTimeIsReal() to avoid compiler bugs on machines where
a > comparison against INT_MIN may do the wrong thing.  Per suggestion
from Andreas.
2000-11-18 05:41:45 +00:00
Tom Lane 6ba959eee0 AIX patches from Andreas. 2000-11-18 05:40:03 +00:00
Tom Lane 31e3634a05 Suppress 'comparison-is-always-true' warning on machines
where char is signed by default.
2000-11-18 04:40:18 +00:00
Tom Lane 75c147e753 Modify locale code to defend against possibility that it was compiled
with an -fsigned-char/-funsigned-char setting opposite to that of libc,
thus breaking the convention that 'undefined' values returned by
localeconv() are represented by CHAR_MAX.  It is sheer stupidity that
gcc even has such a switch --- it's just as bad as the structure-packing
control switches offered by the more brain-dead PC compilers --- and
as for the behavior of Linux distribution vendors who set RPM_OPT_FLAGS
differently from the way they built libc, well, words fail me...
2000-11-18 03:55:51 +00:00
Tom Lane aa21da208c Put back BufferSync() for WAL after database creation.
Also, add some comments about what it's for...
2000-11-18 03:36:48 +00:00
Peter Eisentraut 52aa720320 Add separate type category for bit string types, allowing mixed bit/varbit
function calls to work.
2000-11-17 19:57:48 +00:00
Tatsuo Ishii 8a35ac24f8 Fix bugs in EUC_TW support. This fix includes patches contributed
by Chih-Chang Hsi. See "A Patch for MIC to EUC_TW code converting in
mb support" posting in pgsql-patches list dated 09 Nov 2000.
2000-11-17 04:42:10 +00:00
Tatsuo Ishii afde2acc50 Recongizing PGCLIENTENCODING has been broken since 7.0. 2000-11-17 04:22:52 +00:00
Tom Lane 2912c287fe Fix spelling errors in error message. 2000-11-17 01:24:46 +00:00
Tom Lane 4e5146b883 Suppress occasional failure of final DROP DATABASE due to
race condition --- old backend may not have shut down by the time we
try to do the DROP.
2000-11-17 00:24:03 +00:00
Tom Lane 55d5b58538 GNUmakefile failed to provide a way to invoke perl Makefile's
'make test' target.
2000-11-17 00:08:57 +00:00
Tom Lane 9a561357e2 Forgot to add ppport.h to MANIFEST. 2000-11-17 00:02:02 +00:00
Peter Eisentraut 6b19803e06 Make a pstrdup copy of the literalbuf when scanning a bit string. Other-
wise the next bit string in the same command clobbers the previous ones.
2000-11-16 22:47:44 +00:00
Tom Lane a933ee38bb Change SearchSysCache coding conventions so that a reference count is
maintained for each cache entry.  A cache entry will not be freed until
the matching ReleaseSysCache call has been executed.  This eliminates
worries about cache entries getting dropped while still in use.  See
my posting to pg-hackers of even date for more info.
2000-11-16 22:30:52 +00:00
Peter Eisentraut cff23842a4 Print bit values as binary strings (not hex) 2000-11-16 21:43:28 +00:00
Peter Eisentraut 7852a35515 Add support for casting bit string constants. 2000-11-16 17:27:10 +00:00
Peter Eisentraut 0f5c1b251d Clean files after installing, since those files will most likely be root
owned, which can be annoying.
2000-11-16 16:21:55 +00:00
Bruce Momjian a5046ad13a That variable I removed broke XLOG, that part of the delta
should have read:

Alfred Perlstein
2000-11-16 06:16:00 +00:00
Bruce Momjian 312063c97b Make pgsql compile on FreeBSD-alpha.
Context diff this time.

Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386.

Compile with only -O on alpha for codegen safety.

Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD.

Fix a lot of bogus string formats for outputting pointers (cast to int
and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now
cast to 'unsigned long' and output with %lu/

Remove an unused variable.

Alfred Perlstein
2000-11-16 05:51:07 +00:00
Bruce Momjian 580d2bc60f Syslog Facility Patch
Here is one with a stray character removed.

Larry Rosenman
2000-11-16 05:50:01 +00:00
Peter Eisentraut 76920de895 Rename parameter "hostname" to "virtual_host". Seemed very ambiguous... 2000-11-15 18:36:06 +00:00
Tom Lane 85b762b499 Clean up array-dimensions parser a bit.
This code still needs a lot of love, however ...
2000-11-14 23:28:13 +00:00
Peter Eisentraut 12b401f739 Fix return type 2000-11-14 21:26:21 +00:00
Peter Eisentraut bea3b8ea35 spaces to tab 2000-11-14 21:23:47 +00:00
Peter Eisentraut d8a11b29c1 Give GCC on Irix a (theoretical) chance. 2000-11-14 21:12:00 +00:00
Tom Lane 21e1e6643c Minor cleanup of tableOid-related coding. 2000-11-14 21:04:32 +00:00
Tom Lane b0d243e420 Clean up comments. 2000-11-14 20:47:34 +00:00
Peter Eisentraut 0937bf9544 Small polishing of syslog facility and ident settings. Only allow setting
at postmaster start, rename syslog_progid to syslog_ident, since syslog
itself uses that term, fix doc markup.
2000-11-14 19:13:27 +00:00
Tom Lane 2cf48ca04b Extend CREATE DATABASE to allow selection of a template database to be
cloned, rather than always cloning template1.  Modify initdb to generate
two identical databases rather than one, template0 and template1.
Connections to template0 are disallowed, so that it will always remain
in its virgin as-initdb'd state.  pg_dumpall now dumps databases with
restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0.
This allows proper behavior when there is user-added data in template1.
initdb forced!
2000-11-14 18:37:49 +00:00
Peter Eisentraut 8a9315ca92 Update and polish postmaster and postgres help output and man pages. 2000-11-14 18:11:32 +00:00
Hiroshi Inoue 3eaf3363d7 Fix illegal combination of SearchSysCacheTuple() and heap_freetuple()
in AlterTableOwner().
2000-11-14 01:57:30 +00:00
Bruce Momjian 026643a6e7 Rename PortName to PortNumber. 2000-11-14 01:15:06 +00:00
Bruce Momjian ebd61ac03f Remove -k unix socketpath option from client side, allow hostname with
leading slash to behave as a unix socket path.
2000-11-13 23:37:54 +00:00
Bruce Momjian d63a762f79 Ok, You guys are probably tired of me, BUT, here is another one, that
adds the facility to set the program name used in syslog.
(this includes the other ones).

One gotcha, the parser doesn't like special characters in strings.
For example, i tried to use pg-test, and if failed the parse coming
from the postgresql.conf file.

I don't think it's a showstopper..

Larry Rosenman
2000-11-13 21:35:03 +00:00
Bruce Momjian b557be50a0 Fix for no hterror(). 2000-11-13 21:31:46 +00:00
Bruce Momjian 2150c2edf1 UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines.  We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:

1. The ability to listen only on a particular IP address.  Each
   hosting customer has their own IP address, on which all of their
   servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
   This allows us to automatically create an empty database, with an
   empty DBA password, for new or upgrading customers without having
   to interactively set a DBA password and communicate it to (or from)
   the customer.  This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
   change-rooted environment.  We run CGI programs chrooted to the
   user's home directory, which is another reason why we need to be
   able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
   root, and then setuid to the desired user.  (mysqld -u can almost
   do this; I had to patch it, too).

The patch below fixes problem 1-3.  I plan to address #4, also, but
haven't done so yet.  These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.

With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.

In summary, this patch makes the following enhancements:

1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
   and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
   listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().

The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.

David J. MacKenzie
2000-11-13 15:18:15 +00:00
Hiroshi Inoue 7633cada54 SearchSysCacheTupleCopy() instead of SearchSysCache() 2000-11-13 09:16:55 +00:00
Hiroshi Inoue c7eb18fcf4 prevent open failure of VIEW 2000-11-13 09:06:36 +00:00
Tom Lane ebb0a20149 Keep track of the last active slot in the shared ProcState array, so
that search loops only have to scan that far and not through all maxBackends
entries.  This eliminates a performance penalty for setting maxBackends
much higher than the average number of active backends.  Also, eliminate
no-longer-used 'backend tag' concept.  Remove setting of environment
variables at backend start (except for CYR_RECODE), since none of them
are being examined by the backend any longer.
2000-11-12 20:51:52 +00:00
Tom Lane 6543d81d65 Restructure handling of inheritance queries so that they work with outer
joins, and clean things up a good deal at the same time.  Append plan node
no longer hacks on rangetable at runtime --- instead, all child tables are
given their own RT entries during planning.  Concept of multiple target
tables pushed up into execMain, replacing bug-prone implementation within
nodeAppend.  Planner now supports generating Append plans for inheritance
sets either at the top of the plan (the old way) or at the bottom.  Expanding
at the bottom is appropriate for tables used as sources, since they may
appear inside an outer join; but we must still expand at the top when the
target of an UPDATE or DELETE is an inheritance set, because we actually need
a different targetlist and junkfilter for each target table in that case.
Fortunately a target table can't be inside an outer join...  Bizarre mutual
recursion between union_planner and prepunion.c is gone --- in fact,
union_planner doesn't really have much to do with union queries anymore,
so I renamed it grouping_planner.
2000-11-12 00:37:02 +00:00
Peter Eisentraut 8095924bdd Make sure shell scripts send error messages to stderr.
Improve help output.
Teach droplang to remove 'pltclu'.
2000-11-11 22:59:48 +00:00
Thomas G. Lockhart b9c8faedde Allow more timezone-like interpretation of INTERVALs.
Fix up labeling of some new test cases.
2000-11-11 19:57:03 +00:00
Thomas G. Lockhart d74c52c357 Allow more timezone-like interpretation of INTERVALs. 2000-11-11 19:56:43 +00:00
Thomas G. Lockhart a669bd74ee Check for existence of the results directory before invoking mkdir. 2000-11-11 19:56:20 +00:00
Thomas G. Lockhart 17d63245c7 Define conversions to and from text for date, time, and timetz. 2000-11-11 19:55:39 +00:00
Thomas G. Lockhart 89a99cb686 Allow interpretation of INTERVALs with more timezone-like syntax.
Define conversions to and from text for date, time, and timetz.
Have millisecond and microsecond return full # of seconds in those units.
 Previously, only returned full fractional part in those units.
2000-11-11 19:55:19 +00:00
Thomas G. Lockhart bc20c41275 Fix bug in recent improvement to type resolution code. Forgot to retain
"best choice" type category when resolving UNKNOWN function and operator
 arguments. Thanks to Tom Lane for finding test case.
2000-11-11 19:49:26 +00:00
Tom Lane 9e877702fc Update expected output to track recent code changes. 2000-11-10 23:19:46 +00:00
Bruce Momjian eafb636435 Update to PyGreSQL 3.1:
Fix some quoting functions. In particular handle NULLs better.

Use a method to add primary key information rather than direct
manipulation of the class structures.

Break decimal out in _quote (in pg.py) and treat it as float.

Treat timestamp like date for quoting purposes.

Remove a redundant SELECT from the get method speeding it, and
insert since it calls get, up a little.

Add test for BOOL type in typecast method to pgdbTypeCache class.
(tv@beamnet.de)

Fix pgdb.py to send port as integer to lower level function
(dildog@l0pht.com)

Change pg.py to speed up some operations

Allow updates on tables with no primary keys.

D'Arcy J.M. Cain
2000-11-10 22:29:21 +00:00
Bruce Momjian 960c186184 the bug was not fixed in the snapshot of November 5th. Also the enterprise
edition of the driver did not compile. I have fixed both issues again. I have
attached the modified files to this email, maybe you can check them into the
repository. (Fixes are marked with //FIXME). Enterprise edition driver now
compiles and seems to work.

Jan Thomae
2000-11-10 22:06:26 +00:00
Tom Lane a210023008 Adjust INET/CIDR display conventions and reimplement some INET/CIDR
functions, per recent discussions on pghackers.  For now, I have called
the verbose-display formatting function text(), but will reconsider if
enough people object.
initdb forced.
2000-11-10 20:13:27 +00:00
Hiroshi Inoue 27026fef60 Use SearchSysCacheTupleCopy() instead of SearchSysCacheTuple() in
order to continue to access the tuple more than now.
This would resolve a segmentation fault error.
2000-11-10 09:38:21 +00:00
Vadim B. Mikheev 92875e6f44 pg_fsync is fsync in WAL version. 2000-11-10 03:53:45 +00:00
Tom Lane ddeab22565 Clean up syscache so that recursive invocation is safe, and remove error
message about recursive use of a syscache.  Also remove most of the
specialized indexscan routines in indexing.c --- it turns out that
catcache.c is perfectly able to perform the indexscan for itself,
in fact has already looked up all the information needed to do so!
This should be faster as well as needing far less boilerplate code.
2000-11-10 00:33:12 +00:00
Peter Eisentraut 700032ad6f Real dynamic loader code 2000-11-09 19:00:50 +00:00
Peter Eisentraut 6b70f3862c Also test for 'void *' as third arg of accept() (as on Solaris 7 and 8),
but take it as 'int *' instead.

Add real test for whether ld -R works on Unixware.

Rename --enable-uniconv to --enable-unicode-conversion.

Install shlibs mode 755 by default, since 644 causes gratuitous complaints
from ldd et al. on some systems.
2000-11-09 18:18:42 +00:00
Tom Lane 343f615e3a ExecEndAppend() neglected to close indices on appended result rels,
and improperly prevented the main result rel from being closed if it
wasn't one of the Append's own result rels.  Per report from Hiroshi.
2000-11-09 18:12:53 +00:00
Michael Meskes 5cbbdd2ecb Applied yet another patch by Christof. Thanks Cristof!
Synced parser.
2000-11-09 14:06:57 +00:00
Vadim B. Mikheev b0299c5d37 Auto checkpoint creation. 2000-11-09 11:26:00 +00:00
Bruce Momjian a0951eec08 Please apply this patch to current, to fix a problem with runcheck,
that installs into a different path than is configured.

With this applied both postmaster and the shared libs are location
independent
for AIX 4.2 and up.

Thanks
Andreas
2000-11-09 04:17:53 +00:00
Tom Lane 372e598c44 Arrange for CASE or UNION with only untyped literal constants as input
to resolve the unknown constants as type TEXT.
2000-11-09 04:14:32 +00:00
Tom Lane 9bbca2c0f0 Add some more union/intersect/except test cases, per suggestions
from Kevin O'Gorman.
2000-11-09 02:47:49 +00:00
Tom Lane a1d133990f Repair some bugs in new union/intersect/except code.
Thanks to Kevin O'Gorman for finding these...
2000-11-09 02:46:17 +00:00
Tom Lane 26adbc7b48 Clean up compiler warnings. 2000-11-08 23:24:24 +00:00
Tom Lane 3908473c80 Make DROP TABLE rollback-able: postpone physical file delete until commit.
(WAL logging for this is not done yet, however.)  Clean up a number of really
crufty things that are no longer needed now that DROP behaves nicely.  Make
temp table mapper do the right things when drop or rename affecting a temp
table is rolled back.  Also, remove "relation modified while in use" error
check, in favor of locking tables at first reference and holding that lock
throughout the statement.
2000-11-08 22:10:03 +00:00
Bruce Momjian ebe0b23690 Add ANALYSE spelling of ANALYZE for vacuum. 2000-11-08 21:28:06 +00:00
Peter Eisentraut 9c0eacb434 Only use ld -R flag in UW 7.1*, since it's new. 2000-11-08 20:27:38 +00:00
Peter Eisentraut 0225d1f01e Fix 'soname's for various platforms, so that libpq.so.2.0 is considered
compatible with libpq.so.2.1, etc.
2000-11-08 20:18:49 +00:00
Peter Eisentraut 5e00df3568 Add dependencies required for parallel make 2000-11-08 18:56:25 +00:00
Peter Eisentraut c6d103a494 Dump identity of alternative location, if any. 2000-11-08 18:23:44 +00:00
Peter Eisentraut 929a599369 Add '-c name=val' flag for setting run-time parameters. 2000-11-08 17:57:46 +00:00
Peter Eisentraut 3304341700 Reimplement alternative database locations with symlinks. No changes in
user interface.
2000-11-08 16:59:50 +00:00
Tom Lane 218f357d82 CLUSTER did no permissions checking, forsooth ... 2000-11-08 16:31:06 +00:00
Thomas G. Lockhart e6e893e74f Enable fallback to string type when argument(s) are of UNKNOWN type.
Same code exactly as for function resolution.
 An obvious example is for
  select '1' = '01';
 which used to throw an error and which now resolves to two text strings.
2000-11-07 16:01:01 +00:00
Bruce Momjian 3af2827f5b This somehow gets moot. Is there a way to make gcc reject those comments?
Andreas
2000-11-07 11:35:16 +00:00
Michael Meskes f27da05c00 Undo incorrectly committed Makefile. 2000-11-07 08:52:22 +00:00
Michael Meskes df8789bb15 Third try. Sorry, I had a wrong path in my copy statement. 2000-11-07 08:46:27 +00:00
Michael Meskes c823b1eedc Added more patches by Cristif Petig. 2000-11-07 08:41:15 +00:00
Tom Lane 5781dbc061 Update for new results. 2000-11-07 06:51:21 +00:00
Tom Lane 52386df4b9 DropErrorMsg() died with assert failure if try to drop a toast table...
mea culpa...
2000-11-07 02:17:50 +00:00
Peter Eisentraut ff0bca613f Update geometry for FreeBSD 4.1 (same as 4.0) 2000-11-06 22:40:30 +00:00
Peter Eisentraut 306c44eead Add -V option to backend, to show version, since --version doesn't seem
to work everywhere.  Also, on FreeBSD you need to set the optreset variable
to 1 before parsing the command line a second time with getopt().
2000-11-06 22:18:10 +00:00
Peter Eisentraut 6f2f169015 Fix GNU make detection.
(The test 'make --version' with FreeBSD make (and potentially others)
would just reinvoke make on the same Makefile, resulting in an infinite
loop.)
2000-11-06 18:18:22 +00:00
Tom Lane db631de531 Add explicit ORDER BYs in a couple of cases --- seems to be necessary
to get platform-independent results.
2000-11-06 18:11:46 +00:00
Tom Lane e8f1340fe0 I think Thomas missed an update here... 2000-11-06 18:11:03 +00:00
Bruce Momjian a9d5289d3c Back out aix makefile patch. 2000-11-06 18:06:58 +00:00
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