Re: postgresql referencing and creating types as record
От | Adrian Klaver |
---|---|
Тема | Re: postgresql referencing and creating types as record |
Дата | |
Msg-id | 53E62F5A.8090501@aklaver.com обсуждение исходный текст |
Ответ на | Re: postgresql referencing and creating types as record (vpmm2007 <vaishalim2007@gmail.com>) |
Список | pgsql-general |
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@aklaver.com
В списке pgsql-general по дате отправления: