Commit Graph

7121 Commits

Author SHA1 Message Date
Neil Conway f76730e35a Small patch to move get_grosysid() from catalog/aclchk.c to
utils/cache/lsyscache.c where it can be used by other things.  Also
cleans up both get_usesysid() and get_grosysid() a bit. From Stephen
Frost.
2005-01-27 23:36:15 +00:00
Neil Conway a885ecd6ef Change heap_modifytuple() to require a TupleDesc rather than a
Relation. Patch from Alvaro Herrera, minor editorializing by
Neil Conway.
2005-01-27 23:24:11 +00:00
Neil Conway ffaaf27eb4 Provide a more descriptive error message when the return type of an SRF
does not match what the query expected. From Brendan Jurd, minor
editorializing by Neil Conway.
2005-01-27 06:36:42 +00:00
Tom Lane f07b9689c9 Generalize TRUNCATE to support truncating multiple tables in one
command.  This is useful because we can allow truncation of tables
referenced by foreign keys, so long as the referencing table is
truncated in the same command.

Alvaro Herrera
2005-01-27 03:19:37 +00:00
Tom Lane aba691b728 Close all cursors created during a failed subtransaction. This is needed
to avoid problems when a cursor depends on objects created or changed in
the same subtransaction.  We'd like to do better someday, but this seems
the only workable answer for 8.0.1.
2005-01-26 23:20:21 +00:00
Tom Lane bf7737a938 On Windows, set the postmaster executable's stack size to 4MB, so that
it agrees with the default value of max_stack_depth.
2005-01-26 21:55:26 +00:00
Tom Lane beaf5ae623 Fix ALTER TABLE ADD COLUMN so that constraints of domain types are
enforced properly when there is no explicit default value for the new
column.  Per report from Craig Perras.
2005-01-24 23:21:57 +00:00
Tom Lane ad538d8bcd Disallow LOAD to non-superusers. Per report from John Heasman. 2005-01-24 17:46:16 +00:00
Tom Lane 0ffe9f7946 Fix memory leak in rtdosplit, per report from Clive Page. 2005-01-24 02:47:26 +00:00
Tom Lane 94e4778a31 The result of a FULL or RIGHT join can't be assumed to be sorted by the
left input's sorting, because null rows may be inserted at various points.
Per report from Ferenc Lutischá¸n.
2005-01-23 02:21:36 +00:00
Neil Conway a341a96c01 Refactor transformExpr() by creating separate functions for most of the
expression types.
2005-01-19 23:45:24 +00:00
Neil Conway b4297c177c This patch makes some improvements to the rtree index implementation:
(1) Keep a pin on the scan's current buffer and mark buffer. This
avoids the need to do a ReadBuffer() for each tuple produced by the
scan. Since ReadBuffer() is expensive, this is a significant win.

(2) Convert a ReleaseBuffer(); ReadBuffer() pair into
ReleaseAndReadBuffer(). Surely not a huge win, but it saves a lock
acquire/release...

(3) Remove a bunch of duplicated code in rtget.c; make rtnext() handle
both the "initial result" and "subsequent result" cases.

(4) Add support for index tuple killing

(5) Remove rtscancache(): it is dead code, for the same reason that
gistscancache() is dead code (an index scan ought not be invoked with
NoMovementScanDirection).

The end result is about a 10% improvement in rtree index scan perf,
according to contrib/rtree_gist/bench.
2005-01-18 23:25:55 +00:00
Neil Conway 1f5299bc3f Replace the use of "0" with "NULL" where appropriate in dllist.c, for
good style and to satisfy sparse. From Alvaro Herrera.
2005-01-18 22:59:32 +00:00
Peter Eisentraut 1723f1f7ae Translation updates 2005-01-17 20:27:44 +00:00
Peter Eisentraut bb60ef23ed Translation updates 2005-01-17 14:55:34 +00:00
Peter Eisentraut f099cb0ede Translation updates 2005-01-17 10:00:06 +00:00
Peter Eisentraut 3332c0722d Fix format string error. 2005-01-17 09:06:31 +00:00
Peter Eisentraut 83ef003f2c Translation updates 2005-01-17 02:41:50 +00:00
Tom Lane 9fa1843454 postgres -boot would print the wrong program name in event of a
failure in SelectConfigFiles().  Cosmetic issue, but ...
2005-01-14 21:08:44 +00:00
Tom Lane 9d83358499 Update obsolete comment, per Alvaro. 2005-01-14 17:53:33 +00:00
Peter Eisentraut f680aaeafa Translation updates 2005-01-13 19:06:37 +00:00
Tom Lane c06b31dc31 get_names_for_var didn't do recursion for unnamed JOIN vars quite right;
got it wrong when the JOIN was in an outer query level.  Per example from
Laurie Burrow.  Also fix same issue in markTargetListOrigin.  I think the
latter is only a latent bug since we currently don't apply markTargetListOrigin
except at the outer level ... but should do it right anyway.
2005-01-13 17:19:10 +00:00
Tom Lane cbd8913245 Remove unportable assumption that it's okay to use the target buffer
of an sprintf() as a source string.  Demonstrably does not work with
recent gcc and/or glibc on some platforms.
2005-01-13 01:40:13 +00:00
Tom Lane 40f32f351a Add conditional inclusion of <com_err.h> to support old 'heimdal'
version of Kerberos.  Per report from Reinhard Max.
2005-01-12 21:37:54 +00:00
Tom Lane 2ec1aa4cb8 Re-allow an untyped literal as the test expression of a CASE, ie
CASE 'a' WHEN 'a' THEN 1 ELSE 2 END.  This worked in 7.4 and before
but had been broken due to premature freezing of the type of the test
expression.  Per gripe from GÄbor SzÃcs.
2005-01-12 17:32:36 +00:00
Tom Lane 8251e0b2fb Increase MAXLISTEN to a more generous value, and add an error message
telling when it has been exceeded.  Per trouble report from
Jean-GÅrard Pailloncy.
2005-01-12 16:38:17 +00:00
Tom Lane d3d00715e2 interval_out failed to mention 'ago' for negative intervals in SQL and
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.
2005-01-11 18:33:46 +00:00
Tom Lane fc299179df Separate the functions of relcache entry flush and smgr cache entry flush
so that we can get the size of a shared inval message back down to what it
was in 7.4 (and simplify the logic too).  Phase 2 of fixing the
'SMgrRelation hashtable corrupted' problem.
2005-01-10 21:57:19 +00:00
Tom Lane 0ce4d56924 Phase 1 of fix for 'SMgrRelation hashtable corrupted' problem. This
is the minimum required fix.  I want to look next at taking advantage of
it by simplifying the message semantics in the shared inval message queue,
but that part can be held over for 8.1 if it turns out too ugly.
2005-01-10 20:02:24 +00:00
Peter Eisentraut c2719ae503 Translation updates 2005-01-10 08:14:35 +00:00
Tom Lane 521e8888e9 Undo an unadvertised change in the API of pg_atoi. In all previous
releases, a nonzero 'c' argument meant that the input string could be
terminated by either that character or \0.  Recent refactoring broke
that, causing the thing to scan for 'c' only.  This went undetected
because no part of the main code actually passes nonzero 'c'.  However
it broke tsearch2 and possibly other user-written code that assumed
the old definition.  Per report from Tom Hebbron.
2005-01-09 21:03:19 +00:00
Peter Eisentraut a58e738cd7 Translation updates 2005-01-09 17:32:05 +00:00
Peter Eisentraut 8511a1b734 New translation 2005-01-09 17:10:29 +00:00
Tom Lane 8afe005f42 Consistently use geteuid() not getuid(); there were a few places deviating
from our long-established standard.
2005-01-08 22:51:15 +00:00
Tom Lane 3b5152cac6 Improve comments in sample config files. 2005-01-07 23:59:17 +00:00
Tom Lane a3f98d5795 Adjust lookup of client-side profile files (.pgpass and so on) as per
discussion on pgsql-hackers-win32 list.  Documentation still needs to
be tweaked --- I'm not sure how to refer to the APPDATA folder in
user documentation.
2005-01-06 18:29:11 +00:00
Peter Eisentraut 381de28eb0 Translation updates 2005-01-06 09:07:17 +00:00
Peter Eisentraut c43bd11683 Translation updates 2005-01-06 08:46:07 +00:00
Peter Eisentraut 073149c6b2 Translation update 2005-01-04 19:42:01 +00:00
Peter Eisentraut 852b4ae5c2 Fix typo 2005-01-04 07:06:01 +00:00
Peter Eisentraut a2a5526ecb Translation updates 2005-01-03 22:39:24 +00:00
Tom Lane c9d8edc906 Repair bufmgr deadlock problem reported by Michael Wildpaner. Must take
share lock on a buffer being written out before releasing BufMgrLock in
the BufferAlloc code path; if we do it later we might block on someone
who's re-pinned the buffer.  I believe this is only an issue for BufferAlloc
and not the other places that call FlushBuffer.  BufferSync must continue
to do it the old way since it may well be trying to write buffers that
other backends have pinned; but it should not be holding any conflicting
locks.  FlushRelationBuffers is okay since it's got exclusive lock at the
relation level.
2005-01-03 18:49:41 +00:00
Tom Lane a17e589046 Adjust a few more copyright notices to match the format expected by
the src/tools/copyright script.
2005-01-01 22:14:33 +00:00
Tom Lane 7e1c8ef4fc Some more missed copyright notices. Many of these look like they
should have been caught by the src/tools/copyright script ... why
weren't they?
2005-01-01 20:44:34 +00:00
Bruce Momjian 2daed8c5b3 Update copyrights that were missed. 2005-01-01 05:43:09 +00:00
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
2004-12-31 22:04:05 +00:00
Tom Lane 7cd25199a9 Clean up win32ver.o on Windows, per Magnus. 2004-12-31 19:09:37 +00:00
Tom Lane 96ecf9d5aa Support Sun's compiler on SunOS4 (a/k/a Solaris 9). Per ayan@ayan.net 2004-12-29 23:47:40 +00:00
Tom Lane eee5abce46 Refactor EXEC_BACKEND code so that postmaster child processes reattach
to shared memory as soon as possible, ie, right after read_backend_variables.
The effective difference from the original code is that this happens
before instead of after read_nondefault_variables(), which loads GUC
information and is apparently capable of expanding the backend's memory
allocation more than you'd think it should.  This should fix the
failure-to-attach-to-shared-memory reports we've been seeing on Windows.
Also clean up a few bits of unnecessarily grotty EXEC_BACKEND code.
2004-12-29 21:36:09 +00:00
Tom Lane 370f90970d Cause pg_hba.conf file inclusion (@file stuff) to behave as documented,
that is, files are sought in the same directory as the referencing file.
Also allow absolute paths in @file constructs.  Improve documentation
to actually say what is allowed in an included file.
2004-12-27 19:19:24 +00:00