pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
"man psql" \set documentation error
3+ messages / 2 participants
[nested] [flat]

* "man psql" \set documentation error
@ 2002-02-11 15:50 Derrell.Lipman@UnwiredUniverse.com
  2002-02-18 17:42 ` Re: "man psql" \set documentation error Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Derrell.Lipman@UnwiredUniverse.com @ 2002-02-11 15:50 UTC (permalink / raw)
  To: pgsql-docs

Running an application and \set'ing its output in a variable requires use of
the backtick '`' operator.  Under the heading "SQL INTERPOLATION", the
examples should be as follows (the difference being use of backticks instead
of single quotes around the command to be executed):

Current (wrong):
       testdb=> \set content '\'' 'cat my_file.txt' '\''

Correct:
       testdb=> \set content '\'' `cat my_file.txt` '\''



Current (wrong):
       testdb=> \set content 'sed -e "s/'/\\\\\\'/g" < my_file.txt'

Correct:
       testdb=> \set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`


Cheers,

Derrell



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: "man psql" \set documentation error
  2002-02-11 15:50 "man psql" \set documentation error Derrell.Lipman@UnwiredUniverse.com
@ 2002-02-18 17:42 ` Bruce Momjian <pgman@candle.pha.pa.us>
  2002-02-26 03:34   ` Re: "man psql" \set documentation error Derrell.Lipman@UnwiredUniverse.com
  0 siblings, 1 reply; 3+ messages in thread

From: Bruce Momjian @ 2002-02-18 17:42 UTC (permalink / raw)
  To: Derrell.Lipman@UnwiredUniverse.com; +Cc: pgsql-docs

Derrell.Lipman@UnwiredUniverse.com wrote:
> Running an application and \set'ing its output in a variable requires use of
> the backtick '`' operator.  Under the heading "SQL INTERPOLATION", the
> examples should be as follows (the difference being use of backticks instead
> of single quotes around the command to be executed):
> 
> Current (wrong):
>        testdb=> \set content '\'' 'cat my_file.txt' '\''
> 
> Correct:
>        testdb=> \set content '\'' `cat my_file.txt` '\''
> 
> 
> 
> Current (wrong):
>        testdb=> \set content 'sed -e "s/'/\\\\\\'/g" < my_file.txt'
> 
> Correct:
>        testdb=> \set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`
> 

I just checked and it looks fine in current sources.  Does it look right
in your browser:

	http://candle.pha.pa.us/main/writings/pgsql/sgml/app-psql.html

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: "man psql" \set documentation error
  2002-02-11 15:50 "man psql" \set documentation error Derrell.Lipman@UnwiredUniverse.com
  2002-02-18 17:42 ` Re: "man psql" \set documentation error Bruce Momjian <pgman@candle.pha.pa.us>
@ 2002-02-26 03:34   ` Derrell.Lipman@UnwiredUniverse.com
  0 siblings, 0 replies; 3+ messages in thread

From: Derrell.Lipman@UnwiredUniverse.com @ 2002-02-26 03:34 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-docs

Bruce Momjian <pgman@candle.pha.pa.us> writes:

> Derrell.Lipman@UnwiredUniverse.com wrote:
>> Running an application and \set'ing its output in a variable requires use of
>> the backtick '`' operator.  Under the heading "SQL INTERPOLATION", the
>> examples should be as follows (the difference being use of backticks instead
>> of single quotes around the command to be executed):
>> 
>> Current (wrong):
>>        testdb=> \set content '\'' 'cat my_file.txt' '\''
>> 
>> Correct:
>>        testdb=> \set content '\'' `cat my_file.txt` '\''
>> 
>> 
>> 
>> Current (wrong):
>>        testdb=> \set content 'sed -e "s/'/\\\\\\'/g" < my_file.txt'
>> 
>> Correct:
>>        testdb=> \set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`
>> 
>
> I just checked and it looks fine in current sources.  Does it look right
> in your browser:
>
> 	http://candle.pha.pa.us/main/writings/pgsql/sgml/app-psql.html

Yes, it looks correct in that html version; it just has the wrong character in
the nroff "man" version.

Cheers,

Derrell



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-02-26 03:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-11 15:50 "man psql" \set documentation error Derrell.Lipman@UnwiredUniverse.com
2002-02-18 17:42 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-02-26 03:34   ` Derrell.Lipman@UnwiredUniverse.com

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox