To address the first problem mentioned in the How it works... section, we can simply wrap our existing ST_MakePoint function in another function specifying the SRID as ST_SetSRID, as shown in the following query:
-- Ensure we don't try to duplicate the view DROP VIEW IF EXISTS chp02.xbecausezed; -- Retain original attributes, but also create a point attribute from x and y CREATE VIEW chp02.xbecausezed AS SELECT x, y, z, ST_SetSRID(ST_MakePoint(x,y), 3734) -- Add ST_SetSRID FROM chp02.xwhyzed;