Re: plpgsql function question

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: plpgsql function question
Дата
Msg-id 20070403181843.GB26926@KanotixBox
обсуждение исходный текст
Ответ на plpgsql function question  (Karthikeyan Sundaram <skarthi98@hotmail.com>)
Список pgsql-sql
Karthikeyan Sundaram <skarthi98@hotmail.com> schrieb:

> 
>      Hi,
>       
>         I am having a requirement here.
>       
>         1) I need to write a plpgsql function where it takes the input
>      parameter of a structure of a table.

Because? To build this table? You can pass an ascii-text with the
table-definition and EXECUTE this string.


>         2) The table has 15 columns

Okay. And the problem is?


>         3) It does lots of validation based on the parameter and finally
>      returns an integer as output parameters

Okay. create function ... returns int as $$ ... return 1; end; $$
language plpgsql;


>       
>        Q) How will I passe the table structure as as parameter

As i said, for instance as simple text and EXECUTE this.


>            2) Do I need to create a type?

No.


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


В списке pgsql-sql по дате отправления:

Предыдущее
От: Karthikeyan Sundaram
Дата:
Сообщение: plpgsql function question
Следующее
От: Karthikeyan Sundaram
Дата:
Сообщение: Re: plpgsql function question