Re: (un)grouping question

From: Reece Hart <reece(at)harts(dot)net>
To: Andrei Kovalevski <andyk(at)commandprompt(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Rhys Stewart <rhys(dot)stewart(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: (un)grouping question
Date: 2008-01-21 21:20:58
Message-ID: 1200950458.7144.47.camel@snafu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2008-01-21 at 22:05 +0200, Andrei Kovalevski wrote:
> How can you garantee that "somevalue + random()" won't duplicate other
> unique values in this column? ;)

Like the inane memo from the boss says, "expect the unexpected" and
"tell me all the unpredictable issues that will happen".

If uid is unique then something like
=> select uid,somevalue,somevalue||'-'||uid from mytable
is much better.

-Reece

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2008-01-21 21:37:32 Re: Graphics
Previous Message Joshua D. Drake 2008-01-21 21:20:26 PostgreSQL 8.3 RC2 is now available!