Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Add function for quote_qualified_identifier?

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Add function for quote_qualified_identifier?
Date: 2007-09-22 20:54:52
Message-ID: 37ed240d0709221354j739bcbb8t714508a66863870c@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I had some spare cycles so I went ahead and patched this.

Patch includes documentation and new regression tests.  While I was in
there I also added regression tests for quote_ident(), which appeared
to be absent.

quote_literal doesn't seem to have any regression tests either, but I
decided to leave that for another patch.

With thanks to Neil Conway for his assistance on IRC.

Cheers
BJ

On 9/15/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> This has been saved for the 8.4 release:
> Brendan Jurd wrote:
> > Hi hackers,
> >
> > I note that we currently expose the usefulness of the quote_identifier
> > function to the user with quote_ident(text).
> >
> > Is there any reason we shouldn't do the same with quote_qualified_identifier?
> >
> > We could just add a quote_qualified_ident(text, text) ... it would
> > make forming dynamic queries more convenient in databases that use
> > multiple schemas.
> >
> > Clearly a DBA could just create this function himself in SQL (and it
> > wouldn't be difficult), but is that a good reason not to have it in
> > our standard set of functions?
> >
> > Would be happy to cook up a patch for this.
> >
> > Cheers,
> > BJ
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: In versions below 8.0, the planner will ignore your desire to
> >        choose an index scan if your joining column's datatypes do not
> >        match
>
> --
>   Bruce Momjian  <bruce(at)momjian(dot)us>          http://momjian.us
>   EnterpriseDB                               http://www.enterprisedb.com
>
>   + If your life is a hard drive, Christ can be your backup. +
>

Attachment: quote_qualified.diff
Description: text/plain (8.1 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-09-22 21:41:19
Subject: Re: [HACKERS] Add function for quote_qualified_identifier?
Previous:From: Andrew DunstanDate: 2007-09-22 20:40:25
Subject: Re: [HACKERS] msvc, build and install with cygwin in the PATH

pgsql-patches by date

Next:From: Tom LaneDate: 2007-09-22 21:41:19
Subject: Re: [HACKERS] Add function for quote_qualified_identifier?
Previous:From: Andrew DunstanDate: 2007-09-22 20:40:25
Subject: Re: [HACKERS] msvc, build and install with cygwin in the PATH

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group