public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Cannot run psql under Cygwin
@ 2010-08-11 16:23 Clement, Sebastien
  2010-08-11 16:43 ` Steve Holden
  0 siblings, 1 reply; 4+ messages in thread
From: Clement, Sebastien @ 2010-08-11 16:23 UTC (permalink / raw)
  To: cygwin

Okay, many thanks Larry.

I forgot to mention I was using the MinTTY console.
It works when I use the regular Cygwin console.

I found that:
http://cygwin.com/ml/cygwin/2009-10/msg00330.html


Sébastien
------



On 8/11/2010 11:57 AM, Clement, Sebastien wrote:

    When I try to run psql (eg. psql -U myusername -d mydb) from Cygwin, it freezes.
    When I run it from the DOS console, it works fine.


In that case, you need to run Cygwin's bash from a console (i.e. use
'cygwin.bat' as provided by 'setup.exe') and run 'psql' from there.
See the 'tty' option for the CYGWIN environment variable in the Users
Guide for more details:


<http://cygwin.com/cygwin-ug-net/using-cygwinenv.html>

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot run psql under Cygwin
  2010-08-11 16:23 Cannot run psql under Cygwin Clement, Sebastien
@ 2010-08-11 16:43 ` Steve Holden
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Holden @ 2010-08-11 16:43 UTC (permalink / raw)
  To: cygwin

This is running in a mintty console on a fairly recent (updated four
days ago) Cygwin load and the standard Windows PostgreSQL server:

sholden@lifeboy ~/Projects/PytDj/Pyteach/templates/training
$ psql -h localhost -p 5432 -U django PyTeach
Password for user django:
Welcome to psql 8.2.11 (server 8.3.5), the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

WARNING:  You are connected to a server with major version 8.3,
but your psql client is major version 8.2.  Some backslash commands,
such as \d, might not work properly.

PyTeach=> select * from city;
 id |      ctyname
----+-------------------
  2 | Washington, DC
  6 | New York, NY
  7 | London, England
  8 | Boston, MA
  9 | Chicago, IL
 10 | Atlanta, GA
 11 | Los Angeles, CA
 12 | San Francisco, CA
(8 rows)

PyTeach=> \q

sholden@lifeboy ~/Projects/PytDj/Pyteach/templates/training
$ which psql
/usr/bin/psql

Had you considered using the Cygwin psql rather than the Windows one?

regards
 Steve

On 8/11/2010 12:23 PM, Clement, Sebastien wrote:
> Okay, many thanks Larry.
> 
> I forgot to mention I was using the MinTTY console.
> It works when I use the regular Cygwin console.
> 
> I found that:
> http://cygwin.com/ml/cygwin/2009-10/msg00330.html
> 
> 
> Sébastien
> ------
> 
> 
> 
> On 8/11/2010 11:57 AM, Clement, Sebastien wrote:
> 
>     When I try to run psql (eg. psql -U myusername -d mydb) from Cygwin, it freezes.
>     When I run it from the DOS console, it works fine.
> 
> 
> In that case, you need to run Cygwin's bash from a console (i.e. use
> 'cygwin.bat' as provided by 'setup.exe') and run 'psql' from there.
> See the 'tty' option for the CYGWIN environment variable in the Users
> Guide for more details:
> 
> 
> <http://cygwin.com/cygwin-ug-net/using-cygwinenv.html>
> 
> --
> Larry Hall                              http://www.rfk.com
> RFK Partners, Inc.                      (508) 893-9779 - RFK Office
> 216 Dalton Rd.                          (508) 893-9889 - FAX
> Holliston, MA 01746
> 


-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
DjangoCon US September 7-9, 2010    http://djangocon.us/
See Python Video!       http://python.mirocommunity.org/
Holden Web LLC                 http://www.holdenweb.com/


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot run psql under Cygwin
  2010-08-11 15:57 Clement, Sebastien
@ 2010-08-11 16:09 ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 4+ messages in thread
From: Larry Hall (Cygwin) @ 2010-08-11 16:09 UTC (permalink / raw)
  To: cygwin

On 8/11/2010 11:57 AM, Clement, Sebastien wrote:
> When I try to run psql (eg. psql -U myusername -d mydb) from Cygwin, it freezes.
> When I run it from the DOS console, it works fine.

In that case, you need to run Cygwin's bash from a console (i.e. use
'cygwin.bat' as provided by 'setup.exe') and run 'psql' from there.
See the 'tty' option for the CYGWIN environment variable in the Users
Guide for more details:

<http://cygwin.com/cygwin-ug-net/using-cygwinenv.html>

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Cannot run psql under Cygwin
@ 2010-08-11 15:57 Clement, Sebastien
  2010-08-11 16:09 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 4+ messages in thread
From: Clement, Sebastien @ 2010-08-11 15:57 UTC (permalink / raw)
  To: cygwin

When I try to run psql (eg. psql -U myusername -d mydb) from Cygwin, it freezes.
When I run it from the DOS console, it works fine.

Here are the versions on my system:
Windows XP Pro 2002, Service Pack 3
Cygwin: CYGWIN_NT-5.1 W-QUE-A103212 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
PostgreSQL: 8.4.4
No version of PostgreSQL was installed under Cygwin.

Sébastien Clément


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-11 16:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 16:23 Cannot run psql under Cygwin Clement, Sebastien
2010-08-11 16:43 ` Steve Holden
  -- strict thread matches above, loose matches on Subject: below --
2010-08-11 15:57 Clement, Sebastien
2010-08-11 16:09 ` Larry Hall (Cygwin)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).