posgre存範圍值 posgresql

2021-10-13 11:44:34 字數 875 閱讀 2109

ubuntu下

修改postgres資料庫使用者的密碼為123456

sudo -u postgres psql

postgres=# alter user postgres with password '123456';

修改ubuntu作業系統的postgres使用者的密碼(密碼要與資料庫使用者postgres的密碼相同)

sudo passwd –d postgres

sudo -u postgres passwd

vi /etc/postgresql/9.4/main/postgresql.conf

#listen_addresses = 'localhost' 改為 listen_addresses = '*'

#password_encryption = on 改為 password_encryption = on

vi /etc/postgresql/9.4/main/pg_hba.conf

在文件末尾加上以下內容

host all all 0.0.0.0 0.0.0.0 md5

psql -u postgres -h 127.0.0.1

postgres=# create user "dev" with password '123456' nocreatedb;

使用者名稱處是雙引號

建立資料庫,並指定所有者

postgres=#create database "testdb" with owner = "dev";

命令列管理使用者 (dev 是使用者,tempdb是資料庫)

sudo -u postgres createuser -d –p dev

sudo -u postgres createdb –o dev tempdb

堆疊存值關係

url 1,堆存引用 棧存值,可共享 2,int a 3 堆中建立乙個a的引用 棧中建立3的字面值 a這個引用指向3這個值 3,string str abc 1 堆中建立乙個str的引用 2 棧中查詢有沒有存放值為 abc 的位址,如果沒有,則開闢乙個存放字面值為 abc 的位址,接著建立乙個新的s...

迭代範圍值

迭代需求 範圍值定義起始值和結束值 防止反向範圍,即起始值大於結束值 必須能夠把元素型別的乙個值和另乙個值進行比較 能狗在範圍值之中找出某個特定的值是否存在 能夠輕易迭代整個範圍值 namespace 迭代範圍值1 this.start start this.end end public t sta...

Vuex存值與取值

存值 methods 取值 methods store的index.js中 import vue from vue import vuex from vuex import handle from handle vue.use vuex export default newvuex.store 改變...