[DOCS] psql man page error?

2006-12-05 Thread Simon Riggs
On the psql man page there is an example of how to perform multiple line psql script as part of the -c option description. The example given is echo "\x \\ select * from foo;" | psql which gives prompt> echo "\x \\ select * from foo;" | psql Expanded display is on.

Re: [DOCS] psql man page error?

2006-12-05 Thread Jeff Frost
On Tue, 5 Dec 2006, Simon Riggs wrote: which gives prompt> echo "\x \\ select * from foo;" | psql Expanded display is on. invalid command \ i.e. doesn't work on bash. With bash the command should be: echo -e "\x \n select * from foo;" | psql which gives

Re: [DOCS] psql man page error?

2006-12-05 Thread Bruce Momjian
Simon Riggs wrote: > > On the psql man page there is an example of how to perform multiple line > psql script as part of the -c option description. > > The example given is > > echo "\x \\ select * from foo;" | psql > > which gives > > prompt> echo "\x \\ select * from foo;" | psql

Re: [DOCS] psql man page error?

2006-12-05 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I think the proper fix is: > psql, like this: echo -e > "\\x\nSELECT * FROM foo;" | psql. > I think all modern operating systems understand echo -e at this point. No, they don't, and neither does the Single Unix Spec: http://www.opengroup.o

Re: [DOCS] psql man page error?

2006-12-05 Thread Simon Riggs
On Tue, 2006-12-05 at 13:14 -0500, Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I think the proper fix is: > > > psql, like this: echo -e > > "\\x\nSELECT * FROM foo;" | psql. > > > I think all modern operating systems understand echo -e at this point. > > No, they

Re: [DOCS] psql man page error?

2006-12-05 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I think the proper fix is: > > > psql, like this: echo -e > > "\\x\nSELECT * FROM foo;" | psql. > > > I think all modern operating systems understand echo -e at this point. > > No, they don't, and neither does the Single

Re: [DOCS] psql man page error?

2006-12-05 Thread Simon Riggs
On Tue, 2006-12-05 at 18:16 -0500, Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > I think the proper fix is: > > > > > psql, like this: echo -e > > > "\\x\nSELECT * FROM foo;" | psql. > > > > > I think all modern operating systems understand

Re: [DOCS] psql man page error?

2006-12-05 Thread Bruce Momjian
Simon Riggs wrote: > On Tue, 2006-12-05 at 18:16 -0500, Bruce Momjian wrote: > > Tom Lane wrote: > > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > > I think the proper fix is: > > > > > > > psql, like this: echo -e > > > > "\\x\nSELECT * FROM foo;" | psql. > > > > > > > I think al

Re: [DOCS] psql man page error?

2006-12-05 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Well, it is even worse because some versions of echo automatically > interpret backslashes, so it would have to be \\x. I am thinking we > should just leave it as I have it now, unless we want to use 'awk' or > 'perl' where we know the backslash behavior

[DOCS] More missing docs (aggs)

2006-12-05 Thread Josh Berkus
Folks, So I don't forget this: The docs do not have an example of creating a multi-column aggregate, and the syntax is NOT obvious. For example, what do you use for stype in a multi-col aggregate? --Josh ---(end of broadcast)--- TIP 6: explai

Re: [DOCS] More missing docs (aggs)

2006-12-05 Thread Tom Lane
Josh Berkus writes: > The docs do not have an example of creating a multi-column aggregate, True... > and the syntax is NOT obvious. For example, what do you use for stype > in a multi-col aggregate? Uh, why do you think that's significant? The stype is whatever you need to use.