Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-09 Thread Volkan YAZICI
On Mon, 8 Sep 2008, Alvaro Herrera [EMAIL PROTECTED] writes: Modified as you suggested. BTW, will there be a similar i18n scenario for dropped column you mentioned below? Yes, you need _() around those too. For this purpose, I introduced a dropped_column_type variable in

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-09 Thread Alvaro Herrera
Volkan YAZICI wrote: On Mon, 8 Sep 2008, Alvaro Herrera [EMAIL PROTECTED] writes: Modified as you suggested. BTW, will there be a similar i18n scenario for dropped column you mentioned below? Yes, you need _() around those too. For this purpose, I introduced a dropped_column_type

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-08 Thread Alvaro Herrera
Volkan YAZICI wrote: On Fri, 05 Sep 2008, Tom Lane [EMAIL PROTECTED] writes: at the call sites, and then errmsg(%s, _(msg)) when throwing the error. Modified as you suggested. BTW, will there be a similar i18n scenario for dropped column you mentioned below? Yes, you need _()

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Volkan YAZICI
On Thu, 4 Sep 2008, Alvaro Herrera [EMAIL PROTECTED] writes: Cool, thanks. I had a look and you had some of the expected vs. returned reversed. I'll happy to fix the reversed ones if you can report them in more details. Regards. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Volkan YAZICI
On Thu, 04 Sep 2008, Tom Lane [EMAIL PROTECTED] writes: This is not ready to go: you've lost the ability to localize most of the error message strings. How can I make this available? What's your suggestion? Also, char *msg should be const char *msg Done. if you're going to pass literal

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Alvaro Herrera
Volkan YAZICI wrote: On Thu, 4 Sep 2008, Alvaro Herrera [EMAIL PROTECTED] writes: Cool, thanks. I had a look and you had some of the expected vs. returned reversed. I'll happy to fix the reversed ones if you can report them in more details. Please use the patch I posted yesterday, as it

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Volkan YAZICI
On Fri, 5 Sep 2008, Alvaro Herrera [EMAIL PROTECTED] writes: Please use the patch I posted yesterday, as it had all the issues I found fixed. There were other changes in that patch too. My bad. Patch is modified with respect to suggestions[1][2] from Tom. (All 115 tests passed in cvs tip.)

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Tom Lane
Volkan YAZICI [EMAIL PROTECTED] writes: On Thu, 04 Sep 2008, Tom Lane [EMAIL PROTECTED] writes: This is not ready to go: you've lost the ability to localize most of the error message strings. How can I make this available? What's your suggestion? I think the best way is to use

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Volkan YAZICI
On Fri, 05 Sep 2008, Tom Lane [EMAIL PROTECTED] writes: I think the best way is to use subroutine(..., gettext_noop(special error message here)) at the call sites, and then errmsg(%s, _(msg)) when throwing the error. gettext_noop() is needed to have the string be put into

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-05 Thread Alvaro Herrera
Volkan YAZICI wrote: BTW, Alvaro fixed my string concatenations which yielded in lines exceeding 80 characters width, but I'd want to ask twice if you're sure with this. Because, IMHO, PostgreSQL is also famous with the quality and readability of its source code -- that I'm quite proud of as

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-04 Thread Alvaro Herrera
Volkan YAZICI wrote: Made callers pass related error message as a string parameter, and appended required details using errdetail(). Cool, thanks. I had a look and you had some of the expected vs. returned reversed. This patch should be OK. Amazingly, none of the regression tests need

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-09-04 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I wasn't able to run the tests in contrib, I don't know why, and I have to go out now. I'll commit this tomorrow. This is not ready to go: you've lost the ability to localize most of the error message strings. Also, char *msg should be const char *msg

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-08-09 Thread Volkan YAZICI
On Fri, 8 Aug 2008, Alvaro Herrera [EMAIL PROTECTED] writes: I think this is a good idea, but the new error messages need more work. Have a look at the message style guidelines please, http://www.postgresql.org/docs/8.3/static/error-style-guide.html Right. Done -- I hope. Particularly I

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-08-09 Thread Volkan YAZICI
[Please ignore the previous reply.] On Fri, 8 Aug 2008, Alvaro Herrera [EMAIL PROTECTED] writes: I think this is a good idea, but the new error messages need more work. Have a look at the message style guidelines please, http://www.postgresql.org/docs/8.3/static/error-style-guide.html Right.

[HACKERS] Verbosity of Function Return Type Checks

2008-08-08 Thread Volkan YAZICI
Hi, Yesterday I needed to fiddle with PostgreSQL internals to be able to debug a PL/pgSQL procedure returning a set of records. I attached the patch I used to increase the verbosity of error messages related with function return type checks. I'll be appreciated if any developer could commit this

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-08-08 Thread Alvaro Herrera
Volkan YAZICI wrote: Yesterday I needed to fiddle with PostgreSQL internals to be able to debug a PL/pgSQL procedure returning a set of records. I attached the patch I used to increase the verbosity of error messages related with function return type checks. I'll be appreciated if any