pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedplpgsql function question
2+ messages / 2 participants
[nested] [flat]
* plpgsql function question
@ 2007-04-03 17:42 Karthikeyan Sundaram <skarthi98@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Karthikeyan Sundaram @ 2007-04-03 17:42 UTC (permalink / raw)
To: pgsql-admin; pgsql-sql@postgresql.org
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.
2) The table has 15 columns
3) It does lots of validation based on the parameter and finally returns an integer as output parameters
Q) How will I passe the table structure as as parameter
2) Do I need to create a type?
Please help me.
Regards
skarthi
_________________________________________________________________
Take a break and play crossword puzzles - FREE!
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_ wlmemailtaglinemarch07=
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: plpgsql function question
@ 2007-04-03 18:18 Andreas Kretschmer <akretschmer@spamfence.net>
parent: Karthikeyan Sundaram <skarthi98@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Kretschmer @ 2007-04-03 18:18 UTC (permalink / raw)
To: pgsql-sql@postgresql.org
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°
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-04-03 18:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-03 17:42 plpgsql function question Karthikeyan Sundaram <skarthi98@hotmail.com>
2007-04-03 18:18 ` Andreas Kretschmer <akretschmer@spamfence.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox