Invoking psql at command prompt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shoonya
    New Member
    • May 2007
    • 160

    Invoking psql at command prompt

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

    shoonya
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    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

    Comment

    • shoonya
      New Member
      • May 2007
      • 160

      #3
      Originally posted by michaelb
      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

      Comment

      • michaelb
        Recognized Expert Contributor
        • Nov 2006
        • 534

        #4
        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.

        Comment

        • shoonya
          New Member
          • May 2007
          • 160

          #5
          Originally posted by michaelb
          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

          Comment

          • michaelb
            Recognized Expert Contributor
            • Nov 2006
            • 534

            #6
            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.

            Comment

            • shoonya
              New Member
              • May 2007
              • 160

              #7
              Originally posted by michaelb
              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[:)]

              Comment

              Working...