Skip site navigation (1) Skip section navigation (2)

Re: Bizzare plpgsql error

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Bizzare plpgsql error
Date: 2003-05-27 22:57:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Tue, 27 May 2003, Jim C. Nasby wrote:

> I'm getting this error trying to run a function:
> usps=# select process_zip4();
> WARNING:  Error occurred while executing PL/pgSQL function process_zip4
> WARNING:  line 55 at SQL statement
> ERROR:  parser: parse error at or near "$1" at character 14
> The relivant code is:
>             IF z.record_type_code = ''P'' THEN
>                 INSERT INTO po_box
>                     SELECT z4.zip4_id
>                             , ....
> The INSERT INTO is line 55. What makes no sense is that it works fine if
> I change the name of the table from po_box to anything else.

Do you happen to have a declared variable named po_box?  IIRC
plpgsql gets confused sometimes when things like that are done.

In response to


pgsql-general by date

Next:From: Stephan SzaboDate: 2003-05-27 23:00:10
Subject: Re: NULL sorts as largest?
Previous:From: Stephan SzaboDate: 2003-05-27 22:54:59
Subject: Re: speed w/ OFFSET/LIMIT

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group