From: Pierre Thibaudeau <pierdeux@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Default values error: "input required"
Date: Sun, 12 Mar 2006 19:14:43 -0500
Message-ID: <74b035bb0603121614q7860079el@mail.gmail.com> (raw)
My PostgreSQL database contains a table My_Table featuring (among others) a
column "entry_created_on" as date, and a column "entry_created_by" as text.
The default value of "entry_created_on" is: now()
and the default value of "entry_created_by" is: "current_user"()
I use OpenOfficeBase (similar to MsAccess) as a front-end to populate the
database through the JDBC driver. One of these forms deals with My_Table.
I left out of the form any reference to "entry_created_on" and
"entry_created_by", with the impression that the postmaster would provide
those columns with their default values whenever a new entry was added to
the table---which is exactly what I would like to see happening.
Instead, OOoBase throws the follow error message:
"Error writing data to database. Input required in field 'entry_created_on'.
Please enter a value."
On the other hand, everything works fine when I created a new row through an
sql INSERT command, or through pgAdmin: I get the expected defaults values
of now() and "current_user"().
Is the problem with the JDBC driver or is it with OOoBase? Does a similar
situation occur with MsAccess? Have I forgotten something obvious?
PS: I tried using the SDBC driver, but OOoBase doesn't see the content of my
tables, only their structure and the number of rows. I also tried with the
ODBC driver, but I was even less successful, since I couldn't even see my
schemas and tables, even though the driver claims to connect properly...
PPS: I was undecided where to send this; sorry if this issue was more
appropriate to the Interface list!
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-jdbc@postgresql.org
Cc: pierdeux@gmail.com
Subject: Re: Default values error: "input required"
In-Reply-To: <74b035bb0603121614q7860079el@mail.gmail.com>
References: <74b035bb0603121614q7860079el@mail.gmail.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