Re: DELETE FROM error message

From: "Daniel Bakken" <dan(at)smtresource(dot)com>
To: "Postgres List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DELETE FROM error message
Date: 2002-07-18 20:50:54
Message-ID: EFELIOJNFEDFOHLPCGEJMEFKEIAA.dan@smtresource.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

FYI, I don't get that error message when I SELECT. For instance:

SELECT * FROM inventory WHERE invid = '01044T';

works just fine with no errors. When I try to delete that same record, I get
the error about explicit casts.

Daniel Bakken

> I tried your suggestion (both ways), but I still get the same
> error message
> about explicit casts.
>
> Daniel Bakken
>
> > DELETE FROM inventory WHERE invid = '01044T'::BPCHAR;
> >
> > Robert Treat
> >
> > On Wed, 2002-07-17 at 21:59, Darren Ferguson wrote:
> > > You will need to cats '01044T' to bpchar since postgres will take any
> > > string as a varchar unless specified otherwise.
> > >
> > > Use the following
> > >
> > > DELETE FROM inventory WHERE invid = '01044T'::VARCHAR;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Jenkins 2002-07-18 21:17:23 Re: Logging SQL queries?
Previous Message Tony Reina 2002-07-18 20:38:17 Re: Appropriate values for sort_mem and shared_buffers