Re: plpgsql function question

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: plpgsql function question
Дата
Msg-id F2B39579-43CE-4074-8AD1-74760FCA5514@pgedit.com
обсуждение исходный текст
Ответ на Re: plpgsql function question  (Karthikeyan Sundaram <skarthi98@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: A long-running transaction
Следующее
От: Karthikeyan Sundaram
Дата:
Сообщение: exception handling in postgres plpgsql