pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedquestion re double quotes
6+ messages / 3 participants
[nested] [flat]
* question re double quotes
@ 2003-10-15 21:45 Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-16 17:02 ` Re: question re double quotes Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 6+ messages in thread
From: Ben Kim @ 2003-10-15 21:45 UTC (permalink / raw)
To: pgsql-admin
Hi,
I wonder if it is possible to let psql recognize Mixed-case-named
("LikeThisName") table names without double quotes in sql statements.
Thanks to the readline, the table name seems to autoexpand to the full
name "LikeThisName", if I just type in "Like" and press the tab key. But
when I execute the sql statement, it gives me
ERROR: Relation "likethisname" does not exist.
Obviously psql uniquely recognizes the name without double quotes (being
able to autoexpand) but won't accept its own creation as valid...
The bash shell in cygwin recognizes both cases and presents choices, if I
put this line in .inputrc.
# Ignore case while completing
set completion-ignore-case on
Is there such a feature already? Or, could I submit it as a suggestion? We
have many table and field names with double quotes, so it will save us a
lot of keystrokes. (Also perhaps some errors related with using Access as
frontend...)
Even if we use mixed-case names, it's primarily for descriptive names, and
we don't use same-letters-different-case names.
Regards,
Ben
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: question re double quotes
2003-10-15 21:45 question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
@ 2003-10-16 17:02 ` Bruno Wolff III <bruno@wolff.to>
2003-10-16 17:51 ` Re: question re double quotes Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: Bruno Wolff III @ 2003-10-16 17:02 UTC (permalink / raw)
To: Ben Kim <bkim@edsun.coe.tamu.edu>; +Cc: pgsql-admin
On Wed, Oct 15, 2003 at 16:45:39 -0500,
Ben Kim <bkim@edsun.coe.tamu.edu> wrote:
>
> I wonder if it is possible to let psql recognize Mixed-case-named
> ("LikeThisName") table names without double quotes in sql statements.
You probably don't want to create tables with mixed case names in the
first place.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: question re double quotes
2003-10-15 21:45 question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-16 17:02 ` Re: question re double quotes Bruno Wolff III <bruno@wolff.to>
@ 2003-10-16 17:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 13:04 ` Re: question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2003-10-16 17:51 UTC (permalink / raw)
To: Bruno Wolff III <bruno@wolff.to>; +Cc: Ben Kim <bkim@edsun.coe.tamu.edu>; pgsql-admin
Bruno Wolff III <bruno@wolff.to> writes:
> On Wed, Oct 15, 2003 at 16:45:39 -0500,
> Ben Kim <bkim@edsun.coe.tamu.edu> wrote:
>> I wonder if it is possible to let psql recognize Mixed-case-named
>> ("LikeThisName") table names without double quotes in sql statements.
> You probably don't want to create tables with mixed case names in the
> first place.
The real problem is that the tab-completion code doesn't work properly
with quoted names. For example, if I do
create table "MixedCase" (f1 int);
then
update M<tab>
completes as
update MixedCase
which is wrong (no double quotes). Arguably it's my fault for not
supplying the initial quote, but
update "M<tab>
fails to offer any completions at all. Somebody should work on this
sometime.
Actually, maybe all we need to do is apply quote_ident() in the
tab-completion queries ... hmmm ...
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: question re double quotes
2003-10-15 21:45 question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-16 17:02 ` Re: question re double quotes Bruno Wolff III <bruno@wolff.to>
2003-10-16 17:51 ` Re: question re double quotes Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-10-20 13:04 ` Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-20 13:25 ` Re: question re double quotes Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: Ben Kim @ 2003-10-20 13:04 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruno Wolff III <bruno@wolff.to>; Ben Kim <bkim@edsun.coe.tamu.edu>; pgsql-admin
Thanks for the reply. I haven't looked at the source code yet, but
assuming I understood it correctly, if we can simply add double quotes
around tab-completed names, it alone would be very convenient.
Regards,
Ben
On Thu, 16 Oct 2003, Tom Lane wrote:
> Bruno Wolff III <bruno@wolff.to> writes:
> > On Wed, Oct 15, 2003 at 16:45:39 -0500,
> > Ben Kim <bkim@edsun.coe.tamu.edu> wrote:
> >> I wonder if it is possible to let psql recognize Mixed-case-named
> >> ("LikeThisName") table names without double quotes in sql statements.
>
> > You probably don't want to create tables with mixed case names in the
> > first place.
>
> The real problem is that the tab-completion code doesn't work properly
> with quoted names. For example, if I do
>
> create table "MixedCase" (f1 int);
>
> then
>
> update M<tab>
>
> completes as
>
> update MixedCase
>
> which is wrong (no double quotes). Arguably it's my fault for not
> supplying the initial quote, but
>
> update "M<tab>
>
> fails to offer any completions at all. Somebody should work on this
> sometime.
>
> Actually, maybe all we need to do is apply quote_ident() in the
> tab-completion queries ... hmmm ...
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: question re double quotes
2003-10-15 21:45 question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-16 17:02 ` Re: question re double quotes Bruno Wolff III <bruno@wolff.to>
2003-10-16 17:51 ` Re: question re double quotes Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 13:04 ` Re: question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
@ 2003-10-20 13:25 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 13:54 ` Re: question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2003-10-20 13:25 UTC (permalink / raw)
To: Ben Kim <bkim@edsun.coe.tamu.edu>; +Cc: Bruno Wolff III <bruno@wolff.to>; pgsql-admin
Ben Kim <bkim@edsun.coe.tamu.edu> writes:
> Thanks for the reply. I haven't looked at the source code yet, but
> assuming I understood it correctly, if we can simply add double quotes
> around tab-completed names, it alone would be very convenient.
> On Thu, 16 Oct 2003, Tom Lane wrote:
>> Actually, maybe all we need to do is apply quote_ident() in the
>> tab-completion queries ... hmmm ...
I did commit a fix along this line last week. As of CVS tip,
given
create table "MixedCase" (f1 int);
psql will offer no completions for
update M<tab>
but will auto-complete
update "M<tab>
as
update "MixedCase"
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: question re double quotes
2003-10-15 21:45 question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-16 17:02 ` Re: question re double quotes Bruno Wolff III <bruno@wolff.to>
2003-10-16 17:51 ` Re: question re double quotes Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 13:04 ` Re: question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-20 13:25 ` Re: question re double quotes Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-10-20 13:54 ` Ben Kim <bkim@edsun.coe.tamu.edu>
0 siblings, 0 replies; 6+ messages in thread
From: Ben Kim @ 2003-10-20 13:54 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ben Kim <bkim@edsun.coe.tamu.edu>; Bruno Wolff III <bruno@wolff.to>; pgsql-admin
Thanks.
Regards,
Ben
On Mon, 20 Oct 2003, Tom Lane wrote:
> Ben Kim <bkim@edsun.coe.tamu.edu> writes:
> > Thanks for the reply. I haven't looked at the source code yet, but
> > assuming I understood it correctly, if we can simply add double quotes
> > around tab-completed names, it alone would be very convenient.
>
> > On Thu, 16 Oct 2003, Tom Lane wrote:
> >> Actually, maybe all we need to do is apply quote_ident() in the
> >> tab-completion queries ... hmmm ...
>
> I did commit a fix along this line last week. As of CVS tip,
> given
> create table "MixedCase" (f1 int);
> psql will offer no completions for
> update M<tab>
> but will auto-complete
> update "M<tab>
> as
> update "MixedCase"
>
> regards, tom lane
>
> ---------------------------(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
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2003-10-20 13:54 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 21:45 question re double quotes Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-16 17:02 ` Bruno Wolff III <bruno@wolff.to>
2003-10-16 17:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 13:04 ` Ben Kim <bkim@edsun.coe.tamu.edu>
2003-10-20 13:25 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 13:54 ` Ben Kim <bkim@edsun.coe.tamu.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox