serial types, pg_depend, permissions
От | Christopher St John |
---|---|
Тема | serial types, pg_depend, permissions |
Дата | |
Msg-id | 8ba906450510070805h1756c3a7if0e4aaa0c4c432f4@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: serial types, pg_depend, permissions
Re: serial types, pg_depend, permissions |
Список | pgadmin-support |
i'm using pgadmin3 v1.2.2 on os x against a postgres 8.0.3 server to add a bigserial column to a table. i'm getting the error: ERROR: permission denied for relation pg_depend i did a search on the mailing list and found some references to problems, but none matched exactly. the sql from the "SQL" tab of the "New Column" dialog looks like this: CREATE SEQUENCE public.categories_idtest_seq; ALTER TABLE categories ADD COLUMN idtest int8; ALTER TABLE categories ALTER COLUMN idtest SET DEFAULT nextval('public.categories_idtest_seq'::text); INSERT INTO pg_depend(classid, objid, objsubid, refclassid, refobjid, refobjsubid, deptype) SELECT cl.oid, seq.oid, 0, cl.oid, 54592::oid, attnum, 'i' FROM pg_class cl, pg_attribute, pg_class seq JOIN pg_namespacesn ON sn.OID=seq.relnamespaceWHERE cl.relname='pg_class' AND seq.relname='categories_idtest_seq' AND sn.nspname='public'AND attrelid=54592::oid AND attname='idtest'; the insert into pg_depend is an obvious candidate for the problem, since i don't have the proper permissions to insert into the pg_depend table. (the database was created for me by my hosting provider, and the pg_depend table is owned by pgsql, not by my id) now, normally i'd assume it was a permissions problem with pg_depend, except that manually adding the table using the following command (as executed through the pgadmin query tool) works fine: ALTER TABLE categories ADD COLUMN idtest bigserial the appropriate sequence is autocreated, and the appropriate entry appears to get dumped into pg_depend with no errors. (i can delete the column and the sequence is dropped automatically, again with no errors) - is this a pgadmin3 bug, or purely a configuration problem? - if it's a configuration problem, why does the query-tool version work? shouldn't pgadmin be spitting out the shorthandversion and letting postgres do the sequence creation and pg_depend work? thanks, -cks Christopher St. John Chief Software Architect http://www.homeconductor.com http://artofsystems.blogspot.com
В списке pgadmin-support по дате отправления: