From wdemoudt@planetinternet.be Fri Jan 21 23:44:59 2000 Received: from relay.planetinternet.be (root@relay.planetinternet.be [194.119.232.24]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA99354 for ; Fri, 21 Jan 2000 18:44:59 -0500 (EST) (envelope-from wdemoudt@planetinternet.be) Received: from planetinternet.be (u212-239-128-46.dialup.planetinternet.be [212.239.128.46]) by relay.planetinternet.be (8.9.3/8.9.3) with ESMTP id AAA06748; Sat, 22 Jan 2000 00:41:29 +0100 Message-ID: <3888F0B1.DA4D2E61@planetinternet.be> Date: Sat, 22 Jan 2000 00:50:09 +0100 From: De Moudt Walter X-Mailer: Mozilla 4.51 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Neil Cameron CC: pgsql-sql@postgreSQL.org Subject: Re: [SQL] SQL Things References: <002e01bf6476$0ce647c0$03c6c6c6@leckhampton> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Neil, You can grant/revoke rights users have with the grant or revoke command: > GRANT select, insert, delete, update ON table_name TO user1, user2,.. > REVOKE create FROM user1 The first example grants the rights to view and update tables to user1 and user2, while the second example tells that user1 is not allowed to create a table. How to change the default behaviour, i don't know at first glance. This is basic SQL. Hope it helps, De Moudt Walter > Neil Cameron wrote: > > Hi > > Two questions. > > 1. How can I change a database object's owner using SQL type commands > ? > 2. Users seem by default to be able to create tables. Is this correct. > If so how can we remove this right. > > Neil@blueice From n.cameron@blueice.co.uk Fri Jan 21 17:30:14 2000 Received: from neptune.wyenet.net (neptune.wyenet.net [195.188.115.3]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA88489 for ; Fri, 21 Jan 2000 12:30:14 -0500 (EST) (envelope-from n.cameron@blueice.co.uk) Received: from leckhampton ([195.188.115.222]) by neptune.wyenet.net (Post.Office MTA v3.5.2 release 221 ID# 527-57157U1000L100S0V35) with SMTP id net for ; Fri, 21 Jan 2000 17:29:47 +0000 Message-ID: <002e01bf6476$0ce647c0$03c6c6c6@leckhampton> From: "Neil Cameron" To: Subject: SQL Things Date: Fri, 21 Jan 2000 17:14:27 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002B_01BF6432.F8DDEFA0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 This is a multi-part message in MIME format. ------=_NextPart_000_002B_01BF6432.F8DDEFA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Two questions. 1. How can I change a database object's owner using SQL type commands ? 2. Users seem by default to be able to create tables. Is this correct. = If so how can we remove this right. Neil@blueice ------=_NextPart_000_002B_01BF6432.F8DDEFA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
 
Two questions.
 
1. How can I change a database = object's owner=20 using SQL type commands ?
2. Users seem by default to be able = to create=20 tables. Is this correct. If so how can we remove this = right.
 
Neil@blueice
------=_NextPart_000_002B_01BF6432.F8DDEFA0-- From peter_e@gmx.net Sun Jan 23 01:22:35 2000 Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA36115 for ; Sat, 22 Jan 2000 20:22:35 -0500 (EST) (envelope-from peter@localhost.its.uu.se) Received: from regulus.its.uu.se ([130.238.7.19]:65041 "EHLO regulus.its.uu.se") by merganser.its.uu.se with ESMTP id ; Sun, 23 Jan 2000 02:21:57 +0100 Received: from peter (helo=localhost) by regulus.its.uu.se with local-esmtp (Exim 3.02 #2) id 12CBq2-0003wD-00; Sun, 23 Jan 2000 02:29:10 +0100 Date: Sun, 23 Jan 2000 02:29:10 +0100 (CET) From: Peter Eisentraut To: Neil Cameron cc: pgsql-sql@postgresql.org Subject: Re: [SQL] SQL Things In-Reply-To: <002e01bf6476$0ce647c0$03c6c6c6@leckhampton> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: Peter Eisentraut On 2000-01-21, Neil Cameron mentioned: > 1. How can I change a database object's owner using SQL type commands ? With update. For example: UPDATE pg_class SET relowner = WHERE relname = 'my_table'; > 2. Users seem by default to be able to create tables. Is this correct. > If so how can we remove this right. Yes and you can't. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden