Search Postgresql Archives

Re: postgresql referencing and creating types as record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/07/2014 09:50 PM, vpmm2007 wrote:
create or replace package CUM_A_TYPES
as
  type LT_PAYMENT is record
(BASIC    number,
   DP    number,
   GRADE_PAY                number
);
TYPE TYPE_CALC_TAX is record
  (
   FIN_ROLE_ID   number(8),
   CALC_FOR_ROLE_CODE  number(4));

NEED TO CONVERT THIS TO POSTGRES , ANYBODY PLS HELP ME I M NEW TO POSTGRES


There is no CREATE PACKAGE in the community version of Postgres.

The pay version of EnterpriseDB does have it:

http://www.enterprisedb.com/docs/en/9.3/oracompat/Postgres_Plus_Advanced_Server_Oracle_Compatibility_Guide-30.htm#P2593_148612

For an idea of the other Oracle features it has, see here:

http://www.enterprisedb.com/docs/en/9.3/oracompat/Table%20of%20Contents.htm#TopOfPage

If you do not want to use the above, then you will have to go another route. What that is, will depend on what you are trying to achieve. From a cursory look at packages, they are a defined grouping of objects stored as such in the database. The nearest solution I can come up at the moment is to store the object creation statements in an external script and run that against the database. This does leave you in charge of handling changes to the objects. So some sort of version control would be helpful. Some examples:

Sqitch

http://sqitch.org/

Alembic

http://alembic.readthedocs.org/en/latest/


THX&RGDS
VPMM


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux