≡ Menu

PostgreSQL DB

8 PostgreSQL Date and Time Function Examples

In this article, let us review following PostgreSQL date and time functions with practical examples. now() now()::date now()::time date_part() age() extract() date_trunc() to_char() to_timestamp() Get current date and time using the following query. dbase=# select now(); now ------------------------------ 2010-06-19 09:28:43.98216-07 (1 row) Use the ::time as shown below to get only the time (without date). [...]

{ 7 comments }

15 Practical PostgreSQL Database Administration Commands

Earlier we discussed about how to install PostgreSQL database on Linux from source. In this article, let us review top 15 practical postgreSQL DBA command examples. If you are a mySQL administrator, check-out our 15 examples of mysqladmin command article that we discussed a while back. $ /usr/local/pgsql/bin/psql postgres postgres Password: (oldpassword) # ALTER USER [...]

{ 21 comments }

Similar to mySQL, postgreSQL is very famous and feature packed free and open source database. Earlier we've discussed several installations including LAMP stack installation, Apache2 installation from source, PHP5 installation from source and mySQL installation. In this article, let us review how to install postgreSQL database on Linux from source code. From the postgreSQL download [...]

{ 32 comments }