From: | Christoph Berg <myon(at)debian(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Michael Banck <mbanck(at)gmx(dot)net>, Tommy Pavlicek <tommypav122(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org, jian(dot)universality(at)gmail(dot)com |
Subject: | Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR) |
Date: | 2024-09-27 17:31:19 |
Message-ID: | Zvbr5zv78AfhB83S@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Re: Tom Lane
> Perhaps. I spent a little more effort on this and added code to
> report errors that don't come with an error location. On those,
> we don't have any constraints about what to report in the QUERY
> field, so I made it trim the string to just the current query
> within the script, which makes things quite a bit better. You
> can see the results in the test_extensions regression test changes.
That looks very good me, thanks!
> (It might be worth some effort to trim away comments appearing
> just before a command, but I didn't tackle that here.)
The "error when psql" comments do look confusing, but I guess in other
places the comment just before the query adds valuable context, so I'd
say leaving the comments in is ok.
Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-09-27 17:54:44 | Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR) |
Previous Message | Masahiko Sawada | 2024-09-27 16:53:48 | Re: Using per-transaction memory contexts for storing decoded tuples |