* Emacs + sql-postgres
@ 2013-05-29 7:22 Pascal c
2013-05-29 8:45 ` Filipp Gunbin
0 siblings, 1 reply; 4+ messages in thread
From: Pascal c @ 2013-05-29 7:22 UTC (permalink / raw)
To: help-gnu-emacs
Dear Emacs users,
I'm using GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601, windows 7) and I would
like to use it as SQL frontend. I have 2 kind of DB : MS SQL and postgresql.
With sql-ms every thing is fine. I got connected and I can execute SQL into
the buffer.
If I use sql-postgres, I got the prompt to entry my user, host and database.
Then I got the prompt from psql to entry my password. But this doesn't
work.
I got the following state :
Password for user postgres:
psql: FATAL: Passwort-Authentifizierung f³r Benutzer ╗ postgres½
fehlgeschlagen
Into my .emacs I have written the line :
(setq sql-postgres-program "C:\\cygwin\\bin\\psql.exe")
I have read that I have to use psql from cygwin because it has this
interactive mode.
Into a cmd.exe I can connect to the server with psql.exe -h localhost -U
postgres -W
If I run this command into Emacs (eshell or Zsh), I got the prompt to entry
the password but after validation with ENTER the cursor still bliking and I
don't get the sql prompt from postgres.
Other question, if I can connect to postgres with Emacs, how can I execute
an SQL request?.
With sql-ms I have to write somthing like :
select * from table;
go
then on 'go' I have to do Cc C-r to send the SQL request.
How it should work with postgresql ?
Thank you in advance !
Cheers,
Pascal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs + sql-postgres
2013-05-29 7:22 Emacs + sql-postgres Pascal c
@ 2013-05-29 8:45 ` Filipp Gunbin
2013-05-29 9:56 ` Pascal c
0 siblings, 1 reply; 4+ messages in thread
From: Filipp Gunbin @ 2013-05-29 8:45 UTC (permalink / raw)
To: Pascal c; +Cc: help-gnu-emacs
On 29/05/2013 11:22 +0400, Pascal c wrote:
> If I use sql-postgres, I got the prompt to entry my user, host and database.
> Then I got the prompt from psql to entry my password. But this doesn't
> work.
> I got the following state :
>
> Password for user postgres:
> psql: FATAL: Passwort-Authentifizierung f³r Benutzer ╗ postgres½
> fehlgeschlagen
The simplest case is using cygwin Postgres (with psql) from cygwin
Emacs. Try that, if that does not work then probably you have some
authentication problems.
As for issuing commands, you can do that either from interactive sql
buffer, which runs psql and therefore accepts its commands, or from any
sql buffer which have an associated interactive buffer (then commands
like `C-c C-r' for sending a query to the interactive buffer apply).
`sql-set-sqli-buffer' allows to choose such an interactive buffer.
`sql-set-product' with an argument of `sql-postgres' may be required
before `sql-set-sqli-buffer'.
Filipp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs + sql-postgres
2013-05-29 8:45 ` Filipp Gunbin
@ 2013-05-29 9:56 ` Pascal c
2013-05-29 13:30 ` Pascal c
0 siblings, 1 reply; 4+ messages in thread
From: Pascal c @ 2013-05-29 9:56 UTC (permalink / raw)
To: help-gnu-emacs
hi Filipp,
thank you for your reply.
As you can read into my email I'm using psql from cygwin :
>Password for user postgres:
>psql: FATAL: Passwort-Authentifizierung f³r Benutzer ╗ postgres½
fehlgeschlagen
>Into my .emacs I have written the line :
>(setq sql-postgres-program "C:\\cygwin\\bin\\psql.exe")
or mybe this is not the psql from cygwin ?
Thank you,
Cheers,
Pascal
2013/5/29 Filipp Gunbin <fgunbin@fastmail.fm>
> On 29/05/2013 11:22 +0400, Pascal c wrote:
>
> > If I use sql-postgres, I got the prompt to entry my user, host and
> database.
> > Then I got the prompt from psql to entry my password. But this doesn't
> > work.
> > I got the following state :
> >
> > Password for user postgres:
> > psql: FATAL: Passwort-Authentifizierung f³r Benutzer ╗ postgres½
> > fehlgeschlagen
>
> The simplest case is using cygwin Postgres (with psql) from cygwin
> Emacs. Try that, if that does not work then probably you have some
> authentication problems.
>
> As for issuing commands, you can do that either from interactive sql
> buffer, which runs psql and therefore accepts its commands, or from any
> sql buffer which have an associated interactive buffer (then commands
> like `C-c C-r' for sending a query to the interactive buffer apply).
>
> `sql-set-sqli-buffer' allows to choose such an interactive buffer.
> `sql-set-product' with an argument of `sql-postgres' may be required
> before `sql-set-sqli-buffer'.
>
> Filipp
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs + sql-postgres
2013-05-29 9:56 ` Pascal c
@ 2013-05-29 13:30 ` Pascal c
0 siblings, 0 replies; 4+ messages in thread
From: Pascal c @ 2013-05-29 13:30 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I got it runing !
Acutually it worked from the begning but after to validate my password, I
didn't get any information that the connection was successful.
So to just execute a SQL requestion, I entry for exemple : select * from
table then press ENTER and I got the result !
Thank you !
Cheers,
Pascal
2013/5/29 Pascal c <pch.netz@gmail.com>
> hi Filipp,
>
> thank you for your reply.
> As you can read into my email I'm using psql from cygwin :
>
> >Password for user postgres:
> >psql: FATAL: Passwort-Authentifizierung f³r Benutzer ╗ postgres½
> fehlgeschlagen
>
> >Into my .emacs I have written the line :
> >(setq sql-postgres-program "C:\\cygwin\\bin\\psql.exe")
>
> or mybe this is not the psql from cygwin ?
>
> Thank you,
>
>
> Cheers,
>
> Pascal
>
>
> 2013/5/29 Filipp Gunbin <fgunbin@fastmail.fm>
>
>> On 29/05/2013 11:22 +0400, Pascal c wrote:
>>
>> > If I use sql-postgres, I got the prompt to entry my user, host and
>> database.
>> > Then I got the prompt from psql to entry my password. But this doesn't
>> > work.
>> > I got the following state :
>> >
>> > Password for user postgres:
>> > psql: FATAL: Passwort-Authentifizierung f³r Benutzer ╗ postgres½
>> > fehlgeschlagen
>>
>> The simplest case is using cygwin Postgres (with psql) from cygwin
>> Emacs. Try that, if that does not work then probably you have some
>> authentication problems.
>>
>> As for issuing commands, you can do that either from interactive sql
>> buffer, which runs psql and therefore accepts its commands, or from any
>> sql buffer which have an associated interactive buffer (then commands
>> like `C-c C-r' for sending a query to the interactive buffer apply).
>>
>> `sql-set-sqli-buffer' allows to choose such an interactive buffer.
>> `sql-set-product' with an argument of `sql-postgres' may be required
>> before `sql-set-sqli-buffer'.
>>
>> Filipp
>>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-29 13:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 7:22 Emacs + sql-postgres Pascal c
2013-05-29 8:45 ` Filipp Gunbin
2013-05-29 9:56 ` Pascal c
2013-05-29 13:30 ` Pascal c
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).