Re: Need more info on PL/pgSQL compile listing

From: Michael Moore <michaeljmoore(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Need more info on PL/pgSQL compile listing
Date: 2015-11-17 00:36:25
Message-ID: CACpWLjOsmP2CEFXm++6fcGFD806GneTWO9nYQ8Te05m+eBhd1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks Tom,
do you know if there is any kind of a switch or command to make the
compiler give a more detailed message?

On Mon, Nov 16, 2015 at 4:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Moore <michaeljmoore(at)gmail(dot)com> writes:
> > I am doing like:
> > *mydb-# \i pxportal2_mod.sql*
>
> > which gives an error like:
>
> > *CREATE FUNCTION*
> > *psql:pxportal2_mod.sql:309: NOTICE: type reference
> > tx_portal.portal_name%TYPE converted to character varying*
> > *psql:pxportal2_mod.sql:309: NOTICE: type reference
> > tx_service_catalog.service_code%TYPE converted to character varying*
> > *psql:pxportal2_mod.sql:309: ERROR: syntax error at or near "pxportal2"*
> > *LINE 61: pxportal2.dlogerror (v_program_name,
> v_program_loca...*
> > * ^*
>
> > The problem is that there are lots of directives and comments in my input
> > file so that neither line 309 (above) or 61 is actually meaningful.
>
> I think 309 will be the file line number of the start of the CREATE
> FUNCTION command, while 61 will be the line number within the function
> body.
>
> If you have /* ... */ style comments in your file, I think psql might end
> up considering the start of the comment before the CREATE FUNCTION command
> as being the start point of that command for this purpose.
>
> regards, tom lane
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message 卢迪 2015-11-19 08:09:28 plpgsql: how to use a composite type varray
Previous Message Tom Lane 2015-11-17 00:02:30 Re: Need more info on PL/pgSQL compile listing