Re: [SQL] Union Question

2010-12-03 Thread Christophe Pettus
On Dec 3, 2010, at 9:08 AM, Shaun McCloud wrote: > That would be nice to see in the documentation for dblink It's true of all contrib modules; that's mentioned at the start of the contrib section: http://www.postgresql.org/docs/9.0/interactive/contrib.html -- -- Christoph

Re: [SQL] Union Question

2010-12-03 Thread Christophe Pettus
active/dblink.html -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] LIMIT 1; The Integer part only

2009-09-03 Thread Christophe Pettus
behavior you want for negative numbers: http://www.postgresql.org/docs/8.4/interactive/functions-math.html -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

[SQL] De-duplicating rows

2009-07-16 Thread Christophe
The Subject: is somewhat imprecise, but here's what I'm trying to do. For some reason, my brain is locking up over it. I'm moving a 7.2 (yes) database to 8.4. In the table in question, the structure is along the lines of: serial_number SERIAL, PRIMARY KEY email

Re: [SQL] vacuum in single-user mode

2008-08-08 Thread Christophe
On Aug 8, 2008, at 12:02 PM, Mark Fenbers wrote: I haven't the foggiest idea what this means but googled the error and found a site that seems to suggest that I need to run the vacuum in "single-user" mode before running VACUUM FULL, but I cannot find out how to do that, either. It's in t

Re: [SQL] DELETE with JOIN

2008-08-07 Thread Christophe
On Aug 7, 2008, at 4:37 PM, [EMAIL PROTECTED] wrote: And I suggest you go back and read where I said I had to do this on several databases and am trying to avoid custom SQL for each one. I would much rather this were postgresql only, but it's not. Then it does appear you have an Oracle debuggi

Re: [SQL] DELETE with JOIN

2008-08-07 Thread Christophe
On Aug 7, 2008, at 2:39 PM, [EMAIL PROTECTED] wrote: In this case, the first database I tried was Oracle, and it complained of too much transactional data; I forget the exact wording now. You might try it on PostgreSQL. While it might have to spill the result of the subquery to disk, it shou

[SQL] Strange DISTINCT !

2001-08-20 Thread Jean-Christophe Boggio
p.idmembre=t.idmembre limit 5; (I currently have idmembre as an index on tmp_stat and prefs) How does DISTINCT work ? Is this a bug or a misconfigured index ? -- Jean-Christophe Boggio [EMAIL PROTECTED] -o) Independant Consultant and Developer

[SQL] pg_ctl start hangs

2001-08-20 Thread Christophe Labouisse
When restarting postgres this morning I notice the pg_ctl start hangs forever while the database seems to be up and working. Eventually I found out that the start process involves a "psql -l" which waits for me to enter a password since I have "local all password" in my pg_hba.conf. I change back

Re: [SQL] Integrity reference and inheritance

2001-06-12 Thread Christophe Labouisse
Sorry for the double post, I messed up in my addresses. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Integrity reference and inheritance

2001-06-12 Thread Christophe Labouisse
I wanted to build the following schema : - one "generic" document table with a column doc_id ; - a couple of "specific" document tables inheriting from doc ; - a table refering a document by it's id with and integrity constraint on it. In SQL : CREATE TABLE doc ( doc_id serial PRIMARY K

[SQL] Integrity and Inheritance

2001-06-09 Thread Christophe Labouisse
I wanted to build the following schema : - one "generic" document table with a column doc_id ; - a couple of "specific" document tables inheriting from doc ; - a table refering a document by it's id with and integrity constraint on it. In SQL : CREATE TABLE doc ( doc_id serial PRIMARY K

[SQL] pg_dumpall and password access

2001-04-03 Thread Christophe Labouisse
I'm trying to run pg_dumpall to backup all my users' bases but since I have configure pg_hba.conf to "passwd" pg_dumpall always fails: su-2.03$ pg_dumpall >backup.dat # I'm the postgres unix user. Password: psql: Password authentication failed for user 'postgres' Password: psql: Password authenti

Re: [SQL] SELECT FROM t1 WHERE id IN (SELECT id FROM t2 UNION SELECT id FROM t3)

2000-11-10 Thread Christophe Boyanique
Tom Lane wrote : > Current releases don't handle UNION in sub-selects. 7.1 will. Thanks very much for this "fast as speed light" answer ! Is there an idea about the 7.1 release date ? Just to know if this is will be in weeks, months or years... Christophe.

[SQL] SELECT FROM t1 WHERE id IN (SELECT id FROM t2 UNION SELECT id FROM t3)

2000-11-10 Thread Christophe Boyanique
a friend to test it with Oracle and that seems to work so I really don't know what to do... Christophe.

[SQL] Help with GROUP BY

2000-11-08 Thread Jean-Christophe Boggio
22 seconds. Is there a way to optimize this ? (REASON is indexed though I can see no interest in this query.) TIA! -- Jean-Christophe Boggio [EMAIL PROTECTED] Independant Consultant and Developer Delphi, Linux, Oracle, Perl

Re: [SQL] if else query help

2000-10-12 Thread Jean-Christophe Boggio
e fractionnal part is the portion of the day (although I don't know --yet-- how to convert date2-date1 to an integer, trunc does not work). HTH -- Jean-Christophe Boggio [EMAIL PROTECTED] Independant Consultant and Developer Delphi, Linux, Oracle, Perl

[SQL] Inheritance

2000-05-30 Thread Christophe Labouisse
I have a table (A) with a few "sibbling" tables (B and C for instance). When I make the following query : select id from A* where [condition] pgsql returns ids taken from A, B or C (which is what I want). Is there a way to know to what table the id actually belong ? -- Le cinéma en Lumière : ht