Re: [GENERAL] Dynamic update - Mailing list pgsql-general

From Aaron J. Seigo
Subject Re: [GENERAL] Dynamic update
Date
Msg-id 99110313450205.00702@stilborne
Whole thread Raw
In response to Dynamic update  (Simon Drabble <simon@eskimo.com>)
List pgsql-general
hi...

> UPDATE member SET votes = `SELECT count(votes) FROM ballot WHERE id = 1`;

> If not, are there truly dynamic SQL-only (i.e. without resorting to external
> functions) ways to achieve this? Am I being obtuse and missing something
> obvious?

i don't know if pl/pgsql fits your definition of an "external function", but...
if not... a simple pl/pgsql function would do this handily...



--
Aaron J. Seigo
Sys Admin

pgsql-general by date:

Previous
From: "Timothy H. Keitt"
Date:
Subject: query seems too slow
Next
From: "Chris Teli"
Date:
Subject: Real Time Applications