From: | "Pierre Thibaudeau" <pierdeux(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Default values error: "input required" |
Date: | 2006-03-13 00:14:43 |
Message-ID: | 74b035bb0603121614q7860079el@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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!
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2006-03-14 03:23:06 | pg_service.conf ? |
Previous Message | Thomas Dudziak | 2006-03-11 15:22:34 | Re: meta-data problem |