[Zope] Timestamp and Bool types in Zope
Jim Penny
jpenny@universal-fasteners.com
Wed, 4 Apr 2001 12:26:18 -0400
On Wed, Apr 04, 2001 at 10:07:07AM +0200, Grant Murphy wrote:
> Hi
>
> I'm trying to insert or select timestamp and bool types into a postgres database and I'm using PoPyDA. Zope seem to only
> have types string, text and int, unless I missed something somewhere. Please help as I'm a newbie?
>
you already had a partial answer, here is a more complete one.
(An aside) postgres uses only strings for all internal communication;
numbers are converted to ASCII before interprocess send and back again
on receipt. This makes debugging issues go away, and removes
'endianness' messes. So, in priciple, the type=int is not real useful
(in fact it quotes differently, so it IS important)
To specify a timestamp or a bool, just use the normal cast notation.
i.e.
insert into .... 'now'::timestamp
or
insert into .... <dtml-sqlvar due_date type=string>::timestamp
etc.
> Thanks
> Grant
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>