mike <mike@bristolreccc.co.uk> writes:
> On Tue, 2004-08-24 at 12:30 -0400, Tom Lane wrote:
>> Possibly, but you haven't given enough info to let someone else
>> reproduce the problem.
> Is this OK, or do you want some data as well?
I plugged in the view definition from your original mail and got
regression=# SELECT * FROM vw_budget HAVING "period"='3';
bcode | subhead | sc_description | Budget | expenditure | balance | head | period
-------+---------+----------------+--------+-------------+---------+------+--------
(0 rows)
So either the problem requires data, or there is something wrong with
your left() function, which was not included in the script. I guessed
at
create function left(text, integer) returns text as
'select substr($1,$2)' language sql ;
but I dunno if this is anything like what you are using.
Please actually *test* the script you are submitting, next time, and
verify that it reproduces the problem starting from an empty database.
regards, tom lane