agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Moore <michaeljmoore@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Need more info on PL/pgSQL compile listing
Date: Mon, 16 Nov 2015 19:02:30 -0500
Message-ID: <4387.1447718550@sss.pgh.pa.us> (raw)
In-Reply-To: <CACpWLjNR-0T3w55i34eqK3z9BrVu2ojxoXPp3aUZWUFYF_M60A@mail.gmail.com>
References: <CACpWLjNR-0T3w55i34eqK3z9BrVu2ojxoXPp3aUZWUFYF_M60A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

Michael Moore <michaeljmoore@gmail.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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (3+ messages)  latest in thread

Message-ID: <4387.1447718550@sss.pgh.pa.us>
Permalink:  ../4387.1447718550@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4387.1447718550@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michaeljmoore@gmail.com
  Subject: Re: Need more info on PL/pgSQL compile listing
  In-Reply-To: <4387.1447718550@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox