Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by postgresql.org (8.11.3/8.11.1) with SMTP id f6NEeof88393 for ; Mon, 23 Jul 2001 10:40:50 -0400 (EDT) (envelope-from janwieck@yahoo.com) Received: from jupiter.us.greatbridge.com (65.196.69.55) by smtp.mail.vip.sc5.yahoo.com with SMTP; 23 Jul 2001 14:34:07 -0000 X-Apparently-From: Received: (from wieck@localhost) by jupiter.us.greatbridge.com (8.11.2/8.11.2) id f6NERhf23959; Mon, 23 Jul 2001 10:27:43 -0400 From: Jan Wieck Message-Id: <200107231427.f6NERhf23959@jupiter.us.greatbridge.com> Subject: Re: Re: PLpgSQL In-Reply-To: from Josh Berkus at "Jul 21, 2001 09:30:27 am" To: Josh Berkus Date: Mon, 23 Jul 2001 10:27:43 -0400 (EDT) CC: Dado Feigenblatt , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200107/307 X-Sequence-Number: 4116 Josh Berkus wrote: > Dado, > > > But still, the $1 is still plaguing me. > > > > Here's your problem: > > > >>CREATE FUNCTION new_proj_pts_seq(int4) > > >>RETURNS text > > >>AS 'DECLARE > > >> proj_ID alias for $1; > > >> seq_name TEXT; > > >> BEGIN > > >> seq_name := ''proj_pts_'' || proj_ID; > > >> create sequence seq_name; > > >> END; > > >> RETURNS seq_name;' > > This should read: RETURN seq_name > > No "S". And should be placed before the END; > > > >>LANGUAGE 'plpgsql'; > > -Josh Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com