pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jon Horsman <horshaq@gmail.com>
To: Rodrigo De Le� <rdeleonp@gmail.com>
Cc: sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Populate unique column with default value
Date: Mon, 1 Oct 2007 11:51:10 -0400
Message-ID: <4f4c2a010710010851y29d02056u6c3224ff38ec5b0f@mail.gmail.com> (raw)
In-Reply-To: <a55915760710010839u5e11e850sa0850564f73eaf4f@mail.gmail.com>
References: <4f4c2a010710010824t7a2fbd59kb9102c879b389a5d@mail.gmail.com>
	<a55915760710010839u5e11e850sa0850564f73eaf4f@mail.gmail.com>

> On 10/1/07, Jon Horsman <horshaq@gmail.com> wrote:
> > ... Is there an elegant way i can set the username
> > to be the extension of the current row ...
>
> UPDATE usertable
> SET username = extension
> WHERE username IS NULL;

Hmm, that simple eh, don't I feel stupid =)

Thanks a ton for the quick response.

Jon.



view thread (4+ messages)

Message-ID: <4f4c2a010710010851y29d02056u6c3224ff38ec5b0f@mail.gmail.com>
Permalink:  ../4f4c2a010710010851y29d02056u6c3224ff38ec5b0f@mail.gmail.com/
Also on:    postgresql.org/message-id/4f4c2a010710010851y29d02056u6c3224ff38ec5b0f@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: horshaq@gmail.com, rdeleonp@gmail.com
  Subject: Re: Populate unique column with default value
  In-Reply-To: <4f4c2a010710010851y29d02056u6c3224ff38ec5b0f@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox