Search Postgresql Archives

Re: savepoint problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Wilson escribió:
On Fri, Aug 1, 2008 at 12:30 PM, Linos <info@xxxxxxxx> wrote:

Well i would like to know if every can help with any other idea or any notes
on this problem? Other question i have it is how i could create a function
without be sure the number of columns to insert/update. Thanks in advance.

you could do:

begin;
create temporary table tmp (...);
[insert (or better yet, COPY) into tmp table]
[delete from real table where exists in temporary table];
insert into real_table select * from tmp;
drop table tmp;
commit;

Your client <--> server communication should be extremely small.


I think this is probably the better solution if i get the jdbc to use the copy command, but i still dont know how to make a function with a variable column number, maybe i simply can put all the columns and let the null columns insert/update with null.

Regards,
Miguel Angel.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux