Hello,
I've come across an odd situation. I've had access to a database where a
the following happens:
" SELECT * FROM table WHERE name LIKE 'abc%' "returns 2 rows...
but...
" SELECT * FROM table WHERE name IN (SELECT name FROM table WHERE name
LIKE 'abc%') " returns 0 rows...
"Dan McFadyen" writes:
> Now, the interesting part is for all I can tell, there are no special
> characters in the field. Unless the latest version of Pgadmin (1.10.1 or
> 1.10.2) hides this from the UI, either that or it's some character that
> renders into a similar glyph as ASCII.
> Is there a
5, 2010 11:04 AM
To: Dan McFadyen
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Odd query behavior
"Dan McFadyen" writes:
> You're right, the second one does use an index, one that is used to
> enforce a unique constraint on the column. I wasn't able to turn it
off
&
"Dan McFadyen" writes:
> You're right, the second one does use an index, one that is used to
> enforce a unique constraint on the column. I wasn't able to turn it off
> as the database is currently in use, and disabling a unique constraint
> probably isn't a good idea.
> Sorry for not mentioning
On 03/12/10 18:41, Dan McFadyen wrote:
Hello,
I've come across an odd situation. I've had access to a database where a
the following happens:
" SELECT * FROM table WHERE name LIKE 'abc%' " returns 2 rows...
but...
" SELECT * FROM table WHERE name IN (SELECT name FROM table WHERE name
LIKE 'ab
"Dan McFadyen" writes:
> I've come across an odd situation. I've had access to a database where a
> the following happens:
What are the plans for the two queries? If either one involves use of
an index, does disabling the index change the results?
> I do know that server it was running on was F
Any views involved, or separate users/roles?
On 03/12/2010 08:41 AM, Dan McFadyen wrote:
> Hello,
>
>
>
> I've come across an odd situation. I've had access to a database where a
> the following happens:
>
>
>
> " SELECT * FROM table WHERE name LIKE 'abc%' "returns 2 rows...
>
>
>
Hello,
I've come across an odd situation. I've had access to a database where a
the following happens:
" SELECT * FROM table WHERE name LIKE 'abc%' "returns 2 rows...
but...
" SELECT * FROM table WHERE name IN (SELECT name FROM table WHERE name
LIKE 'abc%') " returns 0 rows...