Re: [PATCH] SQL function to report log message
| От | Tom Lane |
|---|---|
| Тема | Re: [PATCH] SQL function to report log message |
| Дата | |
| Msg-id | 15578.1436821971@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [PATCH] SQL function to report log message (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
| Ответы |
Re: [PATCH] SQL function to report log message
|
| Список | pgsql-hackers |
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 7/13/15 3:39 PM, dinesh kumar wrote:
>> Ah. It's' my bad interpretation. Let me work on it, and will send a new
>> patch as a wrapper sql function for ereport.
> You might want to present a plan for that; it's not as trivial as it
> sounds due to how ereport works. In particular, I'd want to see (at
> minimum) the same functionality that plpgsql's RAISE command now
> provides (errdetail, errhint, etc).
The real question is why the existing functionality in plpgsql isn't
sufficient. Somebody who wants a "log from SQL" function can easily
write a simple plpgsql function that does exactly what they want,
with no more or fewer bells-n-whistles than they need. If we try
to create a SQL function that does all that, it's likely to be a mess
to use, even with named arguments.
I'm not necessarily against the basic idea, but I think inventing
something that actually offers an increment in usability compared
to the existing alternative is going to be harder than it sounds.
regards, tom lane
В списке pgsql-hackers по дате отправления: