zoukankan      html  css  js  c++  java
  • HOW TO: How to import UUID function into Postgre 9.3

    1. Open a command console and go to the directory where you installed Postgre server.

    e.g. D:Program FilesPostgreSQL9.3in>

    2. Drill down into BIN folder and issue following command.

    psql -d <database name> -U <username>

    3. Issue  CREATE EXTENSION command to import extension

    CREATE EXTENSION "uuid-ossp" ;

    NOTICE: There is a semicolon at the end of command.

    4. After above steps, you can check if the extension has been imported successfully by calling following command.

     select * from pg_extension;

    5. If succeed, you should be able to see the list as below.

      extname  | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
    -----------+----------+--------------+----------------+------------+-----------+--------------
     plpgsql   |       10 |           11 | f              | 1.0        |           |
     uuid-ossp |    89286 |         2200 | t              | 1.0        |           |

    6. Now, you may generate UUID by uuid_generate_v4()

    select uuid_generate_v4() ;
  • 相关阅读:
    crontab使用
    python 学习 第一课
    php调用阿里大鱼 接口curl
    thinkphp 动态 级联
    nginx重启
    linux查看 文件夹大小
    mysql convert
    mysql 数据库导入 导出,解决 导入 错误问题
    .net 更新数据 ado.net parameter
    PHP的超全局变量$_SERVER
  • 原文地址:https://www.cnblogs.com/mfrbuaa/p/5136755.html
Copyright © 2011-2022 走看看