While fooling with the issue of serial columns for foreign tables, I noticed that pg_dump will sometimes try to restore a default expression with a command like this:
ALTER TABLE ONLY rem ALTER COLUMN f1 SET DEFAULT nextval('rem_f1_seq'::regclass); which when applied to a foreign table gets you ERROR: "rem" is a foreign table HINT: Use ALTER FOREIGN TABLE instead. Now, I suppose we could kluge up pg_dump to emit ALTER FOREIGN TABLE instead, but I'd like to object to this degree of anal retentivity. There is *no* good reason to refuse this command, and plenty of precedent in favor of being laxer. Most ALTER TABLE variants have historically allowed any relation type for which the action is sensible. As an example, three lines earlier in this same dump file I find ALTER TABLE public.rem_f1_seq OWNER TO postgres; for which we are not bleating that you have to use ALTER SEQUENCE instead (and we'd better not start, since this usage is well embedded in existing dump files). Comments? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers