summaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAgeFilesLines
* Add special checks for non-super-user setting LOG_MIN_DURATION_STATEMENTBruce Momjian2003-07-091-4/+5
| | | | to zero.
* Add new USERLIMIT GUC source level so certain options can be disabledBruce Momjian2003-07-092-40/+143
| | | | | | | or increased only by super-users. This fixes problems caused by making certain variables SUSET for security reasons.
* tm2timestamp should return -1, not elog, on overflow. (In the backendTom Lane2003-07-041-5/+10
| | | | | this is merely an API inconsistency, but in ecpg it's fatal.) Also, fix misconceived overflow test in HAVE_INT64_TIMESTAMP case.
* Add --help-config facility to dump information about GUC parametersTom Lane2003-07-046-409/+1431
| | | | | | without needing a running backend. Reorder postgresql.conf.sample to match new layout of runtime.sgml. This commit re-adds work lost in Wednesday's crash.
* Some early work on error message editing. Operator-not-found andTom Lane2003-07-0415-245/+238
| | | | | function-not-found messages now distinguish the cases no-match and ambiguous-match, and they follow the style guidelines too.
* Fix bug I introduced in recent rewrite of NUMERIC code: numeric toTom Lane2003-07-031-3/+12
| | | | | integer conversions gave the wrong answer for values with stripped trailing zeroes, such as 10000000.
* Do honest transformation and preprocessing of LIMIT/OFFSET clauses,Tom Lane2003-07-036-83/+142
| | | | | | | | instead of the former kluge whereby gram.y emitted already-transformed expressions. This is needed so that Params appearing in these clauses actually work correctly. I suppose some might claim that the side effect of 'SELECT ... LIMIT 2+2' working is a new feature, but I say this is a bug fix.
* Code review for UPDATE tab SET col = DEFAULT patch ... whack it aroundTom Lane2003-07-0310-88/+140
| | | | so it has some chance of working in rules ...
* Aggregates can be polymorphic, using polymorphic implementation functions.Tom Lane2003-07-017-77/+397
| | | | | | It also works to create a non-polymorphic aggregate from polymorphic functions, should you want to do that. Regression test added, docs still lacking. By Joe Conway, with some kibitzing from Tom Lane.
* Dept. of second thoughts: supporting inlining of polymorphic SQL functionsTom Lane2003-07-011-11/+34
| | | | | takes only a few more lines of code than preventing it, so might as well support it.
* STRENGH => STRENGTH, per Jon Jensen.Tom Lane2003-07-011-2/+2
|
* Department of second thoughts: even if we can't run the full parser onTom Lane2003-07-011-10/+18
| | | | | a SQL function with polymorphic inputs, we can at least run the raw parser to catch silly syntactic errors.
* SQL functions can have arguments and results declared ANYARRAY orTom Lane2003-07-016-53/+145
| | | | | | | | ANYELEMENT. The effect is to postpone typechecking of the function body until runtime. Documentation is still lacking. Original patch by Joe Conway, modified to postpone type checking by Tom Lane.
* Change EXECUTE INTO to CREATE TABLE AS EXECUTE.Peter Eisentraut2003-07-012-12/+24
|
* Add GUC option log_error_verbosity to control which fields of errorTom Lane2003-06-303-31/+95
| | | | | | reports get put into the postmaster log. Options are TERSE, DEFAULT, VERBOSE, with the same behavior as implemented on the client side in libpq.
* Restructure building of join relation targetlists so that a join planTom Lane2003-06-2911-208/+310
| | | | | | | | | | | | | | node emits only those vars that are actually needed above it in the plan tree. (There were comments in the code suggesting that this was done at some point in the dim past, but for a long time we have just made join nodes emit everything that either input emitted.) Aside from being marginally more efficient, this fixes the problem noted by Peter Eisentraut where a join above an IN-implemented-as-join might fail, because the subplan targetlist constructed in the latter case didn't meet the expectation of including everything. Along the way, fix some places that were O(N^2) in the targetlist length. This is not all the trouble spots for wide queries by any means, but it's a step forward.
* Information schema views for group privileges, some corrections on columnPeter Eisentraut2003-06-291-26/+198
| | | | privileges.
* It was comparing the wrong pair of columns, which triggered the previouslyPeter Eisentraut2003-06-291-2/+2
| | | | mentioned bug.
* Add missing PO files from last commit.Peter Eisentraut2003-06-292-0/+15295
|
* Support expressions of the form 'scalar op ANY (array)' andTom Lane2003-06-2916-50/+540
| | | | | | | | | | 'scalar op ALL (array)', where the operator is applied between the lefthand scalar and each element of the array. The operator must yield boolean; the result of the construct is the OR or AND of the per-element results, respectively. Original coding by Joe Conway, after an idea of Peter's. Rewritten by Tom to keep the implementation strictly separate from subqueries.
* Merge PO file updates from 7.3 branch.Peter Eisentraut2003-06-284-8114/+10113
|
* Make information schema aware of arrays.Peter Eisentraut2003-06-281-18/+155
| | | | | The view element_types is currently not functional, awaiting some fixes in the planner (reported on -hackers).
* Add is_superuser parameter reporting, soon to be used by psql.Tom Lane2003-06-274-18/+47
|
* Fix compile warnings.Tom Lane2003-06-275-5/+10
|
* First batch of object rename commands.Peter Eisentraut2003-06-2727-268/+1077
|
* Create real array comparison functions (that use the element datatype'sTom Lane2003-06-2710-474/+1082
| | | | | | | | | | | | | | | | comparison functions), replacing the highly bogus bitwise array_eq. Create a btree index opclass for ANYARRAY --- it is now possible to create indexes on array columns. Arrange to cache the results of catalog lookups across multiple array operations, instead of repeating the lookups on every call. Add string_to_array and array_to_string functions. Remove singleton_array, array_accum, array_assign, and array_subscript functions, since these were for proof-of-concept and not intended to become supported functions. Minor adjustments to behavior in some corner cases with empty or zero-dimensional arrays. Joe Conway (with some editorializing by Tom Lane).
* Add comment pointing out that XLByteToPrevSeg macro is not broken.Tom Lane2003-06-261-2/+3
|
* Back out array mega-patch.Bruce Momjian2003-06-2522-1973/+582
| | | | Joe Conway
* In ISO datestyle, never emit just HH:MM, always emit HH:MM:SS orTom Lane2003-06-251-6/+4
| | | | | | | | HH:MM:SS.SSS... when there is a nonzero part-of-a-day field in an interval value. The seconds part used to be suppressed if zero, but there's no equivalent behavior for timestamp, and since we're modeling this format on timestamp it's probably wrong. Per complaint and patch from Larry Rosenman.
* Don't generate 'zero' typeids in the output from gen_cross_product.Tom Lane2003-06-251-49/+76
| | | | | | This is no longer necessary or appropriate since we don't use zero typeid as a wildcard anymore, and it fixes a nasty performance problem with functions with many parameters. Per recent example from Reuven Lerner.
* Fix up JOIN .. USING with domainsBruce Momjian2003-06-251-3/+3
| | | | | | | | | | | | | | | | The attached fixes select_common_type() to support the below case: create table t1( c1 int); create domain dom_c1 int; create table t2(c1 dom_c1); select * from t1 join t2 using( c1 ); I didn't see a need for maintaining the domain as the preferred type. A simple getBaseType() call on all elements of the list seems to be enough. -- Rod Taylor <rbt@rbt.ca>
* UPDATE ... SET <col> = DEFAULTBruce Momjian2003-06-256-42/+74
| | | | Rod Taylor
* Updated the pg_get_constraintdef() to use conbin. Update pg_dump to useBruce Momjian2003-06-252-4/+64
| | | | | | pg_get_constraintdef() for >= 70400. Rod Taylor <rbt@rbt.ca>
* Includes:Bruce Momjian2003-06-256-19/+192
| | | | | | | | | | | | | | | | - LIKE <subtable> [ INCLUDING DEFAULTS | EXCLUDING DEFAULTS ] - Quick cleanup of analyze.c function prototypes. - New non-reserved keywords (INCLUDING, EXCLUDING, DEFAULTS), SQL 200X Opted not to extend for check constraints at this time. As per the definition that it's user defined columns, OIDs are NOT inherited. Doc and Source patches attached. -- Rod Taylor <rbt@rbt.ca>
* > This change (I'm sure this will wrap poorly -- sorry):Bruce Momjian2003-06-251-1/+8
| | | | | | | | | | | | | | | | | | | > http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/libpq/pqcomm.h.diff?r1=1.85&r2=1.86 > > modified SockAddr, but no corresponding change was made here > (fe-auth.c:612): > > case AUTH_REQ_KRB5: > #ifdef KRB5 > if (pg_krb5_sendauth(PQerrormsg, conn->sock, &conn->laddr.in, > &conn->raddr.in, > hostname) != STATUS_OK) > > It's not obvious to me what the change ought to be though. This patch should hopefully fix both kerberos 4 and 5. Kurt Roeckx
* Here's a small patch to pg_hba.conf.sample that explains the use of CIDRBruce Momjian2003-06-251-4/+10
| | | | | | addresses. Andrew Dunstan
* >> If a transaction marks a tuple for update and later commits withoutBruce Momjian2003-06-252-69/+84
| | | | | | | | | | | | | | | >> actually having updated the tuple, [...] can we simply >> set the HEAP_XMAX_INVALID hint bit of the tuple? > >AFAICS this is a reasonable thing to do. Thanks for the confirmation. Here's a patch which also contains some more noncritical changes to tqual.c: . make code more readable by introducing local variables for xvac . no longer two separate branches for aborted and crashed. The actions were the same in all cases. Manfred Koizar
* In an attempt to simplify my life I'm submitting this patch thatBruce Momjian2003-06-241-69/+70
| | | | | | | | restructures the deferred trigger queue. The fundamental change is to put all the static variables to hold the deferred triggers in a single structure. Alvaro Herrera
* Array mega-patch.Bruce Momjian2003-06-2422-582/+1973
| | | | Joe Conway
* Prevent compiler warning from sprintf in recent ipv6 patch.Bruce Momjian2003-06-241-3/+3
|
* Add ipv6 address parsing support to 'inet' and 'cidr' data types.Bruce Momjian2003-06-243-286/+824
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression tests for IPv6 operations added. Documentation updated to document IPv6 bits. Stop treating IPv4 as an "unsigned int" and IPv6 as an array of characters. Instead, always use the array of characters so we can have one function fits all. This makes bitncmp(), addressOK(), and several other functions "just work" on both address families. add family() function which returns integer 4 or 6 for IPv4 or IPv6. (See examples below) Note that to add this new function you will need to dump/initdb/reload or find the correct magic to add the function to the postgresql function catalogs. IPv4 addresses always sort before IPv6. On disk we use AF_INET for IPv4, and AF_INET+1 for IPv6 addresses. This prevents the need for a dump and reload, but lets IPv6 parsing work on machines without AF_INET6. To select all IPv4 addresses from a table: select * from foo where family(addr) = 4 ... Order by and other bits should all work. Michael Graff
* Revise hash join and hash aggregation code to use the same datatype-Tom Lane2003-06-229-142/+296
| | | | | | | | specific hash functions used by hash indexes, rather than the old not-datatype-aware ComputeHashFunc routine. This makes it safe to do hash joining on several datatypes that previously couldn't use hashing. The sets of datatypes that are hash indexable and hash joinable are now exactly the same, whereas before each had some that weren't in the other.
* Fix for extended-query protocol: in event of error, backend was issuingTom Lane2003-06-201-5/+7
| | | | | a ReadyForQuery (Z message) immediately and then another one after the Sync message arrives. Suppress the first one to make it work per spec.
* Disallow dollar sign in operator names, instead allow it as a non-firstTom Lane2003-06-191-8/+8
| | | | | | | character in identifiers. The first change eliminates the current need to put spaces around parameter references, as in "x<=$2". The second change improves compatibility with Oracle and some other RDBMSes. This was discussed and agreed to back in January, but did not get done.
* Make FLOAT(p) measure the precision p in bits, not decimal digits, toTom Lane2003-06-171-6/+6
| | | | | match the SQL standard. Document FLOAT and FLOAT(p) notations in datatype.sgml. Per recent pghackers discussion.
* More information schema views.Peter Eisentraut2003-06-171-22/+309
|
* Fix bugs in interval-to-time conversion: HAVE_INT64_TIMESTAMP case did notTom Lane2003-06-161-7/+20
| | | | work at all, and neither case behaved sanely for negative intervals.
* Allow GROUP BY, ORDER BY, DISTINCT targets to be unknown literals,Tom Lane2003-06-165-36/+99
| | | | | | | | | silently resolving them to type TEXT. This is comparable to what we do when faced with UNKNOWN in CASE, UNION, and other contexts. It gets rid of this and related annoyances: select distinct f1, '' from int4_tbl; ERROR: Unable to identify an ordering operator '<' for type unknown This was discussed many moons ago, but no one got round to fixing it.
* Adjust nestloop-with-inner-indexscan plan generation so that we catchTom Lane2003-06-157-134/+264
| | | | | | | some cases of redundant clauses that were formerly not caught. We have to special-case this because the clauses involved never get attached to the same join restrictlist and so the existing logic does not notice that they are redundant.
* Replace cryptic 'Unknown kind of return type' messages with somethingTom Lane2003-06-154-10/+17
| | | | hopefully a little more useful.