Re: Parse error help needed... - Mailing list pgsql-general

From Larry Rosenman
Subject Re: Parse error help needed...
Date
Msg-id 40600000.1073957347@lerlaptop.lerctr.org
Whole thread Raw
In response to Re: Parse error help needed...  ("Thapliyal, Deepak" <dthapliyal@soe.sony.com>)
List pgsql-general

--On Monday, January 12, 2004 17:24:14 -0800 "Thapliyal, Deepak"
<dthapliyal@soe.sony.com> wrote:

> Made the change and used returns in both places now .. Gives me error
>
> postgres=# \i a.sql
> psql:a.sql:10: ERROR:  language "plpgsql" does not exist
>
createlang plpgsql


> Any help is appreciated
>
> Thx
> Deep
>
> create function loadme() returns text as '
> Declare
>    s_out text ;
> Begin
>   For i in 1..10000 loop
>     insert into test values (i,''Test'');
>   end loop;
> returns s_out;
> End;
> ' language 'plpgsql';
>
>
>
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Alex Satrapa
> Sent: Monday, January 12, 2004 4:57 PM
> To: PostgreSQL General
> Subject: Re: [GENERAL] Parse error help needed...
>
>
> Thapliyal, Deepak wrote:
>> create function loadme() return text as '
>
> try "RETURNS" instead of "RETURN"
>
> [the guys writing the function parser might want to consider reporting
> what the parser was expecting at this point]
>
>> Declare
>>    s_out text ;
>> Begin
>>   For i in 1..10000 loop
>>     insert into test values (i,''Test'');
>>   end loop;
>> return s_out;
>> End;
>> ' language 'plpgsql';
>
> The rest looks fine (works for me - yes I tested it this time)
>
> Alex Satrapa
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>



--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Attachment

pgsql-general by date:

Previous
From: "Thapliyal, Deepak"
Date:
Subject: Re: Parse error help needed...
Next
From: "Jim Wilson"
Date:
Subject: Re: Column qualifier issue