Thread: Disable the more command

Disable the more command

From
Marcos Barreto de Castro
Date:
Hi,

     Can someone tell me how can I disable the more
command at the end of any one page display in
PostgreSQL 7.0 ? I simply don't want to be asked to
press a key to continue displaying the result of a
query.
     Thanks a lot!
Marcos Castro


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.com/

Re: Disable the more command

From
Alfred Perlstein
Date:
* Marcos Barreto de Castro <mbdecastro@yahoo.com> [000721 12:45] wrote:
> Hi,
>
>      Can someone tell me how can I disable the more
> command at the end of any one page display in
> PostgreSQL 7.0 ? I simply don't want to be asked to
> press a key to continue displaying the result of a
> query.
>      Thanks a lot!

export PAGER=cat

:)

-Alfred

how connect visual basic to pgsql?

From
"Ingenieria de Sistemas"
Date:
I am a beginner in pqsql and linux.
I can't connect from visual basic to my pgsql server.
When do I do telnet "host-pgsql" what is the message that have i receive
from pgsql server if my postgres port is enabled?
I just can read " connect to "host-pgsql", then i type anything and press
enter .
I read this message "connection closed by foreign host"
what do you think about this.
Thanksfully Hector Barrera


Re: Disable the more command

From
Froilan Mendoza
Date:
On Fri, 21 Jul 2000, Marcos Barreto de Castro wrote:

>      Can someone tell me how can I disable the more
> command at the end of any one page display in
> PostgreSQL 7.0 ? I simply don't want to be asked to
> press a key to continue displaying the result of a
> query.

Hmm.  I don't have the answer to your question, but I have a question
which does the reverse -- how can I _enable_ the "more" function? .. when
I do, say \do, there are a lot of operators displayed, how can i see them
per page.

TIA!


---
Froilan C. Mendoza
Tridel Technologies, Inc.
http://www.tridel.net


Re: how connect visual basic to pgsql?

From
Philip Warner
Date:
At 16:53 21/07/00 -0500, Ingenieria de Sistemas wrote:
>I am a beginner in pqsql and linux.
>I can't connect from visual basic to my pgsql server.
>When do I do telnet "host-pgsql" what is the message that have i receive
>from pgsql server if my postgres port is enabled?
>I just can read " connect to "host-pgsql", then i type anything and press
>enter .
>I read this message "connection closed by foreign host"
>what do you think about this.

You need to install ODBC drivers on your PC, and ODBC support in PG, then
use PG just like any other ODBC data source.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

RE: how connect visual basic to pgsql?

From
"anuj"
Date:
Hi,
I have installed ODBC support in PG-

PostgreSQL ODBC driver for Windows 95 (I'm using Win-NT-Wks 4.0)
ODBC Driver Name - PostgreSQL 6.50.0000
Company Name - Insight Distribution System
File Name - PSQLODBC.DLL

Postgres running on Linux RH-6.0 (HTTP,SAMBA services not working. Telnet
and FTP working fine.).
Other side I have VB-6.0 on Windows-NT-Workstations 4.0.
I want connectivity VB (front-end) and PG(Back-end).

When I do connectivity then error come - "Provider cannot be found. It may
not be properly installed."

Why does this error come ?
Thanks in advance
Anuj



-----Original Message-----
From: pgsql-general-owner@hub.org [mailto:pgsql-general-owner@hub.org]On
Behalf Of Philip Warner
Sent: Saturday, July 22, 2000 9:22 AM
To: Ingenieria de Sistemas; pgsql-general@hub.org
Subject: Re: [GENERAL] how connect visual basic to pgsql?


At 16:53 21/07/00 -0500, Ingenieria de Sistemas wrote:
>I am a beginner in pqsql and linux.
>I can't connect from visual basic to my pgsql server.
>When do I do telnet "host-pgsql" what is the message that have i receive
>from pgsql server if my postgres port is enabled?
>I just can read " connect to "host-pgsql", then i type anything and press
>enter .
>I read this message "connection closed by foreign host"
>what do you think about this.

You need to install ODBC drivers on your PC, and ODBC support in PG, then
use PG just like any other ODBC data source.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


Re: Disable the more command

From
"Oliver Elphick"
Date:
Froilan Mendoza wrote:
  >
  >On Fri, 21 Jul 2000, Marcos Barreto de Castro wrote:
  >
  >>      Can someone tell me how can I disable the more
  >> command at the end of any one page display in
  >> PostgreSQL 7.0 ? I simply don't want to be asked to
  >> press a key to continue displaying the result of a
  >> query.
  >
  >Hmm.  I don't have the answer to your question, but I have a question
  >which does the reverse -- how can I _enable_ the "more" function? .. when
  >I do, say \do, there are a lot of operators displayed, how can i see them
  >per page.

\pset pager


From psql manpage (in release 7.0.2):

              pager  Toggles the list of  a  pager  to  do  table
                     output. If the environment variable PAGER is
                     set, the output is piped  to  the  specified
                     program.  Otherwise more is used.

                     In  any case, psql only uses the pager if it
                     seems appropriate. That  means  among  other
                     things  that the output is to a terminal and
                     that the table would normally not fit on the
                     screen.   Because  of  the modular nature of
                     the  printing  routines  it  is  not  always
                     possible to predict the number of lines that
                     will actually be printed.  For  that  reason
                     psql  might  not  appear very discriminating
                     about when to use the pager and when not to.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Then Peter and the other apostles answered and said,
      We ought to obey God rather than men."
                                        Acts 5:29



RE: how connect visual basic to pgsql?

From
Philip Warner
Date:
At 10:32 22/07/00 +0530, anuj wrote:
>
>When I do connectivity then error come - "Provider cannot be found. It may
>not be properly installed."
>

Looks like a Windows/VB/ODBC/OLEDB error message to me, but I could be wrong.



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

RE: how connect visual basic to pgsql?

From
"anuj"
Date:


>-----Original Message-----
>From: Philip Warner [mailto:pjw@rhyme.com.au]
>Sent: Saturday, July 22, 2000 4:15 PM
>To: anuj; pgsql-general@hub.org
>Subject: RE: [GENERAL] how connect visual basic to pgsql?


>At 10:32 22/07/00 +0530, anuj wrote:
>>
>>When I do connectivity then error come - "Provider cannot be found. It may
>>not be properly installed."
>>
>> PostgreSQL ODBC driver for Windows 95 (I'm using Win-NT-Wks 4.0)

>Looks like a Windows/VB/ODBC/OLEDB error message to me, but I could be
wrong.

This deriver made for Win95.
I am using Win-Nt-Wks-4.0.
Is this possible this due to different OS's ?
Best Regard,
Anuj


Re: how connect visual basic to pgsql?

From
"Alex Bolenok"
Date:
> This deriver made for Win95.
> I am using Win-Nt-Wks-4.0.
> Is this possible this due to different OS's ?
> Best Regard,
> Anuj

What kind of application do you use and where did you install your ODBC DSN?
If your application is a service, or if you plan to share this DSN across
multiple users, you should install it under 'System DSN' entry.

This driver work perfectly on Windows NT 4.0 Server, Windows 2000
Professional and Windows 2000 Advanced Server. I used it to connect MS SQL
Server 7.0 to PostgreSQL database through 'OLE DB provider for ODBC driver'
and succeded in it. I did not test it on Windows NT Workstation 4.0, but I
see no reason why this driver shouldn't work on it.

Alex Bolenok.


RE: how connect visual basic to pgsql?

From
"anuj"
Date:

-----Original Message-----
From: Alex Bolenok [mailto:abolen@chat.ru]
Sent: Monday, July 24, 2000 12:09 PM
To: anuj
Cc: pgsql-general
Subject: Re: [GENERAL] how connect visual basic to pgsql?


>> This deriver made for Win95.
>> I am using Win-Nt-Wks-4.0.
>> Is this possible this due to different OS's ?
>> Best Regard,
>> Anuj

>What kind of application do you use and where did you install your ODBC
DSN?

I don't know , Where  I have installed but I am able to see 'OLE DB provider
for ODBC driver' entry.

>If your application is a service, or if you plan to share this DSN across
>multiple users, you should install it under 'System DSN' entry.

I make a 'System DSN' name pg.

>This driver work perfectly on Windows NT 4.0 Server, Windows 2000
>Professional and Windows 2000 Advanced Server. I used it to connect MS SQL
>Server 7.0 to PostgreSQL database through 'OLE DB provider for ODBC driver'
>and succeded in it. I did not test it on Windows NT Workstation 4.0, but I
>see no reason why this driver shouldn't work on it.

>Alex Bolenok.

My connection string is :
Provider=MSDASQL.1;Password=tempdb;Persist Security Info=True;User
ID=postgres;Data Source=pg

Postgres running on Linux RH-6.0 (HTTP,SAMBA services not working. Telnet
and FTP working fine.).
Other side I have VB-6.0 on Windows-NT-Workstations 4.0.

After reinstall the VB6.0 the error msg. has been changed.
Now new error is : "could not connect to the server, could not connect to
the remote socket."
Now how to connect VB to pgsql.
Regards,
Anuj






RE: how connect visual basic to pgsql?

From
Philip Warner
Date:
At 16:36 24/07/00 +0530, anuj wrote:
>
>>> This deriver made for Win95.
>>> I am using Win-Nt-Wks-4.0.
>>> Is this possible this due to different OS's ?
>>> Best Regard,
>>> Anuj
>
>>What kind of application do you use and where did you install your ODBC
>DSN?
>
>I don't know , Where  I have installed but I am able to see 'OLE DB provider
>for ODBC driver' entry.

Where do you see this?


>>If your application is a service, or if you plan to share this DSN across
>>multiple users, you should install it under 'System DSN' entry.
>
>I make a 'System DSN' name pg.

And what did you set the port, server, dbname etc to?


>>This driver work perfectly on Windows NT 4.0 Server, Windows 2000
>>Professional and Windows 2000 Advanced Server. I used it to connect MS SQL
>>Server 7.0 to PostgreSQL database through 'OLE DB provider for ODBC driver'
>>and succeded in it. I did not test it on Windows NT Workstation 4.0, but I
>>see no reason why this driver shouldn't work on it.
>
>>Alex Bolenok.

Works for me on NT4 SP6.


>My connection string is :
>Provider=MSDASQL.1;Password=tempdb;Persist Security Info=True;User
>ID=postgres;Data Source=pg

So you are using an ADO data control for OLEDB, is that right?


>
>Postgres running on Linux RH-6.0 (HTTP,SAMBA services not working. Telnet
>and FTP working fine.).
>Other side I have VB-6.0 on Windows-NT-Workstations 4.0.
>
>After reinstall the VB6.0 the error msg. has been changed.
>Now new error is : "could not connect to the server, could not connect to
>the remote socket."

This looks like either (1) postgres is not running on the server - can you
do 'psql pg' (or whatever the db name in the DSN is). Or 2, you put the
wrong port in the DSN.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

RE: how connect visual basic to pgsql?

From
"anuj"
Date:
>>I don't know , Where  I have installed but I am able to see 'OLE DB
provider
>>for ODBC driver' entry.

>Where do you see this?

In "ADO data control 6.0", properties .

>And what did you set the port, server, dbname etc to?

Data Source:pg
database:tempdb
Server:10.1.1.50
Post:5432
username:postgres
password:**********

>So you are using an ADO data control for OLEDB, is that right?
Yes. ADO data control 6.0.

>This looks like either (1) postgres is not running on the server - can you
>do 'psql pg' (or whatever the db name in the DSN is). Or 2, you put the
>wrong port in the DSN.

1. Yes, Postmaster is running fine. '$psql tempdb' running fine. I am using
postgres through libpg.
2. How can I know what is right port ?

Best regards,
Anuj