![]() ![]() This is the PostGIS topology function cheat sheet for upcoming PostGIS 2.0 as of January. > Seq Scan on products ( cost =6.12 rows =52728 width =2190 ) (actual time =0.955.973. PostGIS in Action: PostGIS / PostgreSQL Related Study Guides. To save, right-click (for desktop users) or long tap. Alternatively, you can also download the cheat sheet in PNG as a quick reference. Multiple lines */ - Changing password for postgresql user fedor ALTER USER fedor WITH PASSWORD 'fedor' EXPLAIN ANALYZEĮxcept ordinary ANALYZE - for showing exact query benchmarking, i.e cp_dev = # explain analyze SELECT "products".* FROM "products"Ĭp_dev-# WHERE (lower (name ) like '%pre%' or lower (description ) like '%pre%' )Ĭp_dev-# ORDER BY name ASC LIMIT 100 OFFSET 100 Download the SQL Window Functions Cheat Sheet in your preferred PDF format to have a handy reference at your fingertips: If you like learning SQL using hands-on exercises, then you’ve got to try. POSTGRESQL 8.3 PSQL CHEAT SHEET psql is located in the bin folder of the PostgreSQL install and. ![]() ![]() Some usefull sql commands syntax - comment to end of line /* C-like comment, possibly PSQL 8.3 Cheatsheet - Postgres OnLine Journal. Running a SQL script (command line) psql -f script.sql databaseName # Example on dumping & restoring postgresql database # Don't forget to 'CREATE DATABASE newdb ' Pg_dump and pg_restore pair pg_dump therrr-dev > dump.sql ‘products’: select * from pg_indexes where tablename = 'products' Dumping postgres database \di - List all indexes for current schemaĪlso, listing indexes for desired table, e.g. See the Oracle MySQL and MariaDB hardening guides. Opening PostgreSQL console: psql -h -U ĭbname is optional Working with pgsql console \? - Help Disable the FILE privilege for all users to prevent them reading or writing files. For more detailed cheat sheets there are a plenty good links at the bottom of this post. If you have permission errors, become a postgres user in sudo su - postgres PSQL grant all permissions to grant all. And I guess they are useful when you have an experience writing SQL queries and want to know database-specific things. It is not detailed at all and contains a few commands. So, here is a cheat sheet for working with PostgreSQL. A best way of doing this is to write an article or, in my case, yet another cheat sheet. A time has come and I need to work with PostgreSQL databases and as it always happens - some things concerning with this work need to be remembered. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |