"David Olbersen" <DOlbersen@stbernard.com> writes:
> urldb2=> EXPLAIN ANALYZE
> urldb2-> SELECT
> urldb2-> id,
> urldb2-> source,
> urldb2-> insertedby,
> urldb2-> insertedon,
> urldb2-> priority
> urldb2-> FROM
> urldb2-> indexscan
> urldb2-> WHERE
> urldb2-> lower(
> urldb2-> substring(
> urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
> urldb2-> )
> urldb2-> ) ~ '^q.*'
> urldb2-> ORDER BY source;
> server closed the connection unexpectedly
Get out your debugger and look at the core file left by the crashing
backend (should be $PGDATA/base/yourdbnumber/core, or some variant of
that name). If you see no core file in $PGDATA/base/yourdbnumber,
restart the postmaster with "ulimit -c unlimited" and try again.
> rposition() is a volatile custom C function.
The odds are excellent that this is a bug in your custom C code.
regards, tom lane