Re: proposal: function parse_ident

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: function parse_ident
Date: 2015-08-19 19:33:23
Message-ID: 17351.1440012803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> I miss a functionality that helps with parsing any identifier to basic
> three parts - database, schema, objectname. We have this function
> internally, but it is not available for SQL layer.

> FUNCTION parse_ident(IN ident text, OUT dbname text, OUT schemaname text,
> OUT objectname text)

What exactly would you do with this that would not be better done with,
for example, regclass?

Don't say "parse names for things other than tables". Only a minority
of the types of objects used in the database have names that meet this
specification.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-08-19 19:44:55 Re: proposal: function parse_ident
Previous Message Tom Lane 2015-08-19 18:11:31 Re: Proposal: Implement failover on libpq connect level.