Functions Tables Views Materialized Views Trigger File Names File Names by Path Bug List Todo List Code Statistics Start Page | pglogger |
GET_PROPERTY_VALUE_BOOLEAN | ||||||||
---|---|---|---|---|---|---|---|---|
Returns the boolean value of given property.
|
001: \echo Start functions/GET_PROPERTY_VALUE_BOOLEAN.pg_sql 002: 003: /** Returns the boolean value of given property. 004: * 005: * @function GET_PROPERTY_VALUE_BOOLEAN 006: * @param in text I_PROPERTY_NAME Name of the property. 007: * @return boolean Value of the property. 008: * @private 009: * @info This function is meant to be private. Its use outside pglogger is 010: * very limited at most. That's why it is marked as private eventhough 011: * it is visible to the outside. All of this is due to the fact that 012: * PostgreSQL 10 and earlier does not support packages. 013: * @version $Id: GET_PROPERTY_VALUE_BOOLEAN.pg_sql 16 2018-06-15 20:23:26Z thiemo $ 014: * @todo Once PostgreSQL supports packages, integrate this function into one. 015: * For the time being, it should get installed within a schema on its 016: * own and no execution grants should be given on it. 017: * @todo Once HyperSQL supports a license tag, convert the corresponding 018: * info tag into one. 019: * @copyright Thiemo Kellner, 2018 - 020: * @info License LGPLv3 021: * @webpage https://www.sourceforge.net/projects/pglogger 022: */ 023: create or replace function GET_PROPERTY_VALUE_BOOLEAN(I_PROPERTY_NAME text) 024: returns boolean 025: language plpgsql 026: stable 027: -- Include the hosting schema into search_path so that dblink 028: -- can find the pglogger objects. There is no need to access 029: -- objects in other schematas not covered with public. 030: set search_path = :SCHEMA_NAME, public 031: as 032: $body$ 033: declare 034: V_PROPERTY_VALUE boolean; 035: begin 036: select PROPERTY_VALUE_BOOLEAN into V_PROPERTY_VALUE 037: from PROPERTY 038: where PROPERTY_NAME = I_PROPERTY_NAME; 039: return V_PROPERTY_VALUE; 040: end; 041: $body$; 042: 043: comment on function GET_PROPERTY_VALUE_BOOLEAN(I_PROPERTY_NAME text) is 'Returns the boolean value of given property. 044: $Header: svn+ssh://thiemo@svn.code.sf.net/p/pglogger/code/functions/GET_PROPERTY_VALUE_BOOLEAN.pg_sql 2 2018-03-21 18:33:44Z 045: thiemo $'; 046: 047: commit; -- unlike Oracle not all ddl commit implicitly 048: 049: \echo End functions/GET_PROPERTY_VALUE_BOOLEAN.pg_sql
Functions Tables Views Materialized Views Trigger File Names File Names by Path Bug List Todo List Code Statistics Start Page | pglogger |