Skip site navigation (1) Skip section navigation (2)

Re: Typecast bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig James <craig_james(at)emolecules(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Typecast bug?
Date: 2008-06-26 05:33:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Craig James <craig_james(at)emolecules(dot)com> writes:
> This seems like a bug to me, but it shows up as a performance problem.

> emol_warehouse_1=> explain analyze select version_id, parent_id from version where version_id = 999999999999999999999999999;

If you actually *need* so many 9's here as to force it out of the range
of bigint, then why is your id column not declared numeric?

This seems to me to be about on par with complaining that "intcol = 4.2e1"
won't be indexed.  We have a numeric data type hierarchy, learn to
work with it ...

			regards, tom lane

In response to


pgsql-performance by date

Next:From: Craig JamesDate: 2008-06-26 06:22:20
Subject: Re: Typecast bug?
Previous:From: Peter T. BreuerDate: 2008-06-26 05:03:38
Subject: Re: Hardware vs Software Raid

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group