Thread: Re: [pgadmin-support] Schemas causing problems :(
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 26 July 2004 18:09 > To: Dave Page > Cc: Vitaly Belman; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] [pgadmin-support] Schemas > causing problems :( > > > pg_catalog is read-only (well, usually...), and displays only > optionally. When context menu is reworked, we should disable > creation/modification too. That would probably not be a bad thing. > >>Unfortunately, this search_path[i] = session_user is not absolutely > >>stable (schema or user name may change), but it should be stable > >>enough. > >> > >>Thoughts? > > > > > > Fully qualify everything. > > You'd wipe your eyes if we really did. How do you like > pg_catalog.int4, pg_catalog.text and so forth? <shrug> Hmm, yes, I was forgetting about things like types, however perhaps they are slightly different - for example, consider: CREATE TABLE pg_catalog.my_comments(objoid oid, descr text); Dropping the pg_catalog from that will likely have far more impact than dropping it from pg_catalog.oid in the same statement (if you see what I'm getting at). Perhaps the search needs to be more clever though. Consider the following: search_path: public custom type: public.text In this case we might need to specify pg_catalog.text to get the right one. > > I think it's the only truly infallible way. > > And the ugliest. Oh yes. > Maybe we should invent a switch if default schema suppression is not > wanted; the search path option seems useless. Lose the switch, but resolve the correct schema each time and display appropriately? Could get nasty... Regards, Dave.
Dave Page wrote: > Perhaps the search needs to be more clever though. Consider the > following: > > search_path: public > custom type: public.text > > In this case we might need to specify pg_catalog.text to get the right > one. This is getting a nightmare... >>Maybe we should invent a switch if default schema suppression is not >>wanted; the search path option seems useless. > > > Lose the switch, but resolve the correct schema each time and display > appropriately? Could get nasty... Ok, here we come back to Vitaly who says this is so easy. He'll probably code this within a few minutes :-) Regards, Andreas
> Ok, here we come back to Vitaly who says this is so easy. He'll probably > code this within a few minutes :-) Would if I could :). Sadly I couldn't get PGAdmin to compile under my system (especially got vexed by the wxWindows). It is a different subject though. Do let me know, please, if you plan to put it in some new build. Thanks again On Mon, 26 Jul 2004 17:51:11 +0000, Andreas Pflug <pgadmin@pse-consulting.de> wrote: > Dave Page wrote: > > > Perhaps the search needs to be more clever though. Consider the > > following: > > > > search_path: public > > custom type: public.text > > > > In this case we might need to specify pg_catalog.text to get the right > > one. > > This is getting a nightmare... > > > >>Maybe we should invent a switch if default schema suppression is not > >>wanted; the search path option seems useless. > > > > > > Lose the switch, but resolve the correct schema each time and display > > appropriately? Could get nasty... > > Ok, here we come back to Vitaly who says this is so easy. He'll probably > code this within a few minutes :-) > > Regards, > Andreas > -- ICQ: 1912453 AIM: VitalyB1984 MSN: tmdagent@hotmail.com Yahoo!: VitalyBe