From operations_bradley@servillian.ca Fri Jan 28 23:54:18 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DF9891337B53 for ; Fri, 28 Jan 2011 19:54:18 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 20586-06 for ; Fri, 28 Jan 2011 23:54:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.shawcable.com (shawmail.shawcable.com [64.59.128.220]) by mail.postgresql.org (Postfix) with ESMTP id 06E301337B51 for ; Fri, 28 Jan 2011 19:54:10 -0400 (AST) Received: from bpd2mi1no-svcs.prod.shawcable.com ([10.0.184.120]) by bpd2mo3no-ssvc.prod.shawcable.com with ESMTP; 28 Jan 2011 16:54:09 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=rhzBfl3TH6jSClqh7E8qe//hARbvbzCI0ETuu7/2kJU= c=1 sm=1 a=BLceEmwcHowA:10 a=rFBdEGy9vS/m0A3AhxL8nA==:17 a=E1WOwkgUKAPRIKBvFQsA:9 a=iNM9O1rRSIgezr7ETi3xDQYwbacA:4 a=CjuIK1q_8ugA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=3gpzFTVO-lcqjAMLM8oA:9 a=2cxrAIeQHRTVNI55opYA:7 a=YCdJ0i5E5K4L-kPJVoicY-pXN7cA:4 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-IronPort-AV: E=Sophos;i="4.60,394,1291618800"; d="scan'208,217";a="498773389" Received: from unknown (HELO bpd2mi1no-cmts.prod.shawcable.com) ([192.168.183.120]) by bpd2mi1no-cmts.prod.shawcable.com with ESMTP; 28 Jan 2011 16:54:09 -0700 X-reinject: true Received: from unknown (HELO BradleyHolbrook) ([24.67.39.150]) by bpd2mi1no-dmz.prod.shawcable.com with ESMTP; 28 Jan 2011 16:54:09 -0700 From: "Bradley Holbrook" To: Subject: Drop Schema Error Date: Fri, 28 Jan 2011 15:53:59 -0800 Message-ID: <00fe01cbbf46$a1c21c20$e5465460$@servillian.ca> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00FF_01CBBF03.939F7860" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Acu/RizxNPHYfXg6Qvuotm2D+kticw== Content-Language: en-ca X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201101/188 X-Sequence-Number: 36628 This is a multipart message in MIME format. ------=_NextPart_000_00FF_01CBBF03.939F7860 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello! I'm trying to: DROP SCHEMA "_old_permissions"; And I get this error: ERROR: cannot drop schema _old_permissions because other objects depend on it DETAIL: function 17059 depends on schema _old_permissions function 17060 depends on schema _old_permissions HINT: Use DROP . CASCADE to drop the dependant objects too. So, naturally I: DROP SCHEMA "_old_permissions" CASCADE; Which produces: NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function 17059 drop cascades to function 17060 [Err] ERROR: cache lookup failed for function 17060 What is this trying to tell me? ------=_NextPart_000_00FF_01CBBF03.939F7860 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello!

 

I’m trying to:
DROP = SCHEMA “_old_permissions”;

 

And I = get this error:

ERROR: cannot drop schema = _old_permissions because other objects depend on = it

DETAIL:  function 17059 = depends on schema _old_permissions

function = 17060 depends on schema _old_permissions

HINT: = Use DROP … CASCADE to drop the dependant objects = too.

 

So, = naturally I:

DROP SCHEMA = “_old_permissions” CASCADE;

 

Which = produces:

NOTICE:  drop cascades to 2 = other objects

DETAIL:  drop cascades to = function 17059

drop cascades to function = 17060

[Err] ERROR:  cache lookup = failed for function 17060

 

What is = this trying to tell me?

------=_NextPart_000_00FF_01CBBF03.939F7860-- From tgl@sss.pgh.pa.us Sat Jan 29 16:58:45 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0D3F01337B7A for ; Sat, 29 Jan 2011 12:58:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 76036-04 for ; Sat, 29 Jan 2011 16:58:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 3072A1336971 for ; Sat, 29 Jan 2011 12:58:36 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p0TGvtgt012067; Sat, 29 Jan 2011 11:58:35 -0500 (EST) To: "Bradley Holbrook" cc: pgsql-admin@postgresql.org Subject: Re: Drop Schema Error In-reply-to: <00fe01cbbf46$a1c21c20$e5465460$@servillian.ca> References: <00fe01cbbf46$a1c21c20$e5465460$@servillian.ca> Comments: In-reply-to "Bradley Holbrook" message dated "Fri, 28 Jan 2011 15:53:59 -0800" Date: Sat, 29 Jan 2011 11:57:55 -0500 Message-ID: <12066.1296320275@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/189 X-Sequence-Number: 36629 "Bradley Holbrook" writes: > DROP SCHEMA "_old_permissions" CASCADE; > NOTICE: drop cascades to 2 other objects > DETAIL: drop cascades to function 17059 > drop cascades to function 17060 > [Err] ERROR: cache lookup failed for function 17060 > What is this trying to tell me? Apparently you've got some dangling references in pg_depend, ie those functions were dropped already but the pg_depend entries for them were not cleaned up. We've heard similar reports before (usually about temp tables not functions, IIRC) but never been able to reproduce them or identify a cause. What PG version is this? Have you done anything funny to that schema or its contents, or had any crashes around the time of manipulating either? As far as cleaning up goes, the thing to do would be to manually delete the relevant pg_depend entries --- for this one, an entry with objid = 17060 is probably what you're looking for. But it would be good to try to figure out how you got into this state first. regards, tom lane From viktor.bojovic@gmail.com Sat Jan 29 19:16:20 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 232F81337C00 for ; Sat, 29 Jan 2011 15:16:20 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15586-01-8 for ; Sat, 29 Jan 2011 19:16:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id 645FB1337C0A for ; Sat, 29 Jan 2011 15:15:57 -0400 (AST) Received: by qwa26 with SMTP id 26so4327740qwa.19 for ; Sat, 29 Jan 2011 11:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=etsvEnLXwcHLKEr4Ve34zcH8HZd/ej3RTw2oZbCH8Vs=; b=Q1BfrANkCVNCtBlDaJFOzJVRSUMqXxi9xKy6XGL+8BaI0W+22wBQ0grXtx1o4OKClJ t+qj14lUGht7GeS0ZKp3IIqWS8KieeEctLKrtagIWLRFeogpd3YEudNvGLrz3Pqo9+oz r57CfIMjhwSfAtK2CrfRLMZOcU5Xycb2YtAGM= 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; b=WwPS3XP9HfuQsupFG4g4kBJkfuMNft0IXVoD6pirXKJB/j7lBJjo6XfyyuOCTcrINa P7YZ0zenVQzN8WlL1tAsS2NtjvSjIdC1PNvL+V5LEUFGqKQzFYos2iYuuzMa2pfnTC6R BcxFZ1tPH5Q622QQKFBi1Afagi180AgmOWcLI= MIME-Version: 1.0 Received: by 10.224.60.208 with SMTP id q16mr4505220qah.82.1296328555983; Sat, 29 Jan 2011 11:15:55 -0800 (PST) Received: by 10.220.185.133 with HTTP; Sat, 29 Jan 2011 11:15:55 -0800 (PST) In-Reply-To: <12066.1296320275@sss.pgh.pa.us> References: <00fe01cbbf46$a1c21c20$e5465460$@servillian.ca> <12066.1296320275@sss.pgh.pa.us> Date: Sat, 29 Jan 2011 20:15:55 +0100 Message-ID: Subject: Re: Drop Schema Error From: =?UTF-8?Q?Viktor_Bojovi=C4=87?= To: Tom Lane Cc: Bradley Holbrook , pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=0015175cde761774e8049b010321 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201101/190 X-Sequence-Number: 36630 --0015175cde761774e8049b010321 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Jan 29, 2011 at 5:57 PM, Tom Lane wrote: > "Bradley Holbrook" writes: > > DROP SCHEMA "_old_permissions" CASCADE; > > NOTICE: drop cascades to 2 other objects > > DETAIL: drop cascades to function 17059 > > drop cascades to function 17060 > > [Err] ERROR: cache lookup failed for function 17060 > > > What is this trying to tell me? > > Apparently you've got some dangling references in pg_depend, ie those > functions were dropped already but the pg_depend entries for them were > not cleaned up. > > We've heard similar reports before (usually about temp tables not > functions, IIRC) but never been able to reproduce them or identify a > cause. What PG version is this? Have you done anything funny to that > schema or its contents, or had any crashes around the time of > manipulating either? > > As far as cleaning up goes, the thing to do would be to manually delete > the relevant pg_depend entries --- for this one, an entry with objid =3D > 17060 is probably what you're looking for. But it would be good to try > to figure out how you got into this state first. > > regards, tom lane > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > i had that problem when renaming schema which had already objects inside. functions inside that schema had references to objects inside that schema. some functions still had reference to old schema name. so i renamed it again to drop those objects. It was 8.3.13 or prior version @ 32bit debian linux . --=20 --------------------------------------- Viktor Bojovi=C4=87 --------------------------------------- Wherever I go, Murphy goes with me --0015175cde761774e8049b010321 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Sat, Jan 29, 2011 at 5:57 = PM, Tom Lane <tgl= @sss.pgh.pa.us> wrote:
"Bradley Holbrook" <operations_bradley@servillian.ca> writes= :
> DROP SCHEMA "_old_permissions" CASCADE;
> NOTICE: =C2=A0drop cascades to 2 other objects=
> DETAIL: =C2=A0drop cascades to function 17059
> drop cascades to function 17060
> [Err] ERROR: =C2=A0cache lookup failed for function 17060

