473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

template1, createdb, schemas, and owners

CSN
I have two machines between which I exchange dumps a
lot. On the first (Windows/cygwin), pgsql was set up
with "Administrator" as the main superuser - who owns
all schemas in template0 and template1. On the second
machine (Linux), "postgres" is pgsql's main superuser.
On whatever machines I do "createdb", the owner of the
schemas in template0/1 is copied over to the schemas
in the new database, even when specifying the owner
parameter (shouldn't the owner of the database own all
schemas in it?). This creates problems when dumping
and importing between the machines. The "SET SESSION
AUTHORIZATION 'Administrator';" causes errors when
trying to import on the machine without user
"Administrator".

What's the best way to remedy the problems caused by
the two different superusers? I've thought about
trying to change all instances of "Administrator" to
"postgres" on the first machine, but don't know how to
go about it.

TIA,
CSN


__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
1 1559
CSN wrote:
I have two machines between which I exchange dumps a
lot. On the first (Windows/cygwin), pgsql was set up
with "Administrator" as the main superuser - who owns
all schemas in template0 and template1. On the second
machine (Linux), "postgres" is pgsql's main superuser.
On whatever machines I do "createdb", the owner of the
schemas in template0/1 is copied over to the schemas
in the new database, even when specifying the owner
parameter (shouldn't the owner of the database own all
schemas in it?). This creates problems when dumping
and importing between the machines. The "SET SESSION
AUTHORIZATION 'Administrator';" causes errors when
trying to import on the machine without user
"Administrator".

What's the best way to remedy the problems caused by
the two different superusers? I've thought about
trying to change all instances of "Administrator" to
"postgres" on the first machine, but don't know how to
go about it.

TIA,
CSN


If you haven't already, check out pg_dump's -O option. This suppresses
all ownership data from the backup, so you'll never get any "SET SESSION
AUTHORIZATION..." lines at all. My setup doesn't use schemas, though,
so I can't be sure there aren't any issues lurking there, but I can't
see why there would be.

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

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AnonymousOne | last post by:
Greetings all, I'm getting a little frustrated trying to figure this out. When creating an XML schema file, the default extention is XSD. How is it that schemas can be accessed using only their...
3
by: Dr. Azmir | last post by:
Hi there I'm Dr. Azmir from Kuala Lumpur. I'm using RH 9.0 with postgresql intalled in it. My problem is I can't createuser and createdb with it. The error message "psql: FATAL: user "name"...
5
by: Frank van Vugt | last post by:
Hi, I noticed that when using the single commandline: drop database <name>; create database <name>; this sometimes fails due to a pg_autovacuum process running on the background. When...
16
by: StenKoll | last post by:
Help needed in order to create a register of stocks in a company. In accordance with local laws I need to give each individual share a number. I have accomplished this by establishing three tables...
5
by: Hadley Willan | last post by:
Hello, I've accidently created a whole bunch of tables and sequences in template1. I didn't actually want the information in template1 but with the slip of a key my script piped all the...
3
by: Mark Harrison | last post by:
Apache has a nice feature: it creates copies of all the default configuration files, so that it's easy to diff and see what has been modified in the config files. Can this be included in...
1
by: Michal Taborsky | last post by:
Hi there. I had a weak moment and accidentally ran a dump restore script on template1 instead of proper database. So my template1 is now polluted with many tables, sequences and the like. Is...
0
by: Thamzyne | last post by:
Hi guys Scenario: There are 4 db owners: wh1, wh2, wh3, wh4. I have created a stored proc for wh2 and it works. Problem: I want to make my stored proc wise enough to be able to see and...
5
by: anand4nk | last post by:
Hi, I am installing postgreSQL 8.2 using batch files in windows xp machine. I am installing postgres using postgresql-8.2.msi installer. Installation was successful. When i tried to run...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.