> Suppose I have defined an additional type in a PG extension. > > Is it possible to add custom accessors to that type -much like jsonb does- but use an API/hook without touching the core PG grammar & parser? > > Hypothetical Examples: > > Assuming I have a TextFile type I’d like to implement syntax like: > > (‘/home/me/a.txt’::TextFile).firstline > (‘/home/me/a.txt’::TextFile).lastline > (‘/home/me/a.txt’::TextFile).countlines() > (‘/home/me/a.txt’::TextFile).size() > (‘/home/me/a.txt’::TextFile).datemodified() Off on a tangent but would file_fdw help in any way ? Karsten