Commit Graph

15006 Commits

Author SHA1 Message Date
Tom Lane 8889685555 Suppress signed-vs-unsigned-char warnings. 2005-09-24 17:53:28 +00:00
Tom Lane 54a8af058e In a machine where INT64_IS_BUSTED, we can only support 32-bit values
for int8 and related types.  However we might be talking to a client
that has working int64; so pq_getmsgint64 really needs to check the
incoming value and throw an overflow error if we can't represent it
accurately.
2005-09-24 15:34:07 +00:00
Bruce Momjian 9f53cfd9db Add comments explaining clauses used by CREATE ROLE but not ALTER. 2005-09-23 22:25:25 +00:00
Tom Lane 06d70d78a4 Fix typo in comment. 2005-09-23 15:36:57 +00:00
Tom Lane d7e4fd99e5 Fix bug introduced into indexable_outerrelids() by an ill-considered
"optimization".  When we find a potentially useful joinclause, we
have to add all its other required_relids to the result, not only the
other clause_relids.  They are different in the case of a joinclause
whose applicability has to be postponed due to outer join.  We have
to include the extra rels because otherwise, after best_inner_indexscan
masks the join rels with index_outer_relids, it will always fail to
find the joinclause as applicable.  Per report from Husam Tomeh.
2005-09-22 23:25:07 +00:00
Bruce Momjian a5b9e18acc Add instructions. 2005-09-22 21:59:50 +00:00
Bruce Momjian 5d075bb4cc Add "codelines" script to compute number of lines in a releaes. 2005-09-22 21:58:58 +00:00
Bruce Momjian b3364fc81b pgindent new GIST index code, per request from Tom. 2005-09-22 20:44:36 +00:00
Tom Lane 08817bdb76 Adjust GiST error messages to conform to message style guidelines. 2005-09-22 18:49:45 +00:00
Tom Lane a453951dd9 Take exclusive buffer lock in scan_heap() to eliminate some corner cases
in which invalid page data could be transiently written to disk by
concurrent bgwriter activity.  There doesn't seem any risk of loss of
actual user data, but an empty page could possibly be left corrupt if a
crash occurs before the correct data gets written out.  Pointed out by
Alvaro Herrera.
2005-09-22 17:32:58 +00:00
Bruce Momjian 4f915cd377 This patch cleans up the access to members of ItemIdData.
It uses existing macros instead of touching directly.

ITAGAKI Takahiro
2005-09-22 16:46:00 +00:00
Bruce Momjian d7a06c2ac8 Fix psql \x by removing puts().
Greg Sabino Mullane
2005-09-22 15:51:51 +00:00
Bruce Momjian a3b9c6988d Suppress port number for unix domain sockets in log connect/disconnect
messages.
2005-09-22 15:33:36 +00:00
Tom Lane d7bb412e9c Remove some dead code. 2005-09-22 15:09:51 +00:00
Tom Lane 1128f55659 Fix postgresql.conf lexer to accept doubled single quotes in literal
strings.  This is consistent with SQL conventions, and since Bruce
already changed initdb in a way that assumed it worked like this, seems
we'd better make it work like this.
2005-09-21 20:33:34 +00:00
Tom Lane dbf952860e Suppress database dump item when --table and/or --schema switch was
given, per gripe from Michael Fuhr.
2005-09-21 19:58:02 +00:00
Tom Lane bc9d4ec9a1 optimize_minmax_aggregates() neglected to check for inherited tables.
Per report from Cesar Paipilla.
2005-09-21 19:15:27 +00:00
Bruce Momjian 99bb9c551e Fix interaction between psql \set AUTOCOMMIT and "ON_ERROR_ROLLBACK"
by properly updating transaction state after AUTOCOMMIT.
2005-09-20 21:43:08 +00:00
Bruce Momjian b7159824e6 Return proper value for psql -f filename failure if filename open fails.
Backpatch to 8.0.X.
2005-09-20 18:59:02 +00:00
Bruce Momjian 408c140266 autovacuum setting false -> off, for consistency 2005-09-20 02:38:35 +00:00
Bruce Momjian 658657177e Print proper cause of statement cancel, user interaction or timeout. 2005-09-19 17:21:49 +00:00
Peter Eisentraut bfa47ddc20 Clarify some error messages 2005-09-18 09:48:24 +00:00
Bruce Momjian d5eab81313 Adjust regression for new cancel query message. 2005-09-16 19:39:02 +00:00
Bruce Momjian 098d204a6b Update query cancel message:
errmsg("canceling query due to user request or statement timeout")));
2005-09-16 19:31:04 +00:00
Bruce Momjian 1d734b79a3 Adjust bcc to work for thread changes. 2005-09-16 19:00:05 +00:00
Bruce Momjian eab3e9b80d This correction is required of nmake of Windows.
Hiroshi Saito
2005-09-16 18:58:48 +00:00
Teodor Sigaev f4516f8732 Small fixes 2005-09-16 14:40:54 +00:00
Neil Conway e4d9b69779 Rename pg_complete_relation_size() to pg_total_relation_size(), for the
sake of brevity and clarity.

Make pg_reload_conf(), pg_rotate_logfile(), and pg_cancel_backend()
return a boolean rather than an integer to indicate success or failure.

Along the way, make some minor cleanups to dbsize.c -- in particular,
use elog() rather than ereport() for "shouldn't happen" error
conditions, and remove some of the more flagrant violations of the
Postgres indentation conventions.

Catalog version bumped.
2005-09-16 05:35:41 +00:00
Neil Conway 148c00acbb Update two comments to refer to use the new list API names. 2005-09-16 04:13:18 +00:00
Tom Lane dc06734a72 Force the size and alignment of LWLock array entries to be either 16 or 32
bytes.  This shouldn't make any difference on x86 machines, where the size
happened to be 16 bytes anyway, but on 64-bit machines and machines with
slock_t int or wider, it will speed array indexing and hopefully reduce
SMP cache contention effects.  Per recent experimentation.
2005-09-16 00:30:05 +00:00
Neil Conway 1dd9b09332 Copy-editing for GiST README. 2005-09-15 17:44:27 +00:00
Teodor Sigaev 79fae4a764 Readme about GiST's algorithms 2005-09-15 16:39:15 +00:00
Neil Conway 08dc2af91e Tweak the PL/PgSQL regression tests to catch the recently reported bug
in parsing cursor declarations.
2005-09-14 18:35:38 +00:00
Tom Lane 323f0a6c01 Fix recent breakage of decl_cursor_arglist syntax, per Michael Paesold. 2005-09-14 13:46:47 +00:00
Tom Lane 5b0fa0c28c Fix make_tuple_from_row to support nested rowtypes, per gripe from
Roman Neuhauser.  Update some obsolete comments for exec_eval_datum, too.
2005-09-13 16:16:17 +00:00
Tom Lane f59b05c95d Ensure that any memory leaked during an error inside the bgwriter is
recovered.  I did not see any actual leak while testing this in CVS tip,
but 8.0 definitely has a problem with leaking the space temporarily
palloc'd by BufferSync().  In any case this seems a good idea to forestall
similar problems in future.  Per report from Arjen van der Meijden.
2005-09-12 22:20:16 +00:00
Michael Meskes c959d370bf Fixed transaction command handling to not ignore savepoints and to correctly check for errors. 2005-09-12 11:57:53 +00:00
Tom Lane cc3bda37f7 Tweak TCP-keepalive code so that an invalid setting doesn't cause us
to drop connections unceremoniously.  Also some other marginal cleanups:
don't query getsockopt() repeatedly if it fails, and avoid having the
apparent definition of struct Port depend on which system headers you
might have included or not.  Oliver Jowett and Tom Lane.
2005-09-12 02:26:33 +00:00
Tom Lane c7d1a8d428 Fix some corner-case bugs in _sendSQLLine's parsing of SQL commands
> found in a pg_dump archive.  It had problems with dollar-quote tags
broken across bufferload boundaries (this may explain bug report from
Rod Taylor), also with dollar-quote literals of the form $a$a$...,
and was also confused about the rules for backslash in double quoted
identifiers (ie, they're not special).  Also put in placeholder support
for E'...' literals --- this will need more work later.
2005-09-11 04:10:25 +00:00
Tom Lane e1a7d1b9f3 Avoid changing stdin/stdout to binary mode on Windows unless that is
really the source or destination of the archive.  I think this will
resolve recent complaints that password prompting is broken in pg_restore
on Windows.  Note that password prompting and reading from stdin is an
unworkable combination on Windows ... but that was true anyway.
2005-09-11 00:36:14 +00:00
Tom Lane 35979e6c35 Given its current definition that depends on time(NULL), timetz_zone
is certainly no longer immutable, but must indeed be marked volatile.
I wonder if it should use the value of now() (that is, transaction
start time) so that it could be marked stable.  But it's probably not
important enough to be worth changing the code for ... indeed, I'm not
even going to force an initdb for this catalog change, seeing that we
just did one a few hours ago.
2005-09-09 06:51:12 +00:00
Tom Lane f2ebd01ef0 timestamptz_izone should return the input, not NULL, when the input
is a non-finite timestamp, for consistency with related functions.
In other words: +infinity rotated to a different timezone is still
+infinity.
2005-09-09 06:46:14 +00:00
Tom Lane a239af02c3 Fix the various forms of AT TIME ZONE to accept either timezones found
in the zic database or zone names found in the date token table.  This
preserves the old ability to do AT TIME ZONE 'PST' along with the new
ability to do AT TIME ZONE 'PST8PDT'.  Per gripe from Bricklen Anderson.
Also, fix some inconsistencies in usage of TZ_STRLEN_MAX --- the old
code had the potential for one-byte buffer overruns, though given
alignment considerations it's unlikely there was any real risk.
2005-09-09 02:31:50 +00:00
Tom Lane 48123de717 Create the pg_pltemplate system catalog to hold template information
for procedural languages.  This replaces the hard-wired table I had
originally proposed as a stopgap solution.  For the moment, the initial
contents only include languages shipped with the core distribution.
2005-09-08 20:07:42 +00:00
Tom Lane c18cabe8ab Update regression tests for new USA timezone data. Mea culpa for not
realizing that the regression tests could be affected.
2005-09-08 16:49:04 +00:00
Tom Lane 69d48cefd1 Update timezone data files to release 2005m of the zic database.
Among other changes, this reflects the recently passed change in USA
daylight savings rules.
2005-09-07 21:39:25 +00:00
Tom Lane e0dedd0559 Implement a preliminary 'template' facility for procedural languages,
as per my recent proposal.  For now the template data is hard-wired in
proclang.c --- this should be replaced later by a new shared system
catalog, but we don't want to force initdb during 8.1 beta.  This change
lets us cleanly load existing dump files even if they contain outright
wrong information about a PL's support functions, such as a wrong path
to the shared library or a missing validator function.  Also, we can
revert the recent kluges to make pg_dump dump PL support functions that
are stored in pg_catalog.
While at it, I removed the code in pg_regress that replaced $libdir
with a hardcoded path for temporary installations.  This is no longer
needed given our support for relocatable installations.
2005-09-05 23:50:49 +00:00
Tom Lane e35e6b1c37 Back out prior patch and instead just suppress SubqueryScan elimination
when there are extra resjunk columns in the child node.  I found some
additional cases involving Append nodes that weren't handled by the
prior patch, and it's not clear how to fix them in the same way without
breaking inheritance cases.  So the prudent path seems to be to narrow
the scope of the optimization.
2005-09-05 18:59:38 +00:00
Tom Lane 2da2d34770 Clean up version comparison/display code, per gripe from Michael Fuhr. 2005-09-05 18:05:13 +00:00
Tom Lane 03728942c2 For non-projecting plan node types such as Limit, set_plan_references
has to recopy the input plan node's targetlist if it removes a
SubqueryScan node just below the non-projecting node.  For simplicity
I made it recopy always.  Per bug report from Allan Wang and Michael Fuhr.
2005-09-05 17:25:01 +00:00