common_function/system/
pg_catalog.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15mod pg_get_userbyid;
16mod table_is_visible;
17mod version;
18
19use std::sync::Arc;
20
21use pg_get_userbyid::PGGetUserByIdFunction;
22use table_is_visible::PGTableIsVisibleFunction;
23use version::PGVersionFunction;
24
25use crate::function_registry::FunctionRegistry;
26
27#[macro_export]
28macro_rules! pg_catalog_func_fullname {
29    ($name:literal) => {
30        concat!("pg_catalog.", $name)
31    };
32}
33
34pub(super) struct PGCatalogFunction;
35
36impl PGCatalogFunction {
37    pub fn register(registry: &FunctionRegistry) {
38        registry.register(Arc::new(PGTableIsVisibleFunction));
39        registry.register(Arc::new(PGGetUserByIdFunction));
40        registry.register(Arc::new(PGVersionFunction));
41    }
42}