Commit Graph

20246 Commits

Author SHA1 Message Date
Bruce Momjian b492c3accc Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
2005-05-25 21:40:43 +00:00
Neil Conway 13b729ca52 Editing for the new "Encryption Options" section of the manual. 2005-05-25 02:56:15 +00:00
Tom Lane 872c1497fc Previous fix for "x FULL JOIN y ON true" failed to handle the case
where there was also a WHERE-clause restriction that applied to the
join.  The check on restrictlist == NIL is really unnecessary anyway,
because select_mergejoin_clauses already checked for and complained
about any unmergejoinable join clauses.  So just take it out.
2005-05-24 18:02:31 +00:00
Tom Lane bc6444dc6a Fix PL makefiles to support running regression tests in VPATH builds. 2005-05-24 17:07:41 +00:00
Tom Lane 1a022f71d8 Add -I$(srcdir) to CPPFLAGS to make psqlscan.c compile in vpath builds.
Not sure why this hasn't been reported before; perhaps it is not needed
with newer gcc versions, but it definitely fails here.
2005-05-24 16:45:23 +00:00
Tatsuo Ishii a90e9d662e Inserting 5 characters into char(10) does not produce 5 padding spaces
if they are two-byte multibyte characters. Same thing can be happen
if octet_length(multibyte_chars) == n where n is char(n).
Long standing bug since 7.3 days. Per report and fix from Yoshiyuki Asaba.
2005-05-24 15:45:34 +00:00
Neil Conway 11a0c3741f Add regression tests for previously-untested PL/Perl features. From
Andrew Dunstan.
2005-05-24 08:05:36 +00:00
Neil Conway 443f21737d Fix weird indentation of function return type. 2005-05-24 07:16:27 +00:00
Bruce Momjian c0ac38d082 Log queries for client-side prepare/execute. Simon Riggs
Log prepare query during execute.  Bruce Momjian
2005-05-24 04:18:04 +00:00
Bruce Momjian f534820d4d Put parentheses around use of macro arguments in FMODULO and TMODULO. 2005-05-24 04:03:01 +00:00
Bruce Momjian 09ff9dbe2b Remove more extraneous parentheses in date/time functions. 2005-05-24 02:09:45 +00:00
Neil Conway a99b2852ca Correct a thinko in pgbench that might result in incorrectly ignoring an
error condition when executing some DDL. Per report from ITAGAKI Takahiro.
2005-05-24 00:26:40 +00:00
Bruce Momjian 4550c1e519 More macro cleanups for date/time. 2005-05-23 21:54:02 +00:00
Bruce Momjian 5ebaae801c Add datetime macros for constants, for clarity:
#define SECS_PER_DAY  86400
#define USECS_PER_DAY INT64CONST(86400000000)
#define USECS_PER_HOUR    INT64CONST(3600000000)
#define USECS_PER_MINUTE INT64CONST(60000000)
#define USECS_PER_SEC INT64CONST(1000000)
2005-05-23 18:56:55 +00:00
Bruce Momjian 33d0d4ce96 Remove unnecessary parentheses in datetime/timestamp code. 2005-05-23 17:13:14 +00:00
Tom Lane c1393173aa Avoid redundant relation lock grabs during planning, and make sure
that we acquire a lock on relations added to the query due to inheritance.
Formerly, no such lock was held throughout planning, which meant that
a schema change could occur to invalidate the plan before it's even
been completed.
2005-05-23 03:01:14 +00:00
Neil Conway 353f111f98 Fix typo in PL/Perl Safe.pm initialization that prevented the proper
sharing of %_SHARED. From Andrew Dunstan.
2005-05-23 01:57:51 +00:00
Neil Conway 1b41965d5d Remove some verbiage describing how min() and max() are slow when applied
to the entire table: as of current sources, they are no longer slow
provided there is an index on the column.
2005-05-23 01:50:01 +00:00
Neil Conway dd2894dfd6 Consistently do not include a terminating period in single-sentence
function descriptions in func.sgml; other minor SGML tweaks.
2005-05-23 01:29:54 +00:00
Tom Lane e2159f3842 Teach the planner to remove SubqueryScan nodes from the plan if they
aren't doing anything useful (ie, neither selection nor projection).
Also, extend to SubqueryScan the hacks already in place to avoid
unnecessary ExecProject calls when the result would just be the same
tuple the subquery already delivered.  This saves some overhead in
UNION and other set operations, as well as avoiding overhead for
unflatten-able subqueries.  Per example from Sokolov Yura.
2005-05-22 22:30:20 +00:00
Bruce Momjian c61207b091 INT4 is probably enough:
< * Allow INET + INT4/INT8 to increment the host part of the address, or
> * Allow INET + INT4 to increment the host part of the address, or
2005-05-21 21:31:26 +00:00
Neil Conway 36ab600511 Cleanup of GiST extensions in contrib/: now that we always invoke GiST
methods in a short-lived memory context, there is no need for GiST methods
to do their own manual (and error-prone) memory management.
2005-05-21 12:08:06 +00:00
Bruce Momjian 875813439d Remove excess parens, use Abs instead of : ?. 2005-05-21 03:38:05 +00:00
Bruce Momjian 2e9c04eedb Mention overflow:
<   throw an error
>   throw an error on overflow
2005-05-21 03:12:44 +00:00
Bruce Momjian 6dab58a643 Add:
> * Allow INET + INT4/INT8 to increment the host part of the address, or
>   throw an error
2005-05-21 03:11:27 +00:00
Bruce Momjian e954cd2bc2 Remove 2-phase description, because it isn't accurate anymore:
<
<   This will involve adding a way to respond to commit failure by either
<   taking the server into offline/readonly mode or notifying the
<   administrator
2005-05-20 19:18:15 +00:00
Bruce Momjian 6e85414647 Update Japanese FAQ.
Jun Kuwamura
2005-05-20 15:53:06 +00:00
Bruce Momjian 6dc7760ac3 Add support for wal_fsync_writethrough for Darwin, and restructure the
code to better handle writethrough.

Chris Campbell
2005-05-20 14:53:26 +00:00
Neil Conway e9b33ed6cd Fix typo in ECPG docs, per Andreas Seltenreich. 2005-05-20 12:36:48 +00:00
Neil Conway 4de23092d0 Add some links to the CREATE FUNCTION reference page when describing
function definition for particular PLs. Original patch from David
Fetter, editorializing by Neil Conway.
2005-05-20 01:52:25 +00:00
Neil Conway ee85870e23 Make the CREATE RULE syntax description in rules.sgml more consistent
with the syntax description in the CREATE RULE reference page. From
Kris Jurka.
2005-05-20 01:37:08 +00:00
Neil Conway f3567eeaf2 Implement md5(bytea), update regression tests and documentation. Patch
from Abhijit Menon-Sen, minor editorialization from Neil Conway. Also,
improve md5(text) to allocate a constant-sized buffer on the stack
rather than via palloc.

Catalog version bumped.
2005-05-20 01:29:56 +00:00
Tom Lane ff0c143a3b Make a comment pgindent-proof, per suggestion from Alvaro. 2005-05-19 23:58:51 +00:00
Tom Lane f519d04a43 Update comment that I missed the first time around. 2005-05-19 23:57:11 +00:00
Tom Lane 191b13aaca Factor out lock cleanup code that is needed in several places in lock.c.
Also, remove the rather useless return value of LockReleaseAll.  Change
response to detection of corruption in the shared lock tables to PANIC,
since that is the only way of cleaning up fully.
Originally an idea of Heikki Linnakangas, variously hacked on by
Alvaro Herrera and Tom Lane.
2005-05-19 23:30:18 +00:00
Tom Lane ee3b71f6bc Split the shared-memory array of PGPROC pointers out of the sinval
communication structure, and make it its own module with its own lock.
This should reduce contention at least a little, and it definitely makes
the code seem cleaner.  Per my recent proposal.
2005-05-19 21:35:48 +00:00
Neil Conway 6910032a56 Upon closer inspection, Greg's psql tab completion patch leaks memory.
Fix the leak, and add a comment to note that the return value of
previous_word must be free'd.
2005-05-18 05:01:10 +00:00
Neil Conway 4c1f9a0f0b psql tab completion improvements, from Greg Sabino Mullane:
* Made DELETE into "DELETE FROM"
* Moved ANALZYE to the end of the list to ease EXPLAIN / VACUUM
  conflicts
