Hi, Dirk,
Dirk Jagdmann wrote:
> So for a batch of inserts the value of a stays the same, while for by
> arbitrary values are inserted. Now I have wondered if PostreSQL offers
> a smarter way to insert those values? A solution can contains usage of
> some plpgsql code.
[local]:postgres=# insert
Hello George,
And don't forget that \COPY and especially COPY are usually much faster
(and, IMHO, easier to compose/maintain) than gobs of INSERTs.
I did not forget, but my application uses embedded SQL (with the epcg
preprocessor) and I don't think it can handle COPYs :(
--
---> Dirk Jagdman
Hello Aaron,
thank you for your suggestion. I will have to think if something
similar would be of any benefit for my data.
--
---> Dirk Jagdmann
> http://cubic.org/~doj
-> http://llg.cubic.org
---(end of broadcast)---
TIP 1: if posting/rea
:46 PM
> To: Dirk Jagdmann
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] optimal insert
>
> On 10/8/06, Dirk Jagdmann <[EMAIL PROTECTED]> wrote:
>
> Hello experts,
>
> I have a database that contains three tables:
>
&
On 10/8/06, Dirk Jagdmann <[EMAIL PROTECTED]> wrote:
Hello experts,I have a database that contains three tables:create table a (id serial primary key,
... -- some more fields not relevant for my question);create table b (id serial primary key,... -- some more fields not relevant for my question);cr
On Sun, Oct 08, 2006 at 23:04:02 +0200,
Dirk Jagdmann <[EMAIL PROTECTED]> wrote:
>
> insert into a_b(a,b) values(1,100);
> insert into a_b(a,b) values(1,200);
> insert into a_b(a,b) values(1,54);
> insert into a_b(a,b) values(1,4577);
>
> So for a batch of inserts the value of a stays the same,