Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Courses
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Courses
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Request a Demo
Home
>
mailing lists
How to check if a Procedure or FUNCTION EXIST - Mailing list pgsql-admin
From
Edwin UY
Subject
How to check if a Procedure or FUNCTION EXIST
Date
May 27
18:01:17
Msg-id
CA+wokJ_fJphYtOFxd2nHV7P6B9YdhN3=cOcevGHXPd50iUvreQ@mail.gmail.com
Whole thread
Raw
Responses
Re: How to check if a Procedure or FUNCTION EXIST
List
pgsql-admin
Tree view
Hi,
Probably a dumb question of sorts.
I want to check for function and procedure if they exist or not including those created by the users as well as system functions
Reading thru the following link
https://stackoverflow.com/questions/34305186/how-to-check-whether-a-stored-procedure-exists-on-postgresql
SELECT EXISTS (
SELECT *
FROM pg_catalog.pg_proc
JOIN pg_namespace ON pg_catalog.pg_proc.pronamespace = pg_namespace.oid
WHERE proname = 'proc_name'
AND pg_namespace.nspname = 'schema_name'
)
https://www.postgresql.org/docs/current/catalog-pg-proc.html
Will querying pg_catalog.pg_proc be enough? Using prokind to check if it is function or procedure and proowner whether it is a system function or user-defined?
Regards,
Ed
pgsql-admin
by date:
Previous
From:
"David G. Johnston"
Date:
27 May, 17:11:16
Subject:
Re: Tables in public schema
Next
From:
"David G. Johnston"
Date:
27 May, 18:06:44
Subject:
Re: How to check if a Procedure or FUNCTION EXIST
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
×
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Courses
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies