Hi all

OK, I did not know about "datetime_date", hum.

As this does work with only one field and as it is a common feature in
other RDBMS's, it would thus seem that this is either a bug or just not
yet implimented.

Does any of the core developers care to comment? is this a bug or just
not implimented?

It would seem to be a bug in the parser, and as it will work with a one
field index, then it would seem that if it could get past the parser
then it should work?


Thanks and have a great day
Terry

P.S.
To the list maintainer:
Not having a "Reply-To:" mail header pointing back at the list is a
pain.  Seems to me that it used to be there, what happened?

------------- old message below --------------------

Hello

I manage to create an index like you described as follow:

create index foo_idx on foo (datetime_date(dt_field) date_ops);

when I missed the term "date_ops" I received this response:
ERROR:  DefineIndex: (null) class not found

I tried to create indexes with more columns and datetime_date(dt_field)
date_ops but ... postgres gave me parse errors.

Bye



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Terry Mackintosh
> Sent: Thursday, June 03, 1999 1:55 PM
> To: pgadmin
> Subject: [ADMIN] create index and date type casting: howto?
>
>
> 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