简体   繁体   中英

How to detect postgresql stored procedure language support?

How can I detect on a production server which languages are available for stored procedures?

I can run sql queries from php and I have phppgadmin on the production server.

You can look at the pg_catalog.pg_language system table :

The catalog pg_language registers languages in which you can write functions or stored procedures.

So just some normal SQL is all you need:

=> select * from pg_catalog.pg_language;
 lanname  | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl 
----------+----------+---------+--------------+---------------+-----------+--------------+--------
 internal |       10 | f       | f            |             0 |         0 |         2246 | 
 c        |       10 | f       | f            |             0 |         0 |         2247 | 
 sql      |       10 | f       | t            |             0 |         0 |         2248 | 
 plpgsql  |       10 | t       | t            |         11571 |     11572 |        11573 | 
(4 rows)

The documentation should help you interpret the various columns.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM