pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedmultiple function declarations
2+ messages / 2 participants
[nested] [flat]
* multiple function declarations
@ 2003-11-18 06:04 Majhi, Akas <amajhi@orbitwerks.com>
2003-11-18 06:22 ` Re: multiple function declarations Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 2+ messages in thread
From: Majhi, Akas @ 2003-11-18 06:04 UTC (permalink / raw)
To: pgsql-sql
Hi ,
I have a plpgsql function (MainFunc) that intends to reuse a a particular block of code. So, I intend to make that particulat block of code into another function. (say, HelperFunc)
My question is
1. Can I declare a function (HelperFunc) inside the main function (MainFunc)
2. If yes then how.
Thanks in advance
-akas
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: multiple function declarations
2003-11-18 06:04 multiple function declarations Majhi, Akas <amajhi@orbitwerks.com>
@ 2003-11-18 06:22 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Eisentraut @ 2003-11-18 06:22 UTC (permalink / raw)
To: Majhi, Akas <amajhi@orbitwerks.com>; +Cc: pgsql-sql
Majhi, Akas writes:
> 1. Can I declare a function (HelperFunc) inside the main function (MainFunc)
> 2. If yes then how.
You could do it if you create the CREATE FUNCTION command in a string
variable and then use EXECUTE to run it, but the normal way would be to
declare it outside. There is usually no reason not to do that.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-11-18 06:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-18 06:04 multiple function declarations Majhi, Akas <amajhi@orbitwerks.com>
2003-11-18 06:22 ` Peter Eisentraut <peter_e@gmx.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