Update question

From: "Fay Du" <fay(dot)du(at)versaterm(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Update question
Date: 2006-03-28 16:41:39
Message-ID: 00b801c65286$7ca8f260$b8d849c6@versaterm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all:

I have a table like this:

Table cost
Id edge_id cost
1 30 101.4
2 30 null
3 40 500.2
4 40 null
5 45 300.7
6 45 null

I want to set cost value with same edge_id by same value. The existing
values are calculated by calling a function (calculate edge length). I
can calculate the value by same function, but the function was slow. I
wander if I can use update statement to set the second value with same
edge_id. Thanks in advance for your help.

Fay

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Markus Schaber 2006-03-28 16:51:55 Re: Update question
Previous Message Wiebe Cazemier 2006-03-28 09:59:13 Re: cursor and for update