Commit Graph

13546 Commits

Author SHA1 Message Date
Bruce Momjian 866627f84d Make adjustment for MS VC and BCC compile of psql, from Dave Page. 2004-09-27 22:06:41 +00:00
Bruce Momjian f6b896b17a Improve MS VC builds for psql by handlling flex properly and prevent
rename prototype conflict.
2004-09-27 20:37:20 +00:00
Peter Eisentraut a6cb7fd60a Translation update 2004-09-27 20:28:15 +00:00
Peter Eisentraut 353b70aef3 Translation updates 2004-09-27 20:26:03 +00:00
Peter Eisentraut 9216b152e3 Translation update 2004-09-27 20:23:07 +00:00
Peter Eisentraut ad6a6170e5 New translations 2004-09-27 20:21:24 +00:00
Bruce Momjian 32b24bfa97 Remove inclusion of windows.h now that it is included in c.h, per idea
from Peter.
2004-09-27 19:16:03 +00:00
Michael Meskes d56b9fdaa8 Synced parser.
Removed Oracle transaction syntax to fix shift/reduce error.
2004-09-27 09:59:17 +00:00
Neil Conway cb7fc63d3e Remove references to the ODBC driver from the main source tree. From Kris
Jurka.
2004-09-27 04:18:28 +00:00
Neil Conway 64a60590ba A few minor list-related cleanups:
(1) Replace while loop with the new forboth() construct in
parser/analyze.c

(2) Replace lcons() with lappend() in SearchCatCacheList(). Since these
now have the same performance, there is no reason to prefer lcons() in
this case, and using lappend() leads to cleaner code.

(3) Improve the name of the second parameter to for_each_cell()
2004-09-27 04:12:03 +00:00
Neil Conway 0ed07d49d5 Code cleanup: don't bother casting the argument to pfree() to void *
from another pointer type. Per C89, this is unnecessary, and it is common
practice throughout the rest of the tree anyway.
2004-09-27 04:01:23 +00:00
Tom Lane ae8f7313ab Rewrite ReadArrayStr() to avoid O(N^2) behavior on large strings,
and hopefully improve code clarity while at it.  One intentional
semantics change: a backslashed space will not be treated as removable
trailing whitespace, as the prior coding would do.  ISTM that if it
wouldn't be considered removable leading whitespace, it shouldn't be
stripped at the end either.
2004-09-27 01:39:02 +00:00
Tom Lane 7ac258c2f3 Fix multiple breakages in our support for SSL certificates. 2004-09-26 22:51:49 +00:00
Tom Lane 9236c79c8e Use ULL not LL in UINT64CONST. 2004-09-26 15:13:42 +00:00
Bruce Momjian 786f3d147d Here is a patch that adds the version info from libpq.rc to the DLL
build in mingw. The MSVC build already did this, but it was not linked
into the mingw one.

This is not the same as the versioninfo patch that's in the queue.
Please apply this one before beta-3 if at all possible.

Magnus Hagander
2004-09-26 02:14:47 +00:00
Bruce Momjian e9ec10494e Use <> not "" for include of pthread.h. 2004-09-26 01:40:55 +00:00
Tom Lane 09a893117a Repair bug that would allow libpq to think a command had succeeded when
it really hadn't, due to double output of previous command's response.
Fix prevents recursive entry to libpq routines.  Found by Jan Wieck.
2004-09-26 00:26:28 +00:00
Tom Lane 26b5d5317b Persuade plpython to build on OS X. 2004-09-24 20:08:42 +00:00
Tom Lane b120485f9c GUC assign hooks that look at external state in deciding whether a
setting is valid must ignore that state and permit the assignment anyway
when source is PGC_S_OVERRIDE.  Otherwise they may disallow a rollback
at transaction abort, which is The Wrong Thing.  Per example from
Michael Fuhr 12-Sep-04.
2004-09-24 19:43:03 +00:00
Neil Conway ae72283816 Cleanup some ancient Ultrix / Alpha code in main() that is intended to
modify how unaligned memory accesses are dealt with. Document that this
is really what is going on, and merge the NOFIXADE and NOPRINTADE code
paths.
2004-09-24 06:29:07 +00:00
Tom Lane 3331180bb4 shmdt takes a void* parameter, per Kris Jurka. 2004-09-24 05:27:35 +00:00
Tom Lane 00b821a11b Fix gratuitous weirdness in function prototype, per Kris Jurka. 2004-09-24 05:16:35 +00:00
Tom Lane 2f132ebff7 Okay, I'm tired of reading gripes from OS X users ... add a regression
variant file to cover OS X 10.3's bizarre minus-zero behavior.
2004-09-24 04:58:46 +00:00
Tom Lane 682598139e Get rid of /*-inside-comment warning. My fault. 2004-09-24 01:48:43 +00:00
Neil Conway be8eafa09d ExecProcAppend() wasn't called ExecAppend() because the latter name was
formerly used in execMain. Since that is no longer the case, this patch
renames ExecProcAppend() to ExecAppend() for the sake of consistency.
2004-09-24 01:36:37 +00:00
Tom Lane 409b38f514 Fix TAS assembly stuff for Solaris/386. (I'm not in a position to
actually test this, but it couldn't be broken any worse than it was...)
2004-09-24 00:21:32 +00:00
Tom Lane 688f0c56dc Fix ALTER TABLE OWNER to adjust the ownership of dependent sequences,
not only indexes.  Alvaro Herrera, with some kibitzing by Tom Lane.
2004-09-23 23:20:24 +00:00
Tom Lane fb147dc30e If we're going to print unrecognized result codes from SSL_get_error
in open_client_SSL, surely we should do it everywhere.  Also make
message formatting conform to style guide.
2004-09-23 20:27:50 +00:00
Bruce Momjian fb755b6dd4 This patch logs the error code in the default case, so that the user
stands a chance of looking it up.  "Unrecognised error" is always
disheartening.  :-)

Dominic Mitchell
2004-09-23 13:20:45 +00:00
Bruce Momjian 31ae87c332 This patch attempts to note the use of the root.crt file in the server.
Given that PostgreSQL will output a message complaining about it's
absence if you're using SSL mode, I feel it's important that it gets a
mention in the documentation at some point.

Dominic Mitchell
2004-09-23 13:16:02 +00:00
Neil Conway 6a84723d7d Minor tweak to pg_controldata usage information, per suggestion from
Dennis Björklund. Also, remove some redundant #include directives.
2004-09-23 00:47:44 +00:00
Tom Lane 9fcbe2af11 Arrange for hash join to skip scanning the outer relation if it detects
that the inner one is completely empty.  Per recent discussion.  Also some
cosmetic cleanups in nearby code.
2004-09-22 19:13:52 +00:00
Tom Lane 5d9f5c20dd Issue a CHECKPOINT just after creating the regression database. Without
this, it's hard to debug core-dump test failures, because WAL replay will
enthusiastically remove the core file (along with the rest of the
regression database directory).  Per recent discussion, not to mention
bitter experience.
2004-09-22 19:11:19 +00:00
Tom Lane bebaf70613 Adjust ExecMakeTableFunctionResult to produce a single all-nulls row
when a function that returns a single tuple (not a setof tuple) returns
NULL.  This seems to be the most consistent behavior.  It would have
taken a bit less code to make it return an empty table (zero rows) but
ISTM a non-SETOF function ought always return exactly one row.  Per
bug report from Ivan-Sun1.
2004-09-22 17:41:51 +00:00
Neil Conway b84788debc Minor cleanup of libpq/LO examples: fix some memory leaks, update a comment
or two.
2004-09-22 05:12:45 +00:00
Neil Conway a94edb4c7b Some improvements for the tab-completion of psql. This should
address all of the items in the todo list and adds some new
things as well. Specifically:

* Add support for ALTER SEQUENCE ...
* Add "RENAME TO" for ALTER TRIGGER xx ON yy
* Pick proper table for ALTER TRIGGER xx ON ...
* Support for ALTER USER xxx ...
* Fix ALTER GROUP xxx DROP ...
* Fix ALTER DOMAIN xxx DROP ...
* Remove "OWNER TO" from ALTER DOMAIN xx DROP ...
* Fix ALTER DOMAIN xx SET DEFAULT ..
* Prevent ALTER INDEX xxx SET TABLESPACE from using "TO"
* Support for ALTER LANGUAGE xxx (RENAME TO)
* More support for ALTER TABLE xxx ALTER COLUMN xxx ...
* More support for COPY

Greg Sabino Mullane
2004-09-22 04:25:16 +00:00
Neil Conway a3c53c834f This patch from Alvaro Herrera adds transaction ID to the list of
log_line_prefix escapes. The escape sequence used for this is %x.
%x previously meant "postmaster et al. stop here" -- this has been
renamed to %q.
2004-09-22 03:55:27 +00:00
Tom Lane 95f20b96d4 Rotate on time boundaries that are sensible per local time rather than GMT.
Also, avoid truncating the file we just wrote into, which might otherwise
easily happen at DST boundaries.  Ed L. and Tom Lane.
2004-09-21 00:21:25 +00:00
Tom Lane 6da0c439ee Change some of the existing plpgsql regression test cases so that they
exercise dollar quoting and named function parameters.  AFAICS we had
no tests of either feature before.
2004-09-20 23:00:12 +00:00
Tom Lane 5b564e5307 Fix some shortcomings in psql's autocommit-off mode concerning detection
of commands for which a transaction block should not be forced.  Recognize
VACUUM and other PreventTransactionChain commands; handle nested /* .. */
comments correctly; handle multibyte encodings correctly.
Michael Paesold with some kibitzing from Tom Lane.
2004-09-20 18:51:19 +00:00
Tom Lane 9332d0baba Documentation improvements, per Josh Berkus. 2004-09-20 17:53:59 +00:00
Peter Eisentraut fbbdfa413e Translation update 2004-09-20 08:15:29 +00:00
Peter Eisentraut 398d4822a4 Translation updates 2004-09-20 07:57:14 +00:00
Peter Eisentraut cb2a8a9e00 Translation updates 2004-09-20 07:49:54 +00:00
Peter Eisentraut fa942e8010 Translation updates 2004-09-20 07:44:42 +00:00
Tom Lane fa8eb8a726 Add defenses against plpython functions being declared to take or return
pseudotypes.  Not sure why I neglected to add these checks at the same
time I added them to the other PLs, but it seems I did.
2004-09-19 23:38:21 +00:00
Tom Lane 84c7cef5eb Fix estimate_num_groups to be able to use expression-index statistics
when there is an expressional index matching a GROUP BY item.
2004-09-18 19:39:50 +00:00
Peter Eisentraut 122016379d Move comment at end of line to a separate line so trailing tabs don't
become part of the make variable value.
2004-09-18 13:28:54 +00:00
Tom Lane 4b9d84d450 Fix memory leak in tokenize_file, per report from Vadim Passynkov. 2004-09-18 01:22:58 +00:00
Peter Eisentraut 152a101f2b Allow WIN1250 as server encoding. 2004-09-17 21:59:57 +00:00
Tom Lane a5713ec427 Hashed LEFT JOIN would miss outer tuples with no inner match if the join
was large enough to be batched and the tuples fell into a batch where
there were no inner tuples at all.  Thanks to Xiaoyu Wang for finding a
test case that exposed this long-standing bug.
2004-09-17 18:28:53 +00:00
Tom Lane 054b78ba38 Now that xmax and cmin are distinct fields again, we should zero xmax when
creating a new tuple.  This is just for debugging sanity, though, since
nothing should be paying any attention to xmax when the HEAP_XMAX_INVALID
bit is set.
2004-09-17 18:09:55 +00:00
Tom Lane 9f6df6c4a6 Fix oversight: there's no reason for PG_TRY to use sigsetjmp(buf,1)
since we don't change the signal mask during normal backend operations.
Use sigsetjmp(buf,0) to avoid many unnecessary kernel calls.
2004-09-16 21:59:17 +00:00
Tom Lane 1cfd2012a6 Remove erroneous Assert, per example from Kris Jurka. 2004-09-16 21:08:12 +00:00
Tom Lane 257cccbe5e Add some marginal tweaks to eliminate memory leakages associated with
subtransactions.  Trivial subxacts (such as a plpgsql exception block
containing no database access) now demonstrably leak zero bytes.
2004-09-16 20:17:49 +00:00
Tom Lane 86fff990b2 RecentXmin is too recent to use as the cutoff point for accessing
pg_subtrans --- what we need is the oldest xmin of any snapshot in use
in the current top transaction.  Introduce a new variable TransactionXmin
to play this role.  Fixes intermittent regression failure reported by
Neil Conway.
2004-09-16 18:35:23 +00:00
Tom Lane 8f9f198603 Restructure subtransaction handling to reduce resource consumption,
as per recent discussions.  Invent SubTransactionIds that are managed like
CommandIds (ie, counter is reset at start of each top transaction), and
use these instead of TransactionIds to keep track of subtransaction status
in those modules that need it.  This means that a subtransaction does not
need an XID unless it actually inserts/modifies rows in the database.
Accordingly, don't assign it an XID nor take a lock on the XID until it
tries to do that.  This saves a lot of overhead for subtransactions that
are only used for error recovery (eg plpgsql exceptions).  Also, arrange
to release a subtransaction's XID lock as soon as the subtransaction
exits, in both the commit and abort cases.  This avoids holding many
unique locks after a long series of subtransactions.  The price is some
additional overhead in XactLockTableWait, but that seems acceptable.
Finally, restructure the state machine in xact.c to have a more orthogonal
set of states for subtransactions.
2004-09-16 16:58:44 +00:00
Neil Conway 6a2869f64e Fix a read of uninitialized memory in array_out(). Perform some minor
cosmetic code cleanup at the same time.
2004-09-16 03:15:54 +00:00
Neil Conway d1b0d965b1 Cosmetic PL/PgSQL fix: declare the second parameter plpgsql_dstring_append
as a const char *, so that we don't need to cast away a const in gram.y
2004-09-14 23:46:46 +00:00
Peter Eisentraut cb66748bdf New translation 2004-09-14 05:50:33 +00:00
Peter Eisentraut e992444faa Translation update 2004-09-14 05:44:40 +00:00
Tom Lane 4f7d3e0faf Win32 compile fix for misc_utils.
Claudio Natoli
2004-09-14 03:50:17 +00:00
Tom Lane 296fb57b20 Make pltcl work on Win32. Magnus Hagander 2004-09-14 03:21:27 +00:00
Neil Conway 65ff0ed455 Fix small memory leak in psql. 2004-09-13 23:07:12 +00:00
Peter Eisentraut adf9a28bb8 Translation update 2004-09-13 20:53:10 +00:00
Tom Lane b2c4071299 Redesign query-snapshot timing so that volatile functions in READ COMMITTED
mode see a fresh snapshot for each command in the function, rather than
using the latest interactive command's snapshot.  Also, suppress fresh
snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE
functions, instead using the snapshot taken for the most closely nested
regular query.  (This behavior is only sane for read-only functions, so
the patch also enforces that such functions contain only SELECT commands.)
As per my proposal of 6-Sep-2004; I note that I floated essentially the
same proposal on 19-Jun-2002, but that discussion tailed off without any
action.  Since 8.0 seems like the right place to be taking possibly
nontrivial backwards compatibility hits, let's get it done now.
2004-09-13 20:10:13 +00:00
Peter Eisentraut d69528881a Translation updates 2004-09-13 12:43:27 +00:00
Peter Eisentraut 95c034e311 Translation updates 2004-09-13 12:35:18 +00:00
Peter Eisentraut 77697dcaa3 New translations 2004-09-13 12:20:24 +00:00
Peter Eisentraut b972ab7178 New translation 2004-09-13 12:14:50 +00:00
Peter Eisentraut a67b5bd3b9 Translation updates 2004-09-13 12:11:22 +00:00
Neil Conway 9ffeab55c9 Fix two typos in comments. 2004-09-13 01:45:32 +00:00
Bruce Momjian 409de6be6c Re-add brace removal code but comment it out so we know why we removed
it and have it in case we need it for some special case.
2004-09-12 22:21:30 +00:00
Bruce Momjian 47402a9b00 Remove code that delete braces around single statements. 2004-09-12 22:11:27 +00:00
Tom Lane abc98dcc15 When LockAcquire fails at the stage of creating a proclock object, be
sure to clean up the already-created lock object, if it has no other
references.  Avoids possibly-permanent leak of shared memory.
2004-09-12 18:30:50 +00:00
Tom Lane 493f72606b Renumber SnapshotNow and the other special snapshot codes so that
((Snapshot) NULL) can no longer be confused with a valid snapshot,
as per my recent suggestion.  Define a macro InvalidSnapshot for 0.
Use InvalidSnapshot instead of SnapshotAny as the do-nothing special
case for heap_update and heap_delete crosschecks; this seems a little
cleaner even though the behavior is really the same.
2004-09-11 18:28:34 +00:00
Tom Lane 9835944e54 Ensure that pg_largeobject references opened by lo_import() or lo_export()
will be cleaned up at end of transaction, even when there is no other LO
operation in the transaction.  Per bug report from Daniel Schuchardt.
2004-09-11 15:56:46 +00:00
Tom Lane 1d681d6cee Fix some problems with restoring databases owned by non-superusers,
as per bug #1249; and remove the last vestiges of using \connect to
change authorization.
2004-09-10 20:05:18 +00:00
Tom Lane b339d1fff6 Fire non-deferred AFTER triggers immediately upon query completion,
rather than when returning to the idle loop.  This makes no particular
difference for interactively-issued queries, but it makes a big difference
for queries issued within functions: trigger execution now occurs before
the calling function is allowed to proceed.  This responds to numerous
complaints about nonintuitive behavior of foreign key checking, such as
http://archives.postgresql.org/pgsql-bugs/2004-09/msg00020.php, and
appears to be required by the SQL99 spec.
Also take the opportunity to simplify the data structures used for the
pending-trigger list, rename them for more clarity, and squeeze out a
bit of space.
2004-09-10 18:40:09 +00:00
Bruce Momjian af7f6c0a6e Fix #if define 2004-09-10 15:51:47 +00:00
Bruce Momjian 487466a601 Fix palloc call from /port for Cygwin. 2004-09-10 15:23:51 +00:00
Bruce Momjian e515c3b13e Properly include port file for Cygwin. 2004-09-10 15:20:19 +00:00
Bruce Momjian 74248ad673 Minor cleanup. 2004-09-10 14:27:37 +00:00
Bruce Momjian 390c148557 More cleanup. 2004-09-10 14:24:25 +00:00
Bruce Momjian 777687c6de Add mention loops over unlink/rename might not be needed. 2004-09-10 09:58:21 +00:00
Bruce Momjian e2e1a0cc71 Move undef of rename/unlink so system declarations are unmodified. 2004-09-10 09:53:08 +00:00
Bruce Momjian 3036b84b77 Adjust quotes for win32 build of psql. 2004-09-10 09:45:21 +00:00
Neil Conway ae7ea1395c psql consistency fixes from Greg Sabino Mullane: have \df show schema and
name first, make sure \di+ shows description last, and make \dl SQL look
a little more standard.
2004-09-10 04:10:53 +00:00
Bruce Momjian 35e88b512e Create pg_config_paths in port/ for win32 builds of psql. 2004-09-10 03:48:54 +00:00
Bruce Momjian 8975dcfcbb Clean up Cygwin test. 2004-09-10 02:49:37 +00:00
Bruce Momjian b493b39004 Move TIMEZONE_GLOBAL out into the proper place. 2004-09-09 14:18:20 +00:00
Bruce Momjian cec5d26d34 We don't use java in our compiles anymore so remove the filter test from
pgtest.
2004-09-09 09:57:23 +00:00
Dennis Bjorklund dbff17a8c8 Added a call to gettext() to fix broken translated error messages. 2004-09-09 06:56:48 +00:00
Dennis Bjorklund 877aa19211 Translation updates 2004-09-09 06:46:57 +00:00
Dennis Bjorklund 65f35065f4 Some source files was not scanned for translatable strings. 2004-09-09 06:32:13 +00:00
Dennis Bjorklund 00eb901d92 Translation updates 2004-09-09 06:02:39 +00:00
Bruce Momjian f1d1116178 Fix Cygwin defines to be consistent. 2004-09-09 00:59:49 +00:00
Bruce Momjian b70999d0fd Make TZNAME_GLOBAL for reference to tzname global variable. 2004-09-09 00:24:12 +00:00
Tom Lane f62901ca81 Minor efficiency improvements in keeping track of trigger deferred
status.  In particular, I see no reason for deferredTriggerCheckState
to make an explicit entry to note that a particular trigger has its
default state --- that just clutters a list that should normally be
empty or very short.  I have plans to revise this module much more
heavily, but this is a simple separable improvement.
2004-09-08 23:47:58 +00:00
Bruce Momjian e97c817092 Use _timezone global on Cygwin instead of timezone. 2004-09-08 19:43:12 +00:00
Tom Lane 6bb0d54eb8 Fix a couple of small errors in trigger-list management, as per recent
discussion.
2004-09-07 21:48:30 +00:00
Tom Lane 2750b11e18 Fix places where WaitForxxx can block, to eliminate failure to detect
deadlock on Win32.  Magnus Hagander
2004-09-07 14:31:42 +00:00
Tom Lane a1f7fb0975 Fix error in Windows version of CHECK_FOR_INTERRUPTS macro.
This prevented statement_timeout from working.
Magnus Hagander
2004-09-06 23:55:34 +00:00
Tom Lane 083258e535 Fix a number of places where brittle data structures or overly strong
Asserts would lead to a server core dump if an error occurred while
trying to abort a failed subtransaction (thereby leading to re-execution
of whatever parts of AbortSubTransaction had already run).  This of course
does not prevent such an error from creating an infinite loop, but at
least we don't make the situation worse.  Responds to an open item on
the subtransactions to-do list.
2004-09-06 23:33:48 +00:00
Tom Lane d55588ea7a Guard against transaction control statements in SQL functions. This
never worked, but it particularly doesn't work now.
2004-09-06 18:10:38 +00:00
Tom Lane 23645f0582 Fix incorrect ordering of smgr cleanup relative to buffer pin cleanup
during transaction abort.  Add a regression test case to catch related
mistakes in future.  Alvaro Herrera and Tom Lane.
2004-09-06 17:56:33 +00:00
Tom Lane eb917c1a21 I can't see any good reason for DropRelFileNodeBuffers to be issuing
FATAL when it detects a nonzero reference count.  Reduce to ERROR.
2004-09-06 17:31:32 +00:00
Michael Meskes 2a8b626d48 Fixed segfault in Informix mode. 2004-09-06 11:23:07 +00:00
Tom Lane e32bba202d Downgrade LOG messages to DEBUG1 for normal recycling of xlog, clog,
subtrans segments.  Per Greg Mullane and Chris K-L.
2004-09-06 03:04:27 +00:00
Tom Lane 7488929c96 Simplify IsXactIsoLevelSerializable test. A cycle saved is a cycle
earned ...
2004-09-05 23:01:26 +00:00
Tom Lane 1a86e6eabf On further consideration, there's another problem here: the existing
elog() emulation code always calls errstart with ERROR error level.
This means that a recursive error call triggered by elog would do
MemoryContextReset(ErrorContext), whether or not this was actually
appropriate.  I'm surprised we haven't seen this in the field...
2004-09-05 03:42:13 +00:00
Tom Lane cefb4b141b Tweak elog.c's logic for promoting errors into more severe errors.
Messages of less than ERROR severity should never be promoted (this
fixes Gaetano Mendola's problem with a COMMERROR becoming a PANIC,
and is obvious in hindsight anyway).  Do all promotion in errstart
not errfinish, to ensure that output decisions are made correctly;
the former coding could suppress logging of promoted errors, which
doesn't seem like a good idea.  Eliminate some redundant code too.
2004-09-05 02:01:41 +00:00
Tom Lane 346900e83b Fix shared library linking operations to work properly on all (or at
least more) combinations of HP-UX hardware, compiler, and linker.
Shinji Teragaito and Tom Lane.
2004-09-02 23:06:43 +00:00
Tom Lane cb79234307 Apparently HPUX runs the IA64 in big-endian mode. 2004-09-02 21:03:30 +00:00
Tom Lane 6ad853b975 Yet another place where someone was being careless about the arguments
of <ctype.h> macros.
2004-09-02 20:07:50 +00:00
Tom Lane a28961d5e0 Spelling correction, per Greg Mullane. 2004-09-02 17:58:41 +00:00
Tom Lane 1e4c33b1e8 Fix getrusage() emulation on Windows. Magnus Hagander 2004-09-02 17:55:16 +00:00
Tom Lane 3cd16475db Cope with recent HPUX versions providing isfinite() instead of finite(). 2004-09-02 17:12:50 +00:00
Tom Lane 5042985fb4 Add s_lock support for HPUX on IA64, per Shinji Teragaito. 2004-09-02 17:10:58 +00:00
Tom Lane e00896f3c6 Remove useless variable. 2004-09-02 16:42:00 +00:00
Bruce Momjian 8cef6ae522 Remove pg_config_paths.h from libpq *.mak builds so later MinGW builds
will succeed.
2004-09-02 02:02:02 +00:00
Bruce Momjian bf831f6e9f Back out timezone detection patch. Tom already applied it. 2004-09-02 01:15:06 +00:00
Bruce Momjian 525449be27 This patch attempts to fix the issue with localized timezones on
Windows.

Recap: When running on a localized windows version, the timezone name
returned is also localized, and therefor does not match our lookup
table.

Solution: The registry contains both the name of the timezone in english
and the localized name. The patch adds code to scan the registry for the
localized name and gets the english name from that, and then rescans the
table.

I have tested this on a Swedish WinXP, and it works without problems.
The registry layout is the same in Win2k, but I haven't specifically
tested it. It's also the same on different languages but again only
Swedish is tested.

Magnus Hagander
2004-09-02 01:03:59 +00:00
Tom Lane e814e4bfe5 Remove obsolete comment. 2004-09-02 00:22:16 +00:00
Tom Lane e41acf4029 Tweak prettyprinting rules for saner indenting of UNION, INTERSECT,
EXCEPT constructs.
2004-09-01 23:58:38 +00:00
Bruce Momjian 453c670b61 Fix bcc to compile libpq by creating include file for path.c. 2004-09-01 23:45:16 +00:00
Bruce Momjian 4fa8b44749 Realign libpq and psql for need for path.c under Win32 VC and BCC. 2004-09-01 23:35:16 +00:00
Bruce Momjian bd9b951191 Back out Cygwin timezone change until we have a more global solution. 2004-09-01 18:59:35 +00:00
Tom Lane 93dc1d4685 Fix mistaken comment. 2004-09-01 18:04:32 +00:00
Tom Lane 272cc8e265 Whack Wisconsin benchmark around until it actually works again.
It's still useless because it tests a standalone backend, but at least
the bit rot is repaired.
2004-09-01 17:25:40 +00:00
Tom Lane d1b2260cdc Add code to be able to match the timezone name on localized Windows
systems.  Magnus Hagander.
2004-09-01 16:21:50 +00:00
Dennis Bjorklund b3d3e27bb8 Translation updates 2004-09-01 10:11:08 +00:00
Bruce Momjian 33f395eada Cast _timezone to int from time_t for Cygwin. 2004-09-01 04:02:06 +00:00
Bruce Momjian 2a5f83c17c src/bin/psql/tab-complete.c =~ s/CONVERSATION/CONVERSION/;
Greg Sabino Mullane
2004-09-01 00:10:01 +00:00
Tom Lane e19f6bcf64 needs_toast_table() should ignore dropped columns. 2004-08-31 23:27:05 +00:00
Tom Lane 1239a01a72 Code review for recent changes in guc-file.l. Avoid multiple frees,
use of already-freed strings, other silliness.  Also fix reporting of
config file syntax errors so that it actually works reasonably well
(eg, points at the correct line).  Use palloc instead of malloc for
temporary storage to reduce code clutter.
2004-08-31 22:43:58 +00:00
Tom Lane c32416ebb7 Code review for various recent GUC hacking. Don't elog(ERROR) when
not supposed to (fixes problem with postmaster aborting due to mistaken
postgresql.conf change); don't call superuser() when not inside a
transaction (fixes coredump when, eg, try to set log_statement from
PGOPTIONS); some message style guidelines enforcement.
2004-08-31 19:28:51 +00:00
Tom Lane 617d6ea7df Fix unintended assignment of sequences to the containing schema's
default tablespace --- they should always go in the database's default
tablespace.  Adjust heap_create() API so that it is passed the relkind
to make this easier; should simplify any further tweaking of the same
sort.
2004-08-31 17:10:36 +00:00
Tom Lane a421b4e850 FlushRelationBuffers was also being a bit cavalier about whether the
relation is already opened by smgr.
2004-08-31 16:13:06 +00:00
Tom Lane 556110f4e0 copy_relation_data was mistakenly assuming that the source relation
would always be already open at the smgr level.  Per bug report from
Fabien Coelho.
2004-08-31 15:56:39 +00:00
Bruce Momjian b4456e6d6a Define lstat with parameters, rather than just redefining the symbol. 2004-08-31 11:29:56 +00:00
Bruce Momjian 2e88d29f88 Fix typo in lstat() macro exposed by new tablespace code. 2004-08-31 11:25:33 +00:00
Tom Lane 8c603f2c95 Replace log_filename_prefix with more general log_filename parameter,
to allow DBA to choose the form in which log filenames reflect the
current time.  Also allow for truncating instead of appending to
pre-existing files --- this is convenient when the log filename pattern
rewrites the same names cyclically.  Per Ed L.
2004-08-31 04:53:44 +00:00
Tom Lane 332ee2dc41 Improve spinlock selftest to make it able to detect misdeclaration of
the slock_t datatype (ie, declared type smaller than what the hardware
TAS instruction needs).
2004-08-30 23:47:20 +00:00
Tom Lane 17364edce6 slock_t must be int not char for MIPS. 7.4 got this right, but the
info was apparently mistranscribed in s_lock code rearrangement.
2004-08-30 22:49:07 +00:00
Tom Lane c7040429e7 Fix obviously-utterly-untested noTocComments code. 2004-08-30 19:44:14 +00:00
Tom Lane 64cb889106 Ensure that the remainder of the current pg_clog page is zeroed during
startup, just to be sure that there's no leftover junk there.
2004-08-30 19:00:42 +00:00
Tom Lane 9cf4eaa00b Fix failure to advance nextXID beyond subtransactions whose XIDs appear
only within COMMIT or ABORT records.
2004-08-30 19:00:03 +00:00
Tom Lane 303e46ea93 Tweak md.c logic to cope with the situation where WAL replay tries to
write into a high-numbered segment of a relation that was later deleted.
We need to temporarily recreate missing segment files, instead of
failing.
2004-08-30 03:52:43 +00:00
Tom Lane 09c6ac9513 Dept. of second thoughts: it'd be a good idea to flush buffers
during replay of CREATE DATABASE as well as the first time around.
Else it's possible that the copy operation will copy obsolete blocks.
We are still a long way from guaranteeing anything about using a
recently-written database as a CREATE template, but this seems needed
to ensure the existing behavior holds up during replay.
2004-08-30 03:50:24 +00:00