zoukankan      html  css  js  c++  java
  • 查看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)

  • 相关阅读:
    sublime开启vim模式
    git命令行界面
    搬进Github
    【POJ 2886】Who Gets the Most Candies?
    【UVA 1451】Average
    【CodeForces 625A】Guest From the Past
    【ZOJ 3480】Duck Typing
    【POJ 3320】Jessica's Reading Problemc(尺取法)
    【HDU 1445】Ride to School
    【HDU 5578】Friendship of Frog
  • 原文地址:https://www.cnblogs.com/songyuejie/p/5166435.html
Copyright © 2011-2022 走看看