X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id BE7D39DCC05 for ; Sun, 12 Mar 2006 20:14:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35864-10 for ; Sun, 12 Mar 2006 20:14:45 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by postgresql.org (Postfix) with ESMTP id 9B5149DCC20 for ; Sun, 12 Mar 2006 20:14:40 -0400 (AST) Received: by zproxy.gmail.com with SMTP id f1so1126500nzc for ; Sun, 12 Mar 2006 16:14:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=VtH7KoBZX/auVl7cGSTEyhQBfSh5KEdBxglCggnu2zrGzMJneyoQ/v8f/SKtiz+jdDKVZxgOMfSpttCz1CHgT0NXGZyohIGXYy0ubd2HS1Z6UBKHOa8dbRSKo3getioIKRELDHBFlpx8AruiunDktgY2OX1WSqj4Dv2o9GlkmoM= Received: by 10.36.250.47 with SMTP id x47mr3850045nzh; Sun, 12 Mar 2006 16:14:43 -0800 (PST) Received: by 10.37.2.17 with HTTP; Sun, 12 Mar 2006 16:14:43 -0800 (PST) Message-ID: <74b035bb0603121614q7860079el@mail.gmail.com> Date: Sun, 12 Mar 2006 19:14:43 -0500 From: "Pierre Thibaudeau" To: pgsql-jdbc@postgresql.org Subject: Default values error: "input required" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12264_5979930.1142208883931" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.946 required=5 tests=[HTML_10_20=0.945, HTML_MESSAGE=0.001] X-Spam-Score: 0.946 X-Spam-Level: X-Archive-Number: 200603/60 X-Sequence-Number: 14841 ------=_Part_12264_5979930.1142208883931 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 a= n 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 m= y 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! ------=_Part_12264_5979930.1142208883931 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline My PostgreSQL database contains a table My_Table featuring (among others) a= column "entry_created_on" as date, and a column "entry_crea= ted_by" as text.

The default value of "entry_created_on&qu= ot; 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 fo= rms deals with My_Table.  I left out of the form any reference to &quo= t;entry_created_on" and "entry_created_by", with the impress= ion that the postmaster would provide those columns with their default valu= es whenever a new entry was added to the table---which is exactly what I wo= uld like to see happening.

Instead, OOoBase throws the follow error message:
"Error wr= iting 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?  Do= es a similar situation occur with MsAccess?  Have I forgotten somethin= g obvious?

PS: I tried using the SDBC driver, but OOoBase doesn't se= e the content of my tables, only their structure and the number of rows.&nb= sp; I also tried with the ODBC driver, but I was even less successful, sinc= e 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 mo= re appropriate to the Interface list!
------=_Part_12264_5979930.1142208883931--