sw...@opspl.com wrote:
Hello all,

When I create a db dump using --

pg_dump -s dbname > mydump.sql

 Sequences present are not being added to the mydump.sql file....

you'll need to be a -little- more specific... sure seems to me like its working on this centos5 linux + pg 8.3.7 system


[postg...@somehost ~]$ createdb junk
[postg...@somehost ~]$ psql junk
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
...
junk=# create table junk (id serial, dat text);
NOTICE: CREATE TABLE will create implicit sequence "junk_id_seq" for serial column "junk.id"
CREATE TABLE
junk=# \q

[postg...@somehost ~]$ pg_dump -s junk
--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: junk; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE junk (
   id integer NOT NULL,
   dat text
);


ALTER TABLE public.junk OWNER TO postgres;

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

CREATE SEQUENCE junk_id_seq
   START WITH 1
   INCREMENT BY 1
   NO MAXVALUE
   NO MINVALUE
   CACHE 1;


ALTER TABLE public.junk_id_seq OWNER TO postgres;

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

ALTER SEQUENCE junk_id_seq OWNED BY junk.id;


--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE junk ALTER COLUMN id SET DEFAULT nextval('junk_id_seq'::regclass);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--

[postg...@somehost ~]$

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to