| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
unnecessary checks for complex grouping expressions: we cannot check
whether the expressions are simple Vars until after we apply
flatten_join_alias_vars, because in the case of FULL JOIN that routine
can introduce non-Var expressions. Per example from Joel Knight.
|
|
|
|
|
|
| |
patch: a 3-value enum was mistakenly assigned directly to a 'bool'
in transformCreateStmt(). Along the way, change makeObjectName()
to be static, as it isn't used outside analyze.c
|
|
|
|
|
|
|
|
|
| |
for sure...). Rather than relying on the query context of a rangetable
entry to identify what permissions it wants checked, store a full AclMode
mask in each RTE, and check exactly those bits. This allows an RTE
specifying, say, INSERT privilege on a view to be copied into a derived
UPDATE query without changing meaning. Per recent discussion thread.
initdb forced due to change of stored rule representation.
|
|
|
|
|
|
|
| |
expressions supported by CREATE SCHEMA.
Also added the beginning of some regression tests for CREATE SCHEMA;
plenty more work is needed here.
|
|
|
|
|
|
|
|
|
|
| |
intended to allow application authors to insulate themselves from
changes to the default value of 'default_with_oids' in future releases
of PostgreSQL.
This patch also fixes a bug in the earlier implementation of the
'default_with_oids' GUC variable: code in gram.y should not examine
the value of GUC variables directly due to synchronization issues.
|
|
|
|
| |
TRANSACTION.
|
|
|
|
|
|
|
|
| |
pointer type when it is not necessary to do so.
For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.
|
|
|
|
|
|
|
|
|
| |
parameters to be declared with names. pg_proc has a column to store
names, and CREATE FUNCTION can insert data into it, but that's all as
yet. I need to do more work on the pg_dump and plpgsql portions of the
patch before committing those, but I thought I'd get the bulky changes
in before the tree drifts under me.
initdb forced due to pg_proc change.
|
|
|
|
| |
readability and for the sake of consistency with the rest of analyze.c
|
|
|
|
|
|
| |
does not affect UNKNOWN-type literals or Params. This fixes the recent
complaint about count('x') being broken, and improves consistency in
a few other respects too.
|
|
|
|
|
|
|
|
| |
proposal for eventually deprecating OIDs on user tables that I posted
earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
WITHOUT OIDS when dumping a table. The documentation has been updated.
Neil Conway
|
| |
|
|
|
|
|
|
| |
tree for CYCLE option; don't assume zeros are invalid values for sequence
fields other than increment_by; don't reset cache_value when not told to;
simplify code for testing whether to apply defaults.
|
|
|
|
|
|
|
|
|
| |
large objects. Dump all these in pg_dump; also add code to pg_dump
user-defined conversions. Make psql's large object code rely on
the backend for inserting/deleting LOB comments, instead of trying to
hack pg_description directly. Documentation and regression tests added.
Christopher Kings-Lynne, code reviewed by Tom
|
|
|
|
|
|
|
|
|
|
| |
pghackers proposal of 8-Nov. All the existing cross-type comparison
operators (int2/int4/int8 and float4/float8) have appropriate support.
The original proposal of storing the right-hand-side datatype as part of
the primary key for pg_amop and pg_amproc got modified a bit in the event;
it is easier to store zero as the 'default' case and only store a nonzero
when the operator is actually cross-type. Along the way, remove the
long-since-defunct bigbox_ops operator class.
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the 'strategy map' code, which was a large amount of mechanism
that no longer had any use except reverse-mapping from procedure OID to
strategy number. Passing the strategy number to the index AM in the
first place is simpler and faster.
This is a preliminary step in planned support for cross-datatype index
operations. I'm committing it now since the ScanKeyEntryInitialize()
API change touches quite a lot of files, and I want to commit those
changes before the tree drifts under me.
|
|
|
|
| |
like the next higher one.
|
|
|
|
|
|
|
|
|
|
|
| |
regression=# select 1 from tenk1 ta cross join tenk1 tb for update;
ERROR: no relation entry for relid 3
7.3 said "SELECT FOR UPDATE cannot be applied to a join", which was better
but still wrong, considering that 7.2 took the query just fine. Fix by
making transformForUpdate() ignore JOIN and other special RTE types,
rather than trying to mark them FOR UPDATE. The actual error message now
only appears if you explicitly name the join in FOR UPDATE.
|
|
|
|
| |
behavior reported by Martin Marques.
|
|
|
|
|
|
|
|
| |
misscanning of this construct:
SELECT ''hello world''
-- SELECT ''goodbye world''
::text;
|
|
|
|
|
|
| |
one side of a binary operator is probably supposed to be the same type
as the other operand' will be applied for domain types. This worked
in 7.3 but was broken in 7.4 due to code rearrangements. Mea culpa.
|
|
|
|
| |
developed on -hackers.
|
|
|
|
| |
longer conveys useful information.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
terms, add some clarifications, fix some untranslatable attempts at dynamic
message building.
|
|
|
|
|
|
|
|
| |
since 7.3: 'select array_dims(histogram_bounds) from pg_stats' used to
work and still should. Problem was that code wouldn't take input of
declared type anyarray as matching an anyarray argument. Allow this
case as long as we don't need to determine an element type (which in
practice means as long as anyelement isn't used in the function signature).
|
| |
|
|
|
|
|
| |
feature they complain about isn't a feature or cannot be implemented without
definitional changes.
|
|
|
|
|
| |
error. There is no point in providing some kind of forward compatibility
now, because no one can tell what a future implementation will look like.
|
|
|
|
|
| |
expr_lists. This appears to be the only remaining O(N^2) bottleneck
in processing many-way 'x IN (a,b,c,...)' conditions.
|
|
|
|
|
|
|
|
| |
be anything yielding an array of the proper kind, not only sub-ARRAY[]
constructs; do subscript checking at runtime not parse time. Also,
adjust array_cat to make array || array comply with the SQL99 spec.
Joe Conway
|
|
|
|
|
|
|
|
|
|
|
| |
datatype by array_eq and array_cmp; use this to solve problems with memory
leaks in array indexing support. The parser's equality_oper and ordering_oper
routines also use the cache. Change the operator search algorithms to look
for appropriate btree or hash index opclasses, instead of assuming operators
named '<' or '=' have the right semantics. (ORDER BY ASC/DESC now also look
at opclasses, instead of assuming '<' and '>' are the right things.) Add
several more index opclasses so that there is no regression in functionality
for base datatypes. initdb forced due to catalog additions.
|
|
|
|
|
|
|
| |
target columns in INSERT and UPDATE targetlists. Don't rely on resname
to be accurate in ruleutils, either. This fixes bug reported by
Donald Fraser, in which renaming a column referenced in a rule did not
work very well.
|
|
|
|
|
|
|
|
| |
yet, though). Avoid using nth() to fetch tlist entries; provide a
common routine get_tle_by_resno() to search a tlist for a particular
resno. This replaces a couple uses of nth() and a dozen hand-coded
search loops. Also, replace a few uses of nth(length-1, list) with
llast().
|
| |
|
|
|
|
|
|
| |
subplan it starts with, as they may be needed at upper join levels.
See comments added to code for the non-obvious reason why. Per bug report
from Robert Creager.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
query node, since that won't work unless the planner is upgraded.
Someday we should try to support at least some cases of this, but for
now just plug the hole in the dike. Per discussion with Dmitry Tkach.
|
|
|
|
|
| |
function-not-found messages now distinguish the cases no-match and
ambiguous-match, and they follow the style guidelines too.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
so it has some chance of working in rules ...
|
|
|
|
|
|
| |
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.
|