0

In Oracle we have packages, which we can also use to keep the constant values in one single place.

I want to do the same in postgres 9.2. I don't want to hard code the values at every functions I write.

I know EnterpriseDB Postgres Plus Advanced Server 9.2 version supports packages.

I just created a package as shown below

 CREATE OR REPLACE PACKAGE sample.reference_constant
 IS
 v_sample_1 CONSTANT VARCHAR := 'SAMPLE ONE';
 END;

When I tried to access the variable like pkg_name.variable_name in the function body, I'm just getting an invalid SELECT operation error.

Can anybody tell me **how to access the package level variable in EDB PPAS?

Cheers,
-AP

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
iDroid
  • 1,140
  • 1
  • 13
  • 30

0 Answers0