Commit Graph

  • dabde323b2 Back out SQLSTATE and SQLERRM support. Bruce Momjian 2005-05-26 04:08:32 +00:00
  • 4c862b18f9 Display only 9 not 10 digits of precision for timestamp values when using non-integer timestamps. This prevents the display of rounding errors for common values like days < 32. Bruce Momjian 2005-05-26 03:48:25 +00:00
  • b3195dae49 Minor cleanup for recent SQLSTATE / SQLERRM patch: spell "successful" correctly, style fixes. Neil Conway 2005-05-26 03:18:53 +00:00
  • ab82f60119 Adjust datetime parsing to be more robust. We now pass the length of the working buffer into ParseDateTime() and reject too-long input there, rather than checking the length of the input string before calling ParseDateTime(). The old method was bogus because ParseDateTime() can use a variable amount of working space, depending on the content of the input string (e.g. how many fields need to be NUL terminated). This fixes a minor stack overrun -- I don't _think_ it's exploitable, although I won't claim to be an expert. Neil Conway 2005-05-26 02:14:32 +00:00
  • 92525dd6c9 Adjust datetime parsing to be more robust. We now pass the length of the working buffer into ParseDateTime() and reject too-long input there, rather than checking the length of the input string before calling ParseDateTime(). The old method was bogus because ParseDateTime() can use a variable amount of working space, depending on the content of the input string (e.g. how many fields need to be NUL terminated). This fixes a minor stack overrun -- I don't _think_ it's exploitable, although I won't claim to be an expert. Neil Conway 2005-05-26 02:10:03 +00:00
  • 63e0d612f5 Adjust datetime parsing to be more robust. We now pass the length of the working buffer into ParseDateTime() and reject too-long input there, rather than checking the length of the input string before calling ParseDateTime(). The old method was bogus because ParseDateTime() can use a variable amount of working space, depending on the content of the input string (e.g. how many fields need to be NUL terminated). This fixes a minor stack overrun -- I don't _think_ it's exploitable, although I won't claim to be an expert. Neil Conway 2005-05-26 02:04:14 +00:00
  • 15e4d1e2a7 Tweak the backend scanner (and psqlscan.l, which must track the backend scanner anyway) to avoid having any backup states. According to the flex manual, this should speed things up, and indeed the backend scanner is about a third faster according to some quick profiling checks. I haven't tried to measure the speed change in psql, but it probably is similar. Tom Lane 2005-05-26 01:24:29 +00:00
  • 38af680ad5 Add PL/pgSQL SQLSTATE and SQLERRM support which sets these values on error. Bruce Momjian 2005-05-26 00:16:31 +00:00
  • 8c792fe9cb At the head of wchareq, length of (multibyte) character is compared by using pg_mblen. Therefore, pg_mblen is executed many times, and it becomes a bottleneck. Bruce Momjian 2005-05-25 22:59:33 +00:00
  • bbb586ff21 Quick patch to adress a recent concern on the mailing list about adding an errant "TO" when we already have a TO. Since TO cannot be a valid column name (we must quote it), we can simply ignore the tab-completion if the previous word was a "TO". Bruce Momjian 2005-05-25 22:12:05 +00:00
  • b492c3accc Add parentheses to macros when args are used in computations. Without them, the executation behavior could be unexpected. Bruce Momjian 2005-05-25 21:40:43 +00:00
  • 9a1a986580 Translation updates Peter Eisentraut 2005-05-25 08:37:22 +00:00
  • d1d5c0fe2e Translation updates Peter Eisentraut 2005-05-25 08:32:14 +00:00
  • 13b729ca52 Editing for the new "Encryption Options" section of the manual. Neil Conway 2005-05-25 02:56:15 +00:00
  • afc0e843b9 Fix previous patch to exprTypmod. Tatsuo Ishii 2005-05-25 02:17:55 +00:00
  • 05a07afd51 Fix previous patch to exprTypmod. Tatsuo Ishii 2005-05-25 02:13:48 +00:00
  • 5454eb0456 Fix previous patch to exprTypmod. Tatsuo Ishii 2005-05-25 02:03:52 +00:00
  • 8f5702ebd5 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. Tatsuo Ishii 2005-05-24 23:52:02 +00:00
  • de212f4910 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. Tatsuo Ishii 2005-05-24 23:15:05 +00:00
  • 2a99455ca7 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. Tatsuo Ishii 2005-05-24 23:02:54 +00:00
  • 0a7b3a3649 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. Tom Lane 2005-05-24 18:03:24 +00:00
  • a94ace0796 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. Tom Lane 2005-05-24 18:02:55 +00:00
  • 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. Tom Lane 2005-05-24 18:02:31 +00:00
  • bc6444dc6a Fix PL makefiles to support running regression tests in VPATH builds. Tom Lane 2005-05-24 17:07:41 +00:00
  • 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. Tom Lane 2005-05-24 16:45:23 +00:00
  • 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. Tatsuo Ishii 2005-05-24 15:45:34 +00:00
  • 11a0c3741f Add regression tests for previously-untested PL/Perl features. From Andrew Dunstan. Neil Conway 2005-05-24 08:05:36 +00:00
  • 443f21737d Fix weird indentation of function return type. Neil Conway 2005-05-24 07:16:27 +00:00
  • c0ac38d082 Log queries for client-side prepare/execute. Simon Riggs Log prepare query during execute. Bruce Momjian Bruce Momjian 2005-05-24 04:18:04 +00:00
  • f534820d4d Put parentheses around use of macro arguments in FMODULO and TMODULO. Bruce Momjian 2005-05-24 04:03:01 +00:00
  • 09ff9dbe2b Remove more extraneous parentheses in date/time functions. Bruce Momjian 2005-05-24 02:09:45 +00:00
  • a99b2852ca Correct a thinko in pgbench that might result in incorrectly ignoring an error condition when executing some DDL. Per report from ITAGAKI Takahiro. Neil Conway 2005-05-24 00:26:40 +00:00
  • 4550c1e519 More macro cleanups for date/time. Bruce Momjian 2005-05-23 21:54:02 +00:00
  • 5ebaae801c Add datetime macros for constants, for clarity: Bruce Momjian 2005-05-23 18:56:55 +00:00
  • 33d0d4ce96 Remove unnecessary parentheses in datetime/timestamp code. Bruce Momjian 2005-05-23 17:13:14 +00:00
  • 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. Tom Lane 2005-05-23 03:01:14 +00:00
  • 6d493ed7f5 Fix typo in PL/Perl Safe.pm initialization that prevented the proper sharing of %_SHARED. From Andrew Dunstan. Neil Conway 2005-05-23 02:02:52 +00:00
  • 353f111f98 Fix typo in PL/Perl Safe.pm initialization that prevented the proper sharing of %_SHARED. From Andrew Dunstan. Neil Conway 2005-05-23 01:57:51 +00:00
  • 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. Neil Conway 2005-05-23 01:50:01 +00:00
  • dd2894dfd6 Consistently do not include a terminating period in single-sentence function descriptions in func.sgml; other minor SGML tweaks. Neil Conway 2005-05-23 01:29:54 +00:00
  • 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. Tom Lane 2005-05-22 22:30:20 +00:00
  • c61207b091 INT4 is probably enough: Bruce Momjian 2005-05-21 21:31:26 +00:00
  • 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. Neil Conway 2005-05-21 12:08:06 +00:00
  • 875813439d Remove excess parens, use Abs instead of : ?. Bruce Momjian 2005-05-21 03:38:05 +00:00
  • 2e9c04eedb Mention overflow: Bruce Momjian 2005-05-21 03:12:44 +00:00
  • 6dab58a643 Add: Bruce Momjian 2005-05-21 03:11:27 +00:00
  • 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 Bruce Momjian 2005-05-20 19:18:15 +00:00
  • 29167dd3d7 Update Japanese FAQ. Bruce Momjian 2005-05-20 15:53:52 +00:00
  • 6e85414647 Update Japanese FAQ. Bruce Momjian 2005-05-20 15:53:06 +00:00
  • 6dc7760ac3 Add support for wal_fsync_writethrough for Darwin, and restructure the code to better handle writethrough. Bruce Momjian 2005-05-20 14:53:26 +00:00
  • 621d5e1d72 Fix typo in ECPG docs, per Andreas Seltenreich. Neil Conway 2005-05-20 12:37:51 +00:00
  • e9b33ed6cd Fix typo in ECPG docs, per Andreas Seltenreich. Neil Conway 2005-05-20 12:36:48 +00:00
  • 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. Neil Conway 2005-05-20 01:52:25 +00:00
  • 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. Neil Conway 2005-05-20 01:37:08 +00:00
  • 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. Neil Conway 2005-05-20 01:29:56 +00:00
  • ff0c143a3b Make a comment pgindent-proof, per suggestion from Alvaro. Tom Lane 2005-05-19 23:58:51 +00:00
  • f519d04a43 Update comment that I missed the first time around. Tom Lane 2005-05-19 23:57:11 +00:00
  • 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. Tom Lane 2005-05-19 23:30:18 +00:00
  • 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. Tom Lane 2005-05-19 21:35:48 +00:00
  • 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. Neil Conway 2005-05-18 05:01:10 +00:00
  • 4c1f9a0f0b psql tab completion improvements, from Greg Sabino Mullane: Neil Conway 2005-05-18 04:47:40 +00:00
  • a9c4c9cd52 Extend the pg_locks system view so that it can fully display all lock types, as per recent discussion. Tom Lane 2005-05-17 21:46:11 +00:00
  • 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 Tom Lane 2005-05-17 18:26:23 +00:00
  • ce93521be0 Guard against duplicate IDs in input file in SortTocFromFile(). Per report from Brian Hackett. Tom Lane 2005-05-17 17:31:24 +00:00
  • e3d0bd8d48 Guard against duplicate IDs in input file in SortTocFromFile(). Per report from Brian Hackett. Tom Lane 2005-05-17 17:31:15 +00:00
  • 88c59aeed8 Guard against duplicate IDs in input file in SortTocFromFile(). Per report from Brian Hackett. Tom Lane 2005-05-17 17:30:53 +00:00
  • 626be474d3 Guard against duplicate IDs in input file in SortTocFromFile(). Per report from Brian Hackett. Tom Lane 2005-05-17 17:30:41 +00:00
  • f9ad8a2802 Guard against duplicate IDs in input file in SortTocFromFile(). Per report from Brian Hackett. Tom Lane 2005-05-17 17:30:29 +00:00
  • ba5684691c Convert Chinese FAQ to valid XHTML, finally. Bruce Momjian 2005-05-17 04:18:30 +00:00
  • 5185cc8eae Update: Bruce Momjian 2005-05-17 04:18:20 +00:00
  • 5e1bfa82dd Convert Chinese FAQ to valid XHTML, finally. Bruce Momjian 2005-05-17 04:17:47 +00:00
  • c23e15cd42 Fix Chinese markup some more. Bruce Momjian 2005-05-17 03:41:14 +00:00
  • 472f9be471 Fix Chinese markup some more. Bruce Momjian 2005-05-17 03:40:35 +00:00
  • 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. Neil Conway 2005-05-17 03:34:18 +00:00
  • eda6dd32d1 GiST improvements: Neil Conway 2005-05-17 00:59:30 +00:00
  • 818bfda1e2 Fix markup: < * Add internationalized message strings > o Add internationalized message strings Bruce Momjian 2005-05-17 00:51:58 +00:00
  • ce1b3065c3 Update italics. Bruce Momjian 2005-05-17 00:51:10 +00:00
  • 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. Tom Lane 2005-05-17 00:43:47 +00:00
  • e90df66269 Update italics on web site. Bruce Momjian 2005-05-17 00:24:22 +00:00
  • 343af94255 Update italics on web site. Bruce Momjian 2005-05-16 23:35:42 +00:00
  • c31a05e819 Update Chinese FAQ to validate properly. Bruce Momjian 2005-05-16 22:27:54 +00:00
  • c6c6fa8f7e Fix typo in comment. Neil Conway 2005-05-16 06:45:57 +00:00
  • 3994ffb479 Fix a few minor mistakes in header comments. From Qingqing Zhou. Neil Conway 2005-05-16 05:52:13 +00:00
  • 390d460138 Update Chinese FAQ to xhtml. Bruce Momjian 2005-05-16 02:50:58 +00:00
  • e336635c5b Update Chinese FAQ to xhtml. Bruce Momjian 2005-05-16 02:50:20 +00:00
  • 7e94998c89 Adjust out-of-date comment. Tom Lane 2005-05-16 00:19:04 +00:00
  • 2ef172a2a4 Fix latent bug in ExecSeqRestrPos: it leaves the plan node's result slot in an inconsistent state. (This is only latent because in reality ExecSeqRestrPos is dead code at the moment ... but someday maybe it won't be.) Add some comments about what the API for plan node mark/restore actually is, because it's not immediately obvious. Tom Lane 2005-05-15 21:19:55 +00:00
  • eb0d00a9be Various style cleanups for GiST; no changes to functionality. Neil Conway 2005-05-15 04:08:29 +00:00
  • c9a382b2ed Rename Rendezvous to Bonjour to match OS/X renaming. Bruce Momjian 2005-05-15 00:26:19 +00:00
  • c8a6b52705 Further marginal speed hacking: in MemoryContextReset, don't call MemoryContextResetChildren unless necessary. Tom Lane 2005-05-14 23:16:29 +00:00
  • fabef3044a Minor refactoring to eliminate duplicate code and make startup a tad faster. Tom Lane 2005-05-14 21:29:23 +00:00
  • 05b4293bd8 Minor speed hacks in AllocSetReset: avoid clearing the freelist headers when the blocks list is empty (there can surely be no freelist items if the context contains no memory), and use MemSetAligned not MemSet to clear the headers (we assume alignof(pointer) >= alignof(int32)). Per discussion with Atsushi Ogawa. He proposes some further hacking that I'm not yet sold on, but these two changes are unconditional wins since there is no case in which they make things slower. Tom Lane 2005-05-14 20:29:13 +00:00
  • 0ff7a2c2ad Convert the existing regression test scripts for the various optional PLs to use the standard pg_regress infrastructure. No changes in the tests themselves. Andrew Dunstan Tom Lane 2005-05-14 17:55:22 +00:00
  • 1ea069b1f6 Re-order items, add mention of how to propose working on a TODO item. Bruce Momjian 2005-05-14 16:26:17 +00:00
  • 184e7a73a5 Revise nodeMergejoin in light of example provided by Guillaume Smet. When one side of the join has a NULL, we don't want to uselessly try to match it against every remaining tuple of the other side. While at it, rewrite the comparison machinery to avoid multiple evaluations of the left and right input expressions and to use a btree comparator where available, instead of double operator calls. Also revise the state machine to eliminate redundant comparisons and hopefully make it more readable too. Tom Lane 2005-05-13 21:20:16 +00:00
  • fd4d6853b7 Add -N make flag to bcc builds from /src dir. Bruce Momjian 2005-05-13 18:13:16 +00:00
  • 2979334d47 Add -N make flag to bcc builds from /src dir. Bruce Momjian 2005-05-13 18:12:35 +00:00
  • 011af314b7 Add missing quote, per Dave Page. Tom Lane 2005-05-13 16:48:22 +00:00
  • 5e6bbc21f4 Add missing quote, per Dave Page. Tom Lane 2005-05-13 16:48:14 +00:00
  • 69664f11af Fix broken markup. Tom Lane 2005-05-13 16:47:03 +00:00