github.com/tuhaihe/gpbackup@v1.0.3/end_to_end/resources/gpdb5_objects.sql (about)

     1  SET statement_timeout = 0;
     2  SET client_encoding = 'UTF8';
     3  SET standard_conforming_strings = on;
     4  SET check_function_bodies = false;
     5  SET client_min_messages = warning;
     6  
     7  SET default_with_oids = false;
     8  SET search_path = public, pg_catalog;
     9  
    10  
    11  CREATE TYPE enum_type AS ENUM (
    12      '750582',
    13      '750583',
    14      '750584'
    15  );
    16  
    17  
    18  CREATE FUNCTION plusone(x character varying) RETURNS character varying
    19      AS $$
    20  BEGIN
    21      RETURN x || 'a';
    22  END;
    23  $$
    24      LANGUAGE plpgsql NO SQL
    25      SET standard_conforming_strings TO 'on'
    26      SET client_min_messages TO 'notice'
    27      SET search_path TO public;
    28  
    29  
    30  CREATE FUNCTION return_enum_as_array(anyenum, anyelement, anyelement) RETURNS TABLE(ae anyenum, aa anyarray)
    31      AS $_$
    32  SELECT $1, array[$2, $3]
    33  $_$
    34      LANGUAGE sql STABLE CONTAINS SQL;
    35  
    36  
    37  
    38  SET default_tablespace = '';
    39  
    40  
    41  CREATE CAST (text AS integer) WITH FUNCTION public.casttoint(text) AS ASSIGNMENT;
    42  
    43  
    44  COMMENT ON CAST (text AS integer) IS 'sample cast';
    45  
    46  
    47  
    48  CREATE TEXT SEARCH DICTIONARY testdictionary (
    49      TEMPLATE = pg_catalog.snowball,
    50      language = 'russian', stopwords = 'russian' );
    51  
    52  
    53  CREATE TEXT SEARCH CONFIGURATION testconfiguration (
    54      PARSER = pg_catalog."default" );
    55  
    56  
    57  CREATE TEXT SEARCH TEMPLATE testtemplate (
    58      LEXIZE = dsimple_lexize );
    59  
    60  CREATE TEXT SEARCH DICTIONARY testdictionary2 (
    61      TEMPLATE = public.testtemplate);
    62  
    63  
    64  CREATE TEXT SEARCH PARSER testparser (
    65      START = prsd_start,
    66      GETTOKEN = prsd_nexttoken,
    67      END = prsd_end,
    68      LEXTYPES = prsd_lextype );
    69  
    70  CREATE TEXT SEARCH CONFIGURATION testconfiguration2 (
    71      PARSER = public.testparser );
    72  
    73  CREATE VIEW ts_config_view AS SELECT * FROM ts_debug('public.testconfiguration2', '
    74  PostgreSQL, the highly scalable, SQL compliant, open source
    75  object-relational database management system, is now undergoing
    76  beta testing of the nextversion of our software');
    77  
    78  CREATE VIEW ts_dict_view AS SELECT ts_lexize('public.testdictionary2', 'hello world');
    79  
    80  CREATE OPERATOR FAMILY test_fam USING hash;
    81  
    82  CREATE OPERATOR CLASS test_op_class
    83      FOR TYPE _int4 USING hash FAMILY test_fam AS
    84      STORAGE _int4;