Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fstF1-0006jw-Qg for pgsql-general@arkaria.postgresql.org; Thu, 23 Aug 2018 17:17:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fstEz-0006RV-Ds for pgsql-general@arkaria.postgresql.org; Thu, 23 Aug 2018 17:17:49 +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.89) (envelope-from ) id 1fstEy-0006RO-MJ for pgsql-general@lists.postgresql.org; Thu, 23 Aug 2018 17:17:49 +0000 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fstEr-0004gU-2a for pgsql-general@postgresql.org; Thu, 23 Aug 2018 17:17:48 +0000 Received: by mail-qt0-x234.google.com with SMTP id m13-v6so7146612qth.1 for ; Thu, 23 Aug 2018 10:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noaa.gov; s=google; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=37eEusllHI7cl1b0I5jvlEqOFtdRhjsi58rZyXAxIHY=; b=btHdywqlhQ8IioQnTnjvxopmNWVgPxeukhG/siyQcaHBPxcmc9mTK7PfQy3elsit3F pwSxmfWdOGsqL+xlRzKTBEGzS0nfB+bq9Wb5O8c0Tynkj5Rs9nr6XBEO1bHZBwb6qJZS uXEF8SszO+V3uFkRHQAmc+jA3wW9eRZ/+JnbZgq2xzkk37HEwQ6v4d7u8WPzGH/6m+e9 b3++/hJSlea3DDCXXLjTtEppjrMXmo2hPI4i0HbgHuFde9RkFjIBwk+nWJrL99/TnM5E +2coNsc9K6rrPmgePNpg3QbINalCc9S/6dSWDbWkeaefoVye2i8trKbkXHmAU/+sZZC/ UpgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=37eEusllHI7cl1b0I5jvlEqOFtdRhjsi58rZyXAxIHY=; b=qed6yrWaMi7Exbn97kBJq4MNiqAccpGDvLEZ8iB0dtjb5as2QOSkN2C3eQJwECYz3V O1fAS8iOq79wo8HJMK/LSRCMfU5tVEGCMjnybpQPBJWnv0OVfm/t+IHPq8rTHRtD/OTp P5QbUnpuECNBs0yqpCGW5VU6wMcgWhzkgI/jwXSBsDzH0wMA9+UxuyymwKYDN65D1CtK 2hisC+vDAessWYEDYy1emyamDNjlrcvQ6z6cXB/S+F+eOPAm1+tCUh7r/pg+DoLwbqMZ T7GNxUPVAp8l+wjAZNVb3G5KAFmPz0l3LlDTUlLdiUBZLgiYFVPqlj3ADuxjNHLX6jH8 A8Pg== X-Gm-Message-State: AOUpUlHzfny4JdEWLKTXHtfw2vpOEL08nKwAERkBaKOvE0l4F9Kc2C7y beaZHzBbFvQy101+9lrIVK2ZX7itYIoT2IxGPnqQlpM0ERE3uNN/EiVL8/lmyT7j4h6gdaK8r+Y dzTLT504DqPSmM/TbTl+uY9A7dg/hkxHw1F8NTt2e/TxUiDgX29pJ+7zjAycB3AlM8G/vXU0Juc c= X-Google-Smtp-Source: AA+uWPwmv74mEtWE0u3MMffChm9IqEBCxdKnoENu5pV6ahni0gkk6dZjlWWSpfp4afhIluYhYEiiqg== X-Received: by 2002:ac8:22f2:: with SMTP id g47-v6mr60538083qta.105.1535044656522; Thu, 23 Aug 2018 10:17:36 -0700 (PDT) Received: from [10.92.8.140] (205-156-36-1.ssmcnet.noaa.gov. [205.156.36.1]) by smtp.gmail.com with ESMTPSA id w30-v6sm3031420qtc.51.2018.08.23.10.17.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 10:17:35 -0700 (PDT) From: Paul Tilles To: pgsql-general@postgresql.org Subject: extracting the sql for a function Message-ID: Date: Thu, 23 Aug 2018 13:17:35 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Using postgres Version 9.5 I can extract the sql for a table using pg_dump  -d database_name  -s  -t  table_name  -f  table_name.sql Is there something equivalent for extracting the sql for a function from the database? Paul Tilles