Commit Graph

16340 Commits

Author SHA1 Message Date
Tom Lane 9b5e108ee9 Fix shared library creation to work properly on AIX. Albe Laurenz 2006-09-19 15:36:08 +00:00
Tom Lane 9b4cda0df6 Add built-in userlock manipulation functions to replace the former
contrib functionality.  Along the way, remove the USER_LOCKS configuration
symbol, since it no longer makes any sense to try to compile that out.
No user documentation yet ... mmoncure has promised to write some.
Thanks to Abhijit Menon-Sen for creating a first draft to work from.
2006-09-18 22:40:40 +00:00
Tom Lane 2ad94d382c Fix problems with column name list of CREATE TABLE AS being applied to
the input query's target list too soon, causing it to affect processing
of ORDER BY in the input query.
2006-09-18 16:04:04 +00:00
Tom Lane 18a963778a Fix CREATE TABLE ... AS VALUES ... to work rather than Assert'ing;
oversight in original implementation of VALUES.  Also fix an oversight
in recent addition of options to CREATE TABLE AS: they weren't getting
propagated if the query was a set-operation such as UNION.
2006-09-18 00:52:14 +00:00
Tom Lane da7540b9d1 Change ANALYZE to take ShareUpdateExclusiveLock not AccessShareLock on
the table being analyzed.  This prevents two ANALYZEs from running
concurrently on the same table and possibly suffering concurrent-update
failures while trying to store their results into pg_statistic.  The
downside is that a database-wide ANALYZE executed within a transaction
block will hold ShareUpdateExclusiveLock on many tables simultaneously,
which could lead to concurrency issues or even deadlock against another
such ANALYZE.  However, this seems a corner case of less importance
than getting unexpected errors from a foreground ANALYZE when autovacuum
elects to analyze the same table concurrently.  Per discussion.
2006-09-17 22:50:31 +00:00
Tom Lane 2e5e856f6b Marginal cleanup in arrangements for ensuring StrategyHintVacuum is cleared
after an error during VACUUM.  We have a PG_TRY block anyway around the only
call sites, so just reset it in the CATCH clause instead of having
AtEOXact_Buffers blindly do it during xact end.  I think the old code was
actively wrong for the case of a failure during ANALYZE inside a
subtransaction --- the flag wouldn't get cleared until main transaction end.
Probably not worth back-patching though.
2006-09-17 22:16:22 +00:00
Tom Lane 5ff4f39c0e Rename the recently-added pg_timezonenames view to pg_timezone_abbrevs,
and create a new view pg_timezone_names that provides information about
the zones known in the 'zic' database.  Magnus Hagander, with some
additional work by Tom Lane.
2006-09-16 20:14:34 +00:00
Tom Lane 7ed5df437d Update timezone data files to release 2006k of the zic database. 2006-09-16 17:21:03 +00:00
Tom Lane 801cbe3310 Define errcode as __msvc_errcode not __vc_errcode for MSVC builds,
per Magnus.
2006-09-16 13:35:49 +00:00
Tom Lane 83078e9912 Several fixes for MSVC build scripts, from Magnus. 2006-09-15 21:42:02 +00:00
Tom Lane a22de540cf Fix some uses of str[n]casecmp that should be pg_str[n]casecmp,
per Magnus.
2006-09-15 21:34:23 +00:00
Tom Lane 0b52204f0d Remove WINLDAPAPI decoration from ldap_start_tls_sA typedef, per Magnus. 2006-09-15 21:28:08 +00:00
Tom Lane 0498a08e66 Improve confusing comment for HeapTupleSatisfiesNow, per gripe from Greg Stark. 2006-09-15 16:39:32 +00:00
Bruce Momjian fa6f9ceab6 Make postgresql.conf.sample match the initdb defaults. This fixes
comment alignment on most systems.
2006-09-14 23:21:47 +00:00
Tom Lane 65ab9f4f24 Add a couple of information functions to support direct checks on whether
a schema is our own temp schema or another backend's temp schema, and use
these in place of some former kluges in information_schema.  Per my
proposal of yesterday.
2006-09-14 22:05:06 +00:00
Teodor Sigaev deb66e013c Improve error message. Per discussion
http://archives.postgresql.org/pgsql-general/2006-09/msg00186.php
2006-09-14 11:26:49 +00:00
Michael Meskes 4eef745fb1 Cygwin systems seem to have a different error message when trying to connect to port 0. Let's try port 20 instead. 2006-09-14 08:46:58 +00:00
Michael Meskes 0f0d6765ce Added missing constuctor/destructor for interval and date. 2006-09-14 08:02:38 +00:00
Tom Lane 0b4bf8537f Make logging of extended-protocol commands a bit more consistent, per
discussion with Guillaume Smet.
2006-09-13 21:59:04 +00:00
Tom Lane 33d3ad4657 Code review for patch to avoid second scan when vacuuming index-less
table: avoid invoking LockBufferForCleanup without need, put out the
same log message we would have before, minor code beautification.
2006-09-13 17:47:08 +00:00
Michael Meskes 9c356a6b3e Seems this wasn't committed originally 2006-09-12 09:09:31 +00:00
Tom Lane 568b80168f Move set_pglocale_pgservice() from path.c to exec.c, so that pulling in
path.c does not in itself force linking of both exec.c and libintl.
Should fix current ecpglib build failure on pickier platforms.
2006-09-11 20:10:30 +00:00
Tom Lane 0bdc18d5d1 Add LDAP_LIBS_FE to $(libpq) for static or AIX linking, per Albe Laurenz. 2006-09-11 13:35:08 +00:00
Tom Lane bb87c7b551 Ooops, forgot to update ecpg comparison files to match
source-code change.
2006-09-11 02:50:07 +00:00
Tom Lane 1d0b7e71e3 Fix unportable usage complained of by icc. Per buildfarm results. 2006-09-11 01:41:35 +00:00
Bruce Momjian d18768867e Remove unnecessary brace pair. 2006-09-10 23:33:22 +00:00
Bruce Momjian 94cf48d72b Back out patch added during 8.2.X development:
Allow to_char() "D" format specifiers for interval/time.

It doesn't work, and I doubt it is useful enough to fix ("D" = day of
week).
2006-09-10 22:54:47 +00:00
Tom Lane 4ee24cbb55 Install a cleaner solution to the AIX libpq linking problem, as per
an earlier discussion.  Centralize assumptions about what libpq depends
on in one place in Makefile.global.  I am unconvinced that this list
is complete, but since ecpg seems to have gotten along with just these
entries, we'll try it this way and see what happens.
2006-09-10 22:07:02 +00:00
Tom Lane f5b4d9a9e0 If we're going to advertise the array overlap/containment operators,
we probably should make them work reliably for all arrays.  Fix code
to handle NULLs and multidimensional arrays, move it into arrayfuncs.c.
GIN is still restricted to indexing arrays with no null elements, however.
2006-09-10 20:14:20 +00:00
Tom Lane ba920e1c91 Rename contains/contained-by operators to @> and <@, per discussion that
agreed these symbols are less easily confused.  I made new pg_operator
entries (with new OIDs) for the old names, so as to provide backward
compatibility while making it pretty easy to remove the old names in
some future release cycle.  This commit only touches the core datatypes,
contrib will be fixed separately.
2006-09-10 00:29:35 +00:00
Tom Lane 42c17a6bb0 Revise OpenLDAP configuration and linking to work on more platforms
than before.  Albe Laurenz (but editorialized heavily by me, so if it
doesn't work it's my fault).
2006-09-09 03:15:40 +00:00
Tom Lane bf6b92d6e0 Fix pg_dump for recent change removing separate RULE privilege.
I had thought this code could be left alone, but I was wrong: as-is
it's failing to recognize when to use ALL for table privileges in 8.2.
2006-09-08 18:05:35 +00:00
Tom Lane d09e79deb9 Put back plan-time check for trying to apply SELECT FOR UPDATE/SHARE
to a relation on the nullable side of an outer join.  I had removed
this during the outer join planning rewrite a few months ago ... I think
I intended to put it somewhere else, but forgot ...
2006-09-08 17:49:13 +00:00
Tom Lane b59d31c215 Tweak the behavior of log_duration as proposed by Guillaume Smet: rather
than being equivalent to setting log_min_duration_statement to zero, this
option now forces logging of all query durations, but doesn't force logging
of query text.  Also, add duration logging coverage for fastpath function
calls.
2006-09-08 15:55:53 +00:00
Michael Meskes 0b33c56297 Not all C compilers understand the "//" comment in this test case, so I removed it. 2006-09-08 14:58:27 +00:00
Michael Meskes 460f46816a Replaced complex tests with small ones. 2006-09-08 13:32:29 +00:00
Michael Meskes 52a013bea8 More logic from complex/test* moved to their own testcases. 2006-09-08 09:03:40 +00:00
Tom Lane 893632be4e Clean up logging for extended-query-protocol operations, as per my recent
proposal.  Parameter logging works even for binary-format parameters, and
logging overhead is avoided when disabled.

log_statement = all output for the src/test/examples/testlibpq3.c example
now looks like

LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE t = $1
DETAIL:  parameters: $1 = 'joe''s place'
LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
DETAIL:  parameters: $1 = '2'

and log_min_duration_statement = 0 results in

LOG:  duration: 2.431 ms  parse <unnamed>: SELECT * FROM test1 WHERE t = $1
LOG:  duration: 2.335 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE t = $1
DETAIL:  parameters: $1 = 'joe''s place'
LOG:  duration: 0.394 ms  execute <unnamed>: SELECT * FROM test1 WHERE t = $1
DETAIL:  parameters: $1 = 'joe''s place'
LOG:  duration: 1.251 ms  parse <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
LOG:  duration: 0.566 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
DETAIL:  parameters: $1 = '2'
LOG:  duration: 0.173 ms  execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
DETAIL:  parameters: $1 = '2'

(This example demonstrates the folly of ignoring parse/bind steps for duration
logging purposes, BTW.)

Along the way, create a less ad-hoc mechanism for determining which commands
are logged by log_statement = mod and log_statement = ddl.  The former coding
was actually missing quite a few things that look like ddl to me, and it
did not handle EXECUTE or extended query protocol correctly at all.

This commit does not do anything about the question of whether log_duration
should be removed or made less redundant with log_min_duration_statement.
2006-09-07 22:52:01 +00:00
Bruce Momjian b6eab50ce4 Update pgcvslog comments. 2006-09-07 18:13:56 +00:00
Bruce Momjian a0e87ad7a5 Specify lo_write() to take a _const_ buffer, to match documentation. 2006-09-07 15:37:25 +00:00
Michael Meskes 803d9c39dd Changing a test case also changes the output that is expected.
Float/Long aliasing doesn't work on all architecures.
2006-09-07 11:18:47 +00:00
Michael Meskes 1d1868d97e Removed one output because integer/double usage differ 2006-09-07 08:15:58 +00:00
Bruce Momjian 8dc8f44f58 Update Emacs/vim editor info. 2006-09-07 00:10:46 +00:00
Tom Lane 5983a1aaa9 Change processing of extended-Query mode so that an unnamed statement
that has parameters is always planned afresh for each Bind command,
treating the parameter values as constants in the planner.  This removes
the performance penalty formerly often paid for using out-of-line
parameters --- with this definition, the planner can do constant folding,
LIKE optimization, etc.  After a suggestion by Andrew@supernews.
2006-09-06 20:40:48 +00:00
Bruce Momjian 6ca4ea8a80 Add interval division/multiplication regression tests.
Michael Glaesemann
2006-09-06 02:05:41 +00:00
Tom Lane 7bae5a289c Get rid of the separate RULE privilege for tables: now only a table's owner
can create or modify rules for the table.  Do setRuleCheckAsUser() while
loading rules into the relcache, rather than when defining a rule.  This
ensures that permission checks for tables referenced in a rule are done with
respect to the current owner of the rule's table, whereas formerly ALTER TABLE
OWNER would fail to update the permission checking for associated rules.
Removal of separate RULE privilege is needed to prevent various scenarios
in which a grantee of RULE privilege could effectively have any privilege
of the table owner.  For backwards compatibility, GRANT/REVOKE RULE is still
accepted, but it doesn't do anything.  Per discussion here:
http://archives.postgresql.org/pgsql-hackers/2006-04/msg01138.php
2006-09-05 21:08:36 +00:00
Tom Lane d5eb52a511 Make Gen_fmgrtab.sh locale-proof. Per report from Marko Kreen and
fix suggestion from Peter.
2006-09-05 19:18:13 +00:00
Teodor Sigaev 889ec4b998 Fix Intel compiler bug. Per discussion
'GIN FailedAssertions on Itanium2 with Intel compiler' in pgsql-hackers,
http://archives.postgresql.org/pgsql-hackers/2006-08/msg01914.php
2006-09-05 18:25:10 +00:00
Michael Meskes a3242fb42c Lost some changes yet again 2006-09-05 12:17:09 +00:00
Michael Meskes c9970d5948 Started to cleanup complex tests.
Added some interval checks to regression suite.
2006-09-05 12:11:03 +00:00