By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

Is it possible to remove the public schema?

P: n/a
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

Nov 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Henry Combrinck" <he***@metroweb.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. 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

Nov 23 '05 #2

P: n/a
On Thursday October 21 2004 10:07, Tom Lane wrote:
"Henry Combrinck" <he***@metroweb.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

Nov 23 '05 #3

P: n/a
> 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.
...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 ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4

P: n/a
Henry Combrinck wrote:
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

Nov 23 '05 #5

P: n/a
Henry Combrinck wrote:
<>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

Nov 23 '05 #6

P: n/a
> 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 ma*******@postgresql.org)

Nov 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.