Commit Graph

16270 Commits

Author SHA1 Message Date
Bruce Momjian b0e5468448 Remove unnecessary copyObject() call in update (values) code. 2006-09-03 00:46:41 +00:00
Bruce Momjian e0938c3f5b Make autovacuum behavior more agressive, per discussion on hackers list
--- was part of autovacuum default 'on' patch that was reverted, but we
want this part.

Peter Eisentraut
2006-09-02 23:12:16 +00:00
Bruce Momjian 946abc7c68 Update postgresql.conf line for default superuser_reserved_connections. 2006-09-02 23:08:36 +00:00
Bruce Momjian 1a84952670 Change "superuser_reserved_connections" default to 3, because of
possible autovacuum use.
2006-09-02 23:04:20 +00:00
Bruce Momjian 1cc9299a7a Small code cleanup for recent UPDATE SET (values) patch. 2006-09-02 20:52:01 +00:00
Bruce Momjian 6e8596a146 Add UPDATE tab SET ROW (col, ...) = (val, ...) for updating
multiple columns

Susanne Ebrecht
2006-09-02 20:34:47 +00:00
Bruce Momjian 6c785d599d Change FETCH/MOVE to use int8.
Dhanaraj M
2006-09-02 18:17:18 +00:00
Bruce Momjian 87eb130ad8 Revert as not needed/inconsistent with SQL REINDEX:
Suppress some NOTICE messages from REINDEX command.

  Euler Taveira de Oliveira
2006-09-02 17:10:17 +00:00
Bruce Momjian e35ea516a4 Remove GUC_REPORT for new "server_version_num" GUC variable. Added
overhead for every connection, per Tom.
2006-09-02 17:08:10 +00:00
Tom Lane 917bbebf7f Apply a simple solution to the problem of making INSERT/UPDATE/DELETE
RETURNING play nice with views/rules.  To wit, have the rule rewriter
rewrite any RETURNING clause found in a rule to produce what the rule's
triggering query asked for in its RETURNING clause, in particular drop
the RETURNING clause if no RETURNING in the triggering query.  This
leaves the responsibility for knowing how to produce the view's output
columns on the rule author, without requiring any fundamental changes
in rule semantics such as adding new rule event types would do.  The
initial implementation constrains things to ensure that there is
exactly one, unconditionally invoked RETURNING clause among the rules
for an event --- later we might be able to relax that, but for a post
feature freeze fix it seems better to minimize how much invention we do.
Per gripe from Jaime Casanova.
2006-09-02 17:06:52 +00:00
Bruce Momjian 04912899e7 Add new variable "server_version_num", which is almost the same as
"server_version" but uses the handy PG_VERSION_NUM which allows apps to
do things like if ($version >= 80200) without having to parse apart the
value of server_version themselves.

Greg Sabino Mullane greg@turnstep.com
2006-09-02 13:12:50 +00:00
Bruce Momjian 819f22a302 Allow PL/python to return composite types and result sets
Sven Suursoho
2006-09-02 12:30:01 +00:00
Bruce Momjian 5e33d6df36 Suppress some NOTICE messages from REINDEX command.
Euler Taveira de Oliveira
2006-09-02 02:43:07 +00:00
Tom Lane a83c71eb24 Clean up rather sloppy fix in HEAD for the ancient bug that CREATE CONVERSION
didn't create a dependency from the new conversion to its schema.  Back-patch
to all supported releases.
2006-08-31 17:31:33 +00:00
Peter Eisentraut 4c0bd228fa Repair interpretation of GB as MB. 2006-08-31 15:10:51 +00:00
Bruce Momjian c23be34a25 Attibution addition: Add Karel Zak also for COPY SELECT. 2006-08-31 03:17:50 +00:00
Bruce Momjian d22164d4c4 Correct attibution:
COPY SELECT work done by Zoltan Boszormenyi
2006-08-31 00:35:32 +00:00
Tom Lane 85188ab883 Extend COPY to support COPY (SELECT ...) TO ...
Bernd Helmle
2006-08-30 23:34:22 +00:00
Bruce Momjian 0d5065781d Update logging of prepare/execute syntax, per comments from Guillaume Smet. 2006-08-30 18:22:02 +00:00
Tom Lane 3a6e2ff08a Fix things so that fopen's, not only open's, pass FILE_SHARE_DELETE
and other special flags on Windows.  May fix intermittent 'Permission
denied' errors.  Magnus Hagander
2006-08-30 18:06:27 +00:00
Tom Lane f6d7ef08a7 Dept. of second thoughts: if query fails part way through, shut down
the pager before reporting the error.
2006-08-29 22:48:55 +00:00
Tom Lane c2f60711d2 Create a FETCH_COUNT parameter that causes psql to execute SELECT-like
queries via a cursor, fetching a limited number of rows at a time and
therefore not risking exhausting memory.  A disadvantage of the scheme
is that 'aligned' output mode will align each group of rows independently
leading to odd-looking output, but all the other output formats work
reasonably well.  Chris Mair, with some additional hacking by moi.
2006-08-29 22:25:08 +00:00
Bruce Momjian 7c5ac5ce22 Separate prepared statement and bind parameters with comma.
Fix printing of NULL bind parameters, use "NULL".
2006-08-29 20:10:42 +00:00
Teodor Sigaev f7efd4ea66 Fix mistyping 2006-08-29 15:47:48 +00:00
Tom Lane 0434c46db0 Invent an assign-hook mechanism for psql variables similar to the one
existing for backend GUC variables, and use this to eliminate repeated
fetching/parsing of psql variables in psql's inner loops.  In a trivial
test with lots of 'select 1;' commands, psql's CPU time went down almost
10%, although of course the effect on total elapsed time was much less.
Per discussion about how to ensure the upcoming FETCH_COUNT patch doesn't
cost any performance when not being used.
2006-08-29 15:19:51 +00:00
Teodor Sigaev b681bfdd59 Fix BUG #2594: Gin Indexes cause server to crash when it builds on empty table 2006-08-29 14:05:44 +00:00
Michael Meskes cda6d0a8d3 Second try committing the path changes. 2006-08-29 13:23:27 +00:00
Michael Meskes 67135eb1ef Removed debug option from pg_regress call.
Changed file paths in expected files too.
2006-08-29 12:33:45 +00:00
Michael Meskes b1710339ba Fixed parser and library to allow empty database names.
Streamlined connection name parsing.
Added Joachim's patch to shorten paths before diffing.
2006-08-29 12:24:52 +00:00
Peter Eisentraut ba9f9bf1b1 Revert change to turn autovacuum on by default. 2006-08-29 11:37:47 +00:00
Bruce Momjian f443258d4f Only call log_after_parse() if necessary. 2006-08-29 02:32:41 +00:00
Bruce Momjian bc24d5b976 Now bind displays prepare as detail, and execute displays prepare and
optionally bind.  I re-added the "statement:" label so people will
understand why the line is being printed (it is log_*statement
behavior).

Use single quotes for bind values, instead of double quotes, and double
literal single quotes in bind values (and document that).  I also made
use of the DETAIL line to have much cleaner output.
2006-08-29 02:11:30 +00:00
Tom Lane 1832cefda1 Fix pgstat_report_waiting() to not dump core if called before
pgstat_bestart() has been called; else any lock-block occurring
during InitPostgres() is disastrous.  I believe this explains
recent wasp regression failure; at least it explains the crash I
got while trying to duplicate the problem.  I also made
pgstat_report_activity() safe against the same scenario, just
in case.  The report_waiting hazard was created by my patch of
19-Aug to include waiting status in pg_stat_activity.
2006-08-28 19:38:09 +00:00
Tom Lane ae28cfe673 Partial fix for ecpg's VPATH problems. It compiles and successfully
builds all the files needed for its regression tests, but the tests
themselves fail because of diffs in the #line directives output by
ecpg itself.  Not sure what to do about that.
2006-08-28 16:13:11 +00:00
Tom Lane fcba3b82e2 Tweak trivial_subqueryscan() to consider a SubqueryScan's targetlist
trivial if it contains either Vars referencing the corresponding subplan
columns, or Consts equaling the corresponding subplan columns.  This
lets the planner eliminate the SubqueryScan in some cases generated by
generate_setop_tlist().
2006-08-28 14:32:41 +00:00
Peter Eisentraut 88b8110443 Turn autovacuum on by default. (stats_row_level is also on by default.)
Threshold and scale factor are cut in half for more aggressive behavior.
2006-08-28 13:37:18 +00:00
Tom Lane ea2e263539 Add new return codes SPI_OK_INSERT_RETURNING etc to the SPI API.
Fix all the standard PLs to be able to return tuples from FOO_RETURNING
statements as well as utility statements that return tuples.  Also,
fix oversight that SPI_processed wasn't set for a utility statement
returning tuples.  Per recent discussion.
2006-08-27 23:47:58 +00:00
Tom Lane 7a2fe85b03 Add some notes about why it's not a bug that RI_FKey_check calls
HeapTupleSatisfiesItself without doing LockBuffer first.  This code
is a bit fragile, but AFAICS it's not actually broken.
2006-08-27 21:41:21 +00:00
Tom Lane e06fda0a8b Add a function GetLockConflicts() to lock.c to report xacts holding
locks that would conflict with a specified lock request, without
actually trying to get that lock.  Use this instead of the former ad hoc
method of doing the first wait step in CREATE INDEX CONCURRENTLY.
Fixes problem with undetected deadlock and in many cases will allow the
index creation to proceed sooner than it otherwise could've.  Per
discussion with Greg Stark.
2006-08-27 19:14:34 +00:00
Tom Lane ca1fd0ea5b Move xact.c's partial support for Lists of TransactionIds into pg_list.h.
Needed because lock.c is now going to use the same type of list.
2006-08-27 19:11:46 +00:00
Michael Meskes 99a5619e7b - Enabled single-quoted connection targets.
- Fixed a memory leak/segfault in unsuccessful connection.
- Some changes to test files.
2006-08-27 16:15:42 +00:00
Tom Lane 162e8f1fd5 Make saveHistory work properly on OS X when HISTFILE is set to /dev/null.
Per discussion with Martin Atukunda.
2006-08-27 15:05:20 +00:00
Michael Meskes 445a61297e Changed double output. 2006-08-26 11:50:00 +00:00
Tom Lane e093dcdd28 Add the ability to create indexes 'concurrently', that is, without
blocking concurrent writes to the table.  Greg Stark, with a little help
from Tom Lane.
2006-08-25 04:06:58 +00:00
Michael Meskes e96df81b17 Synced parser 2006-08-24 12:31:33 +00:00
Michael Meskes 8d9cf79437 Needed more stuff from c.h. 2006-08-24 10:48:21 +00:00
Michael Meskes e8d1dcbfde Fixed of by one variable size. 2006-08-24 10:35:58 +00:00
Michael Meskes b7d5a88dbb Need more defines in ecpg_config.h, patch sent by Rocco Altier <RoccoA@Routescape.com> 2006-08-24 09:37:07 +00:00
Tom Lane f836c2e37e Add some debug logging code to AllocateFile's failure path to log the
specific Windows error code (GetLastError).  This is a hopefully temporary
hack to try to diagnose rare failures.  Magnus Hagander
2006-08-24 03:15:43 +00:00
Tom Lane 08ae5edc5c Optimize the case where a btree indexscan has current and mark positions
on the same index page; we can avoid data copying as well as buffer refcount
manipulations in this common case.  Makes for a small but noticeable
improvement in mergejoin speed.

Heikki Linnakangas
2006-08-24 01:18:34 +00:00