Skip to content

Long's blog

Góp nhặt của một kẻ mù công nghệ :p

  • My Info
    • Đỗ Thành Long’s CV
    • My Github
    • My Youtube
    • My Google Scholar
    • My Facebook
  • Café
    • soiqualang_chentreu
    • Trắng Xóa!
    • Capuchino
    • Robusta Café
    • Đen nóng Café
  • Dev
    • Web
    • Công nghệ
    • Uncategorized
  • GIS
    • Shared Map
    • QGIS
    • WebGIS
    • PostgreSQL, PostGIS
    • GeoServer
    • Openlayers
  • Viễn thám
  • Research
    • Ý tưởng
    • Research
    • Sói’s Tutorials
  • Tài liệu
    • GIS – Remote Sensing news
    • Tài liệu
    • Dữ liệu
    • Mẹo vặt
  • My Apps
    • Khoa học thường thức
    • Trắng Xóa – Danh ngôn
    • Harmonica tabs
    • Ảnh chế hài hước, dzui dzui
    • GeoGIS
    • Guitar tabs – Viettabs
    • 2000 Phác đồ điều trị bệnh
    • Q2A
    • Học HTML
    • Openlayers Cookbook
    • OpenLayers3 Leaflte Cookbook
    • OpenLayers Create Code
    • PostgreSQL Tools
    • Get link Remote Sensing Data
    • Lon,Lat Decimal
    • Download Landsat Images
    • Tra cứu vận đơn Viettel Post
    • GET Map OGC WMS, WFS, WCS services
    • PHP-SLD Generate
    • Viettabs.cf – Guitar tabs sharing
    • Files to Videos
  • Other
    • Reading
    • Games
    • Harvest Moon

Tag: postgresql

PostgreSQL select current user

Posted on 23/11/2023 by soiqualang_chentreu Posted in Mẹo vặt Tagged postgresqlLeave a Comment on PostgreSQL select current user

PostgreSQL select current user SELECT session_user, current_user;

Read More

PostgreSQL set TIMEZONE

Posted on 27/10/2023 by soiqualang_chentreu Posted in Uncategorized Tagged postgresql, TIMEZONELeave a Comment on PostgreSQL set TIMEZONE

PostgreSQL set TIMEZONE ALTER DATABASE geolands SET timezone TO 'Asia/Ho_Chi_Minh'; SELECT CURRENT_TIMESTAMP; Tham khảo thêm SHOW TIMEZONE; select * from pg_timezone_names

Read More

PostgreSQL thống kê | PostgreSQL statistics

Posted on 28/08/202328/08/2023 by soiqualang_chentreu Posted in Dữ liệu, Mẹo vặt Tagged postgresql, statisticsLeave a Comment on PostgreSQL thống kê | PostgreSQL statistics

PostgreSQL thống kê Create a function for row count create function count_rows_of_table( schema text, tablename text ) returns integer security invoker language plpgsql as $body$ declare query_template constant text not null := ' select count(*) from "?schema"."?tablename" '; query constant […]

Read More

PostgreSQL xử lý chuỗi với xpath

Posted on 24/04/2023 by soiqualang_chentreu Posted in Công nghệ, Lang thang, Mẹo vặt, Sói's Tutorials Tagged postgresql, postgresql xpath, postgresql xpath query, postgresql xpath_string example, xpathLeave a Comment on PostgreSQL xử lý chuỗi với xpath

PostgreSQL xử lý chuỗi với xpath Tôi có bảng thế này Giờ tôi cần tách theo cấu trúc thế này Với cột định nghĩa cần cực kỳ ngắn gọn, 1 cụm từ thôi càng tốt Cột description trên kia thì […]

Read More

PostgreSQL – Terminate Client Connect View

Posted on 06/04/2023 by soiqualang_chentreu Posted in Lang thang, Mẹo vặt, Sói's Tutorials Tagged postgresqlLeave a Comment on PostgreSQL – Terminate Client Connect View

PostgreSQL – Terminate Client Connect View To fix FATAL: sorry, too many clients already connection to server https://dothanhlong.org/postgresql-fatal-sorry-too-many-clients-already-connection-to-server/ — View: public.terminate_client_connect — DROP VIEW public.terminate_client_connect; CREATE OR REPLACE VIEW public.terminate_client_connect AS SELECT pg_terminate_backend(pg_stat_activity.pid) AS pg_terminate_backend FROM pg_stat_activity WHERE pg_stat_activity.pid <> […]

Read More

[PostgreSQL] FATAL: sorry, too many clients already connection to server

Posted on 04/04/2023 by soiqualang_chentreu Posted in Lang thang, Mẹo vặt Tagged clients, postgresqlLeave a Comment on [PostgreSQL] FATAL: sorry, too many clients already connection to server

[PostgreSQL] FATAL: sorry, too many clients already connection to server Unable to connect to PostgreSQL server: connection to server at "DB hostname" (DB IP), port DB port failed: FATAL: sorry, too many clients already connection to server at "DB hostname" […]

Read More

Make and Update SEQUENCE in PostgreSQL – GeoServer WMST with Image mosaicking plugin

Posted on 17/03/2023 by soiqualang_chentreu Posted in GIS, Mẹo vặt, WebGIS Tagged geoserver, Image mosaicking, postgresql, SEQUENCELeave a Comment on Make and Update SEQUENCE in PostgreSQL – GeoServer WMST with Image mosaicking plugin

Make and Update SEQUENCE in PostgreSQL – GeoServer WMST with Image mosaicking plugin Create Table, Index, SEQUENCE, COMMENT DROP TABLE IF EXISTS "img_lst"; DROP SEQUENCE IF EXISTS raster.img_lst_fid_seq; CREATE SEQUENCE raster.img_lst_fid_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE […]

Read More

PostgreSQL – Column to Json/Jsonb

Posted on 07/03/2023 by soiqualang_chentreu Posted in Dữ liệu, Lang thang, Mẹo vặt, Sói's Tutorials, Web Tagged array_agg, array_to_string, json_agg, postgresql, row_to_json, to_jsonbLeave a Comment on PostgreSQL – Column to Json/Jsonb

PostgreSQL – Column to Json/Jsonb I have a table coso_nhayen like this row_to_json select row_to_json(row) from (select * from coso_nhayen) row LIMIT 5; to_jsonb SELECT id, to_jsonb(t.*) – 'id' AS data FROM coso_nhayen t LIMIT 5; json_agg SELECT json_agg(t) FROM coso_nhayen t; […]

Read More

[Notes] SQL or NoSQL? Why not use both (with PostgreSQL)?

Posted on 11/02/202311/02/2023 by soiqualang_chentreu Posted in Công nghệ, GIS, Lang thang, Ý tưởng Tagged nosql, postgresql, sqlLeave a Comment on [Notes] SQL or NoSQL? Why not use both (with PostgreSQL)?

[Notes] SQL or NoSQL? Why not use both (with PostgreSQL)? https://supabase.com/blog/sql-or-nosql-both-with-postgresql It’s a tough decision for any developer starting a new project. Should you store your data in a standard, time-tested SQL database, or go with one of the newer […]

Read More

Docker Backup, Restore PostgreSQL Database

Posted on 03/11/2022 by soiqualang_chentreu Posted in Công nghệ, Lang thang, Linux, Mẹo vặt Tagged backup, database, Docker, postgresql, RestoreLeave a Comment on Docker Backup, Restore PostgreSQL Database

Docker Backup, Restore PostgreSQL Database Single Database PostgreSQL Backup Single Database sudo docker exec -t –user pg_username pg_container_name pg_dump -c -p 5432 -U pg_username "database_name" > "/path/on/your/machine/dump.sql" PostgreSQL Restore Single Database sudo docker exec -t –user pg_username pg_container_name psql -c […]

Read More

[PostgreSQL Linux] Remove installed PostgreSQL in opt dir

Posted on 19/09/202219/09/2022 by soiqualang_chentreu Posted in Lang thang, Linux Tagged Database Engines, postgresqlLeave a Comment on [PostgreSQL Linux] Remove installed PostgreSQL in opt dir

