Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:38 AM
David Garamond
Guest
 
Posts: n/a
Default psql wishlist: value completion

Wouldn't it be cool if someday psql could do value completion?

# delete from person where lastname = 'Garam<tab>
# delete from person where lastname = 'Garamond' _

# delete from person where firstname = 'Da<tab><tab>
# delete from person where firstname = 'Da
Damian Darren Dave David Dawson

# delete from person where firstname = 'D<tab><tab>
Display all 215 possibilities? (y or n)

--
dave


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

  #2  
Old November 23rd, 2005, 01:38 AM
Steve Crawford
Guest
 
Posts: n/a
Default Re: psql wishlist: value completion

On Friday 13 August 2004 12:18 pm, David Garamond wrote:[color=blue]
> Wouldn't it be cool if someday psql could do value completion?
>
> # delete from person where lastname = 'Garam<tab>
> # delete from person where lastname = 'Garamond' _
>
> # delete from person where firstname = 'Da<tab><tab>
> # delete from person where firstname = 'Da
> Damian Darren Dave David Dawson
>
> # delete from person where firstname = 'D<tab><tab>
> Display all 215 possibilities? (y or n)[/color]

Sure it would be cool - but as far as I can tell totally impractical.

Determining all the possible expandable values for a particular column
could very well require a full-table-scan of a multi-million row
table each time you try to tab-expand. Not only would performance be
terrible but get a few users doing this and you could really hammer
the server.

Cheers,
Steve


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

  #3  
Old November 23rd, 2005, 01:38 AM
Gaetano Mendola
Guest
 
Posts: n/a
Default Re: psql wishlist: value completion

Steve Crawford wrote:
[color=blue]
> On Friday 13 August 2004 12:18 pm, David Garamond wrote:
>[color=green]
>>Wouldn't it be cool if someday psql could do value completion?
>>
>> # delete from person where lastname = 'Garam<tab>
>> # delete from person where lastname = 'Garamond' _
>>
>> # delete from person where firstname = 'Da<tab><tab>
>> # delete from person where firstname = 'Da
>> Damian Darren Dave David Dawson
>>
>> # delete from person where firstname = 'D<tab><tab>
>> Display all 215 possibilities? (y or n)[/color]
>
>
> Sure it would be cool - but as far as I can tell totally impractical.
>
> Determining all the possible expandable values for a particular column
> could very well require a full-table-scan of a multi-million row
> table each time you try to tab-expand. Not only would performance be
> terrible but get a few users doing this and you could really hammer
> the server.[/color]

Why you need a full-table-scan ? The search will be an anchored search and
with the right operator class a index scan can occur.
However I have do admit that is nice but impratical.



Regards
Gaetano Mendola



  #4  
Old November 23rd, 2005, 01:38 AM
j0rd1 adame
Guest
 
Posts: n/a
Default Re: [ok] Re: psql wishlist: value completion

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El Vie 13 Ago 2004 16:27, Steve Crawford escribió:[color=blue]
> On Friday 13 August 2004 12:18 pm, David Garamond wrote:[color=green]
> > Wouldn't it be cool if someday psql could do value completion?
> >
> > # delete from person where lastname = 'Garam<tab>
> > # delete from person where lastname = 'Garamond' _
> >
> > # delete from person where firstname = 'Da<tab><tab>
> > # delete from person where firstname = 'Da
> > Damian Darren Dave David Dawson
> >
> > # delete from person where firstname = 'D<tab><tab>
> > Display all 215 possibilities? (y or n)[/color]
>
> Sure it would be cool - but as far as I can tell totally impractical.
>
> Determining all the possible expandable values for a particular column
> could very well require a full-table-scan of a multi-million row
> table each time you try to tab-expand. Not only would performance be
> terrible but get a few users doing this and you could really hammer
> the server.[/color]

This could be an extra cool-hack and not nesesarely be part of the core
distribution.

greets

j0rd1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBHUbuB5QJme5SU08RAhp4AJ433eG+glvfarErjdsWLX GZd1joxACdGPhr
l1TsTGx7ARJNCNen7sObTo4=
=rpFy
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

  #5  
Old November 23rd, 2005, 01:38 AM
David Garamond
Guest
 
Posts: n/a
Default Re: psql wishlist: value completion

Steve Crawford wrote:[color=blue][color=green]
>> # delete from person where firstname = 'D<tab><tab>
>> Display all 215 possibilities? (y or n)[/color]
>
> Sure it would be cool - but as far as I can tell totally impractical.
>
> Determining all the possible expandable values for a particular column
> could very well require a full-table-scan of a multi-million row
> table each time you try to tab-expand.[/color]

Well, psql could display "Warning: this would require a full-table-scan
of a multi-million row table..." or "Warning: there are more than 100
possibilities, continue?" if there are no indexes or the first SELECT
.... LIMIT 101 returns 101 rows.

--
dave

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles