Re: simple question about using an empty string building a partial index - Mailing list pgsql-admin

From Guillaume Lelarge
Subject Re: simple question about using an empty string building a partial index
Date
Msg-id 4DBFA533.6080700@lelarge.info
Whole thread Raw
In response to simple question about using an empty string building a partial index  (Tom Hartnett <tdhartnett@gmail.com>)
Responses Re: simple question about using an empty string building a partial index
List pgsql-admin
On 05/03/2011 05:52 AM, Tom Hartnett wrote:
> can it be done?
>
> create index my_idx on my_table(col1) where col1='';
>
> ERROR:  invalid input syntax for integer: ""
>
> Seems simple enough but I don't know what the trick is.
>

col1 is an integer, not a string. And you cannot check for empty string
in an integer column.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

pgsql-admin by date:

Previous
From: Tom Hartnett
Date:
Subject: simple question about using an empty string building a partial index
Next
From: Sam Stearns
Date:
Subject: Unable to Insert Row