#psql
3 posts tagged psql. Clear filter
-
Select Basename in Postgres SQL
Postgres doesn't have a basename function per se. But it's easy to accomplish. select regexpreplace('http://www.seanbehan.com/images/logo.png', '.+/', '') ; -- Will return logo.png
-
How to Find Postgres Log File and Postgres Data Directory from PSQL
If you want to find the location of your log file in Postgres, you'll need to hop into a Psql session.. psql dbname Then it's as simple as running.. show data\directory ; Which will output the data...
-
How to Use Named Variables with Postgres and PHP PDO Driver
You can write reusable scripts with Postgres by taking advantage of named variables. A named variable starts with a : in your sql script. Here is an example select :anumber You can then use this...