From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Ravi Krishna <srkrishna(at)gmx(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [GENERAL] Does PG support bulk operation in embedded C |
Date: | 2015-05-20 00:36:58 |
Message-ID: | 555BD72A.6070406@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-05-20 00:43:53 | Re: [GENERAL] Does PG support bulk operation in embedded C |
Previous Message | Ravi Krishna | 2015-05-20 00:27:27 | Re: [GENERAL] Does PG support bulk operation in embedded C |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-05-20 00:43:53 | Re: [GENERAL] Does PG support bulk operation in embedded C |
Previous Message | Ravi Krishna | 2015-05-20 00:27:27 | Re: [GENERAL] Does PG support bulk operation in embedded C |