Re: How to Create a table in another database
Guillaume Lelarge <[email protected]> Thu, 12 Nov 2015 19:56:45 +0100
| Newsgroups | gmane.comp.db.postgresql.php |
|---|---|
| Message-ID | <CAECtzeVAOHF2pBd8dZg+Q4FEzDYT1fdP1_ssozPB6S_LqbvLMw@mail.gmail.com> |
--001a1145ad96203fd505245c817f Content-Type: text/plain; charset=UTF-8 Hey, 2015-11-12 11:26 GMT+01:00 Archana K N <[email protected]>: > 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. > > Have you installed dblink on the db1 database? If yes, can you give us the complete query that begins with "select dblink_connect..." ? Thanks. -- Guillaume. http://blog.guillaume.lelarge.info http://www.dalibo.com --001a1145ad96203fd505245c817f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hey,<br><div class=3D"gmail_extra"><br><div class=3D"gmail= _quote">2015-11-12 11:26 GMT+01:00 Archana K N <span dir=3D"ltr"><<a hre= f=3D"mailto:[email protected]" target=3D"_blank">[email protected]<= /a>></span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 = .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hello,<d= iv><br></div><div>=C2=A0 =C2=A0 =C2=A0I created a postgres function in<i><b= > db1</b></i>, from which I need to create a table in another database say = <b style=3D"font-style:italic">db2. </b>I tried to use 'dblink' but= it is giving the error:-</div><div><br></div><div><br></div><div>=C2=A0<fo= nt color=3D"#cc0000"> =C2=A0ERROR: =C2=A0function dblink_connect(unknown, u= nknown) does not exist</font><div><font color=3D"#cc0000">=C2=A0 =C2=A0LINE= 1: select dblink_connect('dbname=3Dmydb port=3D5432 host=3Dlocalhost .= ..</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"#cc0000">=C2=A0 = =C2=A0HINT: =C2=A0No function matches the given name and argument types. Yo= u might need =C2=A0 =C2=A0 =C2=A0 to add explicit type casts.</font></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 d= o.=C2=A0</font></div><div><font color=3D"#000000">=C2=A0 =C2=A0 =C2=A0</fon= t></div><div><font color=3D"#000000">=C2=A0 =C2=A0 =C2=A0I am using 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 color=3D"#0000= 00">=C2=A0 =C2=A0 =C2=A0 Please help me.=C2=A0</font></div><span class=3D"H= OEnZb"><font color=3D"#888888"><div><br></div></font></span></div></div></b= lockquote><div><br></div><div>Have you installed dblink on the db1 database= ? If yes, can you give us the complete query that begins with "select = dblink_connect..." ?<br><br></div><div>Thanks.<br></div></div><br clea= r=3D"all"><br>-- <br><div class=3D"gmail_signature"><div dir=3D"ltr"><div>G= uillaume.<br></div><div>=C2=A0 <a href=3D"http://blog.guillaume.lelarge.inf= o" target=3D"_blank">http://blog.guillaume.lelarge.info</a><br></div>=C2=A0= <a href=3D"http://www.dalibo.com" target=3D"_blank">http://www.dalibo.com<= /a><br></div></div> </div></div> --001a1145ad96203fd505245c817f--