Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZwyVU-0008TF-Bu for pgsql-php@arkaria.postgresql.org; Thu, 12 Nov 2015 20:30:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZwyVT-00068r-Uc for pgsql-php@arkaria.postgresql.org; Thu, 12 Nov 2015 20:30:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZwyNg-0005C9-Qf for pgsql-php@postgresql.org; Thu, 12 Nov 2015 20:22:04 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZwyNd-0002Cu-6D for pgsql-php@postgresql.org; Thu, 12 Nov 2015 20:22:04 +0000 Received: by wmdw130 with SMTP id w130so2881807wmd.0 for ; Thu, 12 Nov 2015 12:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=YBT5OzM/2CC2i63QUgfMKa7iYDlSvWn4w5KGiE9qH88=; b=sWNC/cfu1t0SOfcTf8v37KzH6CY/4E2+7fqEBDdwvh3w7ta8AE+rZv4Iy+kmhTWMm3 tmDwGiyNOeoCN5dgEqqyzxYQ8+gByw4vIcjLRzVjFsaJBa12WOqsOVv6YrcEVgIrKhwZ F7KerFmesFqROVzQOxJvSzgIG6PxznjkH3dFk8NAZQzgPqaCyn0Gaqu63+yE8+tfbNlH 3/N+2ciOXdf+fBztY7ktvrdwK5NE0EME+mTmLn6/PvrGvYmchibbzgCQUvOcm9KX/enQ Vvb+YhGzffK6eFt+TeVaWG2ytQFBUjjibNsW6amf7tX3iM/cedaCaamNQyjq8woajref /CMA== X-Received: by 10.194.243.102 with SMTP id wx6mr18468197wjc.68.1447359719756; Thu, 12 Nov 2015 12:21:59 -0800 (PST) Received: from suse132-intel.home.loc (x5ce0981b.dyn.telefonica.de. [92.224.152.27]) by smtp.gmail.com with ESMTPSA id b12sm312377wma.6.2015.11.12.12.21.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 12:21:58 -0800 (PST) From: itb348@gmail.com X-Google-Original-From: itb348@googlemail.com Subject: Re: How to Create a table in another database To: pgsql-php@postgresql.org References: Message-ID: <5644F4DB.9010702@googlemail.com> Date: Thu, 12 Nov 2015 21:21:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------090200070207030003020806" X-Pg-Spam-Score: -1.4 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-php Precedence: bulk Sender: pgsql-php-owner@postgresql.org This is a multi-part message in MIME format. --------------090200070207030003020806 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12.11.2015 19:56, Guillaume Lelarge wrote: > Hey, > > 2015-11-12 11:26 GMT+01:00 Archana K N >: > > 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..." ? > > to me it looks like Archana is mixing PHP and SQL. "more details" certainly is the right reaction here. /Str. --------------090200070207030003020806 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On 12.11.2015 19:56, Guillaume Lelarge= wrote:
Hey,

2015-11-12 11:26 GMT+01:00 Archana K= N <a= rchanakknn@gmail.com>:
Hello,

=C2=A0 =C2=A0 =C2=A0I 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:-


=C2=A0 =C2=A0ERROR: =C2=A0function dblink_connect(un= known, unknown) does not exist
=C2=A0 =C2=A0LINE 1: select dblink_connect('dbname= =3Dmydb port=3D5432 host=3Dlocalhost ...
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0^
=C2=A0 =C2=A0HINT: =C2=A0No function matches the g= iven name and argument types. You might need =C2=A0 =C2=A0 =C2=A0 t= o add explicit type casts.

=C2=A0 =C2=A0 =C2=A0Have been stuck on this for 2 = days. Dont know what to do.=C2=A0
=C2=A0 =C2=A0 =C2=A0
=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

=C2=A0 =C2=A0 =C2=A0 Please help me.=C2=A0


Have you installed dblink on the db1 database? If yes, can you give us the complete query that begins with "select dblink_connect..." ?


to me it looks like Archana is mixing PHP and SQL.=C2=A0 "more detail= s" certainly is the right reaction here.

/Str.
--------------090200070207030003020806--