Simple question about messages - Mailing list pgsql-general

From Hadley Willan
Subject Simple question about messages
Date
Msg-id 1051656206.1866.90.camel@atlas.sol.deeper.co.nz
Whole thread Raw
Responses Re: Simple question about messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi All,
   I've written a script that trawls through my sql code and in
conjunction with GPP parses my code. I can then pipe this output from
bash to a file and as one large file, pipe that sql into postgresql from
the cli psql.

eg.
psql -h gaia -U postgres -d template1 < create_users_and_database.sql >
dbout.txt

That way the output is put into a file rather than just the terminal.
It also reduces the clutter on the screen and off the mark I get the
table create notice like NOTICE:: CREATE TABLE ......

However, may question is that how do I raise custom notices like 'At
point x' or something. That way I can get a feel for where the commands
are and that way when the occasiconal 'parser: parse error at or near
'WHERE' character 2' pops up know where roughly to find it.

I've tried RAISE NOTICE 'xxx'; but that fails.
SELECT 'point x' AS point; creates a larger output of result name and
text, but that isn't ideal.

I've flicked through the docs, but nothing jumps out at me?

Thanks.
--
Hadley Willan > Systems Development > Deeper Design Limited. +64(7)377-3328
hadley.willan@deeperdesign.co.nz > www.deeperdesign.com > +64(21)-28-41-463
Level 1, 4 Tamamutu St, PO Box 90, TAUPO 2730, New Zealand.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: ExecutePlan: (junk) `ctid' is NULL!
Next
From: Tom Lane
Date:
Subject: Re: Simple question about messages