Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
postgresql [2008/07/14 16:13] a |
postgresql [2009/06/12 01:27] (current) a terminate a query which is taking a long time to run |
||
|---|---|---|---|
| Line 24: | Line 24: | ||
| You can also do this for a passwordless user: % crateuser bork | You can also do this for a passwordless user: % crateuser bork | ||
| + | |||
| + | **Creating a new user** | ||
| + | |||
| + | | ||
| + | |||
| + | **creating a new database** | ||
| + | |||
| + | | ||
| + | |||
| + | **changing postgsql user password** \\ | ||
| + | |||
| + | as postgres user (su - postgres) do: | ||
| + | < | ||
| + | $ psql template1 | ||
| + | |||
| + | | ||
| + | |||
| + | | ||
| + | \h for help with SQL commands | ||
| + | \? for help on internal slash commands | ||
| + | \g or terminate with semicolon to execute query | ||
| + | \q to quit | ||
| + | |||
| + | template1=# ALTER USER < | ||
| + | </ | ||
| + | |||
| + | **changeing ownership of database** | ||
| + | |||
| + | | ||
| **Inserting a time column** \\ | **Inserting a time column** \\ | ||
| Line 88: | Line 117: | ||
| order by whenx desc | order by whenx desc | ||
| + | **terminate a query which is taking a long time to run** | ||
| + | | ||
| + | FROM pg_stat_activity; | ||
| + | kill -INT procpid | ||

