Re: MERGE vs REPLACE
От | Petr Jelinek |
---|---|
Тема | Re: MERGE vs REPLACE |
Дата | |
Msg-id | 4377BF0F.4090201@seznam.cz обсуждение исходный текст |
Ответ на | Re: MERGE vs REPLACE (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: MERGE vs REPLACE
Re: MERGE vs REPLACE |
Список | pgsql-hackers |
Peter Eisentraut wrote: > > In that regard, MERGE is quite flexible, but MERGE doesn't address the > point of REPLACE, because MERGE requires *two* tables as input, whereas > REPLACE only takes *one*. Unless someone can show that you can trick > MERGE into doing the REPLACE job anyway, we're not discussing the same > thing. > I am really not db expert and I don't have copy of sql standard but you don't need to use 2 tables I think - USING part can also be subquery (some SELECT) and if I am right then you could simulate what REPLACE does because in PostgreSQL you are not forced to specify FROM clause in SELECT. So you could in theory do MERGE INTO tablename USING (SELECT 1 AS myid) ON (tablename.id = myid) ... But I am not sure if this is what you want. -- Regards Petr Jelinek (PJMODOS)
В списке pgsql-hackers по дате отправления: