how to filter through HTML in PostgreSQL query
I have a table with a name snapmail_logs
.
which has a column body
in which I have been saving Email Templates as an HTML. There are a few things included in this body, to determine which email was failed or not.
["<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">n<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n<head>n <meta name="viewport" content="width=device-width">n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">n <title>Evercam.io</title>n</head>n<body bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; margin: 0; padding: 0;">n<style type="text/css">n @media only screen and (max-width: 600px) {n a[class="btn"] {n display: block !important; margin-bottom: 10px !important; background-image: none !important; margin-right: 0 !important;n }n div[class="column"] {n width: auto !important; float: none !important;n }n table.social div[class="column"] {n width: auto !important;n }n }n @media only screen and (max-width: 480px){n .logo{n max-width:28% !important;n max-width:175px !important;n }n }n</style>n<!-- HEADER -->n<table class="head-wrap" bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;">n <td style="margin: 0; padding: 0;"></td>n <td class="header container" style="display: block !important; clear: both !important; margin: 0 auto; padding: 0;">n <div class="content" style="display: block; margin: 0 auto; padding: 15px;">n <table bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;text-align:center;">n <td style="margin: 0; padding: 0;">n <img src="http://www.evercam.io/img/logo.png" class="logo" style="max-width:28%;max-width:175px; padding-top:10px;margin:0;">n </td>n </tr>n </table>n </div>n </td>n <td style="margin: 0; padding: 0;"></td>n </tr>n</table>n<!-- /HEADER -->n<!-- BODY -->n<table class="body-wrap" style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; background-color:#f5f5f5; padding: 0;">n <tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"><td style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"></td>n <td class="container" bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; display: block !important; border-radius:3px; clear: both !important; margin: 0 auto; padding: 0;">nn <div class="content" style="font-family: Arial, Helvetica, sans-serif; display: block; margin: 0 auto; padding: 15px;">n <table style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n <td style="font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; margin: 0; padding: 0;">nn <p class="lead" style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Hello, </p>nn <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Here's the snapshot from your camera.</p>n <br>n<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'><br>n <p style='line-height: 1.6; margin: 0 0 10px; padding: 0;'><b>Evercam PK Office 4K</b> (everc-fhlcr) - See the live view on Evercam by <a style='color:#428bca; text-decoration:none;' href='https://dash.evercam.io/v2/cameras/everc-fhlcr'>clicking here</a></p><br>n <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Thanks,</p><br>n <p style="line-height: 1.6; margin: 0 0 0px; padding: 0;">The Evercam Team</p>n <p style="color:#aaaaaa; line-height: 1.0; margin: 0 0 10px; padding: 0;"><a href="#" style="text-decoration:none; color:#aaaaaa;">support@evercam.io</a></p>n <br>nn <p><center style="font-size:11px">n If you want to change your Snapmail settings, <a " <> ..., "1551074758", "junaid@evercam.io", "Your Scheduled SnapMail @ 11:05", #DateTime<2019-02-25 06:06:18Z>, #DateTime<2019-02-25 06:06:18Z>]
Above is a sample data which is saved in the body, and this HTML has a class of .last-snapmail-snapshot
which tell email was not failed and another class .failed-camera
this tells about failure.
One is basically img
tag
<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'>
and other one is a span
<span id='iamfailed' class='failed-camera'>Could not retrieve live image from</span>
Camera id is one that in ID
, which I want to fetch. There could be multiple img and span tags in one body as well.
Through server side, I can filter this Body and can exract the values of failed and successive camera ids but My problem is I cannot sort them or cannot search them with where clause if I get this out of query.
What I am trying to do is:
Get all_camera_ids (which will be from both classes, last-snapmail-snapshot
& failed-camera
)
Get Failed Camera Ids (All ids from the class failed-camera
)
And most probably Is it possible to do a where a query on that? where you can say, failed_camera_ids like "%junaid%"?
Its totally a new subject for me to parse HTML in PSQL query. I am sorry for such a ambiguis question. any help would be thankful
postgresql regex
add a comment |
I have a table with a name snapmail_logs
.
which has a column body
in which I have been saving Email Templates as an HTML. There are a few things included in this body, to determine which email was failed or not.
["<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">n<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n<head>n <meta name="viewport" content="width=device-width">n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">n <title>Evercam.io</title>n</head>n<body bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; margin: 0; padding: 0;">n<style type="text/css">n @media only screen and (max-width: 600px) {n a[class="btn"] {n display: block !important; margin-bottom: 10px !important; background-image: none !important; margin-right: 0 !important;n }n div[class="column"] {n width: auto !important; float: none !important;n }n table.social div[class="column"] {n width: auto !important;n }n }n @media only screen and (max-width: 480px){n .logo{n max-width:28% !important;n max-width:175px !important;n }n }n</style>n<!-- HEADER -->n<table class="head-wrap" bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;">n <td style="margin: 0; padding: 0;"></td>n <td class="header container" style="display: block !important; clear: both !important; margin: 0 auto; padding: 0;">n <div class="content" style="display: block; margin: 0 auto; padding: 15px;">n <table bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;text-align:center;">n <td style="margin: 0; padding: 0;">n <img src="http://www.evercam.io/img/logo.png" class="logo" style="max-width:28%;max-width:175px; padding-top:10px;margin:0;">n </td>n </tr>n </table>n </div>n </td>n <td style="margin: 0; padding: 0;"></td>n </tr>n</table>n<!-- /HEADER -->n<!-- BODY -->n<table class="body-wrap" style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; background-color:#f5f5f5; padding: 0;">n <tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"><td style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"></td>n <td class="container" bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; display: block !important; border-radius:3px; clear: both !important; margin: 0 auto; padding: 0;">nn <div class="content" style="font-family: Arial, Helvetica, sans-serif; display: block; margin: 0 auto; padding: 15px;">n <table style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n <td style="font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; margin: 0; padding: 0;">nn <p class="lead" style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Hello, </p>nn <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Here's the snapshot from your camera.</p>n <br>n<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'><br>n <p style='line-height: 1.6; margin: 0 0 10px; padding: 0;'><b>Evercam PK Office 4K</b> (everc-fhlcr) - See the live view on Evercam by <a style='color:#428bca; text-decoration:none;' href='https://dash.evercam.io/v2/cameras/everc-fhlcr'>clicking here</a></p><br>n <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Thanks,</p><br>n <p style="line-height: 1.6; margin: 0 0 0px; padding: 0;">The Evercam Team</p>n <p style="color:#aaaaaa; line-height: 1.0; margin: 0 0 10px; padding: 0;"><a href="#" style="text-decoration:none; color:#aaaaaa;">support@evercam.io</a></p>n <br>nn <p><center style="font-size:11px">n If you want to change your Snapmail settings, <a " <> ..., "1551074758", "junaid@evercam.io", "Your Scheduled SnapMail @ 11:05", #DateTime<2019-02-25 06:06:18Z>, #DateTime<2019-02-25 06:06:18Z>]
Above is a sample data which is saved in the body, and this HTML has a class of .last-snapmail-snapshot
which tell email was not failed and another class .failed-camera
this tells about failure.
One is basically img
tag
<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'>
and other one is a span
<span id='iamfailed' class='failed-camera'>Could not retrieve live image from</span>
Camera id is one that in ID
, which I want to fetch. There could be multiple img and span tags in one body as well.
Through server side, I can filter this Body and can exract the values of failed and successive camera ids but My problem is I cannot sort them or cannot search them with where clause if I get this out of query.
What I am trying to do is:
Get all_camera_ids (which will be from both classes, last-snapmail-snapshot
& failed-camera
)
Get Failed Camera Ids (All ids from the class failed-camera
)
And most probably Is it possible to do a where a query on that? where you can say, failed_camera_ids like "%junaid%"?
Its totally a new subject for me to parse HTML in PSQL query. I am sorry for such a ambiguis question. any help would be thankful
postgresql regex
Can you just string extract the important information into specific columns of this or a new table and then work with this. It will be easier to work with, faster and much smaller once you throw the html away.
– eckes
14 mins ago
Yes, you are right but its too late now data has been coming to this table for 2 years now. I have to deal it through this way. Is this possible? I can do it through server-side totally to first get and the parse it in Elixir's own way. But then IT will lose the sorting/where queries
– Junaid Farooq
11 mins ago
add a comment |
I have a table with a name snapmail_logs
.
which has a column body
in which I have been saving Email Templates as an HTML. There are a few things included in this body, to determine which email was failed or not.
["<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">n<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n<head>n <meta name="viewport" content="width=device-width">n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">n <title>Evercam.io</title>n</head>n<body bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; margin: 0; padding: 0;">n<style type="text/css">n @media only screen and (max-width: 600px) {n a[class="btn"] {n display: block !important; margin-bottom: 10px !important; background-image: none !important; margin-right: 0 !important;n }n div[class="column"] {n width: auto !important; float: none !important;n }n table.social div[class="column"] {n width: auto !important;n }n }n @media only screen and (max-width: 480px){n .logo{n max-width:28% !important;n max-width:175px !important;n }n }n</style>n<!-- HEADER -->n<table class="head-wrap" bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;">n <td style="margin: 0; padding: 0;"></td>n <td class="header container" style="display: block !important; clear: both !important; margin: 0 auto; padding: 0;">n <div class="content" style="display: block; margin: 0 auto; padding: 15px;">n <table bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;text-align:center;">n <td style="margin: 0; padding: 0;">n <img src="http://www.evercam.io/img/logo.png" class="logo" style="max-width:28%;max-width:175px; padding-top:10px;margin:0;">n </td>n </tr>n </table>n </div>n </td>n <td style="margin: 0; padding: 0;"></td>n </tr>n</table>n<!-- /HEADER -->n<!-- BODY -->n<table class="body-wrap" style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; background-color:#f5f5f5; padding: 0;">n <tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"><td style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"></td>n <td class="container" bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; display: block !important; border-radius:3px; clear: both !important; margin: 0 auto; padding: 0;">nn <div class="content" style="font-family: Arial, Helvetica, sans-serif; display: block; margin: 0 auto; padding: 15px;">n <table style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n <td style="font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; margin: 0; padding: 0;">nn <p class="lead" style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Hello, </p>nn <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Here's the snapshot from your camera.</p>n <br>n<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'><br>n <p style='line-height: 1.6; margin: 0 0 10px; padding: 0;'><b>Evercam PK Office 4K</b> (everc-fhlcr) - See the live view on Evercam by <a style='color:#428bca; text-decoration:none;' href='https://dash.evercam.io/v2/cameras/everc-fhlcr'>clicking here</a></p><br>n <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Thanks,</p><br>n <p style="line-height: 1.6; margin: 0 0 0px; padding: 0;">The Evercam Team</p>n <p style="color:#aaaaaa; line-height: 1.0; margin: 0 0 10px; padding: 0;"><a href="#" style="text-decoration:none; color:#aaaaaa;">support@evercam.io</a></p>n <br>nn <p><center style="font-size:11px">n If you want to change your Snapmail settings, <a " <> ..., "1551074758", "junaid@evercam.io", "Your Scheduled SnapMail @ 11:05", #DateTime<2019-02-25 06:06:18Z>, #DateTime<2019-02-25 06:06:18Z>]
Above is a sample data which is saved in the body, and this HTML has a class of .last-snapmail-snapshot
which tell email was not failed and another class .failed-camera
this tells about failure.
One is basically img
tag
<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'>
and other one is a span
<span id='iamfailed' class='failed-camera'>Could not retrieve live image from</span>
Camera id is one that in ID
, which I want to fetch. There could be multiple img and span tags in one body as well.
Through server side, I can filter this Body and can exract the values of failed and successive camera ids but My problem is I cannot sort them or cannot search them with where clause if I get this out of query.
What I am trying to do is:
Get all_camera_ids (which will be from both classes, last-snapmail-snapshot
& failed-camera
)
Get Failed Camera Ids (All ids from the class failed-camera
)
And most probably Is it possible to do a where a query on that? where you can say, failed_camera_ids like "%junaid%"?
Its totally a new subject for me to parse HTML in PSQL query. I am sorry for such a ambiguis question. any help would be thankful
postgresql regex
I have a table with a name snapmail_logs
.
which has a column body
in which I have been saving Email Templates as an HTML. There are a few things included in this body, to determine which email was failed or not.
["<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">n<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n<head>n <meta name="viewport" content="width=device-width">n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">n <title>Evercam.io</title>n</head>n<body bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; margin: 0; padding: 0;">n<style type="text/css">n @media only screen and (max-width: 600px) {n a[class="btn"] {n display: block !important; margin-bottom: 10px !important; background-image: none !important; margin-right: 0 !important;n }n div[class="column"] {n width: auto !important; float: none !important;n }n table.social div[class="column"] {n width: auto !important;n }n }n @media only screen and (max-width: 480px){n .logo{n max-width:28% !important;n max-width:175px !important;n }n }n</style>n<!-- HEADER -->n<table class="head-wrap" bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;">n <td style="margin: 0; padding: 0;"></td>n <td class="header container" style="display: block !important; clear: both !important; margin: 0 auto; padding: 0;">n <div class="content" style="display: block; margin: 0 auto; padding: 15px;">n <table bgcolor="#f5f5f5" style="width: 100%; margin: 0; padding: 0;">n <tr style="margin: 0; padding: 0;text-align:center;">n <td style="margin: 0; padding: 0;">n <img src="http://www.evercam.io/img/logo.png" class="logo" style="max-width:28%;max-width:175px; padding-top:10px;margin:0;">n </td>n </tr>n </table>n </div>n </td>n <td style="margin: 0; padding: 0;"></td>n </tr>n</table>n<!-- /HEADER -->n<!-- BODY -->n<table class="body-wrap" style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; background-color:#f5f5f5; padding: 0;">n <tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"><td style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;"></td>n <td class="container" bgcolor="#FFFFFF" style="font-family: Arial, Helvetica, sans-serif; display: block !important; border-radius:3px; clear: both !important; margin: 0 auto; padding: 0;">nn <div class="content" style="font-family: Arial, Helvetica, sans-serif; display: block; margin: 0 auto; padding: 15px;">n <table style="font-family: Arial, Helvetica, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0;">n <td style="font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; margin: 0; padding: 0;">nn <p class="lead" style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Hello, </p>nn <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Here's the snapshot from your camera.</p>n <br>n<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'><br>n <p style='line-height: 1.6; margin: 0 0 10px; padding: 0;'><b>Evercam PK Office 4K</b> (everc-fhlcr) - See the live view on Evercam by <a style='color:#428bca; text-decoration:none;' href='https://dash.evercam.io/v2/cameras/everc-fhlcr'>clicking here</a></p><br>n <p style="line-height: 1.6; margin: 0 0 10px; padding: 0;">Thanks,</p><br>n <p style="line-height: 1.6; margin: 0 0 0px; padding: 0;">The Evercam Team</p>n <p style="color:#aaaaaa; line-height: 1.0; margin: 0 0 10px; padding: 0;"><a href="#" style="text-decoration:none; color:#aaaaaa;">support@evercam.io</a></p>n <br>nn <p><center style="font-size:11px">n If you want to change your Snapmail settings, <a " <> ..., "1551074758", "junaid@evercam.io", "Your Scheduled SnapMail @ 11:05", #DateTime<2019-02-25 06:06:18Z>, #DateTime<2019-02-25 06:06:18Z>]
Above is a sample data which is saved in the body, and this HTML has a class of .last-snapmail-snapshot
which tell email was not failed and another class .failed-camera
this tells about failure.
One is basically img
tag
<img class='last-snapmail-snapshot' id='everc-fhlcr' src='cid:everc-fhlcr.jpg' alt='Last Snapshot' style='width: 100%; display:block; margin:0 auto;'>
and other one is a span
<span id='iamfailed' class='failed-camera'>Could not retrieve live image from</span>
Camera id is one that in ID
, which I want to fetch. There could be multiple img and span tags in one body as well.
Through server side, I can filter this Body and can exract the values of failed and successive camera ids but My problem is I cannot sort them or cannot search them with where clause if I get this out of query.
What I am trying to do is:
Get all_camera_ids (which will be from both classes, last-snapmail-snapshot
& failed-camera
)
Get Failed Camera Ids (All ids from the class failed-camera
)
And most probably Is it possible to do a where a query on that? where you can say, failed_camera_ids like "%junaid%"?
Its totally a new subject for me to parse HTML in PSQL query. I am sorry for such a ambiguis question. any help would be thankful
postgresql regex
postgresql regex
asked 18 mins ago
Junaid FarooqJunaid Farooq
14029
14029
Can you just string extract the important information into specific columns of this or a new table and then work with this. It will be easier to work with, faster and much smaller once you throw the html away.
– eckes
14 mins ago
Yes, you are right but its too late now data has been coming to this table for 2 years now. I have to deal it through this way. Is this possible? I can do it through server-side totally to first get and the parse it in Elixir's own way. But then IT will lose the sorting/where queries
– Junaid Farooq
11 mins ago
add a comment |
Can you just string extract the important information into specific columns of this or a new table and then work with this. It will be easier to work with, faster and much smaller once you throw the html away.
– eckes
14 mins ago
Yes, you are right but its too late now data has been coming to this table for 2 years now. I have to deal it through this way. Is this possible? I can do it through server-side totally to first get and the parse it in Elixir's own way. But then IT will lose the sorting/where queries
– Junaid Farooq
11 mins ago
Can you just string extract the important information into specific columns of this or a new table and then work with this. It will be easier to work with, faster and much smaller once you throw the html away.
– eckes
14 mins ago
Can you just string extract the important information into specific columns of this or a new table and then work with this. It will be easier to work with, faster and much smaller once you throw the html away.
– eckes
14 mins ago
Yes, you are right but its too late now data has been coming to this table for 2 years now. I have to deal it through this way. Is this possible? I can do it through server-side totally to first get and the parse it in Elixir's own way. But then IT will lose the sorting/where queries
– Junaid Farooq
11 mins ago
Yes, you are right but its too late now data has been coming to this table for 2 years now. I have to deal it through this way. Is this possible? I can do it through server-side totally to first get and the parse it in Elixir's own way. But then IT will lose the sorting/where queries
– Junaid Farooq
11 mins ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230637%2fhow-to-filter-through-html-in-postgresql-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230637%2fhow-to-filter-through-html-in-postgresql-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you just string extract the important information into specific columns of this or a new table and then work with this. It will be easier to work with, faster and much smaller once you throw the html away.
– eckes
14 mins ago
Yes, you are right but its too late now data has been coming to this table for 2 years now. I have to deal it through this way. Is this possible? I can do it through server-side totally to first get and the parse it in Elixir's own way. But then IT will lose the sorting/where queries
– Junaid Farooq
11 mins ago