From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Suresh Raja <suresh(dot)rajaabc(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: pl/pgsql examples |
Date: | 2014-11-21 15:59:29 |
Message-ID: | 546F6161.6080606@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Christina | 2014-11-21 19:08:15 | Re: pl/pgsql examples |
Previous Message | Suresh Raja | 2014-11-21 15:48:04 | pl/pgsql examples |