Re: Multiple atributes with -P switch to psql - Mailing list pgsql-general

From Stuart Cooper
Subject Re: Multiple atributes with -P switch to psql
Date
Msg-id 7fc8628a0703132119t32b09bf0if3d196827b22e17f@mail.gmail.com
Whole thread Raw
In response to Multiple atributes with -P switch to psql  ("Harvey, Allan AC" <HarveyA@OneSteel.com>)
Responses Re: Multiple atributes with -P switch to psql  ("Harvey, Allan AC" <HarveyA@OneSteel.com>)
List pgsql-general
Hi Allan,

> TABLEOPTIONS="-P border=5 -P tableattr=width=\"80%\" -P tableattr=bgcolor=\"#FFFFFF\""

> produces
 ...
> <table border="5" bgcolor="#FFFFFF">
 ...

> Seems to hang on to the last.

Yes- you've said -P tableattr twice so the second one overrides the first one.

$ psql -H  -P tableattr='width="80%" bgcolor="#FFFFFF"'

works for me. Carefully study my nice simple quoting: single quotes ''
around the whole
tableattr='THING' shebang and non-escaped double quotes "" for width
and bgcolor values.

Cheers,
Stuart.

pgsql-general by date:

Previous
From: "Harvey, Allan AC"
Date:
Subject: Multiple atributes with -P switch to psql
Next
From: "Harvey, Allan AC"
Date:
Subject: Re: Multiple atributes with -P switch to psql