agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Adrian Klaver <adrian.klaver@aklaver.com>
To: Suresh Raja <suresh.rajaabc@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: pl/pgsql examples
Date: Fri, 21 Nov 2014 07:59:29 -0800
Message-ID: <546F6161.6080606@aklaver.com> (raw)
In-Reply-To: <CAJP7dtAZ6Og40jzr4CtjHheWGOLDRPQ3j-QrB+LYuGbniAe4xQ@mail.gmail.com>
References: <CAJP7dtAZ6Og40jzr4CtjHheWGOLDRPQ3j-QrB+LYuGbniAe4xQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
view thread (3+ messages) latest in thread
Message-ID: <546F6161.6080606@aklaver.com>
Permalink: ../546F6161.6080606@aklaver.com/
Also on: postgresql.org/message-id/546F6161.6080606@aklaver.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: adrian.klaver@aklaver.com, suresh.rajaabc@gmail.com
Subject: Re: pl/pgsql examples
In-Reply-To: <546F6161.6080606@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox