Thread: BUG #2867: FULL PATH name problem
The following bug has been logged online: Bug reference: 2867 Logged by: Ted Petrosky Email address: tedpet5@yahoo.com PostgreSQL version: 8.2 Operating system: OS X Description: FULL PATH name problem Details: I have been working with WebObjects and the EOModeler. When I tell EOModeler to examine a table, it comes up with this for the primary key. ALTER TABLE public.article ADD CONSTRAINT public.article_PK PRIMARY KEY (entityid); I must change it to be: ALTER TABLE public.article ADD CONSTRAINT article_PK PRIMARY KEY (entityid); because postgresql doesn't like the 'public.' after the CONSTRAINT. I guess the question is, should it? Ted
"Ted Petrosky" <tedpet5@yahoo.com> writes: > I have been working with WebObjects and the EOModeler. When I tell EOModeler > to examine a table, it comes up with this for the primary key. > ALTER TABLE public.article ADD CONSTRAINT public.article_PK PRIMARY KEY > (entityid); > I must change it to be: > ALTER TABLE public.article ADD CONSTRAINT article_PK PRIMARY KEY > (entityid); > because postgresql doesn't like the 'public.' after the CONSTRAINT. I guess > the question is, should it? No, I think that'd be a bad idea. The SQL spec does call for a schema-qualified constraint name here, but that's because they have a different model of the constraint namespace than we do, to wit, unique per schema vs. our unique per table. Unless you want to buy into the SQL naming model, you shouldn't be trying to specify a schema name here. regards, tom lane
So my problem is that the program EOModeler is forcing the schema-qualified constraint. I will filed a bug report with Apple.... Unfortunitily, I believe that the product has been deprecated.... I have yet to get eclipse with "entity modeler" working correctly to see what it does the the name space.... Thanks for the reply Ted --- Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Ted Petrosky" <tedpet5@yahoo.com> writes: > > I have been working with WebObjects and the > EOModeler. When I tell EOModeler > > to examine a table, it comes up with this for the > primary key. > > > ALTER TABLE public.article ADD CONSTRAINT > public.article_PK PRIMARY KEY > > (entityid); > > > I must change it to be: > > ALTER TABLE public.article ADD CONSTRAINT > article_PK PRIMARY KEY > > (entityid); > > because postgresql doesn't like the 'public.' > after the CONSTRAINT. I guess > > the question is, should it? > > No, I think that'd be a bad idea. The SQL spec does > call for a > schema-qualified constraint name here, but that's > because they have a > different model of the constraint namespace than we > do, to wit, unique > per schema vs. our unique per table. Unless you > want to buy into the > SQL naming model, you shouldn't be trying to specify > a schema name here. > > regards, tom lane > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com