Re: Roadmap for FE/BE protocol redesign
От | Tom Lane |
---|---|
Тема | Re: Roadmap for FE/BE protocol redesign |
Дата | |
Msg-id | 27130.1047484194@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Roadmap for FE/BE protocol redesign ("Dave Page" <dpage@vale-housing.co.uk>) |
Список | pgsql-hackers |
"Dave Page" <dpage@vale-housing.co.uk> writes: > No, but with them we can avoid cluttering the wire protocol with fields > for all this, and the JDBC required data. With 2 numeric columns > (attrelid, attnum), any application/interface can query the system > catalogs easily for whatever extra info they like. This is my feeling also. We shouldn't try to guess in the protocol exactly what set of information will be wanted by a frontend; we should just provide the catalog keys needed to look up whatever is wanted. I like attrelid/attnum because (a) it's compact --- not much added overhead for apps that don't care; and (b) it's a primary key, which names are not. The relid/attnum identity of a column will remain the same as long as it exists. A name-based API breaks the moment some other user renames things; similar objections could be raised against attlognum, if we had it. The point about apps breaking if the system catalog layout changes is a fair one, but that situation would be no worse than it's ever been; ODBC and JDBC have coped well enough so far. In any case the best solution would be to offer functions that hide the details of where to find any given bit of info. We've got a few like that already (format_type() for example) and I have no problem with adding more. regards, tom lane
В списке pgsql-hackers по дате отправления: