pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: chris Günther <guenther@uscreen.de>
To: pgsql-sql@postgresql.org
Subject: Re: DELETE FROM fails with error
Date: Wed, 28 Mar 2001 07:54:05 -0800
Message-ID: <web-30884@davinci.ethosmedia.com> (raw)
In-Reply-To: <20010328115051.6ad6ad5d.guenther@uscreen.de>

Chris,

> I have a reference between these two tables pointing from
> tblshop.ID_Country to 
> tblcountry.ID_Country
> 
> When I try to delete a row from tblshop I get the error that postgres
> can't find
> the attribute id_shop. My SQL-command looks like follows:
> 
> 	DELETE FROM tblshop WHERE tblshop."ID_Shop" = 12
> 
> the same happens when I try to do:
> 
> 	DELETE FROM tblshop WHERE tblshop."ID_Country" = 3
> 
> I also tried this query without quotes, with simple quotes (')
> without the leading
> tablename and so on, but I always get the error-message:

Two possibilities:

1. You're using a couple of different cases in the above example.
PostgreSQL is case-sensitive.  What interface program are you using?
What OS?  From the error messages, it looks like your commands are being
lower-cased by the interface or data transport, which would cause
Postgres not to recognize the field names.
	a. Try you commands from PSQL on the Database server, making sure that
your case is the same as the table definition.
	b. If you can down the DB for an hour, try re-naming one of the ID
fields in lower case (one that isn't foriegn keyed, of course).

2. It's possible that defining these rows as type OID requires some
special reference syntax.  If so, hopefully someone on the list will
come forward.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



view thread (3+ messages)  latest in thread

Message-ID: <web-30884@davinci.ethosmedia.com>
Permalink:  ../web-30884@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-30884@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, guenther@uscreen.de
  Subject: Re: DELETE FROM fails with error
  In-Reply-To: <web-30884@davinci.ethosmedia.com>
  References: <20010328115051.6ad6ad5d.guenther@uscreen.de> <web-30884@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox