Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id EAD709FB30D for ; Mon, 19 Mar 2007 11:24:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 18348-06 for ; Mon, 19 Mar 2007 11:24:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from gw.sandvine.com (unknown [199.243.201.138]) by postgresql.org (Postfix) with ESMTP id 824659FB954 for ; Mon, 19 Mar 2007 11:24:22 -0300 (ADT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: Re: Problem migrating from 8.0.3 to 8.2.3 Date: Mon, 19 Mar 2007 10:24:20 -0400 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Problem migrating from 8.0.3 to 8.2.3 Thread-Index: AcdoAhZJz81h3dxsTrqHYziidDlybQCKuYFQAADv6ZA= References: <7901.1174062531@sss.pgh.pa.us> <9806.1174073654@sss.pgh.pa.us> From: "Anton Pikhteryev" To: "Tom Lane" Cc: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/118 X-Sequence-Number: 24942 BTW creating domain didn't throw any error on the destination server (8.2.3), but I found that after migration permissions are not consistent: ... COMMENT CREATE DOMAIN valid_user AS name DEFAULT "session_user"() CONSTRAINT user_exists CHECK (has_table_privilege(VALUE, 'pg_user'::text, 'SELECT'::text)); CREATE DOMAIN ALTER DOMAIN public.valid_user OWNER TO labadmin; ALTER DOMAIN COMMENT ON DOMAIN valid_user IS 'valid PostgreSQL user name'; COMMENT ... New server (8.2.3) =3D> select has_table_privilege('mfgtest','clap_file_info','SELECT'); has_table_privilege --------------------- f (1 row) Old one (8.0.3):=20 # select has_table_privilege('mfgtest','clap_file_info','SELECT'); has_table_privilege --------------------- t (1 row) Anton Pikhteryev =20 > -----Original Message----- > From: pgsql-admin-owner@postgresql.org=20 > [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Anton=20 > Pikhteryev > Sent: Monday, March 19, 2007 9:52 AM > To: Tom Lane > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Problem migrating from 8.0.3 to 8.2.3=20 >=20 > On the destination box: >=20 > #\dD+ valid_user > List of domains > Schema | Name | Type | Modifier | > Check > --------+------------+------+--------------------------+------ > ---------- > ----------------------------------------------------- > public | valid_user | name | default "session_user"() |=20 > CHECK (has_table_privilege(VALUE, 'pg_user'::text, 'SELECT'::text)) > (1 row) >=20 > On the source: >=20 > # \dD+ valid_user > List of domains > Schema | Name | Type | Modifier > --------+------------+------+-------------------------- > public | valid_user | name | default "session_user"() > (1 row) >=20 >=20 > I created valid_user domain on the old system (8.0.3) a long time ago > as: >=20 > CREATE DOMAIN valid_user > AS name -- pg_catalog.pg_user.usename%TYPE > DEFAULT SESSION_USER > CONSTRAINT user_exists > CHECK (has_table_privilege(VALUE,'pg_user','SELECT')); > COMMENT ON DOMAIN valid_user IS 'valid PostgreSQL user name'; >=20 > I was also thinking that there is no need to recreate the=20 > domain again as a part of migration and hoping that=20 > pg_dumpall will take care of it. >=20 >=20 >=20 > Anton Pikhteryev > =20 > =20 >=20 > > -----Original Message----- > > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > > Sent: Friday, March 16, 2007 3:34 PM > > To: Anton Pikhteryev > > Cc: pgsql-admin@postgresql.org > > Subject: Re: [ADMIN] Problem migrating from 8.0.3 to 8.2.3 > >=20 > > "Anton Pikhteryev" writes: > > > There is that part and doesn't have any errors: > > > CREATE TABLE clap_file_info ( > > > fileid integer DEFAULT > > > nextval('public.clap_file_info_fileid_seq'::text) NOT NULL, > > > filename text NOT NULL, > > > created timestamp with time zone DEFAULT > > > ('now'::text)::timestamp(6) with time zone NOT NULL, > > > "owner" valid_user NOT NULL > > > ); > >=20 > > What is a valid_user? (No, I don't want \dT output, I want the=20 > > definition of the type.) > >=20 > > regards, tom lane > >=20 >=20 > ---------------------------(end of=20 > broadcast)--------------------------- > TIP 4: Have you searched our list archives? >=20 > http://archives.postgresql.org >=20