Re: plpgsql function question - Mailing list pgsql-sql

From John DeSoi
Subject Re: plpgsql function question
Date
Msg-id F2B39579-43CE-4074-8AD1-74760FCA5514@pgedit.com
Whole thread Raw
In response to Re: plpgsql function question  (Karthikeyan Sundaram <skarthi98@hotmail.com>)
List pgsql-sql
It should work pretty much like you have it. You don't need a type;  
the table is already a type.

Something like:

create or replace function a_func (in p_row a) returns int as
$$  if p_row.i ...  if p_row.j ...
$$

If it does not work, show the error and I'll try to dig up an example.

John



On Apr 3, 2007, at 2:33 PM, Karthikeyan Sundaram wrote:

> What I want is something like this
> create or replace functinon a_func (in a%rowtype) returns int as
> $$
>    ---- do the validation
> $$
> language 'plpgsql';
>
> execute a_func(1, 'good','04/02/2007');



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL



pgsql-sql by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: A long-running transaction
Next
From: Karthikeyan Sundaram
Date:
Subject: exception handling in postgres plpgsql