Hi all

I have a datetime field that I need to have as a datetime field, but for
some things I only want to see the date part of it.
Specifically I need to do something like this:

create unique index on mytable (fld1, fld2, date(dt_fld));

While both date(datetime_fld) and datetime_fld::date will work fine in a
select or where clause, they both cause parse errors if used in a create
index.  Is this a bug or just not implimented yet? (PostgreSQL 6.4.2 on
Red Hat Linux 5.2)

I know that at least some other RDBMS's can do this, I've done it
before.

And yes I know that I could make a date field, and *maybe* say "default
date(dt_fld)"?
But I really don't want 2 fields when one should due.

Thanks
Have a great day
Terry Mackintosh <[EMAIL PROTECTED]>               http://www.terrym.com
sysadmin/owner                  I'm excited about life! How about YOU!?
Professional Web Hosting and site design to include programming
Proudly powered by R H Linux, Apache, PHP, PostgreSQL, other Open Source
-----------------------------------------------------------------------
Only if you know where you're going can you get there.

Reply via email to