From: | Chirag Karkera <chiragkrkr102(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Use Dblink without column defination |
Date: | 2022-05-24 13:07:49 |
Message-ID: | CANZL2iGCmwkXiBcfM-+YVh+LDVzV+5B9CrZn=8CZcZVwG1LjeA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Team,
Any update on this?
Thank You.
Regards,
Chirag Karkera
On Mon, 23 May, 2022, 1:46 pm Chirag Karkera, <chiragkrkr102(at)gmail(dot)com>
wrote:
> Hi Team,
>
> Appreciate your time to look into this.
>
> To select from another database I try to use dblink or fdw extension of
> Postgres, like this:
>
> mesods =>CREATE EXTENSION dblink;
>
> CREATE EXTENSION
>
> mesods => CREATE EXTENSION postgres_fdw;
>
> CREATE EXTENSION
>
> mesods=> select dblink_connect('conn_db_link','foreign_server') ;
>
> dblink_connect
>
> ----------------
>
> OK
>
> (1 row)
>
>
>
> mesods=> select * from dblink('foreign_server','select * from
> ods_sch.emp') AS x(a int,b text);
>
> a | b
>
> ---+---------
>
> 1 | Gohan
>
> 1 | Piccolo
>
> 1 | Tien
>
> (3 rows)
>
>
> This works fine when I specify which columns I want to select.
>
>
> Is there something that postgres has without specifying the column names
> we can fetch the data from dblink.
>
>
> Awaiting your reply.
>
>
> Thank you.
>
>
> Regards,
>
> Chirag Karkera
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2022-05-24 13:33:14 | Re: PostgreSQL 15 Beta 1 release announcement draft |
Previous Message | Amit Kapila | 2022-05-24 12:49:45 | Re: Build-farm - intermittent error in 031_column_list.pl |