Commit Graph

6644 Commits

Author SHA1 Message Date
Tom Lane 6a4b7d83f3 Tweak horology regress test to ensure platform-independent ordering of
results in conversions tests.  Update horology-no-DST-before-1970.out.
2000-03-16 17:03:41 +00:00
Bruce Momjian a7e0ee9a0e Since it has been confirmed working on the bugs list, please apply the
attached patch.

Andreas Kardos
2000-03-16 15:35:34 +00:00
Bruce Momjian 3e4708c45c libpq++ Makefile uses -DDEBUG to turn on debugging trace to
/tmp/trace.out.
However, elog.h uses DEBUG as a log-level flag.  As a result, tracing is
turned on even if the libpq++.so is built with DEBUG commented out in
the Makefile.

This patch changes libpq++ to use DEBUGFILE instead (which is not
defined anywhere else).

Oliver Elphick
2000-03-16 15:34:36 +00:00
Thomas G. Lockhart 1f3122e26d Fix typo (introduced by xemacs markup normalization) in the syntax summary. 2000-03-16 14:39:30 +00:00
Thomas G. Lockhart 9e7166096e Support full POSIX-style time zone: EST+3, PST-3, etc.
We probably support a superset of the spec, but I don't have the spec
 to confirm this.
Update regression tests to include tests for this format.
2000-03-16 14:38:42 +00:00
Thomas G. Lockhart 90c4bab7ea Support full POSIX-style time zone: EST+3, PST-3, etc.
We probably support a superset of the spec, but I don't have the spec
 to confirm this.
Update regression tests to include tests for this format.
Update geometry.out with results from Linux RH 5.2 system
(for last decimal place).
2000-03-16 14:38:31 +00:00
Thomas G. Lockhart ff0a420c92 Support full POSIX-style time zone: EST+3, PST-3, etc.
We probably support a superset of the spec, but I don't have the spec
 to confirm this.
Update regression tests to include tests for this format.
Fix single-space typo in printed message in regress.sh.
2000-03-16 14:37:33 +00:00
Tatsuo Ishii 0e1043b760 Fixes for char_length() change. 2000-03-16 11:55:43 +00:00
Tatsuo Ishii 805e0c4589 Fixes for char_length() changes. 2000-03-16 11:53:16 +00:00
Tom Lane d14c8aab99 Turns out that Mazurkiewicz's gripe about 'function inheritance' is
actually a type-coercion problem.  If you have a function defined on
class A, and class B inherits from A, then the function ought to work
on class B as well --- but coerce_type didn't know that.  Now it does.
2000-03-16 06:35:07 +00:00
Tatsuo Ishii d4a2c86eaf Fix for char_length() changes 2000-03-16 05:07:21 +00:00
Tom Lane e64a331179 Fix some (more) problems with subselects in rules. Rewriter failed to
mark query as having subselects if a subselect was added from a rule
WHERE condition (as opposed to a rule action).  Also, fix adjustment
of varlevelsup so that it actually has some prospect of working when
inserting an expression containing a subselect into a subquery.
2000-03-16 03:23:18 +00:00
Bruce Momjian 4a3a1e2cf1 Hi,
small changes in formatting.c code (better memory usage ...etc.) and
better
to_char's cache (will fastly for more to_char()s in one query).

(It is probably end of to_char() development in 7.0 cycle.)

                                                Karel
2000-03-16 01:35:41 +00:00
Tom Lane 6358e654ca Update comment obsoleted by Thomas's latest fixes. 2000-03-15 23:42:14 +00:00
Tom Lane 1763a7c1ea Tweak GROUP BY so that it will still accept result-column names, but only
after trying to resolve the item as an input-column name.  This allows us
to be compliant with the SQL92 spec for queries that fall within the spec,
while still accepting the same out-of-spec queries as 6.5 did.  You'll only
lose if there is an output column name that is the same as an input
column name, but doesn't refer to the same value.  7.0 will interpret
such a GROUP BY spec differently than 6.5 did.  No way around that, because
6.5 was clearly not spec compliant.
2000-03-15 23:31:19 +00:00
Michael Meskes 8e0790519a *** empty log message *** 2000-03-15 19:09:10 +00:00
Tom Lane 77f4885393 Fix busted TRANSLATE() code --- it coredumped due to pfree()'ing the
wrong pointer.
2000-03-15 17:24:18 +00:00
Bruce Momjian 795878d2dd Fix " to ' on lobj docs. 2000-03-15 17:07:41 +00:00
Tom Lane 84b9507f78 Remove another incorrect UserAbortTransactionBlock() call. 2000-03-15 07:02:56 +00:00
Tom Lane fe189063b8 Remove gratuitous and incorrect begin/commit transaction calls in
CREATE DB/DROP DB.  If you didn't think they were wrong, try what
happens when you compile with -DCLOBBER_FREED_MEMORY --- database
name displayed in error messages is trashed, because transaction
abort freed it.  Also, remove trailing periods in error messages,
per our prevailing style.
2000-03-15 06:50:51 +00:00
Tom Lane c397e264db Fix a couple of missed changes in expected results. 2000-03-15 06:24:58 +00:00
Tom Lane ce3b489b97 Add 'datetime' -> 'timestamp' conversion to xlateSqlFunc() to ease
the pain of updating apps to 7.0.  Should we also translate some of
the 'datetime_foo' functions that exist in 6.* ?
2000-03-15 05:31:55 +00:00
Tom Lane a50f2fd76e Repair unintentional damage to MULTIBYTE code. 2000-03-14 23:59:23 +00:00
Tom Lane 34235a295b Cache fmgr lookup data for index's getnext() function in IndexScanDesc,
so that the fmgr lookup only has to happen once per index scan and not
once per tuple.  Seems to save 5% or so of CPU time for an indexscan.
2000-03-14 23:52:01 +00:00
Thomas G. Lockhart 6456810078 Implement column aliases on views "CREATE VIEW name (collist)".
Implement TIME WITH TIME ZONE type (timetz internal type).
Remap length() for character strings to CHAR_LENGTH() for SQL92
 and to remove the ambiguity with geometric length() functions.
Keep length() for character strings for backward compatibility.
Shrink stored views by removing internal column name list from visible rte.
Implement min(), max() for time and timetz data types.
Implement conversion of TIME to INTERVAL.
Implement abs(), mod(), fac() for the int8 data type.
Rename some math functions to generic names:
 round(), sqrt(), cbrt(), pow(), etc.
Rename NUMERIC power() function to pow().
Fix int2 factorial to calculate result in int4.
Enhance the Oracle compatibility function translate() to work with string
 arguments (from Edwin Ramirez).
Modify pg_proc system table to remove OID holes.
2000-03-14 23:06:59 +00:00
Thomas G. Lockhart ce543b2121 Write up new TIME WITH TIME ZONE type. 2000-03-14 22:52:53 +00:00
Tom Lane c40a0a1b52 Marginal performance improvement in LockBuffer --- calculate address
of BufferLocks[] entry just once.  Seems to save 10% or so of the
routine's runtime, which'd not be worth worrying about if it weren't
such a hotspot.
2000-03-14 22:46:27 +00:00
Bruce Momjian e02cde4b0a > I have improved the System V semaphore emulation of the QNX4 port.
Please
> apply the attached patch to
>
> backend/port/qnx4
>
> Andreas Kardos
>
2000-03-14 18:12:06 +00:00
Bruce Momjian e3fb902991 > To make PostgreSQL compilable on Digital Unix I had to modify the
alpha_cc
> template file. Patch attached.
>
> Andreas Kardos
>
2000-03-14 16:00:22 +00:00
Bruce Momjian 5e3eda41db > Here is an extension of the regression test suite for Digital Unix
(Alpha).
>
> Andreas Kardos
2000-03-14 15:59:39 +00:00
Bruce Momjian 27b3f7c4e0 > Here is an extension of the regression test suite for Digital Unix
(Alpha).
>
2000-03-14 15:55:54 +00:00
Bruce Momjian ab9b4d8086 > The snprintf stuff in interfaces/ecpg/preproc/Makefile.in is broken.
Please
> apply the attached patch.
>
> Andreas Kardos
>
>
2000-03-14 15:55:17 +00:00
Tatsuo Ishii 44a9639123 Detect postmaster being ready by calling psql -l rathern than
checking postmaster.pid. It's not enough to check the existence
of postmaster.pid since DB recovery might be running.
2000-03-14 08:34:47 +00:00
Tom Lane 6217a8c7ba Fix some bogosities in the code that deals with estimating the fraction
of tuples we are going to retrieve from a sub-SELECT.  Must have been
half asleep when I did this code the first time :-(
2000-03-14 02:23:15 +00:00
Peter Eisentraut a1642089bf Fixed deficiency where an unterminated (no semicolon) command at end of
psql script would be dropped silently.
2000-03-13 13:46:32 +00:00
Tom Lane e631df3c1b Extend numeric_round and numeric_trunc to accept negative scale inputs
(ie, allow rounding to occur at a digit position left of the decimal
point).  Apparently this is how Oracle handles it, and there are
precedents in other programming languages as well.
2000-03-13 02:31:13 +00:00
Tom Lane 57cf09591b Remove unnecessary limitations on lengths of bpchar and varchar constants.
Since we detect oversize tuples elsewhere, I see no reason not to allow
string constants that are 'too long' --- after all, they might never get
stored in a tuple at all.
2000-03-13 01:54:07 +00:00
Tom Lane a84c95634e Performance improvement for lexing long strings: increase flex's
YY_READ_BUF_SIZE, which turns out to have nothing to do with buffer size.
It's just a totally arbitrary upper limit on how much data myinput() is
asked for at one time.
2000-03-13 01:52:06 +00:00
Tom Lane 7cb253ed19 Somehow, the variant NATIONAL CHAR [ VARYING ] was missing from the
set of SQL-standard type names that we accept.
2000-03-12 20:09:41 +00:00
Tom Lane 1879175b18 Fix performance bug in constant-expression simplifier. After finding
that the inputs to a given operator can be recursively simplified to
constants, it was evaluating the operator using the op's *original*
(unsimplified) arg list, so that any subexpressions had to be evaluated
again.  A constant subexpression at depth N got evaluated N times.
Probably not very important in practical situations, but it made us look
real slow in MySQL's 'crashme' test...
2000-03-12 19:32:06 +00:00
Tom Lane ef3386affe Fix performance problem in fireRIRonSubselect: with nested subqueries,
fireRIRonSubselect was invoked twice at each subselect, leading to an
exponential amount of wasted effort.
2000-03-12 18:57:05 +00:00
Tom Lane 117fa25ae1 Clean up grammar's handling of NULL in expressions: a_expr_or_null is
gone, replaced by plain a_expr.  The few places where we needed to
distinguish NULL from a_expr are now handled by tests inside the actions
rather than by separate productions.  This allows us to accept queries
like 'SELECT 1 + NULL' without requiring parentheses around the NULL.
2000-03-12 00:39:52 +00:00
Tom Lane e8be8ffaf0 Further tweaking of logic that decides when to materialize an uncorrelated
subplan: do it if subplan has subplans itself, and always do it if the
subplan is an indexscan.  (I originally set it to materialize an indexscan
only if the indexqual is fairly selective, but I dunno what I was
thinking ... an unselective indexscan is still expensive ...)
2000-03-11 23:53:41 +00:00
Tom Lane bbe1ff7404 Make TypeCategory think that NAME is a member of type
category STRING.  Also, if UNKNOWNOID is passed in, return UNKNOWN_TYPE
not USER_TYPE.
2000-03-11 23:19:50 +00:00
Tom Lane c9f287e49b Further fixes for bogus list-slinging, scribbling on input, etc in type
coercion code.  I'm beginning to wonder why we have separate candidate
selection routines for functions, operators, and aggregates --- shouldn't
this code all be unified?  But meanwhile,
	SELECT 'a' LIKE 'a';
finally works; the code for dealing with unknown input types for operators
was pretty busted.
2000-03-11 23:17:47 +00:00
Peter Eisentraut 1d75298176 Karel Zakr's revised patch to fix psql prompt for local host connections. 2000-03-11 13:56:24 +00:00
Tom Lane 73f5b0847b exec_simple_check_plan() must not allow a plan having initPlans or
subPlans to be considered 'simple'.  This fixes reported problem with
'return exists (select 1 from foo);' in plpgsql function.
2000-03-11 06:19:00 +00:00
Tom Lane f3a9d75ebd Finish cleaning up backend's handling of /* ... */ and -- comments,
per pghackers discussion around 20-Feb.  Also add specific error messages
for unterminated comments and unterminated quoted strings.  These things
are nonissues for input coming from psql, but they do matter for input
coming from other front ends.
2000-03-11 05:14:06 +00:00
Tom Lane 370186e807 Update libpq documentation for PQconndefaults() change. Add section
about thread-safeness of the library.
2000-03-11 03:09:28 +00:00
Tom Lane a71daab4b4 Change PQconndefaults() to return a malloc'd array, instead of a static
array.  This allows processing of conninfo strings to be made thread-safe,
at the cost of a small memory leak in applications that use
PQconndefaults() and are not updated to free the returned array via
the new PQconninfoFree() function.  But PQconndefaults() is probably not
used very much, so this seems like a good compromise.
2000-03-11 03:08:37 +00:00