set line number / input file name in psql - Mailing list pgsql-general

From Adrian von Bidder
Subject set line number / input file name in psql
Date
Msg-id 201002190904.55399@fortytwo.ch
Whole thread Raw
List pgsql-general
Heyho!

I'm writing a little toy project, part of it involves scripts that pre-
process sql and then feed it to psql.

Is it possible to set the input filename / line number in psql?

(Similar to how cpp includes this information so that the compiler can
report the filename/line number of the C file and not the preprocessed
file.)

If it's not possible: would it be realistic that PostgreSQL would accept a
patch, if I were to implement it?  Either (without changing the syntax)
using \set a special variable, or (for those who'd like to use cpp)
extending the lexer and accepting the cpp syntax.  (Perhaps conditionally on
a --cpp-processed cmdline option.)

cheers
-- vbi

--
Kallisti!

Attachment

pgsql-general by date:

Previous
From: wilczarz1@op.pl
Date:
Subject: Re: PERFORM not working properly, please help..
Next
From: wilczarz1@op.pl
Date:
Subject: Re: PERFORM not working properly, please help..