473,765 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invoking psql at command prompt

shoonya
161 New Member
hello all
I am just started migrated from WAMP to WAPP
can any body tell me how to run postgreSQL from command prompt??

shoonya
May 11 '07 #1
6 11355
michaelb
534 Recognized Expert Contributor
What do you mean by "run postgreSQL"?

If you need to start the database server look at pg_ctl,
if you need to open the interactive terminal and run your SQL commands look at psql
May 12 '07 #2
shoonya
161 New Member
What do you mean by "run postgreSQL"?

If you need to start the database server look at pg_ctl,
if you need to open the interactive terminal and run your SQL commands look at psql
i tried psql command on command prompt but it's giving errors
"unrecogniz ed command"
i think i am doing some basic error
so any help will be appriciated
May 14 '07 #3
michaelb
534 Recognized Expert Contributor
Try to either use the fully qualified path, or cd to the directory where psql is installed, or add the directory where psql is installed to the path variable in your environment.

It appears that you report your own postings. There's no need to do that, it won't help you to get the answer sooner.
May 14 '07 #4
shoonya
161 New Member
Try to either use the fully qualified path, or cd to the directory where psql is installed, or add the directory where psql is installed to the path variable in your environment.

It appears that you report your own postings. There's no need to do that, it won't help you to get the answer sooner.
i am not reporting my posts
just clicked on the report button instead on reply one[;)]
while setting the path to the location of psql
it's giving warning about window code page 1252
May 15 '07 #5
michaelb
534 Recognized Expert Contributor
In most cases you can disregard this warning about code page.
But if you do want to try something new here's the info that may help.

psql on Windows is built as a "console application". Since the Windows console windows use a different encoding than the rest of the system, you must take special care when using 8-bit characters within psql. If psql detects a problematic console code page, it will warn you at startup. To change the console code page, two things are necessary:

1) Set the code page by executing cmd.exe /c chcp 1252. (you may need to replace 1252 with your value.)

2) Set the console font to "Lucida Console", because the raster font does not work with the ANSI code page.

Read the psql manual for more information.
May 15 '07 #6
shoonya
161 New Member
In most cases you can disregard this warning about code page.
But if you do want to try something new here's the info that may help.

psql on Windows is built as a "console application". Since the Windows console windows use a different encoding than the rest of the system, you must take special care when using 8-bit characters within psql. If psql detects a problematic console code page, it will warn you at startup. To change the console code page, two things are necessary:

1) Set the code page by executing cmd.exe /c chcp 1252. (you may need to replace 1252 with your value.)

2) Set the console font to "Lucida Console", because the raster font does not work with the ANSI code page.

Read the psql manual for more information.

great man...
thanks a ton[:)]
May 16 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

15
12350
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); but i want to execute this script from the client and so my blob-data is
2
2621
by: Chris Fonnesbeck | last post by:
I'm trying to run the latest Postgresql on OSX 10.3, but am receiving a version mismatch error when I try and run the database: dyld: psql version mismatch for library: /usr/local/lib/libreadline.4.dylib (compatibility version of user: 4.2.0 greater than library's version: 4.0.0) Trace/BPT trap Has anyone else run into this problem, or know of a solution?
7
37780
by: Willem Herremans | last post by:
I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also trying to call psql from my application for SQL statements typed directly by the user. I have used the Tcl command set psqlChannel
4
2154
by: Brendan Jurd | last post by:
Hello all, I just wanted to pass on some information about compatibility between the psql client and the postgres server. On a particular network, my workstation and the server are both debian boxes, but the workstation is on a more frequent upgrade schedule. The server is still running postgres 7.3.4, but my workstation has been upgraded with the latest (7.4.1) postgres client tools.
3
1986
by: Hunter Hillegas | last post by:
I have two varchars on my table... I tried to run the following: VMGEngine=# update user_account set editor_status = 'true' and administrator_status = 'true' where rec_num = 20; ERROR: column "editor_status" is of type character varying but expression is of type boolean I was expecting the single quotes to tell psql to treat the data as a
1
10879
by: Ennio-Sr | last post by:
Hi all! I'm writing a script that presents the user with a numbered lines menu, each line corresponding to a <case n> which executes a psql command. As the psql-commands are very similar to each other (all of them have the structure: 1.- psql mydb -x -c "SELECT * FROM tb_nm WHERE col_nm LIKE '%$k_r%'" ) I thought it was possible to shorten it, initializing a str with said command at the beginning of the script and limiting the...
2
1760
by: Russ Brown | last post by:
Hello, Today I tried connecting to my database locally via psql. I got the usual welcome & basic help messages, but it never got to the prompt: it just hung. So I checked top and the psql process was increasing in size at quite a rate (up to a gig in under 30 seconds). I'd been using psql with no problems only a couple of hours ago, and I haven't installed anything for at least a couple of days that I can think of.
3
2228
by: Anony Mous | last post by:
Hi, I've run into a problem. I've had postgres V8 beta on my WinXP Pro machine for some time now, and it's been running great. Now, for some reason, I cannot issue any queries to the database via psql. See snippit below... ------------ C:\Program Files\PostgreSQL\8.0-beta1\bin>createdb -U postgres test CREATE DATABASE
2
8729
by: Dmitri Priimak | last post by:
Hi All. There is one thing which somewhat annoys me, which is that psql always prompts me for a password. That makes it difficult for use in Makefile where I want to say 'make build_db', which would run psql for each stored procedure which needs to be updated. Is there a way to specify that password somehow in a command line like isql ( sybase cli client ) does?
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.