⌘+k ctrl+k
1.1.3 (stable)
Search Shortcut cmd + k | ctrl + k
Writing JSON

表的内容或查询结果可以直接使用COPY语句写入JSON文件。例如:

CREATE TABLE cities AS
    FROM (VALUES ('Amsterdam', 1), ('London', 2)) cities(name, id);
COPY cities TO 'cities.json';

这将导致cities.json包含以下内容:

{"name":"Amsterdam","id":1}
{"name":"London","id":2}

有关更多信息,请参阅COPY statement