I have created a few PostgreSQL / PostGIS functions that may be useful for others. The links below lead to code
for generating linestring grids, clipping polygons by linestrings and doing linear interpolation of vector arrays and
linestrings in PostgreSQL / PostGIS. All the code is in pure SQL or
PL/PGSQL. Though a bit dated (~2012), the functions should still work.
linear_interpolation.sql
polygon_clipping_functions.sql