EXISTS / IN - does it work on Postgresql?

Started by Nonameover 24 years ago3 messagesgeneral
Jump to latest
#1Noname
paula@cyberlazarus.net

Hello there,

Finally I got a \"yes\" and I\'m moving from Microsoft SQL Server to Postgresql. I\'m using PHP4 and PHPLIB to work with query abstractions. I have a lot of subqueries like:

WHERE ... EXISTS (SELECT ...)

I was researching and found ambiguous information about this kind of subqueries, is that working fine with Postgresql?

Thanks in advance,

/paula

paula@nervesane.net
paula@cyberlazarus.net

----------------------------------------------------------------
:: www.nervemail.net :: free access to POP3 accounts

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Noname (#1)
Re: EXISTS / IN - does it work on Postgresql?

On 19 Sep 2001 paula@cyberlazarus.net wrote:

Hello there,

Finally I got a \"yes\" and I\'m moving from Microsoft SQL Server to
Postgresql. I\'m using PHP4 and PHPLIB to work with query
abstractions. I have a lot of subqueries like:

WHERE ... EXISTS (SELECT ...)

I was researching and found ambiguous information about this kind of
subqueries, is that working fine with Postgresql?

In general, yes. Although IN (<subquery>) queries are rather slow right
now and you might want to look at rewriting those as EXISTS (...)
instead (there's an FAQ item on this with a very simple example).

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Noname (#1)
Re: EXISTS / IN - does it work on Postgresql?

paula@cyberlazarus.net writes:

WHERE ... EXISTS (SELECT ...)

I was researching and found ambiguous information about this kind of subqueries, is that working fine with Postgresql?

Yes.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter