Database Reference
In-Depth Information
CREATE OR REPLACE FUNCTION
flatten_application_settings(app_version
varchar(200))
RETURNS setof application_settings_new
AS $$
BEGIN
-- Create a temporary table to hold a
single row of data
IF EXISTS (SELECT relname FROM pg_class
WHERE relname='tmp_settings')
THEN
TRUNCATE TABLE tmp_settings;
ELSE
CREATE TEMP TABLE tmp_settings (LIKE
application_settings_new);
END IF;
-- the row will contain all of the data for
this application version
INSERT INTO tmp_settings (version) VALUES
(app_version);
Search WWH ::




Custom Search