Tag Info

New answers tagged

1

Try dumping the database, recreating, verifying it's empty, and re-importing? If it does it again then check the actual file you're importing and see if it has everything listed 2x.


3

The backslash commands in psql are shortcuts for a query or queries that look through the system catalogs. The \l command looks at information in pg_catalog.pg_database, specifically, this query: SELECT d.datname as "Name", pg_catalog.pg_get_userbyid(d.datdba) as "Owner", pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding", d.datcollate as ...


1

Set-Location 'E:\Program Files\PostgreSQL\9.1\bin\'; $env:PGPASSWORD = 'mypwd'; .\psql --% -U postgres -w myDB .\psql --% -c "copy {'SELECT * FROM myTable';} TO 'C:\Users\e\Desktop\test1.csv' CSV DELIMITER ',';" You invoke psql twice here. The first enters interctive mode as no stdin was supplied, no -f filename parameter was supplied, and there's no ...


0

Mind you I am not a PostgreSQL user by any means...but it looks like you are trying to run an interactive tool through a PowerShell script that I don't think is going to work. The most common method of connecting to databases with PowerShell is using .NET classes to make a connection, then run the query, pull the output into a PowerShell object, and then ...


5

The documentation on psql explains: Whenever the pattern parameter is omitted completely, the \d commands display all objects that are visible in the current schema search path — this is equivalent to using * as the pattern. (An object is said to be visible if its containing schema is in the search path and no object of the same kind and name ...


1

First command works because all listed tables has 'reference' in their schema. Second command works the same for 'donor'. so the relation "reference.iso_3166_1" does not have any 'donor' in its name. if you want to list iso_3166_1 then just try \dt+ iso* ref: http://www.postgresql.org/docs/current/static/app-psql.html#APP-PSQL-PATTERNS


1

In your situation, I would just spin up a PostgreSQL database somewhere and have them connect to it in Microsoft Access via ODBC. http://www.postgresonline.com/journal/archives/24-Using-MS-Access-with-PostgreSQL.html And I would keep Access and its limitations and tradeoffs in mind while designing my PostgreSQL database. Advanced features will require ...



Top 50 recent answers are included