Re: savepoint problems
От | Linos |
---|---|
Тема | Re: savepoint problems |
Дата | |
Msg-id | 48938FE8.4080900@linos.es обсуждение исходный текст |
Ответ на | savepoint problems (Linos <info@linos.es>) |
Список | pgsql-general |
David Wilson escribió: > On Fri, Aug 1, 2008 at 12:30 PM, Linos <info@linos.es> 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.
В списке pgsql-general по дате отправления: