Re: Invalid input for integer on VIEW

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mike <mike(at)bristolreccc(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Invalid input for integer on VIEW
Date: 2004-08-24 18:07:37
Message-ID: 5834.1093370857@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

mike <mike(at)bristolreccc(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-08-24 18:29:25 Re: UTF-8 and LIKE vs =
Previous Message Shelby Cain 2004-08-24 18:00:00 Re: Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming