471,108 Members | 1,239 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

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*******@postgresql.org

Nov 23 '05 #1
3 1811
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Daniel Schuchardt | last post: by
7 posts views Thread by Willem Herremans | last post: by
4 posts views Thread by Brendan Jurd | last post: by
10 posts views Thread by Carlos Ojea Castro | last post: by
15 posts views Thread by Dino Vliet | last post: by
7 posts views Thread by Esteban Kemp | last post: by
2 posts views Thread by Russ Brown | last post: by
4 posts views Thread by somequestion | last post: by

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.