Le Mardi 21 Octobre 2014 10:44 CEST, David Rowley dgrowle...@gmail.com a
écrit:
For what it's worth I'd say they are identical, at least, if you discount
deferring foreign key constraints or also executing the query from within
a volatile function which was called by a query which just
On Tue, Oct 21, 2014 at 2:58 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Laurent Martelli laurent.marte...@enercoop.org writes:
Do we agree that both queries are identical ?
No, they *aren't* identical. Go consult any SQL reference. Left join
conditions don't work the way you seem to be
Hi David,
Do we agree that both queries are identical ? Since we join on
c.user_info=u.id http://u.id having u.id http://u.id is not null or
c.user_info is not null in the where clause is the same, isn't it ?
Since c.user_info=u.id http://u.id the condition onu.id is not null
does not use
Laurent Martelli laurent.marte...@enercoop.org writes:
Do we agree that both queries are identical ?
No, they *aren't* identical. Go consult any SQL reference. Left join
conditions don't work the way you seem to be thinking: after the join,
the RHS column might be null, rather than equal to
Le 20/10/2014 15:58, Tom Lane a écrit :
Laurent Martelli laurent.marte...@enercoop.org writes:
Do we agree that both queries are identical ?
No, they *aren't* identical. Go consult any SQL reference. Left join
conditions don't work the way you seem to be thinking: after the join,
the RHS
Laurent Martelli wrote
Le 20/10/2014 15:58, Tom Lane a écrit :
Laurent Martelli lt;
laurent.martelli@
gt; writes:
Do we agree that both queries are identical ?
No, they *aren't* identical. Go consult any SQL reference. Left join
conditions don't work the way you seem to be thinking:
David G Johnston wrote
Laurent Martelli wrote
Le 20/10/2014 15:58, Tom Lane a écrit :
Laurent Martelli lt;
laurent.martelli@
gt; writes:
Do we agree that both queries are identical ?
No, they *aren't* identical. Go consult any SQL reference. Left join
conditions don't work the way
On Sun, Oct 19, 2014 at 5:10 PM, Laurent Martelli
laurent.marte...@enercoop.org wrote:
Hello there,
I have a strange query plan involving an IS NOT NULL and a LEFT JOIN.
I grant you that the query can be written without the JOIN on
user_user_info,
but it is generated like this by
Hello there,
I have a strange query plan involving an IS NOT NULL and a LEFT JOIN.
I grant you that the query can be written without the JOIN on
user_user_info,
but it is generated like this by hibernate. Just changing the IS NOT
NULL condition
to the other side of useless JOIN makes a big