pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Bhuvan A <bhuvansql@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Re: Pattern Matching on Columns
Date: Thu, 17 Jan 2002 07:13:10 -0800 (PST)
Message-ID: <20020117151310.82324.qmail@web20803.mail.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.20.0201171044440.12728-100000@Larry.bks>

If I understand you right:
1. You have a column which contains blocks of text,
which may be multi-line.
2. You want to find out how many of those lines match
a given pattern?  Or you just want to extract those
lines?

A function using pl/perl looks like your best bet. 
Perl regular expressions could do what you want quite
easily.

--- Bhuvan A <bhuvansql@yahoo.com> wrote:
> 
> Thu Jan 17 10:26:49 IST 2002
> ----------------------------
> 
> Hello,
> 
> How can i apply a delimiter, in pattern matching on
> database columns?
> 
> say, in my table i have a column of type 'text' and
> each of its value
> is MULTIPLE lines.
> 
> Now, i would like to search for a string in (say
> delimiter is '\n')
> that column and it should result in that many
> MATCHED LINES instead of
> that many matched columns.
> 
> How can i achieve this? Thankx in advance.
> 
> NOTE: Kindly apologize for any inconvenience.
> 
> 
>
======================================================================
>  I like work; it fascinates me; I can sit and look
> at it for hours.
>
======================================================================
> 
> Regards,
> Bhuvaneswar.
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



view thread (2+ messages)

Message-ID: <20020117151310.82324.qmail@web20803.mail.yahoo.com>
Permalink:  ../20020117151310.82324.qmail@web20803.mail.yahoo.com/
Also on:    postgresql.org/message-id/20020117151310.82324.qmail@web20803.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jeff_eckermann@yahoo.com, bhuvansql@yahoo.com
  Subject: Re: Pattern Matching on Columns
  In-Reply-To: <20020117151310.82324.qmail@web20803.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox