Re: [SQL] Sql select like question.

2005-05-25 Thread Tom Lane
"hatuan" <[EMAIL PROTECTED]> writes: > I have a select query Select * from A where id like 'US%' > In pgAdmin i have error : "ERROR: unsupported type: 136452". What PG version is this? There were some bugs of that ilk in 8.0..8.0.2, but I think they are all fixed in 8.0.3. Leastwise your exampl

Re: [SQL] Duplicated records

2005-05-25 Thread lucas
Thanks CTAS (Create Table As Select) command works fine!!! With great performance. I think it is the best way to correct the data...(apparently) I didnt know about "select DISTINCT". I am going to read about it. Thank you. Quoting Bricklen Anderson <[EMAIL PROTECTED]>: Is there a way to del

Re: [despammed] Re: [SQL] Duplicated records

2005-05-25 Thread Andreas Kretschmer
am 25.05.2005, um 13:58:07 -0300 mailte [EMAIL PROTECTED] folgendes: > Hi. > Thanks for the article... > But, I have read it and the query works very slow... > My table have aprox. 180.000 records (correct) and in entire table it has > aprox.360.000 records(duplicated)... How often is this necess

Re: [SQL] Duplicated records

2005-05-25 Thread Alvaro Herrera
On Wed, May 25, 2005 at 01:58:07PM -0300, [EMAIL PROTECTED] wrote: > The records is entire duplicated (with all fields having the same data), > thinking the "numos" fields as primary key I have executed the query: > > # DELETE from lanctos where not oid=(select oid from lanctos as l2 where > l2.n

Re: [SQL] Duplicated records

2005-05-25 Thread lucas
Hi. Thanks for the article... But, I have read it and the query works very slow... My table have aprox. 180.000 records (correct) and in entire table it has aprox.360.000 records(duplicated)... I tried to execute a query to delete the duplicated records, but it worked very very slow... look: #

[SQL] Sql select like question.

2005-05-25 Thread hatuan
I use domain in my database Ex CREATE DOMAIN ud_id AS bpchar(3) DEFAULT ''::bpchar NOT NULL; And have table A CREATE TABLE A ( id ud_ma_nt NOT NULL, name ud_name, CONSTRAINT A_pkey PRIMARY KEY (id) ) I have a select query Select * from A where id like 'US%' In pgAdmin i have er

Re: [SQL] Permissions + Views + Functions = relation not exist when not owner

2005-05-25 Thread Tom Lane
"Adie" <[EMAIL PROTECTED]> writes: > I got a View which calls function which uses table. > It works fine when selecting from view by owner (postgres) of table, > function and view. > Problem is when another user is sellecting view. There is an error: > ERROR: relation "XXX" does not exist Perhaps

[SQL] Permissions + Views + Functions = relation not exist when not owner

2005-05-25 Thread Adie
HI! I got a View which calls function which uses table. It works fine when selecting from view by owner (postgres) of table, function and view. Problem is when another user is sellecting view. There is an error: ERROR: relation "XXX" does not exist CONTEXT: PL/pgSQL function "XXX" line 4 at selec