[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUe] Problem with datetime in updates
From: |
chafar |
Subject: |
[GNUe] Problem with datetime in updates |
Date: |
Mon, 29 Mar 2004 01:49:57 +0200 |
User-agent: |
Mutt/1.3.28i |
Hello.
I have a table definition like that:
<table name="org_org">
<constraints>
...
</constraints>
<fields>
<field name="id" type="key" auto="Y" defaultwith="serial"
nullable="N"/>
<field name="nick" type="string" length="25" nullable="N"/>
<field name="name" type="string" length="60" nullable="N"/>
<field name="created" type="datetime" defaultwith="timestamp"
^^^^^^^^^^
nullable="N"/>
<field name="status" type="string"/>
<field name="status_updated" type="datetime"
defaultwith="timestamp" nullable="N"/>
</fields>
...
</table>
Postgresql gives this schema:
...
CREATE TABLE "org_org" (
"id" bigint DEFAULT nextval('org_org_id_seq'::text) NOT NULL,
"nick" character varying(25) NOT NULL,
"name" character varying(60) NOT NULL,
"created" timestamp without time zone DEFAULT now() NOT NULL,
^^^^^^^^^
"status" text,
"status_updated" timestamp without time zone DEFAULT now() NOT NULL,
Constraint "pk_org" Primary Key ("id")
);
...
And, as a query example from line command:
id | nick | name | created | ...
----+------+------+----------------------------+ ...
11 | f | ff | 2004-03-29 01:23:22.886056 | ...
^^^^^^
i.e.: timestamp has 6 decimal digits for seconds
The problem arises when I you try to update from gnue-forms, which
issues this statement:
DB005: [RecordSet:56] _postChanges: statement=UPDATE org_org SET
name='fff' WHERE id='11' AND status_updated='2004-03-29 01:23:22' AND
created='2004-03-29 01:23:22' AND name='ff' AND nick='f' AND
^^^^^^^^^^^^^^^^^^^
status='prop'
i.e.: no decimal digits for seconds, so none record gets updated.
?Any suggestion about how can I deal with it?
thanks in advance.
--
Jos? Esteban
Granada - Spain
- [GNUe] Problem with datetime in updates,
chafar <=