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
jie@stbernard.com