Re: Re: PLpgSQL

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Dado Feigenblatt <dado(at)wildbrain(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Re: PLpgSQL
Date: 2001-07-23 14:27:43
Message-ID: 200107231427.f6NERhf23959@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bhuvan A 2001-07-23 14:33:42 how can we get total records in pg server?
Previous Message Karl Orbell 2001-07-23 14:27:15 position(text,text) function