Re: Multiple atributes with -P switch to psql

From: "Stuart Cooper" <stuart(dot)cooper(at)gmail(dot)com>
To: "Harvey, Allan AC" <HarveyA(at)onesteel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple atributes with -P switch to psql
Date: 2007-03-14 04:19:24
Message-ID: 7fc8628a0703132119t32b09bf0if3d196827b22e17f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harvey, Allan AC 2007-03-14 04:59:58 Re: Multiple atributes with -P switch to psql
Previous Message Jasbinder Singh Bali 2007-03-14 03:23:03 Exception handling in plperl