Обсуждение: large going giving errors.
Hi I have a largeish join that is giving me an error.. here's the query SELECT o.name,o,contactname,o.contactphone,o.fax,o.emailaddy,o.freetelephone,o.address1,o.address2,uw.id,m.manufacturer,i.type,uw.model,uw.color,uw.size,uw.price FROMuser_wantads AS uw,organisations AS o,users AS u ,itemtypes AS i,itemmanufacturers AS m,provinces AS p,cities AS ct,countriesAS cyWHERE uw.owner = u.loginid AND u.belongsto = o.organisationid AND m.id=uw.manufacturer AND i.id=uw.itemtype AND o.provinceid=p.provinceid AND o.cityid=ct.cityid AND o.countryid=cy.countryid AND uw.id=9 and the error ERROR: copyObject: don't know how to copy 704 can anyone shed a little light please ? jeff.
What happens when you don't join quite so much? That is, take off the AND blah blocks, one by one? -Robby -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of jeff@tht.net Sent: Wednesday, June 13, 2001 3:38 PM To: pgsql-sql@postgresql.org Subject: [SQL] large going giving errors. Hi I have a largeish join that is giving me an error.. here's the query SELECT o.name,o,contactname,o.contactphone,o.fax,o.emailaddy,o.freetelephone,o.addr ess1,o.address2,uw.id,m.manufacturer,i.type,uw.model,uw.color,uw.size,uw.pri ce FROM user_wantads AS uw,organisations AS o,users AS u ,itemtypes AS i,itemmanufacturers AS m,provinces AS p,cities AS ct,countries AS cyWHERE uw.owner = u.loginid AND u.belongsto = o.organisationid AND m.id=uw.manufacturer AND i.id=uw.itemtype AND o.provinceid=p.provinceid AND o.cityid=ct.cityid ANDo.countryid=cy.countryid AND uw.id=9 and the error ERROR: copyObject: don't know how to copy 704 can anyone shed a little light please ? jeff. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
i actually found the problem, SELECT o.name,o,contactname should be SELECT o.name,o.contactname jeff On Wed, 13 Jun 2001, Robby Slaughter wrote: > What happens when you don't join quite so much? That is, take off the AND > blah blocks, > one by one? > -Robby > > -----Original Message----- > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of jeff@tht.net > Sent: Wednesday, June 13, 2001 3:38 PM > To: pgsql-sql@postgresql.org > Subject: [SQL] large going giving errors. > > > Hi > > I have a largeish join that is giving me an error.. > > here's the query > > SELECT > o.name,o,contactname,o.contactphone,o.fax,o.emailaddy,o.freetelephone,o.addr > ess1,o.address2,uw.id,m.manufacturer,i.type,uw.model,uw.color,uw.size,uw.pri > ce > FROM user_wantads AS uw,organisations AS o,users AS u ,itemtypes AS > i,itemmanufacturers AS m,provinces AS p,cities AS ct,countries AS cy > WHERE uw.owner = u.loginid > AND u.belongsto = o.organisationid > AND m.id=uw.manufacturer > AND i.id=uw.itemtype > AND o.provinceid=p.provinceid > AND o.cityid=ct.cityid AND o.countryid=cy.countryid > AND uw.id=9 > > and the error > > ERROR: copyObject: don't know how to copy 704 > > can anyone shed a little light please ? > > jeff. > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >
<jeff@tht.net> writes: > SELECT o.name,o,contactname,o.contactphone,o.fax,o.emailaddy,o.freetelephone,o.address1,o.address2,uw.id,m.manufacturer,i.type,uw.model,uw.color,uw.size,uw.price > FROM user_wantads AS uw,organisations AS o,users AS u ,itemtypes AS i,itemmanufacturers AS m,provinces AS p,cities ASct,countries AS cy > WHERE uw.owner = u.loginid > AND u.belongsto = o.organisationid > AND m.id=uw.manufacturer > AND i.id=uw.itemtype > AND o.provinceid=p.provinceid > AND o.cityid=ct.cityid AND o.countryid=cy.countryid > AND uw.id=9 > ERROR: copyObject: don't know how to copy 704 You probably wanted "o.contactname" not "o,contactname". 7.2 will give a more useful error message for this sort of mistake ... regards, tom lane