Re: Output filter for psql
От
Andrew Dunstan
Тема
Re: Output filter for psql
Дата
Msg-id
4980AD46.30803@dunslane.net
Ответ на
Re: Output filter for psql (D'Arcy J.M. Cain)
Список
Дерево обсуждения
Output filter for psql "D'Arcy J.M. Cain" <darcy@druid.net>
Re: Output filter for psql "D'Arcy J.M. Cain" <darcy@druid.net>
Re: Output filter for psql Andrew Dunstan <andrew@dunslane.net>
Re: Output filter for psql "D'Arcy J.M. Cain" <darcy@druid.net>
Re: Output filter for psql Andrew Dunstan <andrew@dunslane.net>
D'Arcy J.M. Cain wrote: > On Thu, 8 Jan 2009 17:22:04 -0500 > "D'Arcy J.M. Cain" wrote: > >> So, I guess psql should pass XML to the user's filter and simply dump >> its output to the screen. Is XML the best format? It would allow us >> to pass meta information. For example, we could pass the border >> setting so that the filter could change its output based on it. >> > > Pardon me while I argue with myself. :-) > > I wonder if XML isn't overkill for this. I think that we only need > three pieces of information: > - The column headings > - The column types (in case the user wants it) > - The data > > XML would be difficult from both the server as well as the user. > Perhaps the simplest thing for both sides is simply CSV with an extra > row for type. For example: > > person_id,person_name,person_email > int,text,text > 1,"darcy","D'Arcy Cain" > 2,"tom","Tom Lane" > 3,"bruce","Bruce Momjian" > ...etc. > > The user could choose to ignore the second line if he doesn't need it. > I suppose we could define another line with options that we could > define for meta information such as the border setting and the table > name and whatever we define later. E.g: > > "table:person","border:3","funky:option with \":\"" > Why do you want to add this extra information? psql doesn't output it now, and IIRC your original proposal didn't do it either. cheers andrew
В списке pgsql-hackers по дате отправления