A library that I use currently has a bug and I'm trying to find a workaround for. Is it possible to to ignore a column on a PostgreSQL view insert? I have this view:
CREATE VIEW schema.auth AS
SELECT email AS id, pass AS pass, 'onymous'::varchar AS rolname
FROM schema.person;
The library is trying to do the following:
INSERT INTO schema.auth (id, pass, rolname) VALUES ('abc', '123', '');
The library should not be setting an empty string ('') for rolname, hence the bug.
Is there a way for me to stop PostgreSQL from throwing an error at rolname and quietly discard the empty string?