How to create data file path if not exists in postgres server using userchangelog.xml file changeset id
i tried following ways but getting many errors. can any one suggest how can we create data file path from the application if it doesn't exist at the location while creating database using changesets
DO $$ DECLARE
BEGIN
PERFORM pg_catalog.pg_stat_file('${DATAFILEPATHNAME}', false);
EXCEPTION WHEN undefined_file THEN
EXECUTE format('mkdir -p %s', '${DATAFILEPATHNAME}');
END;
$$ LANGUAGE plpgsql;