On Thu, Nov 10, 2005 at 10:58:18 -0500,
  george young <gry@ll.mit.edu> wrote:
> [PostgreSQL 7.4RC2 on i686-pc-linux-gnu](I know, I know... must upgrade soon)
> 
> I have a table mytable like:
>  i |  txt  
> ---+-------
>  1 | the
>  2 | the
>  3 | rain
>  4 | in
>  5 | mainly
>  6 | spain
>  7 | stays
>  8 | mainly
>  9 | in
> 
> I want to update it, adding a ':' to txt so that each txt value is unique.
> I don't care which entry gets changed.  I tried:

This seems like an odd way to fix whatever problem you are having.

Assuming you really do want to go through with this, you can use oids to
distinguish rows. For example you could add a colon to the row with the
lowest oid for each repeated string, and keep doing that until you have them
all fixed.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to