agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Joshua D. Drake <jd@commandprompt.com>
To: Ravi Krishna <srkrishna@gmx.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Does PG support bulk operation in embedded C
Date: Tue, 19 May 2015 17:36:58 -0700
Message-ID: <555BD72A.6070406@commandprompt.com> (raw)
In-Reply-To: <trinity-21edeb52-1d3f-4a62-93c2-9059113edfc7-1432081647362@3capp-mailcom-lxa15>
References: <8A634A74EF65401FBE09169A72984EBB@RaviLaptop>
<555BD1C6.4000301@commandprompt.com>
<trinity-21edeb52-1d3f-4a62-93c2-9059113edfc7-1432081647362@3capp-mailcom-lxa15>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
On 05/19/2015 05:27 PM, Ravi Krishna wrote:
> Not sure whether I am understanding this. I checked embedded C and did
> not find any section which describes what I have asked, that is the
> ability to do multiple inserts, or updates or deletes in one sql call.
> For example, if my application does the following
>
> BEGIN TRANSACTION
> INSERT INTO TABLE_A
> UPDATE TABLE_B
> INSERT INTO TABLE_C
> COMMIT TRANSACTION
Well PostgreSQL certainly supports the above.
>
> DB2 provides to combine the three sql operations into an array and make
> a call to DB2 which executes the array (that is all 3 sqls as one single
> call).
You can do this with inserts using multivalue.
INSERT INTO TABLE_A VALUES (), (), ();
I am not sure about UPDATE or DELETE, I know you can use WITH on DELETE
which gives you some flexibility.
I don't think you will get a one to one comparison but you should be
able to get close.
JD
--
Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.
--
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 (9+ messages) latest in thread
Message-ID: <555BD72A.6070406@commandprompt.com>
Permalink: ../555BD72A.6070406@commandprompt.com/
Also on: postgresql.org/message-id/555BD72A.6070406@commandprompt.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: jd@commandprompt.com, srkrishna@gmx.com, pgsql-general@postgresql.org
Subject: Re: [GENERAL] Does PG support bulk operation in embedded C
In-Reply-To: <555BD72A.6070406@commandprompt.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