Re: INSERT ... SELECT DISTINCT - Doesn't work...

From: "Cesar A(dot) K(dot) Grossmann" <cesar(at)rotnet(dot)com(dot)br>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: INSERT ... SELECT DISTINCT - Doesn't work...
Date: 2000-07-12 00:21:10
Message-ID: 396BB9F6.DB33E2DB@rotnet.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Cesar's example looked like it didn't run into these problems, so I'm
> not sure what's going wrong for him.

I'm sorry. In fact, I was not so carefull with my analisis and the
example I provided you was not exactly like the real problem.

First, I have failed to use the same type in the columns (integer in one
relation, varchar in the other). I think this was the major problem. To
make the example more realistic:

user_operations (
user_id integer,
user_name varchar,
user_operation varchar)

CREATE TABLE users (
user_id varchar,
user_name varchar);

the column user_id from the relation users was with the wrong type
(varchar). I changed it to integer (as user_operations), and the INSERT
works well.

[]s
--
César A. K. Grossmann
ckant(at)usa(dot)net
http://members.xoom.com/ckant/
Para os sádicos e corajosos e infantis:
http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2000-07-12 00:23:23 Re: pg_backup symlink?
Previous Message Chris Bitmead 2000-07-12 00:07:13 Re: Slashdot discussion