Re: explicit cast error

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Lynn David Newton <lynn(dot)newton(at)cox(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: explicit cast error
Date: 2002-07-05 17:12:59
Message-ID: 20020705100744.S27855-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Thu, 4 Jul 2002, Lynn David Newton wrote:

> Having said that ... I'm charged with putting together
> what seems to be a fairly straightforward database of
> so far five tables. Most things are working all right,
> but I have a hump to get over. I have a table
> definition that is structurally idential to the
> following (with actual field, table names, and comments
> changed/removed because the project is company
> confidential):
>
> create table abc
> (
> c1 serial not null primary key,
> c2 smallint not null,
> lab text not null,
> dlab text not null,
> bdigits bigint null,
> foreign key (bdigits) references def
> );
>
> Never mind the table def for right now.

Well, actually, it'd be useful to know how the primary
key for def is defined since you're doing a references
constraint to it (since you have not specified a column
set it'll point to the primary key of the other table).

I'd suggest as a first step turning on query printing
in the logs so you can see if it's your query or the
query being run for the foreign keys or some other query
that is causing the problem.
I think you can do this by setting debug_print_query
to true in the postgresql.conf in your data directory.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert L Mathews 2002-07-05 17:14:36 Re: I am being interviewed by OReilly
Previous Message Stephan Szabo 2002-07-05 17:07:09 Re: two primairy key in one table ?