Re: CREATE SEQUENCE fails in plpgsql function

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Erik Erkelens <erik_erkelens(at)yahoo(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: CREATE SEQUENCE fails in plpgsql function
Date: 2003-07-01 04:49:30
Message-ID: 20030630214811.D46138-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Mon, 30 Jun 2003, Erik Erkelens wrote:

> new_max_records ALIAS FOR $1;
> BEGIN
> DROP SEQUENCE my_sequence;
> --CREATE SEQUENCE my_sequence MAXVALUE 4
> CYCLE;
> CREATE SEQUENCE my_sequence MAXVALUE
> new_max_records CYCLE;

Most of the creates/drops/etc... don't directly work with
variables/arguments. You can probably do this with execute
however.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stefan Bill 2003-07-01 04:54:45 Re: LEAST and GREATEST functions?
Previous Message Mendola Gaetano 2003-07-01 03:40:03 Re: cleaning up useless pl/pgsql functions