Re: Space Stalker in SQL Output
От | Jerry Sievers |
---|---|
Тема | Re: Space Stalker in SQL Output |
Дата | |
Msg-id | 87zhzgauk2.fsf@jsievers.enova.com обсуждение исходный текст |
Ответ на | Space Stalker in SQL Output (Susan Hurst <susan.hurst@brookhurstdata.com>) |
Ответы |
Re: Space Stalker in SQL Output
|
Список | pgsql-general |
Susan Hurst <susan.hurst@brookhurstdata.com> writes: > Why would a psql statement insert a leading space into the output, > which is a single integer value? > > The leading space caused my job call to fail elsewhere in the same > shell script as the psql call. Here is the anonymized version of the > psql call to assign a value to a shell script variable: > > IDz=`psql -d proddb -U produser -h 10.9.999.99 -p 99900 -t < > last_id.sql` Get in the habit of including -A which gets rid of alignment padding in psql output. As in... shellvar=`psql -Atqc 'select froboz;'` $db HTH -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800
В списке pgsql-general по дате отправления: