agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedpl/pgsql examples
3+ messages / 3 participants
[nested] [flat]
* pl/pgsql examples
@ 2014-11-21 15:48 Suresh Raja <suresh.rajaabc@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Suresh Raja @ 2014-11-21 15:48 UTC (permalink / raw)
To: pgsql-sql
Hi :
i'm looking for pgsql functions to insert rows from a select query. I'm
new pgsql. So please bear with me. Can you share some sample code if you
have. Or if you interested in writing the code, i can out source.
Cheers!
-SR
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pl/pgsql examples
@ 2014-11-21 15:59 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Suresh Raja <suresh.rajaabc@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Klaver @ 2014-11-21 15:59 UTC (permalink / raw)
To: Suresh Raja <suresh.rajaabc@gmail.com>; pgsql-sql
On 11/21/2014 07:48 AM, Suresh Raja wrote:
> Hi :
>
> i'm looking for pgsql functions to insert rows from a select query. I'm
> new pgsql. So please bear with me. Can you share some sample code if
> you have. Or if you interested in writing the code, i can out source.
Could you provide some pseudo code outlining what is want to accomplish?
Say something like:
CREATE FUNCTION some_fnc()
SELECT fld_1, fld_2, fld_3 FROM some_table WHERE id = <some_parameter>
INSERT INTO another_table(fld1, fld2, fld3) VALUES(fld_1, fld_2, fld_3)
Obviously this a simple contrived example. The more detail you can
provide, the better.
>
> Cheers!
> -SR
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pl/pgsql examples
@ 2014-11-21 19:08 Oliver Christina <oliveiros.cristina@gmail.com>
parent: Suresh Raja <suresh.rajaabc@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Christina @ 2014-11-21 19:08 UTC (permalink / raw)
To: Suresh Raja <suresh.rajaabc@gmail.com>; +Cc: pgsql-sql
Not Sure if you need pl/pgsql for that.
A insert SELECT query will do if I am understanding what you want to do...
Best,
Oliver
Sent from Oliver's iPhone
> On 21 Nov 2014, at 03:48 p.m., Suresh Raja <suresh.rajaabc@gmail.com> wrote:
>
> Hi :
>
> i'm looking for pgsql functions to insert rows from a select query. I'm new pgsql. So please bear with me. Can you share some sample code if you have. Or if you interested in writing the code, i can out source.
>
> Cheers!
> -SR
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2014-11-21 19:08 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 15:48 pl/pgsql examples Suresh Raja <suresh.rajaabc@gmail.com>
2014-11-21 15:59 ` Adrian Klaver <adrian.klaver@aklaver.com>
2014-11-21 19:08 ` Oliver Christina <oliveiros.cristina@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox