execute sql in a function?

From: "Jiri D(dot) Hoogeveen" <jiri(at)pro(dot)nl>
To: pgsql-novice(at)postgresql(dot)org
Subject: execute sql in a function?
Date: 2001-07-17 15:21:05
Message-ID: 3B5457E1.9020605@pro.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

Is't possible to do something like this in a function witj the language
plpgsql?

declare
maxid int4;
begin
maxid := select max(id) from test;
return maxid + 10;

Grtz, Jiri

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Virginie Garcia 2001-07-17 15:43:53 sequence primary key
Previous Message Giorgio A. 2001-07-17 15:01:27 COUNT doesn't shows items with 0 occurrance