Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I tried importing a sql file using
psql.exe -U postgres -d development "d:\myprojects\ruby\HelloWorld\db\data.sql".
I get a message
"extra command line arguement d:\myprojects\ruby\HelloWorld\db\data.sql ignored"
Any help on this ?
Either
psql.exe -U postgres -d development < "d:\myprojects\ruby\HelloWorld\db\data.sql"
or
psql.exe -U postgres -d development -f "d:\myprojects\ruby\HelloWorld\db\data.sql"
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I think the main question is complete. I am not familiar with docker and I would love if someone could break down for me the meaning of the following command:
docker build -f 12.Dockerfile -t docker.something.com/blah/postgresql:12 .
docker build -f 12.Dockerfile -t docker.something.com/blah/postgresql:12 .
Breaking it down:
docker build is using the docker cli to invoke the build command
-f 12.Dockerfile specifies the 12.Dockerfile file as the Dockerfile you are trying to build
-t docker.something.com/blah/postgresql:12 is specifying a tag which would be used to identify the build image
. is the docker context that tells docker that files and directories it would have access to, should it need to copy everything.
That said, you'd be better served by reading the documentation and familiarising yourself with these concepts
This question already has answers here:
How do you find the original user through multiple sudo and su commands?
(10 answers)
Closed 6 years ago.
I am using the system as "user1" and I sudo as different user say "sudo -u user2 sbsh" and the execute a perl script.
Is there a way to get the "user1" in the script I am running ?
I used ENV{'USER'}. but it is giving "user2". 'SUDO_USER' is also not working.
Try $ENV{'SUDO_USER'}.
Example:
$ sudo perl -E 'say for $ENV{USER}, $ENV{SUDO_USER}'
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have Ubuntu 14 server dockerized. All are good I guess, but when I'm going to dump a table:
psql -c -h myserver -p5433 mydb -t gr_service_plan_xxx > gr_service_plan_xxx.sql
an error occurs:
psql: warning: extra command-line argument
What does it mean? Am I missing something in the command line?
Judging from the command arguments you included, I think you intended to run pg_dump not psql:
pg_dump -c -h myserver -p 5433 mydb -t gr_service_plan_xxx > gr_service_plan_xxx.sql
Or you need to specify the command for psql, for example:
psql -h myserver -p5433 mydb -c 'SELECT * FROM gr_service_plan_xxx;' > gr_service_plan_xxx.sql
This question already has answers here:
Import SQL dump into postgresql [closed]
(3 answers)
Closed 10 years ago.
when i run this command on ubuntu terminal:
psql -h localhost -U arwinder --password -f sh_cake_db_14_02_13.sql -d new_db
where "arwinder" is user name and "sh_cake_db_14_02_13.sql" is sql dump and "new_db" is database.
then while importing it shows following errors and in postgresql database I don't have all the tables. Tese are the errors:
invalid command \N
invalid command \
invalid command \
ERROR: syntax error at or near "27"
LINE 1: 27 Balaji Angan
There is a convert tool https://github.com/lanyrd/mysql-postgresql-converter ,or you can refer to postgressql's wiki http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL , see MySQL section and check your data types.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
How to uninstall .pkg in solaris?
We have command to install pkgadd -d one.pkg,. Similarly can we have command for uninstall?
There is no direct way as the name of the file containing the package can be anything.
You need to retrieve the package name to be able to remove it.
This can be done with that oneliner (ksh or bash):
# pkgrm $(pkginfo -d one.pkg | nawk '{print $2}')
pkgrm <pkg_name>
To know package name run below command
pkginfo -l <word_in_package_name>