> What is this trying to tell me?

Apparently you've got some dangling references in pg_depend, ie t= hose
functions were dropped already but the pg_depend entries for them were
not cleaned up.

We've heard similar reports before (usually about temp tables not
functions, IIRC) but never been able to reproduce them or identify a
cause. =C2=A0What PG version is this? =C2=A0Have you done anything funny to= that
schema or its contents, or had any crashes around the time of
manipulating either?

As far as cleaning up goes, the thing to do would be to manually delete
the relevant pg_depend entries --- for this one, an entry with objid =3D 17060 is probably what you're looking for. =C2=A0But it would be good t= o try
to figure out how you got into this state first.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0regards, tom lane

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

i had that problem when renaming schema = which had already objects inside.
functions inside that schem= a =C2=A0had references to objects inside that schema.
some functi= ons still had reference to old schema name.
so i renamed it again to drop those objects.
It was 8.3.13 o= r prior version @ 32bit debian linux =C2=A0.


-- =
---------------------------------------
Viktor Bojovi=C4=87
-----= ----------------------------------
Wherever I go, Murphy goes with me
--0015175cde761774e8049b010321-- From operations_bradley@servillian.ca Mon Jan 31 18:10:02 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 58BCC1337B4F for ; Mon, 31 Jan 2011 14:10:02 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 18481-01 for ; Mon, 31 Jan 2011 18:09:54 +0000 (UTC) X-Greylist: delayed 00:09:47.045855 by SQLgrey-1.7.6 Received: from mail.shawcable.com (shawmail.shawcable.com [64.59.128.220]) by mail.postgresql.org (Postfix) with ESMTP id EAB571336FA7 for ; Mon, 31 Jan 2011 14:09:53 -0400 (AST) Received: from bpd2mi1no-svcs.prod.shawcable.com ([10.0.184.120]) by bpd2mo1no-ssvc.prod.shawcable.com with ESMTP; 31 Jan 2011 11:00:04 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=rhzBfl3TH6jSClqh7E8qe//hARbvbzCI0ETuu7/2kJU= c=1 sm=1 a=BLceEmwcHowA:10 a=rFBdEGy9vS/m0A3AhxL8nA==:17 a=pGLkceISAAAA:8 a=epTmVMiNAAAA:8 a=0RanPRUr-sOKZ68TYTsA:9 a=iFsVeCVgTdbY1udnLIUA:7 a=SEi_a0x4TDOYQ2e7Dmnov9ay88IA:4 a=QEXdDO2ut3YA:10 a=MSl-tDqOz04A:10 a=YObXiYvaVLwA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=R8MTGjiPr9qfZkGvTsUA:9 a=j85vBWOrg1EIUj1KFDwA:7 a=gDlmDjQ-uGNOIMEgeVuNNjWc52kA:4 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-IronPort-AV: E=Sophos;i="4.60,405,1291618800"; d="scan'208,217";a="499389141" Received: from unknown (HELO bpd2mi1no-cmts.prod.shawcable.com) ([192.168.183.120]) by bpd2mi1no-cmts.prod.shawcable.com with ESMTP; 31 Jan 2011 11:00:03 -0700 X-reinject: true Received: from unknown (HELO BradleyHolbrook) ([24.67.39.150]) by bpd2mi1no-dmz.prod.shawcable.com with ESMTP; 31 Jan 2011 11:00:03 -0700 From: "Bradley Holbrook" To: =?UTF-8?Q?'Viktor_Bojovi=C4=87'?= , "'Tom Lane'" Cc: References: <00fe01cbbf46$a1c21c20$e5465460$@servillian.ca> <12066.1296320275@sss.pgh.pa.us> In-Reply-To: Subject: Re: Drop Schema Error Date: Mon, 31 Jan 2011 10:00:03 -0800 Message-ID: <00d201cbc170$af9c5ff0$0ed51fd0$@servillian.ca> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00D3_01CBC12D.A17C7B50" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHmigR+4celrkQEgv9mn7NuZnsPEwJkcVOtAnxGcHqTjsd9MA== Content-Language: en-ca X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201101/196 X-Sequence-Number: 36636 This is a multipart message in MIME format. ------=_NextPart_000_00D3_01CBC12D.A17C7B50 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Worked like a charm, thanks Tom and Viktor. =20 I=E2=80=99m using version 8.4.5 64bit CentOs Linux =20 I renamed the schema from permissions to _old_permissions and I believe = this caused the error. =20 =20 From: Viktor Bojovi=C4=87 [mailto:viktor.bojovic@gmail.com]=20 Sent: January-29-11 11:16 AM To: Tom Lane Cc: Bradley Holbrook; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Drop Schema Error =20 =20 =20 On Sat, Jan 29, 2011 at 5:57 PM, Tom Lane wrote: "Bradley Holbrook" writes: > DROP SCHEMA "_old_permissions" CASCADE; > NOTICE: drop cascades to 2 other objects > DETAIL: drop cascades to function 17059 > drop cascades to function 17060 > [Err] ERROR: cache lookup failed for function 17060 > What is this trying to tell me? Apparently you've got some dangling references in pg_depend, ie those functions were dropped already but the pg_depend entries for them were not cleaned up. We've heard similar reports before (usually about temp tables not functions, IIRC) but never been able to reproduce them or identify a cause. What PG version is this? Have you done anything funny to that schema or its contents, or had any crashes around the time of manipulating either? As far as cleaning up goes, the thing to do would be to manually delete the relevant pg_depend entries --- for this one, an entry with objid =3D 17060 is probably what you're looking for. But it would be good to try to figure out how you got into this state first. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin =20 i had that problem when renaming schema which had already objects = inside. functions inside that schema had references to objects inside that = schema. some functions still had reference to old schema name. so i renamed it again to drop those objects. It was 8.3.13 or prior version @ 32bit debian linux . --=20 --------------------------------------- Viktor Bojovi=C4=87 --------------------------------------- Wherever I go, Murphy goes with me ------=_NextPart_000_00D3_01CBC12D.A17C7B50 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Worked like a = charm, thanks Tom and Viktor.

 

I=E2=80=99m = using version 8.4.5 64bit CentOs Linux

 

I renamed the = schema from permissions to _old_permissions and I believe this = caused the error.

 

 

From:= Viktor = Bojovi=C4=87 [mailto:viktor.bojovic@gmail.com]
Sent: = January-29-11 11:16 AM
To: Tom Lane
Cc: Bradley = Holbrook; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Drop = Schema Error

 

 

 

On Sat, = Jan 29, 2011 at 5:57 PM, Tom Lane <tgl@sss.pgh.pa.us> = wrote:

"Bradley = Holbrook" <operations_bradley@servi= llian.ca> writes:
> DROP SCHEMA = "_old_permissions" CASCADE;

> NOTICE:  drop = cascades to 2 other objects
> DETAIL:  drop cascades to = function 17059
> drop cascades to function 17060
> [Err] = ERROR:  cache lookup failed for function 17060

> What is = this trying to tell me?

Apparently you've got some dangling references in = pg_depend, ie those
functions were dropped already but the pg_depend = entries for them were
not cleaned up.

We've heard similar = reports before (usually about temp tables not
functions, IIRC) but = never been able to reproduce them or identify a
cause.  What PG = version is this?  Have you done anything funny to that
schema or = its contents, or had any crashes around the time of
manipulating = either?

As far as cleaning up goes, the thing to do would be to = manually delete
the relevant pg_depend entries --- for this one, an = entry with objid =3D
17060 is probably what you're looking for. =  But it would be good to try
to figure out how you got into this = state first.

              =          regards, tom lane

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org= )
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

 

i had that problem when renaming schema which had = already objects inside.

functions inside that schema  had references to = objects inside that schema.

some functions still had reference to old schema = name.

so i renamed it = again to drop those objects.

It was 8.3.13 or prior version @ 32bit debian linux =  .



-- =
---------------------------------------
Viktor = Bojovi=C4=87
---------------------------------------
Wherever I = go, Murphy goes with me

------=_NextPart_000_00D3_01CBC12D.A17C7B50-- From tgl@sss.pgh.pa.us Mon Jan 31 18:24:35 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 159C21337B43 for ; Mon, 31 Jan 2011 14:24:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 55005-05 for ; Mon, 31 Jan 2011 18:24:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 79B291336FA7 for ; Mon, 31 Jan 2011 14:24:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p0VIOQn7019813; Mon, 31 Jan 2011 13:24:26 -0500 (EST) To: "Bradley Holbrook" cc: "=?UTF-8?Q?'Viktor_Bojovi=C4=87'?=" , pgsql-admin@postgresql.org Subject: Re: Drop Schema Error In-reply-to: <00d201cbc170$af9c5ff0$0ed51fd0$@servillian.ca> References: <00fe01cbbf46$a1c21c20$e5465460$@servillian.ca> <12066.1296320275@sss.pgh.pa.us> <00d201cbc170$af9c5ff0$0ed51fd0$@servillian.ca> Comments: In-reply-to "Bradley Holbrook" message dated "Mon, 31 Jan 2011 10:00:03 -0800" Date: Mon, 31 Jan 2011 13:24:26 -0500 Message-ID: <19812.1296498266@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/197 X-Sequence-Number: 36637 "Bradley Holbrook" writes: > I renamed the schema from permissions to _old_permissions and I believe this caused the error. Uh, no, certainly not. pg_depend only cares about the objects' OIDs, not their names. Testing in 8.3, it works fine: regression=# create schema old_permissions; CREATE SCHEMA regression=# create function old_permissions.foo() returns int as regression-# 'select 2+2' language sql; CREATE FUNCTION regression=# create function old_permissions.foo2(int) returns int as 'begin return $1 + 1; end' language plpgsql; CREATE FUNCTION regression=# alter schema old_permissions rename to "_old_permissions"; ALTER SCHEMA regression=# DROP SCHEMA "_old_permissions" ; NOTICE: function _old_permissions.foo2(integer) depends on schema _old_permissions NOTICE: function _old_permissions.foo() depends on schema _old_permissions ERROR: cannot drop schema _old_permissions because other objects depend on it HINT: Use DROP ... CASCADE to drop the dependent objects too. regression=# DROP SCHEMA "_old_permissions" CASCADE; NOTICE: drop cascades to function _old_permissions.foo2(integer) NOTICE: drop cascades to function _old_permissions.foo() DROP SCHEMA regression=# As I said, we've never seen a reproducible example. regards, tom lane