Re: [GENERAL] Does PG support bulk operation in embedded C

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: [GENERAL] Does PG support bulk operation in embedded C
Дата
Msg-id 555BD72A.6070406@commandprompt.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Does PG support bulk operation in embedded C  ("Ravi Krishna" <srkrishna@gmx.com>)
Ответы Re: [GENERAL] Does PG support bulk operation in embedded C  (john <johnf@jfcomputer.com>)
Список 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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Ravi Krishna"
Дата:
Сообщение: Re: [GENERAL] Does PG support bulk operation in embedded C
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Does PG support bulk operation in embedded C