
> My suspicion falls on the very-recently-added awk calls.  Try changing
> 
>         (echo "SET autocommit TO 'on';"; awk 'BEGIN {printf 
> "\\set ECHO all\n"}'; cat "$inputdir/sql/$1.sql") |

Why use awk for this at all ? and not:
echo "\\set ECHO all"

??
Andreas

Wed, 13 Nov 2002 14:23:11 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: RC1? 
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> Why use awk for this at all ? and not:
> echo "\\set ECHO all"

I think Bruce is worried about portability; some versions of echo might
do something weird with the backslash.  OTOH, it's not obvious to me
that awk is better on that score.  Bruce?

			regards, tom lane

Wed, 13 Nov 2002 10:06:15 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: RC1? 
> "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
>> Why use awk for this at all ? and not:
>> echo "\\set ECHO all"

Actually, some googling revealed the following advice (in the Autoconf
manual):

     Because of these problems, do not pass a string containing
     arbitrary characters to echo. For example, echo "$foo" is safe if
     you know that foo's value cannot contain backslashes and cannot
     start with -, but otherwise you should use a here-document like
     this:

     cat <<EOF
     $foo
     EOF

This seems obviously safer, so I shall make it do that instead
of relying on either awk or echo.

			regards, tom lane

Wed, 13 Nov 2002 11:28:02 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: RC1? 
On Wed, 13 Nov 2002 10:06:15 EST, the world broke into rejoicing as
Tom Lane <tgl@sss.pgh.pa.us>  said:
> "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> > Why use awk for this at all ? and not:
> > echo "\\set ECHO all"
> 
> I think Bruce is worried about portability; some versions of echo might
> do something weird with the backslash.  OTOH, it's not obvious to me
> that awk is better on that score.  Bruce?

The problem is that the regress script isn't pointing to the version of
awk that was picked up in the autoconf phase.

(More detailed comments forwarded directly :-).)

The "real deal" on what happens on Solaris is thus, from the awk FAQ,
where Patrick McPhee writes:

> SunOS includes three versions of awk. /usr/bin/awk is the old
> (pre-1989) version. /usr/bin/nawk is the new awk which appeared in
> 1989, and /usr/xpg4/bin/awk is supposed to conform to the single unix
> specification.  No one knows why Sun continues to ship old awk.

I would be /very/ inclined to trust Patrick's wisdom on this.

So long as we fix up the regression script to grab the "nawk" that
we expect to work, that's probably nicer than figuring out which
echo parameters are needed...
--
(concatenate 'string "cbbrowne" "@ntlug.org")
http://cbbrowne.com/info/wp.html
The first cup of coffee recapitulates phylogeny.

Wed, 13 Nov 2002 11:42:01 -0500
cbbrowne@cbbrowne.com
Re: RC1? 