Thanks for suggestion. I could use two separate sqls, but I am looking to get it in a single sql.
I just compiled and installed (under postgres id) first_last_agg C extension.
http://pgxn.org/dist/first_last_agg/it WORKED under postgres user with sample
select first(column1), last(column1) from (values (null),(1),(3),(null)) as x
but somehow when I run under other users, it say
ERROR: function first(integer) does not exist
below is the control file , I can not find out why I can not run under other user ids.
Any help would be appreciated.
# first_last_agg extension
comment = 'first() and last() aggregate functions'
default_version = '0.1.4'
module_pathname = '$libdir/first_last_agg'
relocatable = false
schema = pg_catalog
superuser = false