bug with distinct?

From: Alfonso Peniche <alfonso(at)iteso(dot)mx>
To: pgsql-general(at)postgresql(dot)org
Subject: bug with distinct?
Date: 2001-02-10 00:23:59
Message-ID: 3A848A1F.D6E6F3F3@iteso.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I dont' know if this a bug or I am just out of my mind, but since it
works with other RDBMS's I decided to ask, so here it goes:

I am trying to do the following:

SELECT distinct 'mod_type' ,currval('mytable_idmytable_seq') from
mytable;

and I get the message:

ERROR: Unable to identify an ordering operator '<' for type 'unknown'
Use an explicit ordering operator or modify the query

Thinking it could be because of the currval I tried the following:

SELECT distinct 'mod_type', idmytable from mytable

getting the same result.

Am I doing something wrong? Is there a way to do this? Is this a bug?

Thanx

P.S. If someone is wondering what the heck I am trying to do.... I
pretend to insert into a log table, the mod_type for 'mytable' (in this
case insert) and the new inserted row for 'mytable'.

Cheers

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaw Terwilliger 2001-02-10 00:30:51 Re: Failover (was Re: PostgreSQL over NFS?)
Previous Message Alfred Perlstein 2001-02-10 00:23:10 Re: PostgreSQL over NFS?