Is there a way in which I can get the table definition in a script that I can execute?
i.e.
I have a table "cities":
CREATE TABLE public.cities
(
name character(80) COLLATE pg_catalog."default" NOT NULL,
location point,
CONSTRAINT pk_city_name PRIMARY KEY (name)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.cities
OWNER to postgres;
is there a way I can generate that with a script rather than using the GUI?