Re: [HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
On 26/12/10 05:55, Robert Haas wrote: On Sat, Dec 25, 2010 at 3:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas rh...@postgresql.org writes: Add foreign data wrapper error code values for SQL/MED. Extracted from a much larger patch by Shigeru Hanada. This patch is quite incomplete. Any patch that adds to errcodes.h *must* also touch doc/src/sgml/errcodes.sgml src/pl/plpgsql/src/plerrcodes.h Drat. OK, will work on it tomorrow. I didn't realize those places needed to be updated. I noticed the other day that plerrcodes.h has a comment saying is should be generated with some sed hackery, and as I needed to generate a Python exception class for each error in errcodes.h I did the hackery. See https://github.com/wulczer/postgres/commit/44fc42b7708f23483156e4e0e1e321e68b2a7e2d#diff-0 for something that maybe could be used as a basis to autogenerate errcodes.sgml and plerrcodes.h. Cheers, Jan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
On Sun, Dec 26, 2010 at 8:03 AM, Jan Urbański wulc...@wulczer.org wrote: See https://github.com/wulczer/postgres/commit/44fc42b7708f23483156e4e0e1e321e68b2a7e2d#diff-0 for something that maybe could be used as a basis to autogenerate errcodes.sgml and plerrcodes.h. Interesting. It looks like this might be even easier with perl. For now I've just written a couple of throwaway scripts to do what I needed. Proposed patch attached. This adds what I believe to be the correct incantations to errcodes.sgml and plerrcodes.h, and also corrects a typographical error in yesterday's commit which I failed to notice while reviewing. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company diff --git a/doc/src/sgml/errcodes.sgml b/doc/src/sgml/errcodes.sgml index 3288687..3a1baf5 100644 --- a/doc/src/sgml/errcodes.sgml +++ b/doc/src/sgml/errcodes.sgml @@ -1411,6 +1411,173 @@ row +entry spanname=span13emphasis role=boldClass HV mdash; Foreign Data Wrapper Error (SQL/MED)//entry +/row + +row +entryliteralHV000/literal/entry +entryFDW ERROR/entry +entryfdw_error/entry +/row + +row +entryliteralHV005/literal/entry +entryFDW COLUMN NAME NOT FOUND/entry +entryfdw_column_name_not_found/entry +/row + +row +entryliteralHV002/literal/entry +entryFDW DYNAMIC PARAMETER VALUE NEEDED/entry +entryfdw_dynamic_parameter_value_needed/entry +/row + +row +entryliteralHV010/literal/entry +entryFDW FUNCTION SEQUENCE ERROR/entry +entryfdw_function_sequence_error/entry +/row + +row +entryliteralHV021/literal/entry +entryFDW INCONSISTENT DESCRIPTOR INFORMATION/entry +entryfdw_inconsistent_descriptor_information/entry +/row + +row +entryliteralHV024/literal/entry +entryFDW INVALID ATTRIBUTE VALUE/entry +entryfdw_invalid_attribute_value/entry +/row + +row +entryliteralHV007/literal/entry +entryFDW INVALID COLUMN NAME/entry +entryfdw_invalid_column_name/entry +/row + +row +entryliteralHV008/literal/entry +entryFDW INVALID COLUMN NUMBER/entry +entryfdw_invalid_column_number/entry +/row + +row +entryliteralHV004/literal/entry +entryFDW INVALID DATA TYPE/entry +entryfdw_invalid_data_type/entry +/row + +row +entryliteralHV006/literal/entry +entryFDW INVALID DATA TYPE DESCRIPTORS/entry +entryfdw_invalid_data_type_descriptors/entry +/row + +row +entryliteralHV091/literal/entry +entryFDW INVALID DESCRIPTOR FIELD IDENTIFIER/entry +entryfdw_invalid_descriptor_field_identifier/entry +/row + +row +entryliteralHV00B/literal/entry +entryFDW INVALID HANDLE/entry +entryfdw_invalid_handle/entry +/row + +row +entryliteralHV00C/literal/entry +entryFDW INVALID OPTION INDEX/entry +entryfdw_invalid_option_index/entry +/row + +row +entryliteralHV00D/literal/entry +entryFDW INVALID OPTION NAME/entry +entryfdw_invalid_option_name/entry +/row + +row +entryliteralHV090/literal/entry +entryFDW INVALID STRING LENGTH OR BUFFER LENGTH/entry +entryfdw_invalid_string_length_or_buffer_length/entry +/row + +row +entryliteralHV00A/literal/entry +entryFDW INVALID STRING FORMAT/entry +entryfdw_invalid_string_format/entry +/row + +row +entryliteralHV009/literal/entry +entryFDW INVALID USE OF NULL POINTER/entry +entryfdw_invalid_use_of_null_pointer/entry +/row + +row +entryliteralHV014/literal/entry +entryFDW TOO MANY HANDLES/entry +entryfdw_too_many_handles/entry +/row + +row +entryliteralHV001/literal/entry +entryFDW OUT OF MEMORY/entry +entryfdw_out_of_memory/entry +/row + +row +entryliteralHV00P/literal/entry +entryFDW NO SCHEMAS/entry +entryfdw_no_schemas/entry +/row + +row +entryliteralHV00J/literal/entry +entryFDW OPTION NAME NOT FOUND/entry +entryfdw_option_name_not_found/entry +/row + +row +entryliteralHV00K/literal/entry +entryFDW REPLY HANDLE/entry +entryfdw_reply_handle/entry +/row + +row +entryliteralHV00Q/literal/entry +entryFDW SCHEMA NOT FOUND/entry +entryfdw_schema_not_found/entry +/row + +row +entryliteralHV00R/literal/entry +entryFDW TABLE NOT FOUND/entry +entryfdw_table_not_found/entry +/row + +row +entryliteralHV00L/literal/entry +entryFDW UNABLE TO CREATE EXECUTION/entry +entryfdw_unable_to_create_execution/entry +/row + +row +entryliteralHV00M/literal/entry +entryFDW UNABLE TO CREATE REPLY/entry +entryfdw_unable_to_create_reply/entry +/row + +row +entryliteralHV00N/literal/entry +entryFDW UNABLE TO ESTABLISH CONNECTION/entry +entryfdw_unable_to_establish_connection/entry +/row + + +row entry spanname=span13emphasis role=boldClass P0 mdash; PL/pgSQL Error//entry /row diff --git a/src/include/utils/errcodes.h b/src/include/utils/errcodes.h index 3b332b6..80a4ca1 100644 --- a/src/include/utils/errcodes.h +++ b/src/include/utils/errcodes.h @@ -368,7 +368,7 @@ #define ERRCODE_FDW_REPLY_HANDLE MAKE_SQLSTATE('H','V', '0','0','K') #define ERRCODE_FDW_SCHEMA_NOT_FOUND MAKE_SQLSTATE('H','V', '0','0','Q') #define ERRCODE_FDW_TABLE_NOT_FOUND MAKE_SQLSTATE('H','V', '0','0','R') -#define ERRCODE_FDW_UNALBE_TO_CREATE_EXECUTION MAKE_SQLSTATE('H','V', '0','0','L') +#define ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION
Re: [HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
Robert Haas robertmh...@gmail.com writes: On Sun, Dec 26, 2010 at 8:03 AM, Jan UrbaÅski wulc...@wulczer.org wrote: See https://github.com/wulczer/postgres/commit/44fc42b7708f23483156e4e0e1e321e68b2a7e2d#diff-0 for something that maybe could be used as a basis to autogenerate errcodes.sgml and plerrcodes.h. Interesting. It looks like this might be even easier with perl. The reason those files aren't autogenerated already is that at the time, we had a policy of not requiring perl during a build. Now that that restriction has gone down the drain, it might be worth thinking about. Proposed patch attached. This adds what I believe to be the correct incantations to errcodes.sgml and plerrcodes.h, and also corrects a typographical error in yesterday's commit which I failed to notice while reviewing. Hmm. Even with the typo fixed, ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION seems pretty darn opaque. Is it missing a word? Can we rephrase it so people will have some idea what it means? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
On Sun, Dec 26, 2010 at 12:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Proposed patch attached. This adds what I believe to be the correct incantations to errcodes.sgml and plerrcodes.h, and also corrects a typographical error in yesterday's commit which I failed to notice while reviewing. Hmm. Even with the typo fixed, ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION seems pretty darn opaque. Is it missing a word? Can we rephrase it so people will have some idea what it means? (looks at a draft copy of the spec) Appears to be straight out of the spec. There's also some incomprehensible (to me) language explaining what it's supposed to mean. I think they're using the term FDW execution to mean something along the lines of an instance of grabbing data via an FDW. Or something sort of vaguely like that. If I didn't know better I'd think this had been deliberately obfuscated. At any rate, I think rewording language straight out of the spec is likely a bad plan. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
Robert Haas robertmh...@gmail.com writes: On Sun, Dec 26, 2010 at 12:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hmm. Even with the typo fixed, ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION seems pretty darn opaque. Is it missing a word? Can we rephrase it so people will have some idea what it means? Appears to be straight out of the spec. Oh, okay. At any rate, I think rewording language straight out of the spec is likely a bad plan. Agreed. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
On Sun, Dec 26, 2010 at 4:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Sun, Dec 26, 2010 at 12:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hmm. Even with the typo fixed, ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION seems pretty darn opaque. Is it missing a word? Can we rephrase it so people will have some idea what it means? Appears to be straight out of the spec. Oh, okay. At any rate, I think rewording language straight out of the spec is likely a bad plan. Agreed. OK, committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
On Sat, Dec 25, 2010 at 3:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas rh...@postgresql.org writes: Add foreign data wrapper error code values for SQL/MED. Extracted from a much larger patch by Shigeru Hanada. This patch is quite incomplete. Any patch that adds to errcodes.h *must* also touch doc/src/sgml/errcodes.sgml src/pl/plpgsql/src/plerrcodes.h Drat. OK, will work on it tomorrow. I didn't realize those places needed to be updated. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers