Re: simple question about using an empty string building a partial index

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: simple question about using an empty string building a partial index
Дата
Msg-id 4DBFA533.6080700@lelarge.info
обсуждение исходный текст
Ответ на simple question about using an empty string building a partial index  (Tom Hartnett <tdhartnett@gmail.com>)
Ответы Re: simple question about using an empty string building a partial index
Список 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 по дате отправления:

Предыдущее
От: Tom Hartnett
Дата:
Сообщение: simple question about using an empty string building a partial index
Следующее
От: Sam Stearns
Дата:
Сообщение: Unable to Insert Row