CLICK ME
yes, even hidden code blocks!
print("hello world!")
The connection failed because by default psql
connects over UNIX sockets using peer
authentication, that requires the current UNIX user to have the same user name as psql
. So you will have to create the UNIX user postgres
and then login as postgres
or use sudo -u postgres psql database-name
for accessing the database (and psql
should not ask for a password).
If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres
(as pointed out by @meyerson answer) will solve your immediate problem.
But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf
* line:
from
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
* |
import asyncio | |
import logging | |
import time | |
import psutil | |
logger = logging.getLogger(__name__) | |
import javafx.application.Application; | |
import javafx.beans.property.SimpleObjectProperty; | |
import javafx.beans.property.SimpleStringProperty; | |
import javafx.beans.value.ObservableValue; | |
import javafx.collections.FXCollections; | |
import javafx.scene.Node; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Pagination; | |
import javafx.scene.control.TableColumn; | |
import javafx.scene.control.TableView; |
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
#include <boost/python.hpp> | |
#include <iostream> | |
namespace { | |
void *convert_to_FILEptr(PyObject* obj) { | |
return PyFile_Check(obj) ? PyFile_AsFile(obj) : 0; | |
} | |
} | |
void test_argument(FILE* f) { |