Re: [SQL] Finding duplicated values

2004-10-21 Thread lorid
Kent Anderson wrote: I have a few tables that have duplicated values from an import from a different database. I have two keys I tried to set as primary and got an error ERROR:  could not create unique index DETAIL:  Table contains duplicated values.   Is there some join I can u

Re: [SQL] Trouble with explicit joins

2004-10-21 Thread Dmitry Tkach
Tom Lane wrote: Dmitry Tkach <[EMAIL PROTECTED]> writes: I suppose, this is because the planner takes the order, in which the tables appear in the explicit joins as some kind of a hint to how I want that query to be executed, It's not a "hint", it's a requirement. In general, changing th

Re: [SQL] Trouble with explicit joins

2004-10-21 Thread Tom Lane
Dmitry Tkach <[EMAIL PROTECTED]> writes: > I suppose, this is because the planner takes the order, in which the > tables appear in the explicit joins as some kind of a hint to how I want > that query to be executed, It's not a "hint", it's a requirement. In general, changing the order in which

[SQL] Functions return a select in a table, which data type I must use? (Brazilian User)

2004-10-21 Thread André Toscano
Hello, friends. If anybody can help, how can I do a FUNCTION return a result from a SELECT in a table in PostgreSQL? My Problem is the RETURN TYPE from a FUNCTION, I don´t know what I have to use to return the data as a select result. Example: DROP FUNCTION ACADEMICO.teste(int4)

[SQL] Trouble with explicit joins

2004-10-21 Thread Dmitry Tkach
Hi, everybody! I am writing a fairly long query, that joins several (like 10-15) tables. It is dynamically generated, and the tables in the join may be different, depending on the criteria etc... The problem is that I need to outer (left) join some of those tables. The only way I know to do tha

Re: [SQL] Finding duplicated values

2004-10-21 Thread Stephan Szabo
On Thu, 21 Oct 2004, Kent Anderson wrote: > I have a few tables that have duplicated values from an import from a > different database. I have two keys I tried to set as primary and got an > error > ERROR: could not create unique index > DETAIL: Table contains duplicated values. > > Is there som

[SQL] Finding duplicated values

2004-10-21 Thread Kent Anderson
I have a few tables that have duplicated values from an import from a different database. I have two keys I tried to set as primary and got an error ERROR:  could not create unique indexDETAIL:  Table contains duplicated values.   Is there some join I can use to compare the hmhmkey, wmwmke

Re: [SQL] Offtopic: psql

2004-10-21 Thread Achilleus Mantzios
O sad έγραψε στις Oct 21, 2004 : > Hi > > Postgres has a perfect tool - psql > what libraries did you (developers) use to develop psql console and > particulary command-line editor. % ldd `which psql` maybe? > > thnx > > > ---(end of broadcast)---

[SQL] Offtopic: psql

2004-10-21 Thread sad
Hi (B (BPostgres has a perfect tool - psql (Bwhat libraries did you (developers) use to develop psql console and (Bparticulary command-line editor. (B (Bthnx (B (B (B---(end of broadcast)--- (BTIP 6: Have you searched our list archives? (B