Proposal: add new field to ErrorResponse and NoticeResponse

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Proposal: add new field to ErrorResponse and NoticeResponse
Date: 2012-05-22 23:10:21
Message-ID: 20120523.081021.1816469325956954697.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2012-05-22 23:11:47 Re: Per-Database Roles
Previous Message Josh Berkus 2012-05-22 22:26:08 Re: Changing the concept of a DATABASE