X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3FF5D329F21 for ; Thu, 30 Sep 2004 16:36:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39960-04 for ; Thu, 30 Sep 2004 15:36:09 +0000 (GMT) Received: from mtiwmhc13.worldnet.att.net (mtiwmhc13.worldnet.att.net [204.127.131.117]) by svr1.postgresql.org (Postfix) with ESMTP id C8AE4329CF7 for ; Thu, 30 Sep 2004 16:36:05 +0100 (BST) Received: from [10.10.100.90] (unknown[216.113.237.29]) by worldnet.att.net (mtiwmhc13) with ESMTP id <20040930153600113003tvppe> (Authid: duanewinner); Thu, 30 Sep 2004 15:36:00 +0000 Message-ID: <415C27DC.80407@att.net> Date: Thu, 30 Sep 2004 11:35:56 -0400 From: Duane Winner User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040909 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Cc: "Arend P. van der Veen" , "David J. Neu" Subject: grant command: wildcard on tables? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/7 X-Sequence-Number: 15001 Hello, We have a database with data loaded and now I need to GRANT SELECT,UPDATE,INSERT,DELETE to all tables in 4 different schemas for a specific postgresql user account. I have two problems: 1) One of these schemas has 75 tables. Is there a way to do the GRANT command with a wildcard to give the privileges to the user in one fell swoop? I try: mydatabase=# grant select,update,insert,delete on schemaA.* to myuser; and I get: ERROR: relation "schemaA.*" does not exist 2) The other three schemas only have several tables each, so I can just run the GRANT command on each schema.table individually, however one table has a name with a hyphen it, and this causes an error. I try: mydatabase=# grant select,update,insert,delete on schemaB.table-two to myuser; and I get: ERROR: syntax error at or near "-" at character 46 Hopefully there are solutions for both of these problems. And I figure if I get a solution for problem #1, it will take care of problem #2. Is there a wildcard syntax solution for #1? Is there a delimiter syntax solution for #2? Thanks for any info, Duane Winner