Commit Graph

20697 Commits

Author SHA1 Message Date
Tom Lane affcb4371c Avoid use of E'', and thereby creating an unnecessary version-dependency,
by using LIKE...ESCAPE instead.  Per suggestion by andrew@supernews.
2005-07-18 19:12:09 +00:00
Tom Lane fdd84469f7 Avoid need for E'' construct by using regexp instead of LIKE. More
readable, and more like the other places in this file.
2005-07-18 19:09:09 +00:00
Bruce Momjian adeede1391 Fix numiericsep length computations.
Eugen Nedelcu
2005-07-18 18:58:45 +00:00
Tom Lane df38d799ea Adjust psql describe queries so that any pg_foo_is_visible() condition
is applied last, after other constraints such as name patterns.  This
is useful first because the pg_foo_is_visible() functions are relatively
expensive, and second because it minimizes the prospects for race
conditions.  The change is fragile though since it makes unwarranted
assumptions about planner behavior, ie, that WHERE clauses will be
executed in the original order if there's not reason to change it.
This should fix ... or at least hide ... an intermittent failure in the
prepared_xacts regression test, while we think about what else to do.
2005-07-18 17:40:14 +00:00
Tom Lane 24ce1438c0 pgcrypto documentation update. Marko Kreen 2005-07-18 17:17:12 +00:00
Tom Lane 35c675a7fd Fortuna fixes. Marko Kreen 2005-07-18 17:12:54 +00:00
Tom Lane 2787db9b1d Small cleanups for pgcrypto. Marko Kreen 2005-07-18 17:09:01 +00:00
Tom Lane dd4a190d18 Fix C++-style comments, per Rocco Altier. 2005-07-18 16:35:06 +00:00
Tom Lane ac43da8466 MemSet() must not cast its pointer argument to int32* until after it has
checked that the pointer is actually word-aligned.  Casting a non-aligned
pointer to int32* is technically illegal per the C spec, and some recent
versions of gcc actually generate bad code for the memset() when given
such a pointer.  Per report from Andrew Morrow.
2005-07-18 15:53:28 +00:00
Tom Lane d0f312ebfe Make pg_regress accept a command-line option for the temporary installation's
port number, and use a default value for it that is dependent on the
configuration-time DEF_PGPORT.  Should make the world safe for running
parallel 'make check' in different branches.  Back-patch as far as 7.4
so that this actually is useful.
2005-07-17 18:28:45 +00:00
Tom Lane 59857b46a8 Fix create_unique_plan() so it doesn't generate useless entries in the
output targetlist of the Unique or HashAgg plan.  This code was OK when
written, but subsequent changes to use "physical tlists" where possible
had broken it: given an input subplan that has extra variables added to
avoid a projection step, it would copy those extra variables into the
upper tlist, which is pointless since a projection has to happen anyway.
2005-07-15 22:02:51 +00:00
Bruce Momjian 5e544e4eb7 Fix SGML spacing. 2005-07-15 19:02:12 +00:00
Tom Lane 184ba4d5ed Check for out-of-range varoattno in deparse_context_for_subplan.
I have seen this case in CVS tip due to new "physical tlist" optimization
for subqueries.  I believe it probably can't happen in existing releases,
but the check is not going to hurt anything, so backpatch to 8.0 just
in case.
2005-07-15 18:39:59 +00:00
Tom Lane 0182951bc8 Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)' and related
cases: we can't just consider whether the subquery's output is unique on its
own terms, we have to check whether the set of output columns we are going to
use will be unique.  Per complaint from Luca Pireddu and test case from
Michael Fuhr.
2005-07-15 17:09:26 +00:00
Tom Lane aa1110624c Adjust permissions checking for ALTER OWNER commands: instead of
requiring superuserness always, allow an owner to reassign ownership
to any role he is a member of, if that role would have the right to
create a similar object.  These three requirements essentially state
that the would-be alterer has enough privilege to DROP the existing
object and then re-CREATE it as the new role; so we might as well
let him do it in one step.  The ALTER TABLESPACE case is a bit
squirrely, but the whole concept of non-superuser tablespace owners
is pretty dubious anyway.  Stephen Frost, code review by Tom Lane.
2005-07-14 21:46:30 +00:00
Bruce Momjian bd15782164 Enable multi-byte thousands_sep and decimal_point for numericsep. 2005-07-14 21:12:41 +00:00
Bruce Momjian fbc11b9dcf Make better thousands_sep default based on decimal marker value. 2005-07-14 15:54:21 +00:00
Bruce Momjian 45a19efa9e Change numericsep to a boolean, and make it locale-aware. 2005-07-14 08:42:37 +00:00
Bruce Momjian 4a8bbbd2ee Add numeric separator support for latex and troff output methods. 2005-07-14 07:32:01 +00:00
Neil Conway 75c76e93c7 Mark xml2 CREATE FUNCTIONs as IMMUTABLE, and use the "STRICT" syntax
rather than the deprecated "WITH (isStrict)" syntax. Patch from Ilia
Kantor, minor editorializing by Neil Conway.
2005-07-14 07:12:27 +00:00
Bruce Momjian 52d1d2e67c barebones variable name -> tuples_only, for consistency. 2005-07-14 06:49:58 +00:00
Bruce Momjian cff9c5748a Fix malloc length for new numeric separator patch.
Centralize malloc into function.
2005-07-14 06:46:17 +00:00
Neil Conway c3f1b0f4dd This doc patch replaces all inappropriate references to SQL:1999 when it
is used as if it were the latest (and/or still valid) SQL standard.
SQL:2003 is used in its place. Patch from Simon Riggs.
2005-07-14 06:17:36 +00:00
Tom Lane 29094193f5 Integrate autovacuum functionality into the backend. There's still a
few loose ends to be dealt with, but it seems to work.  Alvaro Herrera,
based on the contrib code by Matthew O'Connor.
2005-07-14 05:13:45 +00:00
Tom Lane f2bf2d2dc5 Fix a couple of bogus comments, per Alvaro. 2005-07-13 22:46:09 +00:00
Tom Lane 5a4c2a75d1 Remove extraneous space after -L ... it confuses SHLIB_LINK filter -L
hack.
2005-07-13 17:12:56 +00:00
Tom Lane 0016911b5d Fix unwanted side-effects of recent SHLIB_LINK -L patch on existing
hacking of SHLIB_LINK for HPUX.
2005-07-13 17:00:44 +00:00
Bruce Momjian 505b925276 Fix #elif spacing too. 2005-07-13 15:59:32 +00:00
Tom Lane faea3db958 Fix libpq memory leak during PQreset() --- closePGconn() was not
freeing all transient state of the PGconn object.
2005-07-13 15:25:55 +00:00
Bruce Momjian 5d0a43c585 Fix pgindent to not have blank line before #else in variable definition
section of a function.
2005-07-13 04:44:42 +00:00
Bruce Momjian 7690b41328 Add backslashes to parentheses in awk regex because if not, they are
treated as regex groups.
2005-07-13 04:00:28 +00:00
Bruce Momjian 5bced8f5cb Move -L flag around for shared builds:
I wrote:
> So either we code up some intelligence to put the "C" in the right
> position or we have to pass down "A B" and "D" separately from the
> main makefile.

The following patch might just do the former.  Please try it out.


Peter E.
2005-07-13 02:11:57 +00:00
Neil Conway d6375d6109 Documentation for some new PL/Perl features. Patch from David Fetter,
various editorialization from Neil Conway.
2005-07-13 02:10:42 +00:00
Tom Lane b4363b7733 Hack around the discrepancy between default library search paths for
gcc and for HP's ld on HPUX.  There may be better ways to do this,
but this seems to work for me...
2005-07-12 23:06:48 +00:00
Tom Lane 2d481b31af Fix plperl crash with list value return for an array result type.
Reported by Michael Fuhr, fixed by Andrew Dunstan.
2005-07-12 20:35:42 +00:00
Tom Lane 807bbe6051 More pgcrypto fixes: handle long messages correctly, suppress
compiler warnings.  Marko Kreen and Kris Jurka.
2005-07-12 20:27:45 +00:00
Bruce Momjian 7f0b690334 Improve comments for AdjustIntervalForTypmod.
Blank line adjustments.
2005-07-12 16:05:12 +00:00
Bruce Momjian 62abb039df Change 5e0 to 5.0, for consistency. 2005-07-12 15:17:44 +00:00
Tom Lane 220e6bfc53 Fix plperl to do recursion safely, and fix a problem with array results.
Add suitable regression tests.  Andrew Dunstan
2005-07-12 01:16:22 +00:00
Tom Lane a1a64bb7c3 Further tweaking of Win32-specific random code. Marko Kreen 2005-07-11 19:06:46 +00:00
Tom Lane e82f7e9e7e I forgot to update win32 code when doing a renaming in random.c.
Marko Kreen
2005-07-11 17:00:03 +00:00
Tom Lane 067a5cdb35 Avoid bzero/bxopy in favor of more standard library routines.
Marko Kreen
2005-07-11 15:40:38 +00:00
Tom Lane e997758cb6 More pgcrypto fixes: avoid bogus alignment assumptions in sha2,
be more wary about having a value for BYTE_ORDER, clean up randomly-
chosen ways of including Postgres core headers.
Marko Kreen and Tom Lane
2005-07-11 15:07:59 +00:00
Tom Lane 3c52d17fa6 Add support for AES cipher with older OpenSSL libraries.
Marko Kreen
2005-07-11 14:38:05 +00:00
Tom Lane 8826fe859f Missed adding extra argument to array_recv in a couple of places
(harmless, actually, but let's be tidy).
2005-07-10 21:36:21 +00:00
Tom Lane d78397d301 Change typreceive function API so that receive functions get the same
optional arguments as text input functions, ie, typioparam OID and
atttypmod.  Make all the datatypes that use typmod enforce it the same
way in typreceive as they do in typinput.  This fixes a problem with
failure to enforce length restrictions during COPY FROM BINARY.
2005-07-10 21:14:00 +00:00
Bruce Momjian 2e330699fa > One more failure:
>
> I think this is because we don't have -lz in SHLIB_LINK.
> Following patch fixes it.

Marko Kreen
2005-07-10 18:32:55 +00:00
Bruce Momjian 21634e513f Add extra argument for new pg_regexec API. 2005-07-10 18:31:59 +00:00
Tom Lane aacfeba61b Suppress compile warning. 2005-07-10 17:22:54 +00:00
Bruce Momjian e8a3e6b8a0 Rename xmalloc to pg_malloc for consistency with psql usage.
Add missing plperl include.
2005-07-10 16:13:13 +00:00