Re: Strange Type Mismatch on Insert

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Strange Type Mismatch on Insert
Date: 2001-03-20 01:18:37
Message-ID: Pine.BSF.4.21.0103191716290.27292-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 19 Mar 2001, Tom Lane wrote:

> Jeff Eckermann <jeckermann(at)verio(dot)net> writes:
> > Can anyone see what is the problem with the following insert?
> > gmp=# insert into data (site, gmp_id, item, category, gmp) values
> > ('Rochester', 22, 'Design fee', 12, 40000.00);
> > ERROR: Unable to identify an operator '=' for types 'text' and 'int4'
>
> Got any foreign keys associated with that table? Check for type
> mismatch between referencing and referenced columns. It's a bug
> that such problems are not detected when you declare the key
> relationship, but right now they're not detected until runtime...

As an odd side note on that...

I have a fix, using oper() to look for an = operator. I noticed
while doing that though that varchar and int4 appear to be comparable
while text and int4 aren't which seemed rather odd.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-20 01:52:35 Re: Strange Type Mismatch on Insert
Previous Message will trillich 2001-03-20 00:52:28 pg_description usage pointers?