* Removed the ANALYZE xx semicolon completion: we don't do that anywhere
  else
* Add DECLARE support
* Add parens for DROP AGGREGATE
* Add "CASCADE | RESTRICT" for DROP xx
* Make EXPLAIN <tab> a lot smarter
* GROUP "BY" and ORDER "BY"
* "ISOLATION" becomes "ISOLATION LEVEL"
* Fix error in which REVOKE xx ON yy was receiving "TO", now gets "FROM"
* Add GRANT/REVOKE xx ON yy TO/FROM choices: usernames, GROUP, PUBLIC
* PREPARE xx <tab> AS "SELECT | INSERT | UPDATE | DELETE"
* Add = at end of UPDATE xx SET yy
* Beef up VACUUM stuff
2005-05-18 04:47:40 +00:00
Tom Lane a9c4c9cd52 Extend the pg_locks system view so that it can fully display all lock
types, as per recent discussion.
2005-05-17 21:46:11 +00:00
Tom Lane 4e7d6f5349 Add a --dbname option to the pg_regress script, and use pl_regression
for testing PLs and contrib_regression for testing contrib, instead of
overwriting the core system's regression database as formerly done.
Andrew Dunstan
2005-05-17 18:26:23 +00:00
Tom Lane f9ad8a2802 Guard against duplicate IDs in input file in SortTocFromFile().
Per report from Brian Hackett.
2005-05-17 17:30:29 +00:00
Bruce Momjian 5185cc8eae Update:
< * All ability to monitor the use of temporary sort files
> * Add ability to monitor the use of temporary sort files
2005-05-17 04:18:20 +00:00
Bruce Momjian 5e1bfa82dd Convert Chinese FAQ to valid XHTML, finally. 2005-05-17 04:17:47 +00:00
Bruce Momjian 472f9be471 Fix Chinese markup some more. 2005-05-17 03:40:35 +00:00
Neil Conway c891e05f26 Cleanup GiST header files. Since GiST extensions are often written as
external projects, we should be careful about what parts of the GiST
API are considered implementation details, and which are part of the
public API. Therefore, I've moved internal-only declarations into
gist_private.h -- future backward-incompatible changes to gist.h should
be made with care, to avoid needlessly breaking external GiST extensions.

Also did some related header cleanup: remove some unnecessary #includes
from gist.h, and remove some unused definitions: isAttByVal(), _gistdump(),
and GISTNStrategies.
2005-05-17 03:34:18 +00:00
Neil Conway eda6dd32d1 GiST improvements:
- make sure we always invoke user-supplied GiST methods in a short-lived
  memory context. This means the backend isn't exposed to any memory leaks
  that be in those methods (in fact, it is probably a net loss for most
  GiST methods to bother manually freeing memory now). This also means
  we can do away with a lot of ugly manual memory management in the
  GiST code itself.

- keep the current page of a GiST index scan pinned, rather than doing a
  ReadBuffer() for each tuple produced by the scan. Since ReadBuffer() is
  expensive, this is a perf. win

- implement dead tuple killing for GiST indexes (which is easy to do, now
  that we keep a pin on the current scan page). Now all the builtin indexes
  implement dead tuple killing.

- cleanup a lot of ugly code in GiST
2005-05-17 00:59:30 +00:00
Bruce Momjian 818bfda1e2 Fix markup:
< 	* Add internationalized message strings
> 	o Add internationalized message strings
2005-05-17 00:51:58 +00:00
Bruce Momjian ce1b3065c3 Update italics. 2005-05-17 00:51:10 +00:00
Tom Lane da56e57695 Modify tidbitmap.c to avoid creating a hash table until there is more
than one heap page represented in the bitmap.  This is a bit ugly but
it cuts overhead fairly effectively in simple join cases.  Per example
from Sergey Koposov.
2005-05-17 00:43:47 +00:00
Bruce Momjian e90df66269 Update italics on web site. 2005-05-17 00:24:22 +00:00