Read Time43 Second
If you are developing a product that runs on PostgreSQL, and supports both the Open Source Edition and AWS Aurora (PostgreSQL compatible) Edition and you would like to know which Edition you are on, there is a neat and simple trick.
This would return the Aurora version (something like 2.2.1, etc.) if it is running Aurora or throw an error if it is PostgreSQL Open Source edition.
If you would just like to know the PostgreSQL version irrespective of the Edition, you can use:
This will return the underlying PostgrSQL version for both the Open Source and the Aurora Editions.