Re: SELECT INTO using Views?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jeanna Geier <jgeier(at)apt-cafm(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: SELECT INTO using Views?
Date: 2007-01-09 17:11:26
Message-ID: 20070109171126.GB19523@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 09, 2007 at 10:10:46 -0600,
Jeanna Geier <jgeier(at)apt-cafm(dot)com> wrote:
>
> If I cast the entire operation to an INT:
> (a.area * su.units_per_sqfoot::integer)::integer AS area_sq
> or by
> (a.area * su.units_per_sqfoot)::integer AS area_sq,
> I'm getting an 'ERROR: integer out of range' error returned when I run my
> SELECT statement:

This suggests that the values are too large to be represented in int4. Can
you switch to using int8?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2007-01-09 17:19:32 Re: Questions about horizontal partitioning
Previous Message Csaba Nagy 2007-01-09 16:48:24 Re: Autovacuum Improvements