Re: How to Create a table in another database

Matthias Ritzkowski <[email protected]> Fri, 13 Nov 2015 07:16:05 -0500
Newsgroups gmane.comp.db.postgresql.php
Message-ID <CAEqybvkQVrK2p-_LWiwVKRoncRvPK70ibceCSfZv9juFNRo8LA@mail.gmail.com>
--001a113ecf7c10073d05246b0605
Content-Type: text/plain; charset=UTF-8

Have you installed AND activated dblink?

You can check with \dx from a pgsql prompt ...

This is a good guide:
http://michael.otacoo.com/postgresql-2/first-steps-with-dblink-on-postgres/

regards
Matthias Ritzkowski
On Nov 12, 2015 05:27, "Archana K N" <[email protected]> wrote:

> Hello,
>
>      I created a postgres function in* db1*, from which I need to create
> a table in another database say *db2. *I tried to use 'dblink' but it is
> giving the error:-
>
>
>    ERROR:  function dblink_connect(unknown, unknown) does not exist
>    LINE 1: select dblink_connect('dbname=mydb port=5432 host=localhost ...
>                ^
>    HINT:  No function matches the given name and argument types. You might
> need       to add explicit type casts.
>
>      Have been stuck on this for 2 days. Dont know what to do.
>
>      I am using Windows 7 OS(32-bit) and due to certain security purpose
> am using         Postgres 9.0(cant update it to newer version).
>
>       Please help me.
>
> --
> -------------------
> regards
> Archana K N
> --------------------
>

--001a113ecf7c10073d05246b0605
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">Have you installed AND activated dblink?</p>
<p dir=3D"ltr">You can check with \dx from a pgsql prompt ...</p>
<p dir=3D"ltr">This is a good guide:<br>
<a href=3D"http://michael.otacoo.com/postgresql-2/first-steps-with-dblink-o=
n-postgres/">http://michael.otacoo.com/postgresql-2/first-steps-with-dblink=
-on-postgres/</a></p>
<p dir=3D"ltr">regards<br>
Matthias Ritzkowski<br>
</p>
<div class=3D"gmail_quote">On Nov 12, 2015 05:27, &quot;Archana K N&quot; &=
lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; w=
rote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r">Hello,<div><br></div><div>=C2=A0 =C2=A0 =C2=A0I created a postgres funct=
ion in<i><b> db1</b></i>, from which I need to create a table in another da=
tabase say <b style=3D"font-style:italic">db2. </b>I tried to use &#39;dbli=
nk&#39; but it is giving the error:-</div><div><br></div><div><br></div><di=
v>=C2=A0<font color=3D"#cc0000"> =C2=A0ERROR: =C2=A0function dblink_connect=
(unknown, unknown) does not exist</font><div><font color=3D"#cc0000">=C2=A0=
 =C2=A0LINE 1: select dblink_connect(&#39;dbname=3Dmydb port=3D5432 host=3D=
localhost ...</font></div><div><font color=3D"#cc0000">=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^</font></div><div><font color=3D"#cc000=
0">=C2=A0 =C2=A0HINT: =C2=A0No function matches the given name and argument=
 types. You might need =C2=A0 =C2=A0 =C2=A0 to add explicit type casts.</fo=
nt></div><div><font color=3D"#cc0000"><br></font></div><div><font color=3D"=
#000000">=C2=A0 =C2=A0 =C2=A0Have been stuck on this for 2 days. Dont know =
what to do.=C2=A0</font></div><div><font color=3D"#000000">=C2=A0 =C2=A0 =
=C2=A0</font></div><div><font color=3D"#000000">=C2=A0 =C2=A0 =C2=A0I am us=
ing Windows 7 OS(32-bit) and due to certain security purpose am using =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 Postgres 9.0(cant update it to newer version).=C2=
=A0</font></div><div><font color=3D"#000000"><br></font></div><div><font co=
lor=3D"#000000">=C2=A0 =C2=A0 =C2=A0 Please help me.=C2=A0</font></div><div=
><br></div>-- <br><div>-------------------<br>regards<br>Archana K N<br>---=
-----------------</div>
</div></div>
</blockquote></div>

--001a113ecf7c10073d05246b0605--