set line number / input file name in psql

From: Adrian von Bidder <avbidder(at)fortytwo(dot)ch>
To: pgsql-general(at)postgresql(dot)org
Subject: set line number / input file name in psql
Date: 2010-02-19 08:04:54
Message-ID: 201002190904.55399@fortytwo.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2010-02-19 08:32:51 Re: Not able to access schema functions and table...
Previous Message dipti shah 2010-02-19 07:21:47 Not able to access schema functions and table...