Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 785E0633534 for ; Sat, 28 Feb 2009 16:04:52 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36134-01 for ; Sat, 28 Feb 2009 16:04:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.182]) by mail.postgresql.org (Postfix) with ESMTP id A43B5633361 for ; Sat, 28 Feb 2009 16:04:49 -0400 (AST) Received: by el-out-1112.google.com with SMTP id y26so1615708ele.10 for ; Sat, 28 Feb 2009 12:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+WtwTyYvukjlS9Xx9Eom4JL85yrm/wyPzc/iH/msUa0=; b=oX458gt3VZ1z6yGfuBvigUk4+BpycVzeOATsiuPtQqDL9tx70bh5T15p8waVigstnt YNZNnz1/UqZTx2giebUewQjgM89Nf+xMYyJ2WYhYkEnIS0c21eFCsixpos+jBZQ6dRFY DKgKyW9HB/sH/uXIjrzO/r3/WJcQznuwDF6H4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hEczLeviFR9NVj8HA0fE8D6q6Qtgm9kbDTWNRRZCmeEk5uiWNbx405ZgiUrq1VCnyt stqAywdopcgKwi9Y/e9b1syPKURzxHVKfm+MvbsbbOoM5sSnPuOmdVusnO2e9eID5cTn mwJuPUvANCqx6HYzcasSyzDsE7FLElLo1PZgQ= MIME-Version: 1.0 Received: by 10.151.45.2 with SMTP id x2mr6703079ybj.6.1235851488621; Sat, 28 Feb 2009 12:04:48 -0800 (PST) In-Reply-To: References: Date: Sat, 28 Feb 2009 13:04:48 -0700 Message-ID: Subject: Re: grant question From: Scott Marlowe To: Tena Sakai Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/267 X-Sequence-Number: 31488 On Sat, Feb 28, 2009 at 12:56 PM, Tena Sakai wrote: > Hi Everybody, > > I want to issue a command: > > =A0 grant select on schema_Z to user_a; > > so that the user_a can look at all tables in schema_Z. > Sadly, what I get is: > =A0 ERROR:=A0 relation "schema_Z" does not exist Two problems. 1: you don't grant select on schemas, you grant it on tables. 2: case folding. If you're gonna use a name "schema_Z" then you have to quote it, because it's mixed case, not all lower. > I tried: > > =A0 grant select on schema_Z.* to user_a; Sorry no wildcarding on grant (At least not yet). You need to grant it for each table. Note that instead of granting it to a user, you should grant it to a role, then give membership to that role to the user.