On Thu, Aug 7, 2014 at 11:50 PM, vpmm2007 <vaishalim2...@gmail.com> 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));

Looks like something like:

CREATE TYPE LT_PAYMENT AS
(
  BASIC numeric,
  DP numeric,
  GRADE_PAY numeric
);

CREATE TYPE TYPE_CALC_TAX AS
(
  FIN_ROLE_ID numeric(8),
  CALC_FOR_ROLE_CODE numeric(8)
);

CREATE OR REPLACE FUNCTION some_function() RETURNS LT_PAYMENT  AS
$$
...
$$ LANGAUGE PLPGSQL;

I'd be studying the pl/pgsql documentation and the data type
differences (for number, you'd want to use int, numeric, or float8
depending on circumstances).

merlin


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

Reply via email to