On Wed, 2005-03-09 at 21:21 -0500, Tom Lane wrote:
> Comments? Can anyone confirm whether DB2 or other databases allow
> ungrouped column references with HAVING?
In Sybase:
1> select 2 as id, max(myfield) from mytable where 2=1
2> go
id
--- --
2
I wrote in reference to bug#1528:
> What the spec actually says, or at least implies, is that a HAVING
> clause is to be evaluated only once per group --- where the "group"
> is the whole table if there's no GROUP BY clause.
In fact, reading the spec more closely, it is clear that the presence
of
I wrote:
> I think the problem can be expressed as
> regression=# select 2 as id, max(b) from t2 having 2 = 1;
> id | max
> +-
> 2 |
> (1 row)
> the issue is clearly that the known-false HAVING clause is pushed down
> inside the aggregation, as though it were WHERE. The existing
Tom,
> the issue is clearly that the known-false HAVING clause is pushed down
> inside the aggregation, as though it were WHERE. ÂThe existing code
> pushes down HAVING to WHERE if the clause contains no aggregates, but
> evidently this is too simplistic. ÂWhat are the correct conditions for
> pus
[EMAIL PROTECTED] wrote:
I have a PLpgSQL function that returns a string (varchar): if this string
is over 256 characters long then the last three characters are corrupted:
replaced by the string ' (.'
I'm skeptical: there is nothing special about 256 characters as far as
the varchar implementa
I have a PLpgSQL function that returns a string (varchar): if this string is over 256 characters long then the last three characters are corrupted: replaced by the string ' (.'
This is my test function:-
-- Function: testconverttousername(varchar, varchar)
DROP FUNCTION testconverttousername()