Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C101D19DE836 for ; Wed, 7 Mar 2012 16:38:12 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S5Nce-000059-UO for pgsql-sql@postgresql.org; Wed, 07 Mar 2012 20:38:11 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q27KbtrM018561; Wed, 7 Mar 2012 15:37:55 -0500 (EST) To: Carlos Mennens cc: "PostgreSQL (SQL)" Subject: Re: Type Ahead Issue In-reply-to: References: Comments: In-reply-to Carlos Mennens message dated "Wed, 07 Mar 2012 13:42:16 -0500" Date: Wed, 07 Mar 2012 15:37:55 -0500 Message-ID: <18560.1331152675@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/34 X-Sequence-Number: 36429 Carlos Mennens writes: > Am I missing something here? When the command is on one line, auto > complete works fine but when I break it up as show above in the 2nd > example, it acts like 'COLUMN' isn't even a valid option but if I > manually type the word 'COLUMN' and finish the command, it works. Yeah, the autocompletion logic can only "see" the current line of input, so in your second example it has no idea that this is an ALTER TABLE command. My recollection is that there's no very nice way around that given the limitations of the readline callback interface, though maybe if somebody got ambitious they could improve it. regards, tom lane