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

Re: WIP: RangeTypes

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: RangeTypes
Date: 2011-01-30 21:33:07
Message-ID: 1296423187.11513.608.camel@jdavis (view raw or flat)
Thread:
Lists: pgsql-hackers
[ trying a third time to send this message, apparently there were
infrastructure problems before ]

On Sun, 2011-01-30 at 02:55 +0000, Thom Brown wrote:
> postgres=# select '[18,20]'::numrange @> 19;
> ERROR:  operator does not exist: numrange @> integer
> LINE 1: select '[18,20]'::numrange @> 19;
>                                    ^
> HINT:  No operator matches the given name and argument type(s). You
> might need to add explicit type casts.

It's because it doesn't know the type on the right side, and assumes
it's an int4.

    select '[18,20]'::numrange @> 19.0;

works.

Regards,
	Jeff Davis




In response to

Responses

pgsql-hackers by date

Next:From: Jan UrbaƄskiDate: 2011-01-30 21:52:27
Subject: Re: wildcard search support for pg_trgm
Previous:From: Peter EisentrautDate: 2011-01-30 21:30:05
Subject: Re: log_hostname and pg_stat_activity

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