Commit Graph

12975 Commits

Author SHA1 Message Date
Bruce Momjian bef228d1ee Add end-of-dump markers for pg_dump and pg_dumpall. 2004-05-19 21:21:26 +00:00
Bruce Momjian 8a91100379 Only do pkglib_path if needed. 2004-05-19 21:17:33 +00:00
Bruce Momjian 4056279958 Only do find_my_exec if it doesn't come from the postmaster. 2004-05-19 19:39:27 +00:00
Bruce Momjian 9ee3310768 Add get_pkglib_path to postmaster.c 2004-05-19 19:11:25 +00:00
Bruce Momjian 5a7e1a187c Move find_my_exec lower so elog() works, per Tom. 2004-05-19 18:58:44 +00:00
Bruce Momjian ecc198bd39 Re-add elog() to exec.c, per Tom. 2004-05-19 17:15:21 +00:00
Bruce Momjian ba71d824d5 Add MinGW to cases where libdir should be used for regression tests:
case $host_platform in
        *-*-cygwin*|*-*-mingw)
            PATH=$libdir:$PATH
            export PATH
            ;;
    esac
2004-05-19 05:20:27 +00:00
Bruce Momjian eb8c79a129 Win32 needs -lpgport for dll creation of ecpglib. 2004-05-19 05:14:58 +00:00
Bruce Momjian dbb9aa224e Supress verbose stderr messages while trying to find my exec path.
Per report from Christopher.
2004-05-19 04:36:33 +00:00
Neil Conway 132d09054e Minor correction for previous SQLSTATE patch: I changed dsqrt() to emit the
right error code previously, and this patch applies an analogous change
to numeric_sqrt().
2004-05-19 04:32:26 +00:00
Bruce Momjian f16874c23d Win32 can't have the same function coming from two library object files,
so we make is_absolute_path a macro so libpq doesn't use path.o.
2004-05-19 04:21:49 +00:00
Bruce Momjian 48eb73b556 Allow zic to compile by defining a "" value for my_exec_path. It isn't
used by zic anyway.
2004-05-19 01:17:42 +00:00
Tom Lane 07f2b767dc setRuleCheckAsUser has to be applied to any subqueries appearing in a
rule's event_qual, not only to the rule's action.  Per example from
Arturs Zoldners.
2004-05-18 22:49:51 +00:00
Bruce Momjian eb79aea9ed Move get_pkglib_path up into main.c too. 2004-05-18 20:27:25 +00:00
Bruce Momjian a9fad44372 Move find_my_exec() way up into main.c so it is available to the
timezone code and other places.

Remove elog() calls from find_my_exec;  do fprintf(stderr) instead.  We
can then remove the exec.c handling in the makefile because it doesn't
have to be built to suppress elog calls.
2004-05-18 20:18:59 +00:00
Bruce Momjian f3f8d36a57 Update Makefile dependencies for Win32 timezones, per Claudio. 2004-05-18 04:10:33 +00:00
Bruce Momjian 3b382d1ae3 Clean up some relative path install issues with Claudio's help. 2004-05-18 03:36:45 +00:00
Bruce Momjian 3febb477e6 Reorganize code to allow path-relative installs.
Create new get_* functions to access compiled-in paths and adjust if
relative installs are to be used.

Clean up substitute_libpath_macro() code.
2004-05-17 14:35:34 +00:00
Bruce Momjian 85383214ea Rename backendbin to backend_exec in initdb.c. 2004-05-17 13:17:29 +00:00
Neil Conway 2871f60f23 Change ln(), log(), power(), and sqrt() to emit the correct SQLSTATE
error codes for certain error conditions, as specified by SQL2003.
2004-05-16 23:18:55 +00:00
Neil Conway 52c82d590a Remove an unused (and empty) header file. 2004-05-14 22:21:43 +00:00
Neil Conway 0079547bcb Implement the width_bucket() function, per SQL2003. This commit only adds
a variant of the function for the 'numeric' datatype; it would be possible
to add additional variants for other datatypes, but I haven't done so yet.

This commit includes regression tests and minimal documentation; if we
want developers to actually use this function in applications, we'll
probably need to document what it does more fully.
2004-05-14 21:42:30 +00:00
Neil Conway 0cb27df5c6 Improve documentation for SQLSTATE error codes, per recent thread on
-patches.
2004-05-14 18:04:02 +00:00
Bruce Momjian 9f944f0443 Adjust find_my_exec/find_other_exec() so that the return parameter is
last, not first.  This fits our style better.
2004-05-14 17:04:48 +00:00
Bruce Momjian 550735cd73 Remove extra 'then'. 2004-05-14 16:29:12 +00:00
Tom Lane c53d6e927f Tighten parsing of boolean options to CREATE TYPE and related functions,
so as to deliver more useful error messages for mistakes like
'PASSEDBYVALUE = f'.  Per gripe from Gaetano Mendola.
2004-05-14 16:11:25 +00:00
Tom Lane 02409a4813 Propagate enlargeStringInfo() fixes into the equivalent code in
pqexpbuffer.c.  While a client-side failure doesn't seem like a
security issue, it's still a bug.
2004-05-14 00:20:38 +00:00
Bruce Momjian 0ec80be435 Properly quote variable for makefile use. 2004-05-14 00:10:52 +00:00
Bruce Momjian 3f41675f6a Move unixware thread stuff into Makefile.unixware. 2004-05-14 00:03:07 +00:00
Bruce Momjian 5e938d831a Force thread flags for all Unixware builds if threading is requested.
This is required because once you link with a library that uses threads,
all references to that library have to use thread flags.
2004-05-13 23:05:54 +00:00
Bruce Momjian f69ecb4f8c Reorganize backend code to more cleanly manage executable names and
backend startup.
2004-05-13 22:45:04 +00:00
Bruce Momjian 261eda55d3 No need for gcc thread stuff anymore, only cc. 2004-05-13 15:44:05 +00:00
Bruce Momjian 9f7283eb1b Remove warning about Unixware. 2004-05-13 14:07:19 +00:00
Bruce Momjian c2e8386440 Fix Win32 bug with missing errno for strerror(). 2004-05-13 01:47:12 +00:00
Tom Lane 4d924bdb46 Tighten up overflow check in path_recv, pursuant to code review inspired
by Ken Ashcraft's report.  I think there is no actual bug here since if
the int32 value does wrap a little bit, palloc will still reject it.
Still it's better that the code be obviously correct.
2004-05-12 22:38:44 +00:00
Bruce Momjian 0a54441cbf Here's a patch that will allow external modules like pl<lang> to set
additional flags for the dlltool and dllwrap commands. More info here:

	http://archives.postgresql.org/pgsql-hackers/2004-05/msg00350.php

Thomas Hallgren
2004-05-12 21:56:27 +00:00
Bruce Momjian b1ffacddfc Rename find_my_binary/find_other_binary to
find_my_exec/find_other_exec().  Remove passing of progname to these
functions as they can find that out from argv[0], which they already
have.

Make get_progname return const char *, and update all progname variables
to be const char *.
2004-05-12 13:38:49 +00:00
Bruce Momjian b9ba13a80e Fix bug by passing arg[0] to find_my_binary(). 2004-05-12 03:48:42 +00:00
Tom Lane 3a0d95d181 Yawn ... still another place not quite ready for zero-column tables. 2004-05-11 22:43:55 +00:00
Bruce Momjian fda15b351a As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries.  I move FindExec into
port/exec.c (and renamed it to find_my_binary()).  I also added
find_other_binary that looks for another binary in the same directory as
the calling program, and checks the version string.

The only behavior change was that initdb and pg_dump would look in the
hard-coded bindir directory if it can't find the requested binary in the
same directory as the caller.  The new code throws an error.  The old
behavior seemed too error prone for version mismatches.
2004-05-11 21:57:15 +00:00
Tom Lane a2160c5eeb Add tests to enlargeStringInfo() to avoid possible buffer-overrun or
infinite-loop problems if a bogus data length is passed.
2004-05-11 20:07:26 +00:00
Tom Lane 5ddbe904c0 Refactor low-level aclcheck code to provide useful interfaces for multi-bit
permissions tests in about the same amount of code as before.  Exactly what
the GRANT/REVOKE code ought to be doing is still up for debate, but this
should be helpful in any case, and it already solves an efficiency problem
in executor startup.
2004-05-11 17:36:13 +00:00
Tom Lane bef764029b Fix oversights in processing of LIMIT expressions during planning. 2004-05-11 13:15:15 +00:00
Tom Lane 1697568d57 Repair recalculation failure for nested sub-SELECTs, per bug report from
Didier Moens.  Bug is new in 7.4, and was caused by not updating everyplace
I should've when replacing locParam markers by allParam.
Add a regression test to catch related errors in future.
2004-05-11 02:21:39 +00:00
Bruce Momjian 608b85a23c Clean up indenting of Makefile filenames. 2004-05-10 23:09:04 +00:00
Tom Lane 2f63232d30 Promote row expressions to full-fledged citizens of the expression syntax,
rather than allowing them only in a few special cases as before.  In
particular you can now pass a ROW() construct to a function that accepts
a rowtype parameter.  Internal generation of RowExprs fixes a number of
corner cases that used to not work very well, such as referencing the
whole-row result of a JOIN or subquery.  This represents a further step in
the work I started a month or so back to make rowtype values into
first-class citizens.
2004-05-10 22:44:49 +00:00
Bruce Momjian c50faf944d Add variables names to static prototypes in initdb.c. 2004-05-10 20:51:58 +00:00
Michael Meskes 491dc124bf - Argh, just another bug in adjust_informix.
- Added "extern C" flags for C++ compiler. Hopefully I got that one right.
2004-05-10 13:46:06 +00:00
Tom Lane 7a3977c08d Fix a couple of oversights in new ALTER TABLE code that broke
ALTER SET STATISTICS for functional indexes.
2004-05-08 22:46:29 +00:00
Tom Lane c00b309932 Alter string format used for integer and OID lists in stored rules.
This simplifies and speeds up the reader by letting it get the representation
right the first time, rather than correcting it after-the-fact.  Also,
after int and OID lists become separate node types per Neil's pending
patch, this will let us treat these lists as just plain Nodes instead
of requiring separate read/write macros the way we have now.
2004-05-08 21:21:18 +00:00
Tom Lane 4af3421161 Get rid of rd_nblocks field in relcache entries. Turns out this was
costing us lots more to maintain than it was worth.  On shared tables
it was of exactly zero benefit because we couldn't trust it to be
up to date.  On temp tables it sometimes saved an lseek, but not often
enough to be worth getting excited about.  And the real problem was that
we forced an lseek on every relcache flush in order to update the field.
So all in all it seems best to lose the complexity.
2004-05-08 19:09:25 +00:00
Bruce Momjian ef0ec907bd Improve style of new log_statement_stats error message, per Peter. 2004-05-08 02:11:46 +00:00
Tom Lane dd16b7aa9e Get rid of cluster.c's apparatus for rebuilding a relation's indexes
in favor of using the REINDEX TABLE apparatus, which does the same thing
simpler and faster.  Also, make TRUNCATE not use cluster.c at all, but
just assign a new relfilenode and REINDEX.  This partially addresses
Hartmut Raschick's complaint from last December that 7.4's TRUNCATE is
an order of magnitude slower than prior releases.  By getting rid of
a lot of unnecessary catalog updates, these changes buy back about a
factor of two (on my system).  The remaining overhead seems associated
with creating and deleting storage files, which we may not be able to
do much about without abandoning transaction safety for TRUNCATE.
2004-05-08 00:34:49 +00:00
Neil Conway 7c6baade7b Refactor CheckDropPermissions() to move some initialization code for
printing the proper error message out of the common path.
2004-05-07 19:12:26 +00:00
Tom Lane d905057853 The timezone() family of functions (a/k/a AT TIME ZONE construct) can
safely be marked immutable, since their results don't depend on the
TimeZone GUC variable.  Per recent discussion.
2004-05-07 16:57:16 +00:00
Michael Meskes 2b55612645 - Added additional test case.
- Fixed bug that reversed string length in typedefs.
- Added portability file to pgtypeslib.
2004-05-07 13:42:49 +00:00
Tom Lane 573aaa52bc NATURAL CROSS JOIN is a contradiction in terms, not to mention disallowed
by the SQL spec and by our parser.  Thanks to Jonathan Scott for finding
this longstanding error.
2004-05-07 03:19:44 +00:00
Bruce Momjian 63d0139061 Remove crude test for log_statement_stats in startup code now that we
have a more proper GUC based test.

Also change error return code to ERRCODE_INVALID_PARAMETER_VALUE so it
matches the old error return code.
2004-05-07 01:53:41 +00:00
Bruce Momjian ae96e629b8 Throw error if log_statement_stats is used with confliction options for
per-query stage stats.
2004-05-07 01:34:08 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Bruce Momjian 38b85b15c1 sysv_shmem.c patch is to correct a bug that prevents the postmaster
recovering from an unexpected backend termination.

The remaining patches are to allow whitespace in db/install directory
names.

