473,508 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Renaming a schema

Recently, I decided to rename one of my schemas from "adium" to "im".

Then, all inserts started failing.

I recreated a couple functions, changed the search path, and all inserts
are still failing due to referential integrity checks going against
"adium" still. Is there any way I can fix this, short of manually
dropping every constraint and recreating them?

Jeff

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
3 1211
Jeffrey Melloy <jm*****@visualdistortion.org> writes:
Recently, I decided to rename one of my schemas from "adium" to "im".
Then, all inserts started failing.
I recreated a couple functions, changed the search path, and all inserts
are still failing due to referential integrity checks going against
"adium" still. Is there any way I can fix this, short of manually
dropping every constraint and recreating them?


I couldn't replicate this ... AFAICS the RI triggers reference tables by
OID, not name. What PG version are you using? Can you give a
self-contained test case?

regards, tom lane

---------------------------(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 #2

On Jun 24, 2004, at 4:46 PM, Tom Lane wrote:
Jeffrey Melloy <jm*****@visualdistortion.org> writes:
Recently, I decided to rename one of my schemas from "adium" to "im".
Then, all inserts started failing.
I recreated a couple functions, changed the search path, and all
inserts
are still failing due to referential integrity checks going against
"adium" still. Is there any way I can fix this, short of manually
dropping every constraint and recreating them?


I couldn't replicate this ... AFAICS the RI triggers reference tables
by
OID, not name. What PG version are you using? Can you give a
self-contained test case?

regards, tom lane

I'm using PostgreSQL 7.4.2, and have a script that reproduces my
problem:

Upon further inspection, the problem isn't the RI triggers; it's the
default sequence not changing.

Jeff
---------------------------(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 #3
Jeffrey Melloy <jm*****@visualdistortion.org> writes:
Upon further inspection, the problem isn't the RI triggers; it's the
default sequence not changing.


Ah. Yes, that's a known issue. We need to fix things so that the
sequence is (internally) referenced by OID rather than by name.
There's been some talk about how to do this but it's a bit harder
than it might sound ...

regards, tom lane

---------------------------(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

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

Similar topics

9
2055
by: peter | last post by:
Hello all, Recently I've started to refactor my code ...(I'm using python 2.3.4) I tried to add extra functionality to old functions non-intrusively. When I used a construct, which involves...
5
5257
by: Adam Barr | last post by:
I have a tag foo that I want to copy unchanged when it is a subtag of bar, so I have a template (x is the namespace for the document): <xsl:template match="x:bar/x:foo"> <xsl:copy>...
0
1721
by: Saradhi | last post by:
Hi All, Here I am facing a performance problem with the TreeView Node renaming. I am displaying a hierarchy Data in a treeview in my Windows C# Application. My tree view represents an...
0
1342
by: Andy | last post by:
Hello: I am using System.Web.Mail.MailMessage. Currently: when I am attaching a file to the object, I am renaming the file using the FileInfo.Copy method and attaching the new file to the...
2
6394
by: cloudx | last post by:
Hi there, it is driving me crazy. Aftering renaming app.config the following code I always get null on myApp. It works if I keep the name app.config. Why? string myApp =...
1
2734
by: Jason B | last post by:
Hello, I have been trying to figure out how to rename my IIS directories and still have the project be able to run through VS. I have renamed the directories listed in the csproj.webinfo file and...
10
1688
by: C. Levasseur | last post by:
I would like to use client side scripting for enabling/disabling buttons (depending on values in other fields). This worked fine in Asp.Net 1.1 but in Asp.Net 2.0, all the names and the id's of the...
2
1340
by: Brett Romero | last post by:
What is the best way for renaming a project (including namespace) that also has its tree structure as the project name in VSS? This project (DLL) is referenced by a couple of other projects in...
8
2837
by: BillCo | last post by:
I'm updating a legacy app with table naming that makes baby jesus cry. It's a bit of a spider web though... no telling when and where the tables will be called by name. So I wrote this for renaming...
4
2134
by: datapro01 | last post by:
I am running DB2 LUW 8.2.5 on AIX 5.3 I am being asked to rename an instance in Production which contains several databases. I am being told it would be difficult to shut the instance down. ...
0
7231
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
7132
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
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
7504
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
5640
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
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.