Created
March 22, 2017 13:03
-
-
Save dijit/ef8289e1b5db81d2a85c4344c1860099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ » pg_dump -h ~/database -d junk -s | |
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.6.2 | |
-- Dumped by pg_dump version 9.6.2 | |
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; | |
-- | |
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: | |
-- | |
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | |
-- | |
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: | |
-- | |
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | |
SET search_path = public, pg_catalog; | |
SET default_tablespace = ''; | |
SET default_with_oids = false; | |
-- | |
-- Name: things; Type: TABLE; Schema: public; Owner: jharasym | |
-- | |
CREATE TABLE things ( | |
id bigint NOT NULL, | |
data bytea | |
); | |
ALTER TABLE things OWNER TO jharasym; | |
-- | |
-- Name: things_id_seq; Type: SEQUENCE; Schema: public; Owner: jharasym | |
-- | |
CREATE SEQUENCE things_id_seq | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE things_id_seq OWNER TO jharasym; | |
-- | |
-- Name: things_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: jharasym | |
-- | |
ALTER SEQUENCE things_id_seq OWNED BY things.id; | |
-- | |
-- Name: things id; Type: DEFAULT; Schema: public; Owner: jharasym | |
-- | |
ALTER TABLE ONLY things ALTER COLUMN id SET DEFAULT nextval('things_id_seq'::regclass); | |
-- | |
-- PostgreSQL database dump complete | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE | |
postgres=# \c junk | |
You are now connected to database "junk" as user "jharasym". | |
junk=# create table things ( id bigserial NOT NULL, data bytea ) ; | |
CREATE TABLE | |
junk=# \d+ things | |
Column | Type | Modifiers | Storage | Stats target | Description | |
--------+--------+-----------------------------------------------------+----------+--------------+------------- | |
id | bigint | not null default nextval('things_id_seq'::regclass) | plain | | | |
data | bytea | | extended | | | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment