PhotoDateChanger
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

Posts Tagged with "Postgres"

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 i...


Connect to Postgres on Heroku using DATABASE_URL Config Var with PHP and PDO

Unfortunately PHP's PDO constructor doesn't take a database connection url (in a format that Heroku makes available as a config var) as an argument. I...


How to Make Cross Database Queries with Postgres and DBLink Extension

Here are a few snippets for cross database queries. It's important to note that you must be explicit in enumerating the columns and types you are quer...


How to Import/Export a Database from One Heroku App to Another Heroku App

Heroku is awesome! Let's say we want to copy a production database to a staging database. We can use the `pg:backups:restore` command to accomplis...


How To Create a Dump File in Postgres Compatible with Heroku

When Heroku creates a dump file of your Postgres database it uses the `-Fc` option It is equivalent to running pg_dump -Fc -d name_of_db > nam...


How to Enable UUIDs in Postgres

The first thing you'll need to do is enable the extension create extension "uuid-ossp"; To test that it's working select uuid_generate_v1...


Deploying Wordpress on Heroku

> This post is out of date - Heroku officially supports PHP now w/ buildpacks Heroku runs Apache version 2.2.22 PHP version 5.3.10 Deployi...


Extract Domain Names From Links in Text with Postgres and a Single SQL Query

This query and pattern will return urls in text all within a single SQL query. select substring(column_name from '.*://([^/]*)') as domain_name fr...


How To Install Pyscopg2 Python Postgres Driver on Mac OSX with Homebrew, Postgres.app and VirtualEnv

You might have to append the path of the Postgres.app bin directory to your path in order to install the Python driver for Posgres. export PATH=$P...


How To Remove Duplicates From a Table with Postgres

Let's create a table that will hold some dummy data. > create table fruits (id serial primary key, name varchar, color varchar); > inse...


How to cast a string of comma separated numbers into an array of integers for Postgres

If you have an string of numbers like "1,2,3" and you want to turn it into an array of integers you need to cast it into an integer a...