Re: Bug: psql misquotes constraints

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug: psql misquotes constraints
Date: 2004-07-12 01:21:58
Message-ID: 1089595317.58812.8.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2004-07-11 at 20:57, Bruce Momjian wrote:
> I can do that for 7.6. Is it worth it? Is it a TODO?

I'm not sure what Christopher mentioned is the correct fix. The
information is displayed correctly in all places except where a
pg_get_.* function is used (indexes, constraints, etc.).

Those functions are tailored to what pg_dump requires (escaped
identifier: """vers""ion""") rather than what psql requires (unescaped
identifier: "vers"ion").

Right now psql shows a mix of both.

> Christopher Kings-Lynne wrote:
> > > As a result of the constraint output functions being shared between
> > > pg_dump and psql, some of the output is mis-quoted in the display area
> > > for columns including quotes. Notice it's correct in the table Column
> > > list, but the constraint has the escaped versions.
> >
> > It's misquoted because psql DOES NOT share the fmtId function with
> > pg_dump. It simply puts double quotes around it. If you can fix psql
> > so that it is able to link to the fmtId function, then you can easily
> > fix the problem

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-07-12 01:24:43 Removing initlocation
Previous Message Bruce Momjian 2004-07-12 01:20:42 Caught up