Proposal: add new field to ErrorResponse and NoticeResponse - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Proposal: add new field to ErrorResponse and NoticeResponse
Date
Msg-id 20120523.081021.1816469325956954697.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: Proposal: add new field to ErrorResponse and NoticeResponse
List pgsql-hackers
I described the problem with possibly localized "S" filed of
ErrorResponse(and NoticeResponse) in Frontend/Backend protocol.
http://archives.postgresql.org/pgsql-hackers/2012-05/msg00912.php

So I would like to propose a solution for this (for 9.3): add new
field to ErrorResponse and NoticeResponse. The new field will have the
same value as "S" except that it's never localized. This will not only
solve the problem I described but possibly reduce the cost to analyze
the error/notice messages in the frontend programs.

Adding new field can be possible without breaking current version of
Frontend/Backend protocol since the protocol is extensible in
this area:
"Since more field types might be added in future, frontends should
silently ignore fields of unrecognized type."(from "46.5. Message
Formats" of PostgreSQL 9.2 documentation)

BTW, changing existing "S" field not to be localized would work but
I'm afraid it breaks backward compatibility.

Comments?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Changing the concept of a DATABASE
Next
From: Christopher Browne
Date:
Subject: Re: Per-Database Roles