Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » PostgreSQL Attribute Foreign Key --> Bug?
icon5.gif  PostgreSQL Attribute Foreign Key --> Bug? [message #17448] Fri, 15 August 2008 17:22 Go to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
I noticed that my foreign keys were not being created in my PostgreSQL database. So I copied a query from the Attributes script created by U++ and tried to run it manually. The query was:
alter table MYTABLE1 add constraint FK_MYTABLE1$MYT_ID foreign key (MYT_ID) references MYTABLE2.MYT_ID;

The error I received was something like:
"ERROR: schema mytable2 does not exist."
I changed the script line to:
alter table MYTABLE1 add constraint FK_MYTABLE1$MYT_ID foreign key (MYT_ID) references MYTABLE2(MYT_ID);

Note the paren () instead of dot/period.
And it worked...

I am using PostgreSQL 8.2.9
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: Connecting to multiple databases.
Next Topic: Count error
Goto Forum:
  


Current Time: Fri Aug 15 17:12:51 CEST 2025

Total time taken to generate the page: 0.08714 seconds