| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
the pain of updating apps to 7.0. Should we also translate some of
the 'datetime_foo' functions that exist in 6.* ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
They are #ifdef'd.
Add -D_DROP_COLUMN_HACK__ compile option
to evaluate it.
|
|
|
|
| |
parameters.
|
|
|
|
|
|
| |
as independent clauses in the grammar. analyze.c takes care of putting
the data where it belongs and complaining about invalid combinations.
Also, make TEMP (and TEMPORARY) non-reserved words.
|
|
|
|
|
|
|
| |
integrity triggers to after statement allways. Ignores
deferred state now, closer to SQL3 semantics.
Jan
|
|
|
|
| |
correctly (the lztext value will be promoted to text automatically).
|
|
|
|
|
|
|
| |
failures. Fix some outright bugs too, including a reference to
uninitialized memory that would cause failures like this one:
select -('1234567890.1234567'::text);
ERROR: Unable to locate type oid 2139062143 in catalog
|
|
|
|
|
|
|
|
|
|
|
| |
such as bpchar(char_expression, N), and pull out the attrtypmod that
the function is coercing to. This allows correct deduction of the
column type in examples such as
CREATE VIEW v AS SELECT f1::char(8) FROM tbl;
Formerly we labeled v's column as char-of-unknown-length not char(8).
Also, this change causes the parser not to insert a redundant length
coercion function if the user has explicitly casted an INSERT or UPDATE
expression to the right length.
|
|
|
|
| |
refer to the single-byte char type. 7.0 was taking it as bpchar(1).
|
|
|
|
| |
from previous release.
|
|
|
|
|
|
|
|
| |
and produce either FLOAT8 or NUMERIC output depending on whether the
value fits in a float8 or not. This is almost back to the way the
code was before I changed T_Float, but there is a critical difference:
now, when a numeric constant doesn't fit in float8, it will be treated
as type NUMERIC instead of type UNKNOWN.
|
|
|
|
|
| |
failed to negate a negative value back to positive, so '- - 123.45'
did the wrong thing.
|
|
|
|
|
|
|
|
| |
integers) to be strings instead of 'double'. We convert from string form
to internal representation only after type resolution has determined the
correct type for the constant. This eliminates loss-of-precision worries
and gets rid of the change in behavior seen at 17 digits with the
previous kluge.
|
|
|
|
|
|
|
| |
as representing a type coercion request in more cases than we did before.
It will work now whenever no underlying function is required, ie if the
coercion is binary-compatible or if the argument is a previously untyped
string constant. Otherwise, you still need a real function to exist.
|
|
|
|
|
|
|
|
|
|
| |
represent the result of a binary-compatible type coercion. At runtime
it just evaluates its argument --- but during type resolution, exprType
will pick up the output type of the RelabelType node instead of the type
of the argument. This solves some longstanding problems with dropped
type coercions, an example being 'select now()::abstime::int4' which
used to produce date-formatted output, not an integer, because the
coercion to int4 was dropped on the floor.
|
|
|
|
|
|
|
|
|
|
|
| |
agg_select_candidate, which could cause them to keep more candidates
than they should and thus fail to select a single match. I had
previously fixed the identical bug in oper_select_candidate, but
didn't realize that the same error was repeated over here.
Also, repair func_select_candidate's curious notion that it could
scribble on the input type-OID vector. That was causing failure to
apply necessary type coercion later on, leading to malfunction of
examples such as select date('now').
|
|
|
|
|
|
|
|
|
| |
a few bricks shy of a load concerning knowing all the date/time types.
This is real bad because it interferes with func_select_candidate()'s
willingness to disambiguate functions --- func_select_candidate() will
punt unless all the available choices have the same type category.
I think this whole mechanism needs redesigned, but in the meantime
this is a needed patch.
|
|
|
|
|
| |
Revised code probably accepts some silly combinations, but that's better
than not accepting valid ones.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interpret a column name as an output column alias (targetlist AS name),
ather than a real column name as it ought to. According to the spec,
only ORDER BY should look at output column names. I left in GROUP BY's
willingness to use an output column number ('GROUP BY 2'), even though
this is also contrary to the spec --- again, only ORDER BY is supposed
to accept that. But there is no possible reason to want to GROUP BY
an integer constant, so keeping this old behavior won't break any
SQL-compliant queries. DISTINCT ON will behave the same as GROUP BY.
Change numerology regress test, which depended on the incorrect
behavior.
|
|
|
|
| |
compliance. Wish they were all that easy...
|
| |
|
|
|
|
|
|
| |
equivalent now, which should make Windows and Mac clients happier.
Also fix failure to handle SQL comments between segments of a multiline
quoted literal.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transform datetime and timespan into timestamp and interval.
Deprecate datetime and timespan, though translate to new types in gram.y.
Transform all datetime and timespan catalog entries into new types.
Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
routines for all date/time types.
date.{h,c} now deals with date, time types.
timestamp.{h,c} now deals with timestamp, interval types.
nabstime.{h,c} now deals with abstime, reltime, tinterval types.
Make NUMERIC a known native type for purposes of type coersion. Not tested.
|
|
|
|
| |
doesn't seem to be used at the moment, but as long as I'm looking at it...
|
| |
|
|
|
|
|
|
|
| |
SELECT a FROM t1 tx (a);
Allow join syntax, including queries like
SELECT * FROM t1 NATURAL JOIN t2;
Update RTE structure to hold column aliases in an Attr structure.
|
|
|
|
|
|
| |
Add "SESSION_USER" as SQL92 keyword; equivalent to CURRENT_USER for now.
Implement column aliases (aka correlation names) and more join syntax.
Fix up indenting and tabbing.
|
| |
|
|
|
|
| |
Jan
|
|
|
|
|
|
| |
FOREIGN KEY constraint during CREATE TABLE. Tnx to Stephan.
Jan
|
|
|
|
|
|
|
|
|
|
|
| |
Added constraint dumping capability to pg_dump (also from Stephan)
Fixed DROP TABLE -> RelationBuildTriggers: 2 record(s) not found for rel
error.
Fixed little error in gram.y I made the last days.
Jan
|
|
|
|
|
|
| |
actions performed by analyse.c when creating table constraints.
Jan
|
|
|
|
|
|
|
| |
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SELECT DISTINCT ON (expr [, expr ...]) targetlist ...
and there is a check to make sure that the user didn't specify an ORDER BY
that's incompatible with the DISTINCT operation.
Reimplement nodeUnique and nodeGroup to use the proper datatype-specific
equality function for each column being compared --- they used to do
bitwise comparisons or convert the data to text strings and strcmp().
(To add insult to injury, they'd look up the conversion functions once
for each tuple...) Parse/plan representation of DISTINCT is now a list
of SortClause nodes.
initdb forced by querytree change...
|
|
|
|
|
|
| |
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
to all files copyright Regents of Berkeley. Man, that's a lot of files.
|
|
|
|
|
|
| |
Made type equivalency apply to aggregates (TODO item)
Fixed parsing bug in psql
Reverted some stupid options changes I made to pg_dump
|
|
|
|
|
| |
Since --with-mb has been removed from configure, previous
messages were not appropriate.
|
|
|
|
|
|
|
| |
updated date/time types doc
fixed small psql bug
removed libpq code that lower-cased db names
make notice when long identifier is truncated
|
| |
|
| |
|