[SQL] Stuffing six separate columns into a single array?

2004-10-04 Thread C. Bensend
Hey folks, I'm in the middle of a database design update, mostly to undo all of the stupid things I did in version 0.01. :) God knows I made enough of them... I have a table with the following columns: dns1_ptr | inet | default '0.0.0.0'::inet dns2_ptr | inet

Re: [SQL] Difference between IN and JOIN

2004-10-04 Thread Markus Bertheau
Ð ÐÐÐ, 04.10.2004, Ð 16:17, Tom Lane ÐÐÑÐÑ: > Markus Bertheau <[EMAIL PROTECTED]> writes: > > I lately wondered if there is a difference between a JOIN and a IN in > > queries similar to the following: > > > SELECT f1 FROM t1 JOIN t2 ON (t.f2 = t2.f2) WHERE t2.f3 = x > > > SELECT f1 FROM t1 WHERE

Re: [SQL] Difference between IN and JOIN

2004-10-04 Thread Tom Lane
Markus Bertheau <[EMAIL PROTECTED]> writes: > I lately wondered if there is a difference between a JOIN and a IN in > queries similar to the following: > SELECT f1 FROM t1 JOIN t2 ON (t.f2 = t2.f2) WHERE t2.f3 = x > SELECT f1 FROM t1 WHERE t1.f2 IN (SELECT f2 FROM t2 WHERE f3 = x) > As I see it

Re: [SQL] Concurrency problem

2004-10-04 Thread Magnus Hagander
> Yes, I have several clients connecting to the db, using > the same username, doing the same things, pretty much. > > Please educate me: > When a table is accessed, is there an entry that is updated > in pg_catalog.pg_tables (or somewhere else) in such a fashion > that the MVCC ca

Re: [SQL] Concurrency problem

2004-10-04 Thread Dag Gullberg
Hi Tom, Yes, I have several clients connecting to the db, using the same username, doing the same things, pretty much. Please educate me: When a table is accessed, is there an entry that is updated in pg_catalog.pg_tables (or somewhere else) in such a fashion that the MVCC canno

[SQL] Difference between IN and JOIN

2004-10-04 Thread Markus Bertheau
Hi, I lately wondered if there is a difference between a JOIN and a IN in queries similar to the following: SELECT f1 FROM t1 JOIN t2 ON (t.f2 = t2.f2) WHERE t2.f3 = x SELECT f1 FROM t1 WHERE t1.f2 IN (SELECT f2 FROM t2 WHERE f3 = x) As I see it there's no semantic difference between the two. A