Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 06F829FA15B for ; Mon, 1 Oct 2007 12:40:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 59056-04 for ; Mon, 1 Oct 2007 12:40:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by postgresql.org (Postfix) with ESMTP id EAD239FA15F for ; Mon, 1 Oct 2007 12:40:06 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so2957555wxc for ; Mon, 01 Oct 2007 08:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=DFjZ/Zd+O2qoDe1c6SQFaHoM5yudA1MiqbFJlR7qGe8=; b=bT2xFpKJJuFfJ1Ief+afswFYEitifOrBY2tVli0YhRcyrgBCytvIQSd7Gi0zmLJyxLFriCGWggl87R1WD+YtxsYjmJOkLhCrpq4UHIJIBm3plsT1HDLy7XflNSwhCGgiZiV3nZJf/btovwHhAHPFh1c2xatTJP5OyK0bOgKrNt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bhP5tmYo9Ftr9bSB2VaY04KhIqPDcPm+AGAlAqUILRajcQpomhfmrFN/Z6Wem2mkFTY8WQUNWSF25+PTdIwmlsSWMU3QWN+FhRgR3btwvfO0wmJDKPDcTbQaVvbsBdfCqfYtmbWrkEvaW6vp40K/9MK4v4EysnMWdYL9p0oruWY= Received: by 10.90.94.2 with SMTP id r2mr5253755agb.1191253195662; Mon, 01 Oct 2007 08:39:55 -0700 (PDT) Received: by 10.90.117.8 with HTTP; Mon, 1 Oct 2007 08:39:55 -0700 (PDT) Message-ID: Date: Mon, 1 Oct 2007 10:39:55 -0500 From: "=?UTF-8?Q?Rodrigo_De_Le=EF=BF=BD?=" To: "Jon Horsman" Subject: Re: Populate unique column with default value Cc: "sql pgsql" In-Reply-To: <4f4c2a010710010824t7a2fbd59kb9102c879b389a5d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4f4c2a010710010824t7a2fbd59kb9102c879b389a5d@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/3 X-Sequence-Number: 29375 On 10/1/07, Jon Horsman 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;