From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Ravi Krishna <srkrishna(at)gmx(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Does PG support bulk operation in embedded C |
Date: | 2015-05-20 00:43:53 |
Message-ID: | CAB7nPqQLPkGwLHTU5nHsMsosryuzqWSAbS5U4CFVagQGHsQ=oQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On Wed, May 20, 2015 at 8:47 AM, Ravi Krishna <srkrishna(at)gmx(dot)com> wrote:
> Essentially in one single sql call, we can do
> -- Add new rows
> -- Update a set of rows where each row is identified by a bookmark
> -- Delete a set of rows where each row is identified by a bookmark
> -- Fetch a set of rows where each row is identified by a bookmark
>
> This gives tremendous performance benefits as the network round trip is
> avoided for each sql.
>
> I am looking for an equivalent of this in PG and C language.
What you are looking at could be accomplished with a user-defined function:
http://www.postgresql.org/docs/devel/static/xfunc.html
Perhaps you are looking for something in C, now it would be less
complex to do it for example with pl/pgsql or another language, and
call it from a C client with a correct set of arguments satisfying
your needs.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Venkata Balaji N | 2015-05-20 02:14:20 | Re: pg_xlog Concern |
Previous Message | Joshua D. Drake | 2015-05-20 00:36:58 | Re: [GENERAL] Does PG support bulk operation in embedded C |
From | Date | Subject | |
---|---|---|---|
Next Message | john | 2015-05-20 13:56:54 | Re: [GENERAL] Does PG support bulk operation in embedded C |
Previous Message | Joshua D. Drake | 2015-05-20 00:36:58 | Re: [GENERAL] Does PG support bulk operation in embedded C |