Use orafce compatibility functions inside Azure Database for PostgreSQL
Published May 15 2019 12:49 PM 5,590 Views


We are extremely excited to announce that the orafce extension for PostgreSQL is now supported on Azure Database for PostgreSQL in all regions. Support for the orafce extension has been a frequent feature ask by our growing customer base and the broader PostgreSQL community. The orafce extension allows usage of well-known database functions and packages inside PostgreSQL. For more information about orafce, see the orafce project on GitHub. The orafce extension is available for all supported versions of the Azure Database for PostgreSQL service.


Enabling the orafce extension on Azure Database for PostgreSQL 

If you are not already familiar, use our QuickStart tutorial to provision a managed PostgreSQL server using the Azure portal or the Azure CLI.  After the server is provisioned, connect to the server with the admin user role using psql or your preferred client. Enable the orafce extension on the database: 


     CREATE EXTENSION orafce; 


Now you can start using orafce functions and packages.  Let’s run a sample function:


     add_months(date, integer):


For example:


     SELECT add_months ('2003-08-01', 3);  


This function returns the date + n months, in this case, 2003-11-01. 


You can try running more sample queries, located in this folder in the orafce GitHub repository. 

We encourage you to use the orafce extension in Azure Database for PostgreSQL to unlock new scenarios and port applications to PostgreSQL. Get started and create your PostgreSQL servers today!


Learn more

Learn more about Azure Database for PostgreSQL in the overview and supported extensions docs.  

Please continue to provide feedback on the features and functionality that you want to see next. If you need any help or have questions, please check out the Azure Database for PostgreSQL documentation. Follow us on Twitter @AzureDBPostgreSQL for the latest news and announcements.  


Note: Azure Database for PostgreSQL doesn't support the utl_file and PLVlex packages of the orafce extension. 


Related resources 



Thanks to Ramkumar Chandrasekaran, a Software Engineer with the Azure Data Magnet Team, for his contributions to this post.

Version history
Last update:
‎May 15 2019 12:52 PM
Updated by: