I am trying to create a function in PostgreSql installed on a server but when a run the .sql function this is the error i get using PgAdminIII SQL queries:
ERROR: could not access file "$libdir/librouting_dd": No such file or
directory
I have read the 'dynamic_library_path (string)' in PostgreSql webpage but i don't understand how to write the correct path into my ubuntu system for PostgreSql.
Thanks in advance.
Related
I am unable to import a CSV with postgres(v12) into pgAdmin4 using the copy command.
COPY revenue
FROM "../Desktop/Home/revenue.csv"
DELIMITER ','
CSV HEADER;
The result I get is:
ERROR: could not open file "../Desktop/Home/revenue.csv" for reading: Permission denied
HINT: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.
SQL state: 42501
I found article
How to import a CSV file into PostgreSQL using Mac
but it was unsolved and I already tried ging the user 'postgres' 'read and write' permissions. Maybe I did it wrong, I right clicked on the CSV file and I also tried giving it permission in pgAdmin4 (properties, default privileges)
I found the solution below suggesting I launch postgres from my command line
Postgres ERROR: could not open file for reading: Permission denied
However everything I read on launching postgres on a mac via command line includes homebrew. I didn't install postgresql with homebrew.
-Can I launch postgres on a mac without using homebrew?
If I install homebrew, will it work to launch postgresql even if I didn't use it to install postgres initially?
-Is there another way to use the copy command via pgadmin ? (I tried using dbeaver but it wouldn't connect to my database)
I am super lost.
Thank you!
I am using sqldeveloper to query database and export results to csv file. I need this file on daily basis so thought of creating bat file which can be scheduled on windows task scheduler. I was researching it and found I can use SQLcl to run my script to export the query data. But somehow I can't connect it and it gives me and error 'ORA-01017: invalid username/password;logon denied. Here is my connection properties from sql developer
Here is my command line:
sql testuser1/mypass#tstwd2.myhost.internal:1521/tst.internal
I have java development kit installed
Do I need anything for java? Or do I need any special rights to run sql command line?
Found the problem, my userid is in double quotes so I have to use escape sequence **\**, its working like a charm.
I want to do some data analysis from NYCopendata. The file is ~900 MB. So I am using postgresql database to store this file. I am using pgadmin4 but could not figure out how to directly store the csv in postgresl without first downloading in my machine. Any help is greatly appreciated.
Thanks.
You can use:
pgAdmin to upload a CSV file from import/export dialog
https://www.pgadmin.org/docs/pgadmin4/4.21/import_export_data.html
COPY statement on the database server
\copy command from psql on any client
It is possible to change postgres data folder during its installation on Windows? For example run the postgres instalator with some parameter.
At this time Iam using this procedure: https://wiki.postgresql.org/wiki/Change_the_default_PGDATA_directory_on_Windows
Or is there another script which do that?
I'm attempting to run a sequence of SQL files using PEM. From the Oracle database I used:
#path_to_file1.sql
#path_to_file2.sql
#path_to_file3.sql
How do I do this using Postgres Enterprise Manager (PEM) ?
Please note that i'm NOT USING a command line and I don't want to run a SINGLE file, but I'm using PEM on a windows machine to run a SEQUENCE of sql files in one shot.
Regards.