pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #7748: "drop owned by" fails with error message: "unrecognized object class: 1262"
Date: Sun, 09 Dec 2012 23:44:13 +0100
Message-ID: <ka3462$2er$1@ger.gmane.org> (raw)
In-Reply-To: <11629.1355071394@sss.pgh.pa.us>
References: <E1ThhcE-0001nJ-1v@wrigleys.postgresql.org>
<11629.1355071394@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Tom Lane wrote on 09.12.2012 17:43:
> spam_eater@gmx.net writes:
>> postgres=# create user testuser with password 'secret';
>> CREATE ROLE
>> postgres=# create database testdb owner testuser;
>> CREATE DATABASE
>> testdb=> drop owned by testuser;
>> ERROR: unrecognized object class: 1262
>
> I can reproduce this in all versions back to 8.3. In 8.2, the role's
> ownership of the database is silently ignored, which I think was the
> design intention. I doubt that we want DROP OWNED dropping whole
> databases. At most maybe we should raise a NOTICE?
>
Just for clarification, this is how it worked in 9.1 (and I'm pretty sure in 9.2.1 as well):
First I create a testuser and the database:
C:\>psql -X -U postgres postgres
psql (9.1.3)
postgres=# create database testdb owner testuser;
ERROR: role "testuser" does not exist
postgres=# create user testuser with password 'secret';
CREATE ROLE
postgres=# create database testdb owner testuser;
CREATE DATABASE
postgres=# \q
Then I log in as the testuser, create a table and drop all objects again:
C:\>psql -X -U testuser testdb
Password for user testuser:
psql (9.1.3)
testdb=> create table foobar (id integer);
CREATE TABLE
testdb=> drop owned by testuser;
DROP OWNED
testdb=>
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
view thread (17+ messages) latest in thread
Message-ID: <ka3462$2er$1@ger.gmane.org> Permalink: ../ka3462$2er$1@ger.gmane.org/ Also on: postgresql.org/message-id/ka3462$2er$1@ger.gmane.org ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: spam_eater@gmx.net Subject: Re: BUG #7748: "drop owned by" fails with error message: "unrecognized object class: 1262" In-Reply-To: <ka3462$2er$1@ger.gmane.org> References: <E1ThhcE-0001nJ-1v@wrigleys.postgresql.org> <11629.1355071394@sss.pgh.pa.us> <ka3462$2er$1@ger.gmane.org> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox