| From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
|---|---|
| To: | Bricklen Anderson <BAnderson(at)PresiNET(dot)com> |
| Cc: | Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: how to emit line number in a function? |
| Date: | 2005-11-03 20:20:26 |
| Message-ID: | 20051103202026.GA55520@pervasive.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Nov 03, 2005 at 09:25:27AM -0800, Bricklen Anderson wrote:
> Richard Huxton wrote:
> > Bricklen Anderson wrote:
> >
> >>I couldn't find any useful references in the docs or archives for emitting the
> >>line number of a plpgsql function (in a RAISE statement). I'd like to use it for
> >>debugging some complex functions.
> >>Does anyone have any tips on where to look, or an example of this?
> >
> >
> > I don't think you can do so yourself. However, recent versions of PG
> > should display the line number of a RAISE NOTICE or similar if you have
> > the error verbosity high enough.
> >
> Okay, thanks for the head's up.
> Is there any other way to get the current line number, for example, an inline
> function call to elog(?) or something? It's not a huge deal, but it would be
> useful for debugging and timings.
This seems to be something useful to have... can we get a TODO? Unless
maybe Bricklen wants to submit a patch... :)
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2005-11-03 20:23:16 | Re: Save prepared plan... |
| Previous Message | Jim C. Nasby | 2005-11-03 20:13:10 | Re: Lock Modes (Documentation) |