Re: automatic scan a table, report on data formats in columns

Jian He <hejian.mark@gmail.com>

From: Jian He <hejian.mark@gmail.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
Cc: pgsql-sql <pgsql-sql@lists.postgresql.org>
Date: 2022-02-21T12:45:23Z
Lists: pgsql-sql
You first want to check a certain text pattern exists in an text column or
not. (you can use generated columns).
Not the other way around to check one text column have what kind of
pattern. If there is an pattern, it's text.




On Mon, Feb 21, 2022 at 3:36 PM Shaozhong SHI <shishaozhong@gmail.com>
wrote:

> Is it possible to do the following?
>
> automatically scan a table of all text columns
> produce a report on data formats in columns as indicated in the following:
>
> Column A                               Column B                   Column C
> alphabetic words/phrases     digits like xxxxx.xx      alphanumeric
> identifiers
> City of London                       5 digits followed by a    iso12345
>                                                decimal point and 2
>                                                digits indicating precision
>
>
> It is a bit like detecting regular expression patterns automatically.
>
> Is automatically detecting something like regular expression patterns
> possible?
>
> Regards,
>
> David
>