• 查看PostgreSQL版本,编译器版本号


    [postgres@localhost bin]$ ./psql -h localhost
    psql (9.4.5)
    Type "help" for help.

    postgres=# select version();
    version
    -----------------------------------------------------------------------------------
    PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.9.3, 64-bit
    (1 row)

    name of current database

    LB308B=# select current_catalog;
    current_database
    ------------------
    LB308B
    (1 row)

    LB308B=# select current_database();
    current_database
    ------------------
    LB308B
    (1 row)

    postgres=# select current_catalog;
    current_database
    ------------------
    postgres
    (1 row)

    text of the currently executing query

    postgres=# select current_query();
    current_query
    -------------------------
    select current_query();
    (1 row)

    name of current schema

    postgres=# select current_schema();
    current_schema
    ----------------
    public
    (1 row)

    user name of current execution context

    postgres=# select current_user;
    current_user
    --------------
    postgres
    (1 row)

    port of the local connection

    postgres=# select inet_server_port();
    inet_server_port
    ------------------
    5432
    (1 row)

    address of the remote connection and 

    address of the local connection

    postgres=# select inet_client_addr();
    inet_client_addr
    ------------------
    ::1
    (1 row)

    postgres=# select inet_server_addr();
    inet_server_addr
    ------------------
    ::1
    (1 row)

    server start time

    postgres=# select pg_postmaster_start_time();
    pg_postmaster_start_time
    ------------------------------
    2016-01-28 14:36:03.32585+08
    (1 row)

  • 相关阅读:
    jQuery 获取jsp页面中用iframe引入的jsp页面中的值
    spring事务管理
    mysql中将多行数据合并成一行数据
    C语言字符串格式化输出
    gdb无法单步调试
    Linux系统glibc库版本信息查看
    gcc编译命令行依赖库的指定顺序
    HDFS的基础与操作
    搭建Kubernetes容器集群管理系统
    如何在 CentOS 里下载 RPM 包及其所有依赖包
  • 原文地址:https://www.cnblogs.com/songyuejie/p/5166435.html
Copyright © 2020-2023  润新知