Re: Only target lines of text
От
Michael Moore
Тема
Re: Only target lines of text
Дата
Msg-id
CACpWLjNQdMJhQ-XBLRrOVP+As-V6hBDtxiSDNpO4hxLC3O5CzA@mail.gmail.com
Ответ на
Re: Only target lines of text (Tom Lane)
Список
Дерево обсуждения
Only target lines of text Michael Moore <michaeljmoore@gmail.com>
Re: Only target lines of text Tom Lane <tgl@sss.pgh.pa.us>
Re: Only target lines of text Michael Moore <michaeljmoore@gmail.com>
Re: Only target lines of text Michael Moore <michaeljmoore@gmail.com>
Re: Only target lines of text Tom Lane <tgl@sss.pgh.pa.us>
Re: Only target lines of text Michael Moore <michaeljmoore@gmail.com>
Re: Only target lines of text Rob Sargent <robjsargent@gmail.com>
Tom,
Yes, that's it, thanks!
Yes, that's it, thanks!
And thanks Rob.
Mike
On Mon, Nov 14, 2016 at 5:57 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Michael Moore <michaeljmoore@gmail.com> writes:
> how can I change this so that it only shows me the lines of text containing
> the matching string?
> SELECT
> proname AS functionname,
> prosrc AS source
> FROM
> pg_proc
> WHERE
> prosrc ~* 'ypoi_db';
You mean you just want part of each prosrc entry? Try something like
select * from
(select proname, unnest(string_to_array(prosrc, '\n')) as l from pg_proc) ss
where l ~* 'ypoi_db';
regards, tom lane
В списке pgsql-sql по дате отправления