PG Bug reporting form <noreply@postgresql.org> writes:
> If I use the function last/first on this dataset, if the first rows parsed
> by the function contain null values, it cause FATAL error on database.
There is no last() nor first() function built into Postgres.
I surmise that you are using a buggy extension, in which case
you need to report this to the extension's author.
regards, tom lane