Re: Formating psql query output
От | Rob Sargent |
---|---|
Тема | Re: Formating psql query output |
Дата | |
Msg-id | 8DC70752-D1F1-4841-8E68-C7103764B144@gmail.com обсуждение исходный текст |
Ответ на | Re: Formating psql query output (Adrian Klaver <adrian.klaver@aklaver.com>) |
Список | pgsql-general |
> On Jul 19, 2021, at 11:49 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote: > > On 7/19/21 10:33 AM, Rich Shepard wrote: >> Until I finish building the python/tkinter/psycopg2 front end to my business >> tracking tool I continue to work using the psql shell.' >> I have a working .sql script that reports my contacts between two dates; the >> script returns more columns than I want included in the report. I want to >> pipe the output through an awk script to extract, in order, the columns I >> need. I'm stuck at the point of defining options to psql. > > Is there a reason you can't just restrict the query to the columns you want? > Also had that thought but OP is wise to head the other switches for cleaner output. But also should probably get familiarwith to-json options as well for easy pickup on the eventual client.
В списке pgsql-general по дате отправления: