I am looking at converting an application from Oracle to Postrges that has all the business logic in the database. Currently there is a very large package that has about 200 public constant variables. Postgres does not support package level variables so I am debating how to convert it. I see two possibilities but need some opinions about which is better (they both seem very nasty):
- Convert each variable to a function that returns a static value. This seems the most likely but it seems very ugly.
- Make a table out of the values. The issue with this is that they are used mainly by other packages/functions. Also there is a mix of types (numeric vs varchars).
Any ideas?