summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2006-03-01Update the expected regression test results to account for the changes toNeil Conway
error messages I made yesterday -- thanks to Andrew Dunstan for reporting this, and my apologies for missing it the first time.
2006-03-01Attached is a patch that replaces a bunch of places where StringInfosNeil Conway
are unnecessarily allocated on the heap rather than the stack. If the StringInfo doesn't outlive the stack frame in which it is created, there is no need to allocate it on the heap via makeStringInfo() -- stack allocation is faster. While it's not a big deal unless the code is in a critical path, I don't see a reason not to save a few cycles -- using stack allocation is not less readable. I also cleaned up a bit of code along the way: moved variable declarations into a more tightly-enclosing scope where possible, fixed some pointless copying of strings in dblink, etc.
2006-03-01This patch makes the error message strings throughout the backendNeil Conway
more compliant with the error message style guide. In particular, errdetail should begin with a capital letter and end with a period, whereas errmsg should not. I also fixed a few related issues in passing, such as fixing the repeated misspelling of "lexeme" in contrib/tsearch2 (per Tom's suggestion).
2006-02-28Fix typo in comment.Neil Conway
2006-02-28Allow the syntax CREATE TYPE foo, with no parameters, to permit explicitTom Lane
creation of a shell type. This allows a less hacky way of dealing with the mutual dependency between a datatype and its I/O functions: make a shell type, then make the functions, then define the datatype fully. We should fix pg_dump to handle things this way, but this commit just deals with the backend. Martijn van Oosterhout, with some corrections by Tom Lane.
2006-02-28Tweak the error message emitted when a void-returning PL/Python functionNeil Conway
does not return None, per suggestion from Tom.
2006-02-28Allow PL/Python functions to return void, per gripe from James RobinsonNeil Conway
(I didn't use his patch, however). A void-returning PL/Python function must return None (from Python), which is translated into a void datum (and *not* NULL) for Postgres. I also added some regression tests for this functionality.
2006-02-28Add PG_VERSION_NUM for use by 3rd party applications wanting to test theBruce Momjian
backend version in C using > and < comparisons.
2006-02-28Teach nodeSort and nodeMaterial to optimize out unnecessary overheadTom Lane
when the passed-down eflags indicate they can. Simon Riggs and Tom Lane
2006-02-28Extend the ExecInitNode API so that plan nodes receive a set of flagTom Lane
bits indicating which optional capabilities can actually be exercised at runtime. This will allow Sort and Material nodes, and perhaps later other nodes, to avoid unnecessary overhead in common cases. This commit just adds the infrastructure and arranges to pass the correct flag values down to plan nodes; none of the actual optimizations are here yet. I'm committing this separately in case anyone wants to measure the added overhead. (It should be negligible.) Simon Riggs and Tom Lane
2006-02-27Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, inPeter Eisentraut
particular get rid of single quotes around language names and old WITH () construct.
2006-02-27Add mention that tid perhaps someday should be output as a record.Bruce Momjian
2006-02-26Improve sorting speed by pre-extracting the first sort-key column ofTom Lane
each tuple, as per my proposal of several days ago. Also, clean up sort memory management by keeping all working data in a separate memory context, and refine the handling of low-memory conditions.
2006-02-26Fix a few minor typos in comments in PL/Perl.Neil Conway
2006-02-26Implement the <> operator for the tid type. Original patch from MarkNeil Conway
Kirkwood, minor improvements by Neil Conway. The regression tests have been updated and the catversion has been bumped.
2006-02-26Fix typo in comment.Neil Conway
2006-02-24The Makefile was invoking perl scripts as ./script.pl. This fails whenPeter Eisentraut
the script is not executable as UCS_to_most.pl is in CVS. It also won't pick up any custom setting of the perl version/location to use. This patch calls perl scripts like $(PERL) $(srcdir)/script.pl. Kris Jurka
2006-02-24Make restricted_exec feature for Windows more robust by using the environmentAndrew Dunstan
to pass the flag instead of the command line - some implementations of getopt fail if getopt arguments are present after non-getopt arguments.
2006-02-24make initdb -U username work as advertised; back out bogus patch at rev 1.42Andrew Dunstan
and supply real fix for problem it tried to address.
2006-02-21Cleanup the usage of ScanDirection: use the symbolic names for theNeil Conway
possible ScanDirection alternatives rather than magic numbers (-1, 0, 1). Also, use the ScanDirection macros in a few places rather than directly checking whether `dir == ForwardScanDirection' and the like. Per patch from James William Pye. His patch also changed ScanDirection to be a "char" rather than an enum, which I haven't applied.
2006-02-21Fix old pg_dump oversight: default values for domains really need to be dumpedTom Lane
by decompiling the typdefaultbin expression, not just printing the typdefault text which may be out-of-date or assume the wrong schema search path. (It's the same hazard as for adbin vs adsrc in column defaults.) The catalogs.sgml spec for pg_type implies that the correct procedure is to look to typdefaultbin first and consider typdefault only if typdefaultbin is NULL. I made dumping of both domains and base types do that, even though in the current backend code typdefaultbin is always correct for domains and typdefault for base types --- might as well try to future-proof it a little. Per bug report from Alexander Galler.
2006-02-21Adjust probe for getaddrinfo to cope with macro-ized definitions, suchTom Lane
as Tru64's. Per previous discussion.
2006-02-20Fix three Python reference leaks in PLy_traceback(). This would resultNeil Conway
in leaking memory when invoking a PL/Python procedure that raises an exception. Unfortunately this still leaks memory, but at least the largest leak has been plugged. This patch also fixes a reference counting mistake in PLy_modify_tuple() for 8.0, 8.1 and HEAD: we don't actually own a reference to `platt', so we shouldn't Py_DECREF() it.
2006-02-19Update obsolete comment.Tom Lane
2006-02-19Modify logtape.c so that the initial LogicalTapeSetCreate call onlyTom Lane
allocates the control data. The per-tape buffers are allocated only on first use. This saves memory in situations where tuplesort.c overestimates the number of tapes needed (ie, there are fewer runs than tapes). Also, this makes legitimate the coding in inittapes() that includes tape buffer space in the maximum-memory calculation: when inittapes runs, we've already expended the whole allowed memory on tuple storage, and so we'd better not allocate all the tape buffers until we've flushed some tuples out of memory.
2006-02-19Improve tuplesort.c to support variable merge order. The original codingTom Lane
with fixed merge order (fixed number of "tapes") was based on obsolete assumptions, namely that tape drives are expensive. Since our "tapes" are really just a couple of buffers, we can have a lot of them given adequate workspace. This allows reduction of the number of merge passes with consequent savings of I/O during large sorts. Simon Riggs with some rework by Tom Lane
2006-02-19Add TABLESPACE and ON COMMIT clauses to CREATE TABLE AS. ON COMMIT isNeil Conway
required by the SQL standard, and TABLESPACE is useful functionality. Patch from Kris Jurka, minor editorialization by Neil Conway.
2006-02-18&apos; is not valid HTML 4.01, so print the plain character instead.Peter Eisentraut
2006-02-18Add support for Windows codepages 1253, 1254, 1255, and 1257 and cleanPeter Eisentraut
up a bunch of the support utilities. In src/backend/utils/mb/Unicode remove nearly duplicate copies of the UCS_to_XXX perl script and replace with one version to handle all generic files. Update the Makefile so that it knows about all the map files. This produces a slight difference in some of the map files, using a uniform naming convention and not mapping the null character. In src/backend/utils/mb/conversion_procs create a master utf8<->win codepage function like the ISO 8859 versions instead of having a separate handler for each conversion. There is an externally visible change in the name of the win1258 to utf8 conversion. According to the documentation notes, it was named incorrectly and this changes it to a standard name. Running the Unicode mapping perl scripts has shown some additional mapping changes in koi8r and iso8859-7.
2006-02-18Mark unescape_single_char() "static": as far as I can see this functionNeil Conway
is only used by scan.l/scan.c
2006-02-17Fix typo in comment.Neil Conway
2006-02-16Change MemSet to use long instead of int32, for better performance onPeter Eisentraut
64-bit platforms. by ITAGAKI Takahiro
2006-02-14Repair --single-transaction patch so it handles blobs correctly.Tom Lane
Simon Riggs
2006-02-14Move btbulkdelete's vacuum_delay_point() call to a place in the loop whereTom Lane
we are not holding a buffer content lock; where it was, InterruptHoldoffCount is positive and so we'd not respond to cancel signals as intended. Also add missing vacuum_delay_point() call in btvacuumcleanup. This should fix complaint from Evgeny Gridasov about failure to respond to SIGINT/SIGTERM in a timely fashion (bug #2257).
2006-02-14Add some missing vacuum_delay_point calls in GIST vacuuming.Tom Lane
2006-02-14AllocSetStats should probably be using unsigned format to show space totals.Tom Lane
2006-02-13Add positive defense against trying to connect when the connectionTom Lane
option state hasn't been fully set up. This is possible via PQreset() and might occur in other code paths too, so a state flag seems the most robust solution. Per report from Arturs Zoldners.
2006-02-13IMHO, --single-transaction should wrap *all* the commands in BEGIN/COMMIT,Tom Lane
not just some of them.
2006-02-13Place function names in first column for consistency.Bruce Momjian
2006-02-13Fix qual_is_pushdown_safe to not try to push down quals involving a whole-rowTom Lane
Var referencing the subselect output. While this case could possibly be made to work, it seems not worth expending effort on. Per report from Magnus Naeslund(f).
2006-02-13Fix build failure when not USE_READLINE. Sergey E. KoposovTom Lane
2006-02-12Revert because C locale uses "" for thousands_sep, meaning "n/a", whileBruce Momjian
French uses "" for "don't want". Seems we have to keep the existing behavior.
2006-02-12Fix bug that allowed any logged-in user to SET ROLE to any other database userTom Lane
id (CVE-2006-0553). Also fix related bug in SET SESSION AUTHORIZATION that allows unprivileged users to crash the server, if it has been compiled with Asserts enabled. The escalation-of-privilege risk exists only in 8.1.0-8.1.2. However, the Assert-crash risk exists in all releases back to 7.3. Thanks to Akio Ishida for reporting this problem.
2006-02-12Throw a warning rather than an error on invalid character from UTF8 toBruce Momjian
Latin1, like we do for other Latin encodings.
2006-02-12Back out patch pending review.Bruce Momjian
--------------------------------------------------------------------------- > I've now tested this patch at home w/ 8.2HEAD and it seems to fix the > bug. I plan on testing it under 8.1.2 at work tommorow with > mod_auth_krb5, etc, and expect it'll work there. Assuming all goes > well and unless someone objects I'll forward the patch to -patches. > It'd be great to have this fixed as it'll allow us to use Kerberos to > authenticate to phppgadmin and other web-based tools which use > Postgres. While playing with this patch under 8.1.2 at home I discovered a mistake in how I manually applied one of the hunks to fe-auth.c. Basically, the base code had changed and so the patch needed to be modified slightly. This is because the code no longer either has a freeable pointer under 'name' or has 'name' as NULL. The attached patch correctly frees the string from pg_krb5_authname (where it had been strdup'd) if and only if pg_krb5_authname returned a string (as opposed to falling through and having name be set using name = pw->name;). Also added a comment to this effect. Please review. Stephen Frost (sfrost@snowman.net) wrote:
2006-02-12> I've now tested this patch at home w/ 8.2HEAD and it seems to fix theBruce Momjian
> bug. I plan on testing it under 8.1.2 at work tommorow with > mod_auth_krb5, etc, and expect it'll work there. Assuming all goes > well and unless someone objects I'll forward the patch to -patches. > It'd be great to have this fixed as it'll allow us to use Kerberos to > authenticate to phppgadmin and other web-based tools which use > Postgres. While playing with this patch under 8.1.2 at home I discovered a mistake in how I manually applied one of the hunks to fe-auth.c. Basically, the base code had changed and so the patch needed to be modified slightly. This is because the code no longer either has a freeable pointer under 'name' or has 'name' as NULL. The attached patch correctly frees the string from pg_krb5_authname (where it had been strdup'd) if and only if pg_krb5_authname returned a string (as opposed to falling through and having name be set using name = pw->name;). Also added a comment to this effect. Please review. Stephen Frost (sfrost@snowman.net) wrote:
2006-02-12Support "" for thousands separator and plus sign in to_char(), perBruce Momjian
report from French Debian user. psql already handles "" fine.
2006-02-12Remove LEFT part of JOIN to pg_roles because of optimizer limitation:Bruce Momjian
> True, but they're not being used where you'd expect. This seems to be > something to do with the fact that it's not pg_authid which is being > accessed, but rather the view pg_roles. I looked into this and it seems the problem is that the view doesn't get flattened into the main query because of the has_nullable_targetlist limitation in prepjointree.c. That's triggered because pg_roles has '********'::text AS rolpassword which isn't nullable, meaning it would produce wrong behavior if referenced above the outer join. Ultimately, the reason this is a problem is that the planner deals only in simple Vars while processing joins; it doesn't want to think about expressions. I'm starting to think that it may be time to fix this, because I've run into several related restrictions lately, but it seems like a nontrivial project. In the meantime, reducing the LEFT JOIN to pg_roles to a JOIN as per Peter's suggestion seems like the best short-term workaround.
2006-02-12Revert patch becaues of locking concerns:Bruce Momjian
Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME Joachim Wieland
2006-02-12Update release checlist.Bruce Momjian