Обсуждение: [SQL] Question on MERGE in postgresql

Поиск
Список
Период
Сортировка

[SQL] Question on MERGE in postgresql

От
Kaleeswaran Velu
Дата:
Greeting all,
I am using postgresql 9.4. When I try to use "Merge" command, seems not working. 

Below is the SQL statement I used. Even after I removed the business logic part for debugging purpose, it dose not work. 

MERGE INTO util.comment C 
  USING util.comment_orig B 
  ON C.jl_id_per_book = B.jl_id_per_book
  WHEN MATCHED DO NOTHING;
 
ERROR:  syntax error at or near "MERGE"
LINE 2: MERGE INTO util.comment C 
        ^
********** Error **********

ERROR: syntax error at or near "MERGE"
SQL state: 42601
Character: 8

Any help is appreciated!

Thanks and Regards
Kalees.

Re: [SQL] Question on MERGE in postgresql

От
"David G. Johnston"
Дата:
On Sat, Feb 18, 2017 at 8:32 AM, Kaleeswaran Velu <kaleeswaran.velu@gmail.com> wrote:
Greeting all,
I am using postgresql 9.4. When I try to use "Merge" command, seems not working. 

​There is no MERGE command in PostgreSQL


​Beginning with 9.5.x we do have:  INSERT ... ON CONFLICT which is similar


David J.