Tom,
You ain't arf clever.
Running Gen_fmgrtab.sh with a "set -x" shows:-
const FmgrBuiltin fmgr_builtins[] = {
+ awk { printf (" { %d, \"%s\", %d, %s, %s, %s },\n"), \ $1, $(NF-1), $9, \ ($8 == "t") ? "true" :
"false",\ ($4 == "11") ? "true" : "false", \ $(NF-1) } fmgr.raw
awk: syntax error near line 3
awk: illegal statement near line 3
+ cat /* dummy entry is easier than getting rid of comma after last real one */ { 0, NULL, 0, false, false,
(PGFunction)NULL }
};
/* Note fmgr_nbuiltins excludes the dummy entry */
const int fmgr_nbuiltins = (sizeof(fmgr_builtins) / sizeof(FmgrBuiltin)) - 1;
Looks like the problem is that, Solaris's awk is "old" awk.
If I change the awk to nawk I get valid output.
I'm just about to start the clean build process with this change.
Once it's started I'm off to bed. Will check in the morning.
Thanks for your trouble, we just need a "portable" fix now.
Thanks,
Keith.
Tom Lane <tgl@sss.pgh.pa.us>
>
> Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
> > I've managed to get a backtrace, attached, thanks to Ross J. Reedstrom's
> > excellent example from the archives, also attached.
>
> > I'm not sure whether the stack frame shown is corrupt, it seems to just
> > loop over and over again. (I got fed up after 400+ frames)
>
> What we've got here is the syscache trying to set up for a search of
> cache 18, which I believe is the pg_proc-indexed-on-OID cache.
> For that it needs the OID comparison function, "oideq" (OID 184).
> It's asking the funcmgr for oideq ... and funcmgr is turning around
> and asking the syscache for the pg_proc entry with OID 184. Ooops.
>
<snip>
> My bet is that there is something snafu'd in your generation of
> fmgrtab.c from pg_proc.h via Gen_fmgrtab.sh, such that your table of
> builtin functions is either empty or corrupt.
>
<snip>
>
> If you still see the problem with a virgin build, take a look at
> src/backend/utils/Gen_fmgrtab.sh and its output
> src/backend/utils/fmgrtab.c to see if you can figure out what's
> wrong. Could be that I introduced some kind of portability problem
> into Gen_fmgrtab.sh ...
>
> regards, tom lane