Claudio Natoli
2004-05-06 19:23:25 +00:00
Bruce Momjian 22a2c4b576 Erase MD5 user passwords when a user is renamed because the username is
used as salt for the MD5 password.
2004-05-06 16:59:16 +00:00
Tom Lane 8325a8d69e Make ALTER COLUMN TYPE preserve clustered status for indexes it doesn't
modify.  Also fix a passel of problems with ALTER TABLE CLUSTER ON:
failure to check that the index is safe to cluster on (or even belongs
to the indicated rel, or even exists), and failure to broadcast a relcache
flush event when changing an index's state.
2004-05-06 16:10:57 +00:00
Tom Lane eee6f9d5c2 Rewrite nodeRead() in a less obfuscated fashion, per discussion with
Neil Conway.
2004-05-06 14:01:33 +00:00
Neil Conway 839be02ee1 Fix grammatical error in comment. 2004-05-06 06:11:01 +00:00
Tom Lane 9e16195f3f Second try at a portable unsetenv(). 2004-05-05 21:18:29 +00:00
Tom Lane dadce6509a Don't assume that struct timeval's tv_sec field is the same datatype as
time_t; on some platforms they are not the same width.  Per Manfred Koizar.
2004-05-05 17:28:46 +00:00
Tom Lane 1899203f3d Fix get_rels_with_domain to not do the wrong thing with views and
composite types that use a domain.
2004-05-05 17:06:56 +00:00
Tom Lane c7007d1848 Use a more portable technique for unsetting environment variables,
and unset PGCLIENTENCODING to prevent backend from dying if it's set
to something incompatible with the -E option.
2004-05-05 16:09:31 +00:00
Michael Meskes e845adf31f - Fixed bug in adjust_informix that treated arrays as simple variables.
- Synced parser again.
- Synced lexer.
2004-05-05 15:03:04 +00:00
Tom Lane 077db40fa1 ALTER TABLE rewrite. New cool stuff:
* ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL
spec.  A default is implemented by rewriting the table with the new value
stored in each row.

* ALTER COLUMN TYPE.  You can change a column's datatype to anything you
want, so long as you can specify how to convert the old value.  Rewrites
the table.  (Possible future improvement: optimize no-op conversions such
as varchar(N) to varchar(N+1).)

* Multiple ALTER actions in a single ALTER TABLE command.  You can perform
any number of column additions, type changes, and constraint additions with
only one pass over the table contents.

Basic documentation provided in ALTER TABLE ref page, but some more docs
work is needed.

Original patch from Rod Taylor, additional work from Tom Lane.
2004-05-05 04:48:48 +00:00
Bruce Momjian 3e3cb0a14a More PWD adjustments for win32. 2004-05-03 13:25:23 +00:00
Bruce Momjian 0142c00180 Use $build_platform for PWD flag test, per suggestion from Peter. 2004-05-02 21:30:08 +00:00
Bruce Momjian 5d7aec483c Update catalog version for acl removal changes. 2004-05-02 13:39:51 +00:00
Bruce Momjian a9d3c2cb18 Revert patch --- needs more generalized solution.
> Please find a attached a small patch that adds accessor functions
> for "aclitem" so that it is not an opaque datatype.
>
> I needed these functions to browse aclitems from user land. I can load
> them when necessary, but it seems to me that these accessors for a
> backend type belong to the backend, so I submit them.
>
> Fabien Coelho
2004-05-02 13:38:28 +00:00
Bruce Momjian e4a03f9e75 Set PWDFLAGS based on test platform, not target platform.
Andrew Dunstan
2004-05-02 10:24:51 +00:00
Bruce Momjian 14a5330806 this patch makes sure that:
* correct platform specific regression files are used under ming
 * pwd prints out a usable win32 pathname

Claudio Natoli
2004-05-02 04:27:37 +00:00
Bruce Momjian 3363b847ec Set std error to no buffering on Win32. 2004-05-02 04:25:45 +00:00
Bruce Momjian deb78dd833 More win32 adjustment for timezone directory. 2004-05-02 03:12:12 +00:00
Bruce Momjian f4c69c8205 Fix timezone data path for Unix and win32. 2004-05-01 22:07:03 +00:00
Bruce Momjian d7ee665089 Align prototype in C code. 2004-05-01 19:25:08 +00:00
Bruce Momjian ddfc4d1681 Remove debug output line. 2004-05-01 01:38:53 +00:00
Bruce Momjian 0a2b9f9cde Rename function to be less win32 specific. 2004-05-01 01:34:47 +00:00
Bruce Momjian e572246565 Suppress use of timezone library by ecpg. 2004-04-30 20:47:33 +00:00
Bruce Momjian 85b7e8351f Fix zic compiler to use pg version.
Move timezone database to share/timezone.
2004-04-30 20:23:28 +00:00
Bruce Momjian 04d426ba70 Allow build of timezone database on unix. 2004-04-30 20:01:39 +00:00
Bruce Momjian 1360fe4096 More timezone build adjustments. 2004-04-30 17:52:07 +00:00
Bruce Momjian 46050a3b75 Timezone code checks for HAVE_SYMLINK of zero, so use in pgtz.h:
#ifndef HAVE_SYMLINK
#define HAVE_SYMLINK 0
#endif
2004-04-30 16:58:48 +00:00
Bruce Momjian 82700281d0 More cleanups for USE_PGTZ. 2004-04-30 16:08:01 +00:00
Bruce Momjian b99a3a7541 Rename to USE_PGTZ to match code. 2004-04-30 15:01:25 +00:00
Bruce Momjian a640845c88 Allow timezone to compile under Unix by blocking 'timezone' conflict with
system headers.

Allow system to find timezone database by pasing pkglibdir into the
binary via a define.
2004-04-30 14:24:14 +00:00
Bruce Momjian e9a028f81f Convert DOS newlines to Unix newlines. 2004-04-30 04:44:06 +00:00
Bruce Momjian 7146eb0bc3 Integrate timezone library to be called only from Win32.
Timezone code backend integration done by Magnus Hagander.
2004-04-30 04:31:52 +00:00
Bruce Momjian 7d6f37b8c0 Enable use of our own timezone library for Win32. 2004-04-30 04:18:28 +00:00
Bruce Momjian 4a73eb5ab1 Minor adjustments to enable public-domain timezone library to be called
from our code.
2004-04-30 04:14:06 +00:00
Bruce Momjian d248a67af1 Timezone library changes to map into our backend code. 2004-04-30 04:11:58 +00:00
Bruce Momjian 6a2b75c2c8 Add Olson's public domain timezone library to src/timezone. 2004-04-30 04:09:23 +00:00
Michael Meskes d51d870f9e Synced parser and keyword list. 2004-04-29 14:08:10 +00:00
Bruce Momjian e27338f26c Do thread testing from configure in a much cleaner fashion. 2004-04-27 19:51:12 +00:00
Bruce Momjian ca8a8baa76 Add comments. 2004-04-27 18:40:50 +00:00
Bruce Momjian f687c7e87f Use mktemp for temporary file names, per suggestion from Peter. 2004-04-27 18:36:31 +00:00
Bruce Momjian b498b795a0 Move postgres.h to the top of the C file. 2004-04-27 17:22:41 +00:00
Bruce Momjian 095ed37f13 Fix subdir for thread test program. 2004-04-26 18:32:33 +00:00
Bruce Momjian efc34e29a2 Add $(X) for cross-compiling. Seems the mingw compiler running on
FreeBSD doesn't add .EXE to links.

Michiel Ephraim
2004-04-26 17:40:48 +00:00
Bruce Momjian 725524bd3b Please find attached a small patch against current cvs head, so that
'information_schema' is considered a system schema by various
pg_stat*_*_{tables,sequences} views.

Fabien COELHO
2004-04-26 15:24:42 +00:00
Bruce Momjian 0a17fd726c Please find a attached a small patch that adds accessor functions
for "aclitem" so that it is not an opaque datatype.

I needed these functions to browse aclitems from user land. I can load
them when necessary, but it seems to me that these accessors for a
backend type belong to the backend, so I submit them.

Fabien Coelho
2004-04-26 15:06:49 +00:00
Dennis Bjorklund 9d8b414722 Translation updates 2004-04-26 06:33:10 +00:00
Bruce Momjian 30a06fe2c4 Unconditionally define:
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS

for all ports.  It can't hurt if they are not supported, but it makes
our job easier for porting.

Should fix Darwin compile and other platforms without mucking with the
thread detection code.
2004-04-26 04:04:42 +00:00
Bruce Momjian f5b6ce7cb9 Clean tools/thread on make clean/distclean. 2004-04-26 00:48:38 +00:00
Bruce Momjian 144d828e7f More thread error improvments. 2004-04-26 00:38:25 +00:00
Bruce Momjian 2f5223600a More thread error message improvments. 2004-04-26 00:36:18 +00:00
Neil Conway 0370951347 Tiny assorted fixes: correct a typo in a comment in vacuumlazy.c, remove
some unused #include directives from bufmgr.c, and clarify comments in
bufmgr.h and buf.h
2004-04-25 23:50:58 +00:00
Bruce Momjian 6a27640230 Fix typo on thread lib name. 2004-04-25 21:03:27 +00:00
Bruce Momjian 45fbab2933 Make thread flags CFLAGS, not CPPFLAGS. 2004-04-25 20:57:32 +00:00
Bruce Momjian ae5bc8a601 No need to use our standard libs for the thread test --- they might not
be compiled yet.
2004-04-25 20:47:56 +00:00
Neil Conway 1812d3b233 Remove the last traces of Joe Hellerstein's "xfunc" optimization. Patch
from Alvaro Herrera. Also, removed lispsort.c, since it is no longer
used.
2004-04-25 18:23:57 +00:00
Tom Lane 2ce964b958 Ensure getaddrinfo_all returns null result on failure. 2004-04-24 20:10:34 +00:00
Bruce Momjian f6646efa4c Hook thread_test program run at the end of configure run.
Add test for cross-compiles that they have to run the thread_test
program on the target machine.
2004-04-23 23:58:12 +00:00
Bruce Momjian 95178c8d24 Report error if thread-test is run without having threading enabled in
configure.
2004-04-23 22:21:49 +00:00
Bruce Momjian 66b42d3028 Improve thread test program. Test only functions that need testing. 2004-04-23 20:35:50 +00:00
Neil Conway fc7fd50182 Add ceiling() as an alias for ceil(), and power() as an alias for pow().
Regression tests and documentation have both been updated.

SQL2003 requires that both ceiling() and ceil() be present, so I have
documented both spellings. SQL2003 doesn't mention pow() as far as I
can see, so I decided to replace pow() with power() in the documentation:
there is little reason to encourage the continued usage of a function
that isn't compliant with the standard, given a standard-compliant
alternative.

RELEASE NOTES: should state that pow() is considered deprecated
(although I don't see the need to ever remove it.)
2004-04-23 20:32:20 +00:00
Bruce Momjian 7a66015e98 Add new auto-detection of thread flags.
Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
2004-04-23 18:15:55 +00:00
Michael Meskes 77528c9bd7 Fixed memory misusage in variable handling. 2004-04-23 06:17:14 +00:00
Bruce Momjian 1b4e82559c Simplify thread test program. 2004-04-22 23:58:03 +00:00
Neil Conway 0fa2afa93a Make psql's \d+ command indicate whether the table in question
contains OIDs. Also, minor documentation improvements to the
psql reference page.
2004-04-22 17:38:16 +00:00
Bruce Momjian b3bc93a4b7 Rename global psql startup file to psqlrc.sample. 2004-04-22 14:34:38 +00:00
Bruce Momjian 65b020bd61 Fix filename mention in psqlrc.sample file. 2004-04-22 14:33:49 +00:00
Neil Conway 139abc2896 Make LocalRefCount and PrivateRefCount arrays of int32, rather than long.
This saves a small amount of per-backend memory for LP64 machines.
2004-04-22 07:21:55 +00:00
Bruce Momjian b00d50d365 Per discussion earlier today, here is a fix that lets ereport() on win32
report socket errors.

Magnus Hagander
2004-04-22 03:51:24 +00:00
Bruce Momjian 914042fe5f This patch makes the EXECUTE command's completion tag return the
completion tag of the actual statement executed.  This allows the
correct update count to be returned for UPDATE/INSERT/DELETE
statements.

Kris Jurka
2004-04-22 02:58:21 +00:00
Bruce Momjian ec7c4c1b66 Please find attached a small patch so that "pg_restore" ignores some sql
errors. This is the second submission, which integrates Tom comments about
localisation and exit code. I also added some comments about one sql
command which is not ignored.

Fabien COELHO
2004-04-22 02:39:10 +00:00
Bruce Momjian be6bbcef56 Add global psql config file, psql.rc.sample. 2004-04-22 01:53:37 +00:00
Bruce Momjian f9a2d0b2fb More thread test program improvements. 2004-04-21 20:58:56 +00:00
Bruce Momjian 53b5455387 Improve thread test program to show if non-*_r functions are even called. 2004-04-21 20:51:54 +00:00
Tom Lane 37fa3b6c89 Tweak indexscan and seqscan code to arrange that steps from one page to
the next are handled by ReleaseAndReadBuffer rather than separate
ReleaseBuffer and ReadBuffer calls.  This cuts the number of acquisitions
of the BufMgrLock by a factor of 2 (possibly more, if an indexscan happens
to pull successive rows from the same heap page).  Unfortunately this
doesn't seem enough to get us out of the recently discussed context-switch
storm problem, but it's surely worth doing anyway.
2004-04-21 18:24:26 +00:00
Tom Lane 95a03e9cdf Another round of code cleanup on bufmgr. Use BM_VALID flag to keep track
of whether we have successfully read data into a buffer; this makes the
error behavior a bit more transparent (IMHO anyway), and also makes it
work correctly for local buffers which don't use Start/TerminateBufferIO.
Collapse three separate functions for writing a shared buffer into one.
This overlaps a bit with cleanups that Neil proposed awhile back, but
seems not to have committed yet.
2004-04-21 18:06:30 +00:00
Bruce Momjian 49d3d9cf40 Change COPY CSV keyword to be:
FORCE QUOTE to force quotes
	FORCE NOT NULL to quote null input values
2004-04-21 00:34:18 +00:00
Bruce Momjian 9b04ddc185 Add NetBSD thread compile flags. 2004-04-20 14:36:49 +00:00
Bruce Momjian 6949fc0269 Remove pg_encoding. Not needed anymore since we have an initdb in C. 2004-04-20 00:40:06 +00:00
PostgreSQL Daemon 41fa9e9bae Remove all of the libpgtcl and pgtclsh files, including all references to
them within the various makefiles

with_tcl is still required for the src/pl/tcl language
2004-04-20 00:33:53 +00:00
Tom Lane 011c3e62e7 Code review for ARC patch. Eliminate static variables, improve handling
of VACUUM cases so that VACUUM requests don't affect the ARC state at all,
avoid corner case where BufferSync would uselessly rewrite a buffer that
no longer contains the page that was to be flushed.  Make some minor
other cleanups in and around the bufmgr as well, such as moving PinBuffer
and UnpinBuffer into bufmgr.c where they really belong.
2004-04-19 23:27:17 +00:00
Bruce Momjian 52e4f27af9 Prevent doubling of escapes when not in quote mode for CSV. 2004-04-19 21:58:02 +00:00
Bruce Momjian e60da4bcf6 Remove debug code that acidentally got into CVS from previous commit. 2004-04-19 21:22:14 +00:00
Bruce Momjian 09f317539a Fix for BEGIN with ISOLATION/READONLY clauses.
Fix for code originally added for 7.5.
2004-04-19 21:21:34 +00:00
Bruce Momjian 31338352bd * Most changes are to fix warnings issued when compiling win32
* removed a few redundant defines
* get_user_name safe under win32
* rationalized pipe read EOF for win32 (UPDATED PATCH USED)
* changed all backend instances of sleep() to pg_usleep

    - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a
32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is
acceptable, please replace with pg_usleep(2000000000L)]

I added a comment to that part of the code:

    /*
     *  It would be nice to use pg_usleep() here, but only does 2000 sec
     *  or 33 minutes, which seems too short.
     */
    sleep(1000000);

Claudio Natoli
2004-04-19 17:42:59 +00:00
Bruce Momjian 862b20b382 Complete TODO item:
o -Allow dump/load of CSV format

This adds new keywords to COPY and \copy:

        CSV - enable CSV mode (comma separated variable)
        QUOTE - specify quote character
        ESCAPE - specify escape character
        FORCE - force quoting of specified column
	LITERAL - suppress null comparison for columns

Doc changes included.  Regression updates coming from Andrew.
2004-04-19 17:22:31 +00:00
Tom Lane b5e52b080c Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses
are sought first as local FROM columns, then as local SELECT-list aliases,
and finally as outer FROM columns; the former behavior made outer FROM
columns take precedence over aliases.  This does not change spec
conformance because SQL99 allows only the first case anyway, and it seems
more useful and self-consistent.  Per gripe from Dennis Bjorklund 2004-04-05.
2004-04-18 18:12:58 +00:00
Bruce Momjian 3e2aef58a2 Handle Warn_restart_ready properly in SIGTERM safety patch. 2004-04-16 12:59:05 +00:00
Bruce Momjian 3a14336746 Modify COPY for() loop to use attnum as a variable name, not 'i'. 2004-04-15 22:36:03 +00:00
Tom Lane 6c72f44c62 Improve syntax error messages for invalid-argument cases in RETURN and
RETURN NEXT.
2004-04-15 13:01:45 +00:00
Peter Eisentraut 0117ed7d4c Translation updates 2004-04-15 08:15:09 +00:00
Peter Eisentraut a45f9e4e52 Translation updates 2004-04-15 08:04:05 +00:00
Bruce Momjian a4c40f140d Here's an attempt at new socket and signal code for win32.
It works on the principle of turning sockets into non-blocking, and then
emulate blocking behaviour on top of that, while allowing signals to
run. Signals are now implemented using an event instead of APCs, thus
getting rid of the issue of APCs not being compatible with "old style"
sockets functions.

It also moves the win32 specific code away from pqsignal.h/c into
port/win32, and also removes the "thread style workaround" of the APC
issue previously in place.

In order to make things work, a few things are also changed in pgstat.c:

1) There is now a separate pipe to the collector and the bufferer. This
is required because the pipe will otherwise only be signalled in one of
the processes when the postmaster goes down. The MS winsock code for
select() must have some kind of workaround for this behaviour, but I
have found no stable way of doing that. You really are not supposed to
use the same socket from more than one process (unless you use
WSADuplicateSocket(), in which case the docs specifically say that only
one will be flagged).

2) The check for "postmaster death" is moved into a separate select()
call after the main loop. The previous behaviour select():ed on the
postmaster pipe, while later explicitly saying "we do NOT check for
postmaster exit inside the loop".
The issue was that the code relies on the same select() call seeing both
the postmaster pipe *and* the pgstat pipe go away. This does not always
happen, and it appears that useing WSAEventSelect() makes it even more
common that it does not.
Since it's only called when the process exits, I don't think using a
separate select() call will have any significant impact on how the stats
collector works.

Magnus Hagander
2004-04-12 16:19:18 +00:00
Bruce Momjian abdabeb995 Change psql \copy stdin/stdout to read from command input/output.
Add pstdin/pstdout to read from psql's stdin/stdout.

BACKWARD INCOMPATIBLE CHANGE
2004-04-12 15:58:52 +00:00
Bruce Momjian 3c4ab3f51d Exit backend from SIGTERM or FATAL by simulating client EOF, rather than
calling proc_exit() directly.  This should make SIGTERM more reliable.
2004-04-11 00:54:45 +00:00
Bruce Momjian 1934055cbe Please find a small patch to fix the brain damage "century" and
"millennium" date part implementation in postgresql, both in the code
and the documentation, so that it conforms to the official definition.
If you do not agree with the official definition, please send your
complaint to "pope@vatican.org". I'm not responsible for them;-)

With the previous version, the centuries and millenniums had a wrong
number and started the wrong year. Moreover century number 0, which does
not exist in reality, lasted 200 years. Also, millennium number 0 lasted
2000 years.

If you want postgresql to have it's own definition of "century" and
"millennium" that does not conform to the one of the society, just give
them another name. I would suggest "pgCENTURY" and "pgMILLENNIUM";-)

IMO, if someone may use the options, it means that postgresql is used for
historical data, so it make sense to have an historical definition. Also,
I just want to divide the year by 100 or 1000, I can do that quite easily.

BACKWARD INCOMPATIBLE CHANGE

Fabien Coelho - coelho@cri.ensmp.fr
2004-04-10 18:02:59 +00:00
Dennis Bjorklund 4bd3f0744d Translation updates 2004-04-09 06:49:35 +00:00
Dennis Bjorklund 0469e9e086 Translation updates 2004-04-09 05:54:01 +00:00
Bruce Momjian 60282569f4 Magnus says new Win32 timezone library will not need special horology:
so remove regression result map line:

	horology/win32=horology-no-DST-before-1970
2004-04-08 23:00:55 +00:00
Bruce Momjian 1f12abbc7d Push superuser check farther down in the if() statements to fix startup
crash with debug in log_statement patch.
2004-04-07 18:52:26 +00:00
Tom Lane 0bb21d391c Still another place to make the world safe for zero-column tables.
Per example from Jiang Wei.
2004-04-07 18:46:12 +00:00
Bruce Momjian e675a23688 Update Darwin thread compile flags, and OS version info. 2004-04-07 18:31:59 +00:00
Bruce Momjian 9b3bc35f82 Update darwin OS version. 2004-04-07 18:30:59 +00:00
Tom Lane 989067bd22 Extend set-operation planning to keep track of the sort ordering induced
by the set operation, so that redundant sorts at higher levels can be
avoided.  This was foreseen a good while back, but not done.  Per request
from Karel Zak.
2004-04-07 18:17:25 +00:00
Tom Lane 5d1af6aee3 build_subquery_pathkeys() was examining wrong copy of subquery target list,
causing it to fail to recognize the output ordering of subqueries that
contain set operations (UNION/INTERSECT/EXPECT).  Per example from Karel Zak.
2004-04-07 17:42:28 +00:00
Bruce Momjian b48325310b Update Darwin as thread-safe. 2004-04-07 14:21:39 +00:00
Bruce Momjian 6a25c6e1d1 > >>1. change the type of "log_statement" option from boolean to string,
> >>with allowed values of "all, mod, ddl, none" with default "none".

OK, here is a patch that implements #1.  Here is sample output:

        test=> set client_min_messages = 'log';
        SET
        test=> set log_statement = 'mod';
        SET
        test=> select 1;
         ?column?
        ----------
                1
        (1 row)

        test=> update test set x=1;
        LOG:  statement: update test set x=1;
        ERROR:  relation "test" does not exist
        test=> update test set x=1;
        LOG:  statement: update test set x=1;
        ERROR:  relation "test" does not exist
        test=> copy test from '/tmp/x';
        LOG:  statement: copy test from '/tmp/x';
        ERROR:  relation "test" does not exist
        test=> copy test to  '/tmp/x';
        ERROR:  relation "test" does not exist
        test=> prepare xx as select 1;
        PREPARE
        test=> prepare xx as update x set y=1;
        LOG:  statement: prepare xx as update x set y=1;
        ERROR:  relation "x" does not exist
        test=> explain analyze select 1;;
                                             QUERY PLAN
        ------------------------------------------------------------------------------------
         Result  (cost=0.00..0.01 rows=1 width=0) (actual time=0.006..0.007 rows=1 loops=1)
         Total runtime: 0.046 ms
        (2 rows)

        test=> explain analyze update test set x=1;
        LOG:  statement: explain analyze update test set x=1;
        ERROR:  relation "test" does not exist
        test=> explain update test set x=1;
        ERROR:  relation "test" does not exist

It checks PREPARE and EXECUTE ANALYZE too.  The log_statement values are
'none', 'mod', 'ddl', and 'all'.  For 'all', it prints before the query
is parsed, and for ddl/mod, it does it right after parsing using the
node tag (or command tag for CREATE/ALTER/DROP), so any non-parse errors
will print after the log line.
2004-04-07 05:05:50 +00:00
Tom Lane e5170860ee Support FULL JOIN with no join clauses, such as X FULL JOIN Y ON TRUE.
That particular corner case is not exactly compelling, but given 7.4's
ability to discard redundant join clauses, it is possible for the situation
to arise from queries that are not so obviously silly.  Per bug report
of 6-Apr-04.
2004-04-06 18:46:03 +00:00
Tom Lane 2098ec6e37 ALTER SEQUENCE RESTART did the wrong thing if sequence last_value was
equal to the desired restart value (must clear is_called, did not).
Per bug report #1127 from Piotr Konieczny.
2004-04-06 16:39:30 +00:00
Bruce Momjian 055b0d27f6 Add thread program mention of errno thread-safety. 2004-04-06 13:55:17 +00:00
Bruce Momjian 4a72dbc1ae The attached applied patch throws an error if the delimiter appears in
the COPY NULL string:

        test=> copy pg_language to '/tmp/x' with delimiter '|';
        COPY
        test=> copy pg_language to '/tmp/x' with delimiter '|' null '|x';
        ERROR:  COPY delimiter must not appear in the NULL specification
        test=> copy pg_language from '/tmp/x' with delimiter '|' null '|x';
        ERROR:  COPY delimiter must not appear in the NULL specification

It also throws an error if it conflicts with the default NULL string:

        test=> copy pg_language to '/tmp/x' with delimiter '\\';
        ERROR:  COPY delimiter must not appear in the NULL specification
        test=> copy pg_language to '/tmp/x' with delimiter '\\' NULL 'x';
        COPY
2004-04-06 13:21:33 +00:00
Bruce Momjian 5e9f4d26bc Add CLUSTER tag to psql \d display. 2004-04-06 04:05:17 +00:00
Bruce Momjian d8fe99d98c Add comment that sched_yield might be a portability problem. 2004-04-05 14:13:45 +00:00
Bruce Momjian a86c329f99 Change getpid() while loop to use sched_yield(), greatly speeds up test.
sched_yield is a requirement for the test but not for our PostgreSQL
code, so if it causes a portability problem, we will remove it.
2004-04-05 14:12:32 +00:00
Peter Eisentraut 49c8d08bc8 New translation 2004-04-05 09:34:11 +00:00
Peter Eisentraut fc43abaccf Translation updates 2004-04-05 09:13:43 +00:00
Bruce Momjian a1d63d9232 Have threads wait for parent to test thread-specific pointers before
exiting.
2004-04-05 05:43:06 +00:00
Bruce Momjian 422d4819ee Corrects issues recently posted by Dann Corbit, allowing libpq/psql to
be built under VC++. Moves a pgstat win32 #def to port.h

Claudio Natoli
2004-04-05 03:16:21 +00:00
Bruce Momjian 823ac7c2b4 This is a cleanup patch for access/transam/xact.c. It only removes some
#ifdef NOT_USED code, and adds a new TBLOCK state which signals the fact
that StartTransaction() has been executed.

Alvaro Herrera
2004-04-05 03:11:39 +00:00
Bruce Momjian 0969dc867b Allow LIKE/ILIKE to appear in more places in a query.
Fabien COELHO
2004-04-05 03:07:26 +00:00
Bruce Momjian 6165bbab8c Remove 'syslog' GUC variable, and add more logical 'log_destination'
variable to control logoutput location on Unix and Win32.

Magnus Hagander
2004-04-05 03:02:11 +00:00
Bruce Momjian a12fc7dae6 Improve handling of GUC USERLIMIT variables by reorganizing code. Also,
handle new postgresql.conf values with SIGHUP better by better enforcing
USERLIMIT settings on existing non-super-user backends.
2004-04-05 02:48:09 +00:00
Bruce Momjian 53ddde5b74 Add volatile to thread-specific thread variables. 2004-04-05 02:22:14 +00:00
Bruce Momjian 31f48c9afe Update thread test to only test for 'localhost' and local machine name. 2004-04-05 01:27:58 +00:00
Bruce Momjian d56b736db0 Update thread test to do getpid() in while loop, also use weather.com
rather than slashdot.org for testing.
2004-04-04 17:23:54 +00:00
Tom Lane 8efbe30df5 check_sql_fn_retval has always thought that we supported doing
'SELECT foo()' in a SQL function returning a rowtype, to simply pass
back the results of another function returning the same rowtype.
However, that hasn't actually worked in many years.  Now it works again.
2004-04-02 23:14:08 +00:00
Tom Lane 3dd1ca035d Fix poor choice of error message in corner cases. 2004-04-02 21:30:44 +00:00
Tom Lane b066d9e4bc Clean up some code that had gotten a bit ugly through repeated revisions. 2004-04-02 21:05:32 +00:00
Tom Lane 27a4f06ade Get rid of crocky use of RangeVar nodes in parser to represent partially
transformed whole-row variables.  Cleaner to use regular whole-row Vars.
2004-04-02 19:07:02 +00:00
Dennis Bjorklund 94d8da8fec Translation updates 2004-04-02 13:47:56 +00:00
Dennis Bjorklund 03f0604643 Translation updates 2004-04-02 13:42:26 +00:00
Tom Lane eeaef25ad6 Fix some portability issues with new float input code (didn't work on
HPUX 11 ...)
2004-04-01 23:52:18 +00:00
Tom Lane b3fcc816ae Add missing casts to unsigned char in recently-added isspace() calls. 2004-04-01 22:51:31 +00:00
Tom Lane 7df21fe8a8 Adjust expected regression outputs for plan changes caused by recent
'fuzzy cost comparison' patch.  Mea culpa for not having noticed this
when I committed the patch.
2004-04-01 21:59:45 +00:00
Tom Lane 375369acd1 Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums.  This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables.  However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well.  Per my proposal of a few days ago.
2004-04-01 21:28:47 +00:00
Bruce Momjian 8590a62b75 Improve comments on USERLIMIT GUC processing. 2004-04-01 14:25:47 +00:00
Bruce Momjian fd071bd478 Fix to_char for 1 BC. Previously it returned 1 AD.
Fix to_char(year) for BC dates.  Previously it returned one less than
the current year.

Add documentation mentioning that there is no 0 AD.
2004-03-30 15:53:18 +00:00
Teodor Sigaev f2c064afcb Cleanup vectors of GISTENTRY and eliminate problem with 64-bit strict-aligned
boxes. Change interface to user-defined GiST support methods union and
picksplit. Now instead of bytea struct it used special GistEntryVector
structure.
2004-03-30 15:45:33 +00:00
Tom Lane 8d9a28eeef Use fuzzy comparison of path costs in add_path(), so that paths with the
same path keys and nearly equivalent costs will be considered redundant.
The exact nature of the fuzziness may get adjusted later based on current
discussions, but no one has shot a hole in the basic idea yet ...
2004-03-29 19:58:04 +00:00
Michael Meskes 047a2cecff Fixed possible segfault in type.c (by Juergen Cappel) 2004-03-29 15:11:58 +00:00
Bruce Momjian b803cf4320 Clean up thread test program. 2004-03-28 02:37:31 +00:00
Bruce Momjian db9a957618 Add test for thread-safe errno to thread test program. 2004-03-27 23:02:44 +00:00
Bruce Momjian 4f0d027e7d Add comment about psql \s (history display):
/* This scrolls off the screen when using /dev/tty */
2004-03-27 18:01:40 +00:00
Bruce Momjian b295c0a085 Clean up function call arg appearance. 2004-03-27 17:59:35 +00:00
Bruce Momjian cfcdd31c5d Change small 'if/else' test to use Max(). 2004-03-27 17:32:42 +00:00
Tom Lane 513bbf4046 Fix brain-dead placement of global variable declaration. 2004-03-27 03:08:42 +00:00
Tom Lane 7820ee24c9 Now that we are allowing index opclasses to contain operators that are
only stable and not immutable, pred_test_simple_clause has to guard
against making invalid deductions.  Add a test for immutability of
the selected test_op.
2004-03-27 00:24:28 +00:00
Bruce Momjian 79b805f6d5 Add -D_REENTRANT for Solaris threading. 2004-03-26 18:24:08 +00:00
Bruce Momjian fda3449625 Update gcc solaris flags. 2004-03-25 22:12:37 +00:00
Bruce Momjian dbd5390ad4 Fix for SSL compile. 2004-03-25 21:48:59 +00:00
Tom Lane 457ad3925d Add a more useful error message for the case where someone tries to pass
a whole row or record variable into a SQL function.  Eventually this case
should be made to actually work, but for now this is better than what it
did before.
2004-03-24 23:38:49 +00:00
Tom Lane 8899a2aba9 Replace max_expr_depth parameter with a max_stack_depth parameter that
is measured in kilobytes and checked against actual physical execution
stack depth, as per my proposal of 30-Dec.  This gives us a fairly
bulletproof defense against crashing due to runaway recursive functions.
2004-03-24 22:40:29 +00:00
Tom Lane 6a034c3322 Adjust error message wording per Andrew Dunstan's advice. 2004-03-24 15:20:54 +00:00
Bruce Momjian c83cd6c1da Update description error text:
(errmsg("no socket configured for listening")));
2004-03-24 04:07:31 +00:00
Bruce Momjian 51b488535e Here's a patch implementing the "thread method" to workaround the bug
with socket calls in signal handlers (APC) on Win32. See details in mail
to pgsql-hackers-win32 a couple of minutes ago.

Magnus Hagander
2004-03-24 04:04:51 +00:00
Bruce Momjian b8fd6756e2 Allow unlink/rename of files open by another process on Win32, using a
special Win32 open flag FILE_SHARE_DELETE.

Claudio Natoli
2004-03-24 03:54:16 +00:00
Bruce Momjian 6daf396879 Add thread locking to SSL and Kerberos connections.
I have removed the docs mentioning that SSL and Kerberos are not
thread-safe.

Manfred Spraul
2004-03-24 03:45:00 +00:00
Neil Conway 017e3e244a Fix some whitespace formatting, and remove an overly-verbose
parameter description: postgresql.conf is not the place for
documentating the functionality of a GUC var.
2004-03-24 03:22:35 +00:00
Bruce Momjian 46c3e29b8e >>Also, what is the default connection mode of psql? It should probably be
>>equivalent to "-h localhost", shouldn't it?
>>
>>
>
>Now that is something I had not thought of.  Seems we can assume a Win32
>psql can never use unix domain sockets, so defaulting that to localhost
>is a good solution too.

Andrew Dunstan
2004-03-24 03:10:29 +00:00
Bruce Momjian f23cce73b3 Use the new GUC variable default_with_oids in pg_dump, rather than using
WITH/WITHOUT OIDS in dump files.  This makes dump files more portable.

I have updated the pg_dump version so old binary dumps will load fine.

Pre-7.5 dumps use WITHOUT OIDS in SQL were needed, so they should be
fine.
2004-03-24 03:06:08 +00:00
Neil Conway 533d0915cf Update the float8 regression tests: they should now pass on FreeBSD 4.x
and (in theory) QNX. Thanks to Chris KL for the report.
2004-03-24 02:02:27 +00:00
Tom Lane f862c42009 Use dollar-quoting for function bodies, unless disabled with
--disable-dollar-quoting.

Andrew Dunstan
2004-03-23 22:06:08 +00:00
Bruce Momjian 48b2802eee When changing select() calls for delays into pg_usleep(), two comments
in s_lock.c were not updated, and still refers to select. Made my grep
hit the wrong files, so I figured a simple patch was in order.. (other
refs in the same comment block was changed..)

Magnus Hagander
2004-03-23 21:39:46 +00:00
Tom Lane 24614a9880 Upgrade ALTER TABLE DROP COLUMN so that it can drop an OID column, and
remove separate implementation of ALTER TABLE SET WITHOUT OIDS in favor
of doing a regular DROP.  Also, cause CREATE TABLE to account completely
correctly for the inheritance status of the OID column.  This fixes
problems with dropping OID columns that have dependencies, as noted by
Christopher Kings-Lynne, as well as making sure that you can't drop an
OID column that was inherited from a parent.
2004-03-23 19:35:17 +00:00
Bruce Momjian ee455f81a5 fflush() FILE buffer to descriptor so stat call gets proper size in fseeko.c.
Fixed problem with pg_dump tar backups.  Only happens on platforms that
use our port/fseeko.c, which is currently BSD/OS and NetBSD.
2004-03-23 05:26:53 +00:00
Bruce Momjian 5688e45979 Fix getpwuid_r call:
*result = getpwuid_r(uid, resultbuf, buffer, buflen);
2004-03-23 02:03:55 +00:00
Tom Lane 2e45c143ef Replace the virtual_host and tcpip_socket parameters with a unified
listen_addresses parameter, as per recent discussion.  The default behavior
is now to listen on localhost, which eliminates the need for the -i
postmaster switch in many scenarios.

Andrew Dunstan
2004-03-23 01:23:48 +00:00
Tom Lane 0d88dd1e50 Before deciding we can use a socket for statistics collection, test to
ensure that it actually passes data.  This catches cases such as a kernel
packet filter rule that makes the socket useless.

Andrew Dunstan
2004-03-22 23:55:29 +00:00
Tom Lane 6b198d61f8 Add missing extern for optind. 2004-03-22 16:46:28 +00:00
Tom Lane d81cd7032e Standardize output buffer size and display format for strftime;
followup to complaint from Korean User's Group.
2004-03-22 15:34:22 +00:00
Bruce Momjian 682a6bd5eb Disasble threads on unixware until other platforms report a problem. 2004-03-22 14:53:43 +00:00
Bruce Momjian 6367ed4382 Increase xlog str_time() static string variable, per Korean User's Group. 2004-03-22 04:16:57 +00:00
Bruce Momjian 3ceda5eab3 I just noticed that \dp outputs "Table" to indicate relations (tables,
sequences and views).  This patch allows it to handle views and
sequences.

Euler Taveira de Oliveira
2004-03-22 03:38:24 +00:00
Bruce Momjian a7f0747320 Adds DLLIMPORT modifier to check_function_bodies
Claudio Natoli
2004-03-22 03:15:33 +00:00
Bruce Momjian 08c0aa7281 Add mention of "-D_POSIX_PTHREAD_SEMANTICS" enabling 5-arg getpwuid_r(). 2004-03-22 01:50:31 +00:00
Tom Lane 0de45c1c27 Add timestamp-versus-timestamptz cross-type comparison functions,
flesh out the index operator classes to include these.  In passing,
fix erroneous volatility marking of ACL functions.
2004-03-22 01:38:18 +00:00
Tom Lane f938c2b91b Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by
plpgsql functions.  Per recent discussions with Fabien Coelho.
2004-03-21 22:29:11 +00:00
Dennis Bjorklund bee3b2a0a0 Translation updates 2004-03-21 12:19:36 +00:00
Dennis Bjorklund 94fb33b115 Translation updates 2004-03-21 09:22:18 +00:00
Tom Lane 05649b88c7 Rewrite pg_dump's comment-dumping code to pull over all the comments
in one query, rather than making a separate query for each object that
could have a comment.  This costs relatively little space (a few tens of
K typically) and saves substantial time in databases with many objects.
I find it reduces the runtime of 'pg_dump -s regression' by about a
third.
2004-03-20 20:09:45 +00:00
Bruce Momjian c8aaa5ceec Remove suggestiong for using test for wal_sync_method. 2004-03-20 16:18:41 +00:00
Bruce Momjian aaf54d99f0 Handle draft version of getpwuid_r() that accepts only four arguments.
Backpatch to 7.4.X.  Required for Solaris 7 & 8.
2004-03-20 15:39:27 +00:00
Tom Lane 0fdc6c4cc0 Create a validator for plpgsql, so that some minimal syntax checking
is done at creation time for plpgsql functions.  Improve createlang and
droplang to support adding/dropping validators for PLs.  Initial steps
towards producing a syntax error position from plpgsql syntax errors
(this part is a work in progress, and will change depending on outcome
of current discussions).
2004-03-19 18:58:07 +00:00
Tom Lane 74ffc77279 Code review for log_line_prefix patch. Cooperate with StringInfo instead
of fighting it, avoid hard-wired (and wrong) assumption about max length
of prefix, cause %l to actually work as documented, don't compute data
we may not need.
2004-03-19 02:23:59 +00:00
Bruce Momjian 8726591720 Make test_fsync use optimizer flag. 2004-03-18 23:27:29 +00:00
Bruce Momjian cbaf1aaeba Fix log_executor_stats if() test. 2004-03-18 23:26:17 +00:00
Bruce Momjian 2ef0ff89af Add Unixware thread support from Larry Rosenman. 2004-03-18 23:23:58 +00:00
Bruce Momjian 6b34711824 Allocate 16mb file for testing. 2004-03-18 20:09:33 +00:00
Bruce Momjian 9e231bab65 Have program default to 1000 loops, and add file name and loop option.
Make open/close loop testings the same.  Add descriptions for certain tests.
2004-03-18 19:54:00 +00:00
Bruce Momjian 9ae9ad155d Add comment about using this testing for wal_sync_method. 2004-03-18 17:23:56 +00:00