Paul Makepeace wrote:
> Hi, is there any documentation for Pg's UPDATE FROM (apparently
> non-standard) syntax? It is mentioned briefly in \h update and not at
> all in http://www.postgresql.org/docs/7.3/static/dml-update.html
> or http://www.postgresql.org/docs/7.3/static/queries-table-expressions
In PL/pgSQL - SQL Procedural Language, 37.6.2. SELECT
INTO, is written:
Here is an example that handles the case where no rows
have been returned:
DECLARE
users_rec RECORD;
full_name varchar;
BEGIN
SELECT INTO users_rec * FROM users WHERE
user_id=3;
IF users_rec.homepage IS NULL