dbTalk Databases Forums  

Is it possible to remove the public schema?

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Is it possible to remove the public schema? in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Henry Combrinck
 
Posts: n/a

Default Is it possible to remove the public schema? - 10-21-2004 , 09:34 AM






Hello all

I've been approached by the development people about removing the 'public'
schema. They complain about having to manually remove the 'public_' tag
from table names generated by their development software whenever they
link to PG via ODBC.

Renaming or using another schema is not what they're after either.

1. If it is possible to remove the public schema, what are the
ramifications to existing databases in our system (ie, will a dump/restore
be required, etc)?

2. If it's not possible, can it be done via the ODBC driver?

Thanks
Henry


--------------------------------------------------------
This message was sent using MetroWEB's AirMail service.
http://www.metroweb.co.za/ - full access for only R73.
Free Web Accelerator, WebMail, Calendar, Anti-Virus,
Anti-Spam, 10 emails, 100MB personal webspace, and more!
Phone Now! 086 11 11 440

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-21-2004 , 11:07 AM






"Henry Combrinck" <henry (AT) metroweb (DOT) co.za> writes:
Quote:
I've been approached by the development people about removing the 'public'
schema. They complain about having to manually remove the 'public_' tag
from table names generated by their development software whenever they
link to PG via ODBC.

Renaming or using another schema is not what they're after either.
Hmm ... you can certainly drop the public schema if you want, but that
just means that you have to put your tables into some other schema.

It sounds to me like the real problem is with non-schema-aware client
software. I think your options are to fix that, or downgrade to a
non-schema-aware database (eg. Postgres 7.2 or before).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #3  
Old   
Ed L.
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-21-2004 , 12:11 PM



On Thursday October 21 2004 10:07, Tom Lane wrote:
Quote:
"Henry Combrinck" <henry (AT) metroweb (DOT) co.za> writes:
I've been approached by the development people about removing the
'public' schema. They complain about having to manually remove the
'public_' tag from table names generated by their development software
whenever they link to PG via ODBC.

It sounds to me like the real problem is with non-schema-aware client
software. I think your options are to fix that, or downgrade to a
non-schema-aware database (eg. Postgres 7.2 or before).
And you do NOT want to downgrade to Pgsql 7.2 or before. Check out the list
of changes and bug-fixes since 7.2 to see what you'll be downgrading to.
You'll likely have far more trouble than modifying your client software.

Ed



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #4  
Old   
Henry Combrinck
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-21-2004 , 01:57 PM



Quote:
It sounds to me like the real problem is with non-schema-aware client
software.
They're using Office XP Developer (Access 2000). No hope of fixing that.

Quote:
...I think your options are to fix that, or downgrade to a
non-schema-aware database (eg. Postgres 7.2 or before).
....and miss out on the nourishing goodness of 7.4? I don't think so!

Thanks anyway.

Regards
Henry


--------------------------------------------------------
This message was sent using MetroWEB's AirMail service.
http://www.metroweb.co.za/ - full access for only R73.
Free Web Accelerator, WebMail, Calendar, Anti-Virus,
Anti-Spam, 10 emails, 100MB personal webspace, and more!
Phone Now! 086 11 11 440

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #5  
Old   
Richard Huxton
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-21-2004 , 02:33 PM



Henry Combrinck wrote:
Quote:
It sounds to me like the real problem is with non-schema-aware client
software.


They're using Office XP Developer (Access 2000). No hope of fixing that.
Don't be pessimistic - give Bill a call and see if he'll accept a patch...

Failing that, I wrote a small VBA procedure to do something very similar
once. Wasn't difficult as I recall, but there was some irritating glitch
with looping through linked tables. Can't remember what at the moment,
and aren't near a Windows machine.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
  #6  
Old   
Richard_D_Levine@raytheon.com
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-21-2004 , 03:06 PM




Bill, Madonna, and I are going out for beers after work. I'll mention it.



Richard Huxton
<dev (AT) archonet (DOT) com> To: Henry Combrinck <henry (AT) metroweb (DOT) co.za>
Sent by: cc: pgsql-general (AT) postgresql (DOT) org
pgsql-general-owner@pos Subject: Re: [GENERAL] Is it possible to remove the public schema?
tgresql.org


10/21/2004 02:33 PM






Henry Combrinck wrote:
Quote:
It sounds to me like the real problem is with non-schema-aware client
software.


They're using Office XP Developer (Access 2000). No hope of fixing that.
Don't be pessimistic - give Bill a call and see if he'll accept a patch...

Failing that, I wrote a small VBA procedure to do something very similar
once. Wasn't difficult as I recall, but there was some irritating glitch
with looping through linked tables. Can't remember what at the moment,
and aren't near a Windows machine.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings






---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
  #7  
Old   
Andreas
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-21-2004 , 11:38 PM



Henry Combrinck wrote:

Quote:
It sounds to me like the real problem is with non-schema-aware client
software.
They're using Office XP Developer (Access 2000). No hope of fixing that.

No problem at all.
It's easy to automate the table linking process.

I have a table in access that holds - among other things - the internal
and external name of my linked tables, in which database, schema and
server they locate.

This is used by a little procedure that goes through this list and
creates the ODBC linked table entries for me.

You need a connection-string:
strConn = "ODBC;"
strConn = strConn & "DSN=" & strDSN & ";"
strConn = strConn & "DATABASE=" & strDBName & ";"
strConn = strConn & "UID=" & strDBUser & ";"
strConn = strConn & "PWD=" & strDBPassword & ";"
strConn = strConn & "TABLE=" & strDBScheme & "." & strTblExtern

You should check if an entry allready exists.
If it exist test if it works by calling
CurrentDb.TableDefs(strTblIntern).RefreshLink

Catch an error in case, the link info is stale.
If an error rose then refresh the link infos.

Set db = CurrentDb()
Set tbl = db.TableDefs(strTblIntern)
If tbl.Connect <> strConn Then
tbl.Connect = strConn
tbl.RefreshLink
End If

If the table entry doesn't exist, create it.

Set tbl = db.CreateTableDef(strTblIntern, _
dbAttachSavePWD, _
strDBScheme & "." & strTblExtern, _
strConn)
db.TableDefs.Append tbl

Dropping and recreating the links takes a little longer than, first
checking for existence.

############################

BTW this creates a link entry for a table in another Access mdb-file
DoCmd.TransferDatabase acLink, "Microsoft Access",
"d:\some\folder\my_access.mdb", acTable, strTblExtern, strTblIntern


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #8  
Old   
Henry Combrinck
 
Posts: n/a

Default Re: Is it possible to remove the public schema? - 10-22-2004 , 03:31 AM



Quote:
No problem at all.
It's easy to automate the table linking process.

I have a table in access that holds - among other things - the internal
and external name of my linked tables, in which database, schema and
server they locate.
[snip]

Thank you very much for the information.

Regards
Henry


--------------------------------------------------------
This message was sent using MetroWEB's AirMail service.
http://www.metroweb.co.za/ - full access for only R73.
Free Web Accelerator, WebMail, Calendar, Anti-Virus,
Anti-Spam, 10 emails, 100MB personal webspace, and more!
Phone Now! 086 11 11 440

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.