Last active
August 25, 2021 15:19
-
-
Save dtest11/66e9f5c86550bbe76ed821d698315196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-20-04-quickstart | |
sudo -i -u postgres | |
createuser --interactive | |
createdb test | |
在电脑本机商: | |
sudo adduser sammy | |
sudo -i -u sammy | |
psql 测试下 | |
CREATE USER test WITH PASSWORD '123456'; | |
# by me add | |
host all all 0.0.0.0/0 md5 | |
select (extract(minute FROM to_timestamp(create_at))::int / 5) AS min5_slot, | |
date_trunc('hour', to_timestamp(create_at)) AS hour_stump, | |
create_at, | |
to_char(to_timestamp(create_at), 'HH12:MI:SS') as time, | |
extract(minute FROM to_timestamp(create_at))::int as minute, | |
remain_cups,remain_time | |
from ticket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
psql -h localhost -d testuser -U testuser -p 5432
Password for user testuser: