RefLib

Reference library for AI

Back

postgresql_16:9.6.12.16.4 Examples

PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > dblink — connect to other PostgreSQL databases > dblink_get_pkey > Examples

CREATE TABLE foobar (
    f1 int,
    f2 int,
    f3 int,
    PRIMARY KEY (f1, f2, f3)
);
CREATE TABLE

SELECT * FROM dblink_get_pkey('foobar');
 position | colname
----------+---------
        1 | f1
        2 | f2
        3 | f3
(3 rows)

Back