dbTalk Databases Forums  

inquiry on readline functionality on psql client

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss inquiry on readline functionality on psql client in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Carlo Florendo
 
Posts: n/a

Default inquiry on readline functionality on psql client - 10-20-2004 , 08:47 PM






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 majordomo (AT) postgresql (DOT) org


Reply With Quote
  #2  
Old   
Carlo Florendo
 
Posts: n/a

Default Re: inquiry on readline functionality on psql client - 10-20-2004 , 09:13 PM






Carlo Florendo wrote:

Quote:
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



Reply With Quote
  #3  
Old   
John DeSoi
 
Posts: n/a

Default Re: inquiry on readline functionality on psql client - 10-21-2004 , 07:08 AM



Hi Carlo,

On Oct 20, 2004, at 9:47 PM, Carlo Florendo wrote:

Quote:
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



Reply With Quote
  #4  
Old   
Carlo Florendo
 
Posts: n/a

Default Re: inquiry on readline functionality on psql client - 10-21-2004 , 07:31 PM



John DeSoi wrote:

Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.