[PostgreSQL Linux] Remove installed PostgreSQL in opt dir I installed PostgreSQL through the installation file, so the installation directory is /opt/PostgreSQL/10 I tried sudo apt-get –purge remove postgresql* but this did not work for me. In my case uninstaller was […]

Read More

PostgreSQL Add User

Posted on 18/09/2022 by soiqualang_chentreu Posted in Lang thang, Mẹo vặt Tagged database, postgresqlLeave a Comment on PostgreSQL Add User

PostgreSQL Add User CREATE USER user_name WITH PASSWORD 'user_password'; GRANT ALL PRIVILEGES ON DATABASE "database_name" to user_name; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO user_name; -soiqualang_chentreu-

Read More

[PostgreSQL] Create a database from an exist database

Posted on 10/09/202210/09/2022 by soiqualang_chentreu Posted in Lang thang, Sói's Tutorials Tagged postgresqlLeave a Comment on [PostgreSQL] Create a database from an exist database

[PostgreSQL] Create a database from an exist database Create a database Postgres allows the use of any existing database on the server as a template when creating a new database. I’m not sure whether pgAdmin gives you the option on […]

Read More

PostgreSQL – Function to remove accents in string

Posted on 04/09/2022 by soiqualang_chentreu Posted in Lang thang, Mẹo vặt, Sói's Tutorials Tagged accents, postgresqlLeave a Comment on PostgreSQL – Function to remove accents in string

PostgreSQL – Function to remove accents in string Loại bỏ dấu câu, chuyển câu có dấu thành không dấu trong PostgreSQL Ex: José, Jose, Jósé, Jóse -> Jose Load extension unaccent CREATE EXTENSION unaccent; Run SQL to remove accents in […]

Read More

PostgreSQL update value in JSONB

Posted on 07/07/2022 by soiqualang_chentreu Posted in Mẹo vặt, Sói's Tutorials Tagged database, jsonb, postgresql, sqlLeave a Comment on PostgreSQL update value in JSONB

PostgreSQL update value in JSONB Tình cờ mình làm việc, cần update lại giá trị một key trong cột có kiểu là jsonb, thế là mình nghĩ json thì cũng là text thôi, replace là được, và đây là cách […]

Read More

Posts navigation

Older posts
Buy me a coffee - MOMO

Tags

3D WebGIS Android Android studio api ArcGIS Capacitor cloudflare cordova database Docker gdal geoserver gis git github Google Earth Engine guitar htaccess Ionic IOS javascript JS GIS Jupyter Notebook leaflet Linux Machine learning map mysql Nodejs openlayers php Pokemon postgis postgresql python QGIS remote sensing sql tomcat tools ubuntu VirtualBox viễn thám webgis wordpress

Recent Posts

  • Fix Geoserver WMS character representation error (UTF-8)
  • Create a globe-like orthographic projection map in QGIS 3
  • Linux Link, Unlink folder
  • PostgreSQL select current user
  • Moodle ERROR You don’t have permission to view this list of courses

Recent Comments

  • [GEE Cơ bản #1] Hướng dẫn thêm một tập ảnh trong Google Earth Engine – OpenGIS Việt Nam on [GEE Basic] Add an Image collection in Google Earth Engine
  • Cannot-Make-Directory-Permission-Denied-Bij-Run-Screen. on [Linux Screen] Cannot make directory ‘/var/run/screen’: Permission denied
  • Lê Tiến on Installing Apache, QGIS Server, And Lizmap Web Client On Windows OS
  • Amit Kumar Singh on Tìm hiểu Cloudflare Worker
  • Nguyen Liem on [Python] Text to speech – Chuyển văn bản thành giọng nói FPT Speech Synthesis

Categories

  • Capuchino
  • Công nghệ
  • Dữ liệu
  • GIS
  • Google Earth Engine
  • Lang thang
  • Linux
  • Mẹo vặt
  • QGIS Tutorials and Tips
  • Research
  • Sói's Tutorials
  • Tài liệu
  • Uncategorized
  • Viễn thám
  • Web
  • WebGIS
  • Ý tưởng

Archives

  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • November 2020
  • September 2020
  • August 2020
  • August 2019
  • July 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • May 2017
  • April 2017

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright 2022. All rights reserved.