Re: [SQL] FULL OUTER JOIN Question

2005-10-14 Thread Tom Lane
Tyler Kellen <[EMAIL PROTECTED]> writes: > I have a question about a full outer join returning duplicate rows. Why do you think they are duplicate? The GROUP BY includes many columns that you can't see directly in the output ... Also, you did not show us the actual input data (where's the rows w

[SQL] FULL OUTER JOIN Question (mistake)

2005-10-14 Thread Tyler Kellen
The first query under 'BAD RESULT:' doesn't have anything to do with my question Please disregard it!   mg=# select * from trans_item where id=20116;   id   | trans_id | parent | qty | item_sku | item_price | item_tax ---+--++-+--++--  20116 |    

[SQL] FULL OUTER JOIN Question

2005-10-14 Thread Tyler Kellen
I have a question about a full outer join returning duplicate rows.   I have one table that stores a record for each transaction with totals: CREATE TABLE trans (   id  serial PRIMARY KEY,   stamp   timestamp DEFAULT now(),   trans_type_id   int NOT NULL REFERENCES trans_type(id

Re: [SQL] Full outer join

2001-04-14 Thread Tom Lane
Tim Perdue <[EMAIL PROTECTED]> writes: > SELECT * > FROM (stats_http_downloads sh > FULL OUTER JOIN stats_ftp_downloads sf USING (day,filerelease_id)) ; > ERROR: FULL JOIN is only supported with mergejoinable join conditions I've committed a fix for this problem. It'll appear in 7.1.1, or you

Re: [SQL] Full outer join

2001-04-13 Thread Tom Lane
Tim Perdue <[EMAIL PROTECTED]> writes: >> Is either of these tables actually a view? > Hehe - no. I sent the \d of both tables at the bottom of that email. \d isn't very helpful for these sorts of reports. How about pg_dump -s ? regards, tom lane --

Re: [SQL] Full outer join

2001-04-13 Thread Tim Perdue
On Fri, Apr 13, 2001 at 11:11:26AM -0400, Tom Lane wrote: > Tim Perdue <[EMAIL PROTECTED]> writes: > > Does it still work with those revised CREATE statements? > > Yes, works fine here. > > >> What version are you using? > > > That's RC3 and RC1. > > Curious. I'd expect this to happen for col

Re: [SQL] Full outer join

2001-04-13 Thread Tom Lane
Tim Perdue <[EMAIL PROTECTED]> writes: > Does it still work with those revised CREATE statements? Yes, works fine here. >> What version are you using? > That's RC3 and RC1. Curious. I'd expect this to happen for column datatypes whose '=' operator isn't marked mergejoinable, but plain old int

Re: [SQL] Full outer join

2001-04-13 Thread Tim Perdue
On Fri, Apr 13, 2001 at 03:02:32AM -0400, Tom Lane wrote: > Tim Perdue <[EMAIL PROTECTED]> writes: > > However, I keep getting this error, and I don't know what it means: > > ERROR: FULL JOIN is only supported with mergejoinable join conditions > > Works for me: > > regression=# create table st

Re: [SQL] Full outer join

2001-04-13 Thread Tom Lane
Tim Perdue <[EMAIL PROTECTED]> writes: > However, I keep getting this error, and I don't know what it means: > ERROR: FULL JOIN is only supported with mergejoinable join conditions Works for me: regression=# create table stats_http_downloads (day int, filerelease_id int); CREATE regression=# cr

[SQL] Full outer join

2001-04-12 Thread Tim Perdue
Looking at the docs for 7.1, it appears that full outer joins are supported: http://www.postgresql.org/devel-corner/docs/user/queries.html However, I keep getting this error, and I don't know what it means: ERROR: FULL JOIN is only supported with mergejoinable join conditions I've tried several