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.
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
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
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
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
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
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
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
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
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
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.
11 matches
Mail list logo