pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Pattern Matching on Columns 2+ messages / 2 participants [nested] [flat]
* Pattern Matching on Columns @ 2002-01-17 05:16 Bhuvan A <bhuvansql@yahoo.com> 2002-01-17 15:13 ` Re: Pattern Matching on Columns Jeff Eckermann <jeff_eckermann@yahoo.com> 0 siblings, 1 reply; 2+ messages in thread From: Bhuvan A @ 2002-01-17 05:16 UTC (permalink / raw) To: pgsql-sql 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. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Pattern Matching on Columns 2002-01-17 05:16 Pattern Matching on Columns Bhuvan A <bhuvansql@yahoo.com> @ 2002-01-17 15:13 ` Jeff Eckermann <jeff_eckermann@yahoo.com> 0 siblings, 0 replies; 2+ messages in thread From: Jeff Eckermann @ 2002-01-17 15:13 UTC (permalink / raw) To: Bhuvan A <bhuvansql@yahoo.com>; pgsql-sql 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/ ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-01-17 15:13 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-01-17 05:16 Pattern Matching on Columns Bhuvan A <bhuvansql@yahoo.com> 2002-01-17 15:13 ` Jeff Eckermann <jeff_eckermann@yahoo.com>
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