Re: Dblink and ISDN

From: "Rod Taylor" <rbt(at)zort(dot)ca>
To: "Joe Conway" <mail(at)joeconway(dot)com>, "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dblink and ISDN
Date: 2002-04-02 18:16:57
Message-ID: 110c01c1da72$93d19f40$8001a8c0@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Out of curiousity, what happens if the remove server is unavailable?

----- Original Message -----
From: "Joe Conway" <mail(at)joeconway(dot)com>
To: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Sent: Tuesday, April 02, 2002 12:58 PM
Subject: Re: [HACKERS] Dblink and ISDN

> Joe Conway wrote:
> > Darko Prenosil wrote:
> >
> >> SAMPLE:
> >>
> >> create view myremotetable as
> >> select dblink_tok(t1.dblink_p,0) as f1,
dblink_tok(t1.dblink_p,1) as f2
> >> from (select dblink('hostaddr=127.0.0.1 port=5432
dbname=template1
> >> user=postgres password=postgres'
> >> ,'select proname, prosrc from pg_proc') as
> >> dblink_p) as t1;
> >>
> >>
> >>
> >> select f1, f2 from myremotetable where f1 like 'bytea%';
> >>
> >
> > You could write the query directly instead of using a view, i.e.
> >
> > select dblink_tok(t1.dblink_p,0) as f1, dblink_tok(t1.dblink_p,1)
as f2
> > from (select dblink('hostaddr=127.0.0.1 port=5432 dbname=template1
> > user=postgres password=postgres','select proname, prosrc from
pg_proc')
> > as dblink_p WHERE proname LIKE 'bytea%') as t1;
> >
>
> Oops, messed up my cut and paste, and forgot to double the quotes
around
> bytea%. This one I tested ;) to work fine:
> select dblink_tok(t1.dblink_p,0) as f1, dblink_tok(t1.dblink_p,1) as
f2
> from (select dblink('hostaddr=127.0.0.1 port=5432 dbname=template1
> user=postgres password=postgres','select proname, prosrc from
pg_proc
> WHERE proname LIKE ''bytea%''')
> as dblink_p) as t1;
>
> Joe
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-04-02 18:30:32 Re: Contrib update
Previous Message Joe Conway 2002-04-02 17:58:55 Re: Dblink and ISDN