pg_dump 输出导入csv文件的过程

pg_dump 输出导入csv文件的过程

命令如下:

pg_dump -t public.global_24h --schema-only -U postgres postgis_32_sample

其中参数:

参数含义
-t  public.global_24h表名称
-U  postgres 用户名
postgis_32_sample数据库名称
--schema-only只转储模式, 不包括数据

输出结果如下:

--
-- PostgreSQL database dump
--

-- Dumped from database version 12.9
-- Dumped by pg_dump version 12.9

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: global_24h; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.global_24h (
    ogc_fid integer NOT NULL,
    latitude character varying,
    longitude character varying,
    brightness character varying,
    scan character varying,
    track character varying,
    acq_date character varying,
    acq_time character varying,
    satellite character varying,
    confidence character varying,
    version character varying,
    bright_t31 character varying,
    frp character varying,
    the_geom public.geometry(Point,3857)
);


ALTER TABLE public.global_24h OWNER TO postgres;

--
-- Name: global_24h_ogc_fid_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.global_24h_ogc_fid_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.global_24h_ogc_fid_seq OWNER TO postgres;

--
-- Name: global_24h_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.global_24h_ogc_fid_seq OWNED BY public.global_24h.ogc_fid;


--
-- Name: global_24h ogc_fid; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.global_24h ALTER COLUMN ogc_fid SET DEFAULT nextval('public.global_24h_ogc_fid_seq'::regclass);


--
-- Name: global_24h global_24h_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.global_24h
    ADD CONSTRAINT global_24h_pkey PRIMARY KEY (ogc_fid);


--
-- Name: global_24h_the_geom_geom_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX global_24h_the_geom_geom_idx ON public.global_24h USING gist (the_geom);


--
-- PostgreSQL database dump complete
--

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值