RE: extracting the sql for a function

From: Igor Neyman <ineyman(at)perceptron(dot)com>
To: Paul Tilles <paul(dot)tilles(at)noaa(dot)gov>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: RE: extracting the sql for a function
Date: 2018-08-23 17:46:25
Message-ID: BN6PR17MB15210E342AC98D26D97EA756DA370@BN6PR17MB1521.namprd17.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----Original Message-----
From: Paul Tilles [mailto:paul(dot)tilles(at)noaa(dot)gov]
Sent: Thursday, August 23, 2018 1:18 PM
To: pgsql-general(at)postgresql(dot)org
Subject: extracting the sql for a function

WARNING: This email originated from outside of Perceptron! Please be mindful of PHISHING and MALWARE risks.

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

__________________________________________________________________________________________________________

select prosrc from pg_proc where proname = 'function_name';

You can pronamespace to WHERE clause to specify schema.

Regards,
Igor Neyman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Jeffcoat 2018-08-23 18:17:37 Join condition parsing puzzle
Previous Message Paul Tilles 2018-08-23 17:17:35 extracting the sql for a function