How can I export the schema of a table in postgres for an older version?
I have on one system 10.0 but I need to export for a 9.2.23 system, which produces a non-compatible command in my case.
Is it possible to generate the schema that is downward compatible?
pg_dump mydb -t 'mytable' --schema-only
The output of this schema is:
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.0
-- Dumped by pg_dump version 10.0
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
...
I am using the postgress app on my mac, so installing an old version extra for this seems like a hassle. Is there an easy way to do this?