Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLWHs-0005TI-Ox for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jun 2017 15:02:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLWHs-0003WG-Bh for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jun 2017 15:02:20 +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_2) (envelope-from ) id 1dLWH8-0002Dh-Th for pgsql-bugs@postgresql.org; Thu, 15 Jun 2017 15:01:34 +0000 Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dLWH6-0002J4-1E for pgsql-bugs@postgresql.org; Thu, 15 Jun 2017 15:01:34 +0000 Received: by mail-qt0-x235.google.com with SMTP id c10so23897892qtd.1 for ; Thu, 15 Jun 2017 08:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=bsPSmdylGB3RN6JfeNCSnKdyTD3FByt5BM5AUKefHc4=; b=D1DXXYjMqhw8SeLR8tdfm0wulLoxRw6OtubNDoiiVYdon4HXcASi3dJR0GQClBC+CA aiys1sO8jjeyX7o+DP7/cZxywuv4Lm14CqMM0EWS0LDXZT3AyIMne32lKIooagFUHMns E4DnRvAvILoNop2YgHc2IxXaZfKCVREX8ApP2VwEFlPmp9RUYq5kvH4D8ZOKqW5Rrsju BSWn16jU9iLZzrCd4R8KlaOIDN2OzvEzX7DmSuasd+yrB0vUyZjkiTtgts45aswFRn1Q 0ZHys1GlYqPzyazBk0T+LD+HlDbhzsrfgksVeVVMtlatWXuUouzVIjA5GZuE1r8KMZ7B oVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=bsPSmdylGB3RN6JfeNCSnKdyTD3FByt5BM5AUKefHc4=; b=ECy35bFEQzZggML9HWdIjvs+Su7tyZm72PCmbHiDjEohwYCq+Jo/rp+PjbZ13V32bi fmImVcaC1/yhqc7HuWT1KzSrScJgrrJYYBUvJbbg2qd24D2f+JCnk69G6pS5+0dmG7Q6 fcuFP6sHIhKlF9wIp8ouZmTn1feTq4M+bLduQ28sRe245s7bu8cHmCcUKZnzMVlitaVY 5lIjpnBzQlrQINB4mtLc0DbR0Qw/Gys/L/hz8qguBzI45qYPDBJV4/AA34j30jcR81yp fxuqI9qkEBXR26ObdFHc+Xd1fUjQAPdQJOFH6ZEMhrOa8VyEinRIWR4QkrLDSo++kG7V 91Mw== X-Gm-Message-State: AKS2vOyyEbwlsf8Hqwz1fUh99XGMjQufwlsa354EYGXfE3ONcxOPo1eB oX8F9i2mmfH8SAam X-Received: by 10.55.139.5 with SMTP id n5mr6939193qkd.17.1497538890185; Thu, 15 Jun 2017 08:01:30 -0700 (PDT) Received: from [192.112.10.245] ([190.153.169.170]) by smtp.gmail.com with ESMTPSA id m22sm232068qkl.49.2017.06.15.08.01.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 08:01:29 -0700 (PDT) Subject: Re: Regarding copy of function from one db to another db To: Rohit Dwivedi , pgsql-bugs@postgresql.org References: From: Anthony Sotolongo Message-ID: Date: Thu, 15 Jun 2017 11:01:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: es-ES List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org HI, i think that is not a bug, try to execute that query, this return the code of functions of specific schema (schema_name) select 'CREATE OR REPLACE FUNCTION '|| nsp.nspname||'.'||proname||'('||pg_get_function_identity_arguments(p.oid)||') RETURNS ' || case when proretset='t' THEN ' SETOF ' else '' end || typname || ' AS $BODY$ ' ||prosrc || ' $BODY$ LANGUAGE ' || l.lanname ||';' from pg_proc p join pg_namespace nsp ON p.pronamespace = nsp.oid join pg_type t ON p.prorettype = t.oid join pg_language l ON p.prolang = l.oid where nsp.nspname = 'schema_name' Greetings PD: maybe use copy to export result and load in the other place On 15/06/17 06:43, Rohit Dwivedi wrote: > Hello sir, > if we need to copy all the functions of database to > another database then how we can implement it other then copy paste > and run it...Because there are total 153 functions in our database. > > Please Reply Us. > > Thank u sir, -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs