source: tags/1.4.0/dns-1.2.3-1.2.4.sql@ 757

Last change on this file since 757 was 649, checked in by Kris Deugau, 10 years ago

/branches/stable

Subtle bugfix merge! All changes from /trunk r589 through r648 merged.

File size: 649 bytes
Line 
1-- SQL upgrade file for dnsadmin 1.2.3 to 1.2.4 bugfix update
2
3-- pre-pg8.3, this must be run as a superuser
4CREATE LANGUAGE plpgsql;
5-- it's required for:
6
7-- Return proper conversion of string to inet, or 0.0.0.0/0 if the string is
8-- not a valid inet value. We need to do this to support "funky" records that
9-- may not actually have valid IP address values. Used for ORDER BY
10CREATE OR REPLACE FUNCTION inetlazy (rdata text) RETURNS inet AS $$
11BEGIN
12 RETURN CAST(rdata AS inet);
13EXCEPTION
14 WHEN OTHERS THEN
15 RETURN CAST('0.0.0.0/0' AS inet);
16END;
17$$ LANGUAGE plpgsql;
18
19-- Update dbversion
20UPDATE misc SET value='1.2.4' WHERE key='dbversion';
Note: See TracBrowser for help on using the repository browser.