| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
incorrect use of StrNCpy.
|
|
|
|
| |
leading to postmaster accepting args 1 shorter than it had room for.
|
| |
|
|
|
|
|
|
|
|
|
| |
had already been transformed. This led to failure in examples like
UPDATE table SET fld = (SELECT ...). Repair this, and revise the
comments to explain that transformExpr has to be robust against this
condition. Someday we might want to fix the callers so that
transformExpr is never invoked on its own output, but that someday
is not today.
|
|
|
|
|
|
|
|
|
|
| |
In function parsing, try for an actual function of the given name and
input types before trying to interpret the function call as a type
coercion request, rather than after. Before, a function that had the
same name as a type and operated on a binary-compatible type wouldn't
get invoked. Also, cross-pollinate between func_select_candidates and
oper_select_candidates to ensure that they use as nearly the same
resolution rules as possible. A few other minor code cleanups too.
|
|
|
|
| |
actually returns the type it is named for.
|
|
|
|
|
|
| |
problem could be lack of parentheses. This addresses cases like
X UserOp UserOp Y, which will be parsed as (X UserOp) UserOp Y,
whereas what likely was wanted was X UserOp (UserOp Y).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
16-Mar-00: trailing + or - is not part of the operator unless the operator
also contains characters not present in SQL92-defined operators. This
solves the 'X=-Y' problem without unduly constraining users' choice of
operator names --- in particular, no existing Postgres operator names
become invalid.
Also, remove processing of // comments, as agreed in the same thread.
|
|
|
|
|
| |
prefix operator :-(. Bad enough that we have no implementation of
unary plus, but at least with this fix the grammar will take it.
|
| |
|
|
|
|
| |
a config.h #define, and the runtime value can be controlled via SET.
|
|
|
|
|
|
| |
running gcc and HP's cc with warnings cranked way up. Signed vs unsigned
comparisons, routines declared static and then defined not-static,
that kind of thing. Tedious, but perhaps useful...
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
wrong pointer.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
the pain of updating apps to 7.0. Should we also translate some of
the 'datetime_foo' functions that exist in 6.* ?
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Please
> apply the attached patch to
>
> backend/port/qnx4
>
> Andreas Kardos
>
|
|
|
|
|
| |
of tuples we are going to retrieve from a sub-SELECT. Must have been
half asleep when I did this code the first time :-(
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
set of SQL-standard type names that we accept.
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
| |
fireRIRonSubselect was invoked twice at each subselect, leading to an
exponential amount of wasted effort.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 ...)
|
|
|
|
|
| |
category STRING. Also, if UNKNOWNOID is passed in, return UNKNOWN_TYPE
not USER_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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
nodes. The former version failed to check permissions of relations that
were referenced in second and later clauses of UNIONs, and it did not
check permissions of tables referenced via inheritance.
|
|
|
|
|
|
| |
They are #ifdef'd.
Add -D_DROP_COLUMN_HACK__ compile option
to evaluate it.
|
|
|
|
| |
freed wholesale by AllocSetReset() is overwritten too.
|
|
|
|
| |
VACUUM.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) adds NetBSD shared lib support on both ELF and a.out platforms
2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
Makefile.global. This makes it much easier to build stuff in
the source tree after you've already installed the libraries.
3) adds TEMPLATEDIR in Makefile.global that indicates where the
database templates are stored. This separates the template files
from real libraries that are installed in $(LIBDIR).
4) changes include order of <readline/readline.h> and <readline.h>.
The latest GNU readline installs its headers under a readline
subdirectory.
In addition to applying the patch below the following files need to be copied:
backend/port/dynloader:
bsd.h -> netbsd.h
bsd.c -> netbsd.c
include/port:
bsd.h -> netbsd.h
makefiles:
Makefile.bsd -> Makefile.netbsd
It would be great to see this incorporated into the source tree before
the 7.0 release is cut.
Thanks!
-- Johnny C. Lam <lamj@stat.cmu.edu>
|