pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Tom Hartnett <tdhartnett@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: simple question about using an empty string building a partial index
Date: Tue, 03 May 2011 08:48:19 +0200
Message-ID: <4DBFA533.6080700@lelarge.info> (raw)
In-Reply-To: <BANLkTimkN8c4WVtNGQY0nbY_aPdR-yiEfg@mail.gmail.com>
References: <BANLkTimkN8c4WVtNGQY0nbY_aPdR-yiEfg@mail.gmail.com>

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



view thread (3+ messages)  latest in thread

Message-ID: <4DBFA533.6080700@lelarge.info>
Permalink:  ../4DBFA533.6080700@lelarge.info/
Also on:    postgresql.org/message-id/4DBFA533.6080700@lelarge.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: guillaume@lelarge.info, tdhartnett@gmail.com
  Subject: Re: simple question about using an empty string building a partial index
  In-Reply-To: <4DBFA533.6080700@lelarge.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox