Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2026-04-30 9f2ef60949ced4fab4d077a7e1c6d913f3620c9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash -e
 
type="$1"
template="$2"
 
if [ "$type" = "packaged" ]; then
    echo '\echo Use "CREATE EXTENSION fulleq" to load this file. \quit'
elif [ "$type" = "unpackaged" ]; then
    echo '\echo Use "CREATE EXTENSION fulleq FROM unpackaged" to load this file. \quit'
    echo 'DROP OPERATOR CLASS IF EXISTS int2vector_fill_ops USING hash;'
    echo 'DROP OPERATOR FAMILY IF EXISTS int2vector_fill_ops USING hash;'
    echo 'DROP FUNCTION IF EXISTS fullhash_int2vector(int2vector);'
    echo 'DROP OPERATOR IF EXISTS == (int2vector, int2vector);'
    echo 'DROP FUNCTION IF EXISTS isfulleq_int2vector(int2vector, int2vector);'
else
    echo "invalid arguments"
    exit 1
fi
 
 
ARGTYPE=(
    bool
    bytea
    char
    name
    int8
    int2
    int4
    text
    oid
    xid
    cid
    oidvector
    float4
    float8
    macaddr
    inet
    cidr
    varchar
    date
    time
    timestamp
    timestamptz
    interval
    timetz
)
 
for type in "${ARGTYPE[@]}"; do
    sed -e "s/ARGTYPE/$type/g" < "$template"
done