pg_dump bug 
Author Message
 pg_dump bug

I have a pg_dump file which contains only schemas,
I think there is a bug, which causes function reload
fail, look at following pieces of dump file:
......
......
--
-- TOC Entry ID 212 (OID 34744710)
--
-- Name: gibson Type: TABLE Owner: jliang
--

CREATE TABLE "gibson" (
        "cid" integer,
        "code" character varying(10),
        "name" character varying(32)
);

--
-- TOC Entry ID 368 (OID 34746075)
--
-- Name: "urlsbycid" (smallint) Type: FUNCTION Owner: jliang
--

CREATE FUNCTION "urlsbycid" (smallint) RETURNS SETOF text AS '
select url from urlinfo where id = ratings_by_serial.id and
ratings_by_serial.cid = $1 order by random() limit 100;
' LANGUAGE 'sql';

--
-- TOC Entry ID 213 (OID 34752225)
--
-- Name: gibson2 Type: TABLE Owner: jliang
--

CREATE TABLE "gibson2" (
        "cid" integer,
        "code" character varying(10),
        "name" character varying(32),
        "url" text
);
......
......
--
-- TOC Entry ID 235 (OID 67353384)
--
-- Name: urlinfo Type: TABLE Owner: bob
--

CREATE TABLE "urlinfo" (
        "url" text NOT NULL,
        "id" integer NOT NULL,
        "ratedby" character varying(32),
        "ratedon" timestamp with time zone DEFAULT
"timestamp"('now'::text),
        "comments" text,
        "list" smallint,
        "pidwsr" integer,
        "refid" integer,
        Constraint "urlinfo_pkey" Primary Key ("id")
);
......
......

BUG:
CREATE FUNCTION "urlsbycid" cannot be created before
table "urlinfo" created!!!

I am using PostgreSQL-7.1.3 with pg_dump -s -f filename dbname.
I am upgrading my DB from Pg7.1.3 to Pg7.2.
This is one of problems I got.
I don't know does this bug has been fixed in Pg7.2??

Jie LIANG

Software Engineer
St. Bernard Software

16882 W. Bernardo Dr.
San Diego, CA 92127
Office:(858)524-2134


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Sun, 19 Sep 2004 04:15:18 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. pg_dump: bug?

2. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h

3. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h

4. pgsql/src/bin/pg_dump (pg_dump.c pg_dump.h)

5. pgsql-server/src/bin/pg_dump pg_dump.c pg_dump ...

6. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h

7. pgsql-server/src/bin/pg_dump pg_dump.c pg_dump ...

8. pgsql/src/bin/pg_dump (common.c pg_backup_archiver.h pg_dump.c pg_dump.h)

9. pgsql-server/src/bin/pg_dump pg_dump.c pg_dump.h

10. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h

11. pgsql/src/bin/pg_dump common.c pg_dump.c pg_dump.h

12. pgsql/src/bin/pg_dump common.c pg_dump.c pg_dump.h


 
Powered by phpBB® Forum Software