From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | Tomisław Kityński <cromax(at)amiga(dot)pl> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: PreparedStatement and DB default values |
Date: | 2002-07-08 16:40:40 |
Message-ID: | 3D29C088.7000906@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Do you have any triggers or rules on this table that might be causing
the problem?
--Barry
Tomisław Kityński wrote:
>----- Original Message -----
>From: "Barry Lind" <barry(at)xythos(dot)com>
>To: "Tomisław Kityński" <cromax(at)amiga(dot)pl>
>Cc: <pgsql-jdbc(at)postgresql(dot)org>
>Sent: Friday, July 05, 2002 9:08 PM
>Subject: Re: [JDBC] PreparedStatement and DB default values
>
>
>
>
>>I doubt this is jdbc related. Can you turn on query tracing in the
>>server to see the exact SQL that the jdbc driver is sending to the
>>server and then run that same sql through psql?
>>
>>
>>
> This is part of the log from postmaster fired off with -d 4:
>
>DEBUG: query: INSERT INTO "users" ("first", "last", "email", "ed") VALUES
>('Jan', 'Nowak', 'jan(at)poczta(dot)pl', 'f');
>
> And now the best part--this query pasted into psql... didn't work too!
>As I'm almost sure, that similar insert string worked for psql, I looked
>into
>.psql_history to find that exact insert that worked. I found it, I pasted
>it,
>and... it didn't work too! Uhm, I am very confused now. Well, I issued
>also such statement:
>
> INSERT INTO users DEFAULT VALUES;
>
>and it refuses to insert null value in not null attribute id_user,
>which of course have defined not-null default value. And this _really_
>is something strange, 'cos I am almost 100% sure that, this one worked
>some time ago (I have it in .psql_history). Well, I checked the table for
>tuples with "first" and "last" set to default values and there is only
>one tuple which consists of exactly the same values as default values.
>And I am sure this tuple exists because above statement worked--but now
>it does not (what this depend on? debug level??? uhm, I guess not--
>I just started postmaster in silent mode and the same happens).
>
>Well, this looks very misterious to me, but you're right in one place:
>this isn't probably JDBC related. But how to explain the existence of
>'default' tuple in table? I really have strong impression, that those
>statements were working when issued from psql few days ago, and now
>they're not. 8((
>
>The worst thing is, that on sunday I have to pass db-project (studies),
>and now I made some steps back 8(
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2002-07-08 16:43:40 | Re: XADatasource |
Previous Message | Dave Cramer | 2002-07-08 14:22:57 | Re: XADatasource |