postgresql_16:9.6.12.17.1 Description
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > dblink — connect to other PostgreSQL databases > dblink_build_sql_insert > Description
dblink_build_sql_insert can be useful in doing selective replication of a local table to a remote database. It selects a row from the local table based on primary key, and then builds an SQL INSERT command that will duplicate that row, but with the primary key values replaced by the values in the last argument. (To make an exact copy of the row, just specify the same values for the last two arguments.)