Re: [SQL] Alternative to INTERSECT

2007-07-31 Thread Stephan Szabo
On Tue, 31 Jul 2007, Andreas Joseph Krogh wrote: > Hi all. I have the following schema: > > CREATE TABLE test ( > id integer NOT NULL, > field character varying NOT NULL, > value character varying NOT NULL > ); > > ALTER TABLE ONLY test > ADD CONSTRAINT test_id_key UNIQUE (id, fiel

Re: [SQL] Alternative to INTERSECT

2007-07-31 Thread Rodrigo De León
On 7/31/07, Andreas Joseph Krogh <[EMAIL PROTECTED]> wrote: > Is there a way to make this more efficient with another construct, or > INTERSECT the only way to accomplish the desired result? SELECT f1.ID FROM TEST f1 JOIN TEST f2 ON f1.ID = f2.ID JOIN TEST f3 ON f2.ID = f3.ID WHERE f1.FI

Re: [SQL] Alternative to INTERSECT

2007-07-31 Thread Andreas Joseph Krogh
On Tuesday 31 July 2007 18:52:22 Josh Trutwin wrote: > On Tue, 31 Jul 2007 17:30:51 + > > Andreas Joseph Krogh <[EMAIL PROTECTED]> wrote: > > Hi all. I have the following schema: > > > > CREATE TABLE test ( > > id integer NOT NULL, > > field character varying NOT NULL, > > value cha

Re: [SQL] Connection Limit

2007-07-31 Thread Jon Horsman
Thanks for the help guys, i'll try your suggestions when i get a chance. Jon. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Alternative to INTERSECT

2007-07-31 Thread Josh Trutwin
On Tue, 31 Jul 2007 17:30:51 + Andreas Joseph Krogh <[EMAIL PROTECTED]> wrote: > Hi all. I have the following schema: > > CREATE TABLE test ( > id integer NOT NULL, > field character varying NOT NULL, > value character varying NOT NULL > ); > > ALTER TABLE ONLY test > ADD CON

[SQL] Alternative to INTERSECT

2007-07-31 Thread Andreas Joseph Krogh
Hi all. I have the following schema: CREATE TABLE test ( id integer NOT NULL, field character varying NOT NULL, value character varying NOT NULL ); ALTER TABLE ONLY test ADD CONSTRAINT test_id_key UNIQUE (id, field, value); CREATE INDEX test_like_idx ON test USING btree (id, fiel

Re: [SQL] Database synchronization

2007-07-31 Thread Andrew Sullivan
On Tue, Jul 31, 2007 at 09:22:04AM +0100, Richard Huxton wrote: > I don't think slony lets you rename tables/schemas during transfer. I'm > not sure many people want it, and it would be a complicated thing to do > properly in the general case (you'll need to consider dependant objects > - FKeys,

Re: [SQL] calling webservice through postgresql function

2007-07-31 Thread Dmitry Turin
Good day, Jyoti. JS>> (e.g. pl/perlu). DT> __You as man (by hands) install connect__ between DBMS and external world DT> by procedural language once again. DT> You are wrong once again: DT> advantage is to __refuse__ from procedural language (to install connect) DT> instead of put it from outsid

Re: [SQL] Database synchronization

2007-07-31 Thread Richard Huxton
Jyoti Seth wrote: Hello, I have one query related to slony-I. Can I replicate table data in different schemas. Say if have table 'country' in database 'stock' and schema 'stocksch'. And I want to replicate the data in table 'country' of database 'smsdb' and schema 'smssch'. Here, the country tab

Re: [SQL] Database synchronization

2007-07-31 Thread Jyoti Seth
Hello, I have one query related to slony-I. Can I replicate table data in different schemas. Say if have table 'country' in database 'stock' and schema 'stocksch'. And I want to replicate the data in table 'country' of database 'smsdb' and schema 'smssch'. Here, the country table is present in two