473,767 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

inquiry on readline functionality on psql client

Hello,

I appreciate very much the readline functionality on the psql client.
However, I'd like to ask if it is possible for the readline
functionality to gobble up even table names and field names:

For example, if have tables

`table1' with 3 fields `field1', 'field2', and `field3'

and

`table2' with 3 fields `field1', 'field2', and `field3',

Is it possible to do

select <tab> # then, after tabbing I select `table1'

then

select table1.<tab> # then, after tabbing I select field2

Thus, I would have the complete statment

`select table1.field2 from table1'

Well, the above statement is equivalent to

`select field1 from table1'

but I was wondering how the name globbing scenario I presented is
possible? If it is not possible to do it with any configuration files,
could anyone point out at source code level what can be done since I'd
like to try playing around with this feature.

Thank you very much.

Best Regards,

Carlo

--
Carlo Florendo
Astra Philippines Inc.
www.astra.ph

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #1
3 1873
Carlo Florendo wrote:
Hello,

I appreciate very much the readline functionality on the psql client.
However, I'd like to ask if it is possible for the readline
functionality to gobble up even table names and field names:

For example, if have tables

`table1' with 3 fields `field1', 'field2', and `field3'

and

`table2' with 3 fields `field1', 'field2', and `field3',

Is it possible to do

select <tab> # then, after tabbing I select `table1'

then

select table1.<tab> # then, after tabbing I select field2

Thus, I would have the complete statment

`select table1.field2 from table1'

Well, the above statement is equivalent to

`select field1 from table1'


Sorry, the above sql shoud read `select field2 from table1'

Thank you very much.

Best Regards,

Carlo

--
Carlo Florendo
Astra Philippines Inc.
www.astra.ph
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2
Hi Carlo,

On Oct 20, 2004, at 9:47 PM, Carlo Florendo wrote:
but I was wondering how the name globbing scenario I presented is
possible? If it is not possible to do it with any configuration
files, could anyone point out at source code level what can be done
since I'd like to try playing around with this feature.


I can't help you with a way to do this, but the source code for the tab
completion is at this path:

src/bin/psql/tab-complete.c

Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3
John DeSoi wrote:
Hi Carlo,

On Oct 20, 2004, at 9:47 PM, Carlo Florendo wrote:
but I was wondering how the name globbing scenario I presented is
possible? If it is not possible to do it with any configuration
files, could anyone point out at source code level what can be done
since I'd like to try playing around with this feature.

I can't help you with a way to do this, but the source code for the
tab completion is at this path:

src/bin/psql/tab-complete.c

Great! I'll be looking at it. Thanks for the pointer.

Best Regards,

Carlo

--
Carlo Florendo
Astra Philippines Inc.
www.astra.ph


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

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
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.
10
2183
by: Carlos Ojea Castro | last post by:
Hello: I have postgreSQL 7.4.1 installed, but I can't start psql (I was able to start psql a few weeks ago...) I get this message: debian-ojea:/home/carlos# psql buques_db /usr/lib/postgresql/bin/psql: relocation error: /usr/local/lib/libreadline.so.4: undefined symbol: BC Anyone knows what is happening?
15
2517
by: Dino Vliet | last post by:
Hi folks, probably this is a question you've heard so many times but I wasn't able to find a solution to it. I'm using a shell script to create a textfile for me. It looks like #!/usr/local/bin/bash psql -c "select foo from bar;" -d database1 -t psql -c "\q" -d database1 exit 0
7
4209
by: Esteban Kemp | last post by:
PostgreSql support materialized views ??? if not, there is something similar?? Thanks Esteban kemp
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.
4
3516
by: Jim Seymour | last post by:
Hi, Environment: SunOS 5.7 Generic_106541-29 sun4u sparc SUNW,UltraSPARC-IIi-Engine Postgresql-7.4.6 Build config: --with-java --enable-thread-safety gcc version 3.3.1 less-381 readline-4.3
4
17928
by: somequestion | last post by:
Question 1. i am using StreamReader Class like this... string str = string.Empty; StreamReader sr = new StreamReader(fsIn,Encoding.Default) while ((str = sr.ReadLine()) != null) { // wanna get line Count of Sr } i just want to get a count of sr.
0
9571
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
9405
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
10169
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...
1
9960
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7383
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
5280
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2807
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.