add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
version
PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4), 64-bit
1 rows affected
16 rows affected
idx length string
1 257 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
2 22       <html lang="en">
3 12       <head>
4 33           <meta charset="utf-8"/>
5 20           more stuff
6 20           more stuff
7 16         </table>
8 13       </body>
9 14        </html>
10 98             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
11 11     select
12 112 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
13 134         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
14 123         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
15 11         t.x
16 12      from t;
idx length ?column? string
1 257 f with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
2 22 t       <html lang="en">
3 12 f       <head>
4 33 f           <meta charset="utf-8"/>
5 20 f           more stuff
6 20 f           more stuff
7 16 f         </table>
8 13 f       </body>
9 14 t        </html>
10 98 f             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
11 11 f     select
12 112 f + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
13 134 f         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
14 123 f         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
15 11 f         t.x
16 12 f      from t;
n
1
2
3
4
5
6
7
8
9
10
n ln
1 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
1       <html lang="en">
1       <head>
1           <meta charset="utf-8"/>
1           more stuff
1           more stuff
1         </table>
1       </body>
1        </html>
1             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
1     select
1 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
1         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
1         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
1         t.x
1      from t;
2 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
2       <html lang="en">
2       <head>
2           <meta charset="utf-8"/>
2           more stuff
2           more stuff
2         </table>
2       </body>
2        </html>
2             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
2     select
2 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
2         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
2         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
2         t.x
2      from t;
3 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
3       <html lang="en">
3       <head>
3           <meta charset="utf-8"/>
3           more stuff
3           more stuff
3         </table>
3       </body>
3        </html>
3             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
3     select
3 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
3         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
3         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
3         t.x
3      from t;
4 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
4       <html lang="en">
4       <head>
4           <meta charset="utf-8"/>
4           more stuff
4           more stuff
4         </table>
4       </body>
4        </html>
4             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
4     select
4 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
4         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
4         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
4         t.x
4      from t;
5 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
5       <html lang="en">
5       <head>
5           <meta charset="utf-8"/>
5           more stuff
5           more stuff
5         </table>
5       </body>
5        </html>
5             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
5     select
5 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
5         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
5         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
5         t.x
5      from t;
6 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
6       <html lang="en">
6       <head>
6           <meta charset="utf-8"/>
6           more stuff
6           more stuff
6         </table>
6       </body>
6        </html>
6             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
6     select
6 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
6         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
6         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
6         t.x
6      from t;
7 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
7       <html lang="en">
7       <head>
7           <meta charset="utf-8"/>
7           more stuff
7           more stuff
7         </table>
7       </body>
7        </html>
7             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
7     select
7 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
7         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
7         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
7         t.x
7      from t;
8 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
8       <html lang="en">
8       <head>
8           <meta charset="utf-8"/>
8           more stuff
8           more stuff
8         </table>
8       </body>
8        </html>
8             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
8     select
8 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
8         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
8         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
8         t.x
8      from t;
9 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
9       <html lang="en">
9       <head>
9           <meta charset="utf-8"/>
9           more stuff
9           more stuff
9         </table>
9       </body>
9        </html>
9             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
9     select
9 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
9         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
9         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
9         t.x
9      from t;
10 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
10       <html lang="en">
10       <head>
10           <meta charset="utf-8"/>
10           more stuff
10           more stuff
10         </table>
10       </body>
10        </html>
10             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
10     select
10 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
10         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
10         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
10         t.x
10      from t;
11 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
11       <html lang="en">
11       <head>
11           <meta charset="utf-8"/>
11           more stuff
11           more stuff
11         </table>
11       </body>
11        </html>
11             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
11     select
11 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
11         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
11         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
11         t.x
11      from t;
12 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
12       <html lang="en">
12       <head>
12           <meta charset="utf-8"/>
12           more stuff
12           more stuff
12         </table>
12       </body>
12        </html>
12             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
12     select
12 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
12         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
12         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
12         t.x
12      from t;
13 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
13       <html lang="en">
13       <head>
13           <meta charset="utf-8"/>
13           more stuff
13           more stuff
13         </table>
13       </body>
13        </html>
13             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
13     select
13 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
13         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
13         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
13         t.x
13      from t;
14 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
14       <html lang="en">
14       <head>
14           <meta charset="utf-8"/>
14           more stuff
14           more stuff
14         </table>
14       </body>
14        </html>
14             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
14     select
14 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
14         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
14         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
14         t.x
14      from t;
15 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
15       <html lang="en">
15       <head>
15           <meta charset="utf-8"/>
15           more stuff
15           more stuff
15         </table>
15       </body>
15        </html>
15             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
15     select
15 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
15         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
15         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
15         t.x
15      from t;
16 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
16       <html lang="en">
16       <head>
16           <meta charset="utf-8"/>
16           more stuff
16           more stuff
16         </table>
16       </body>
16        </html>
16             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
16     select
16 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
16         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
16         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
16         t.x
16      from t;
n ln
1 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
1       <html lang="en">
1       <head>
1           <meta charset="utf-8"/>
1           more stuff
1         </table>
1       </body>
1        </html>
1             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
1     select
1 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
1         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
1         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
1         t.x
1      from t;
2 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
2       <html lang="en">
2       <head>
2           <meta charset="utf-8"/>
2           more stuff
2         </table>
2       </body>
2        </html>
2             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
2     select
2 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
2         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
2         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
2         t.x
2      from t;
3 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
3       <html lang="en">
3       <head>
3           <meta charset="utf-8"/>
3           more stuff
3         </table>
3       </body>
3        </html>
3             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
3     select
3 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
3         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
3         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
3         t.x
3      from t;
4 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
4       <html lang="en">
4       <head>
4           <meta charset="utf-8"/>
4           more stuff
4         </table>
4       </body>
4        </html>
4             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
4     select
4 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
4         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
4         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
4         t.x
4      from t;
5 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
5       <html lang="en">
5       <head>
5           <meta charset="utf-8"/>
5           more stuff
5         </table>
5       </body>
5        </html>
5             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
5     select
5 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
5         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
5         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
5         t.x
5      from t;
6 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
6       <html lang="en">
6       <head>
6           <meta charset="utf-8"/>
6           more stuff
6         </table>
6       </body>
6        </html>
6             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
6     select
6 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
6         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
6         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
6         t.x
6      from t;
7 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
7       <html lang="en">
7       <head>
7           <meta charset="utf-8"/>
7           more stuff
7         </table>
7       </body>
7        </html>
7             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
7     select
7 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
7         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
7         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
7         t.x
7      from t;
8 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
8       <html lang="en">
8       <head>
8           <meta charset="utf-8"/>
8           more stuff
8         </table>
8       </body>
8        </html>
8             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
8     select
8 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
8         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
8         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
8         t.x
8      from t;
9 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
9       <html lang="en">
9       <head>
9           <meta charset="utf-8"/>
9           more stuff
9         </table>
9       </body>
9        </html>
9             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
9     select
9 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
9         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
9         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
9         t.x
9      from t;
10 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
10       <html lang="en">
10       <head>
10           <meta charset="utf-8"/>
10           more stuff
10         </table>
10       </body>
10        </html>
10             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
10     select
10 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
10         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
10         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
10         t.x
10      from t;
11 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
11       <html lang="en">
11       <head>
11           <meta charset="utf-8"/>
11           more stuff
11         </table>
11       </body>
11        </html>
11             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
11     select
11 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
11         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
11         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
11         t.x
11      from t;
12 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
12       <html lang="en">
12       <head>
12           <meta charset="utf-8"/>
12           more stuff
12         </table>
12       </body>
12        </html>
12             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
12     select
12 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
12         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
12         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
12         t.x
12      from t;
13 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
13       <html lang="en">
13       <head>
13           <meta charset="utf-8"/>
13           more stuff
13         </table>
13       </body>
13        </html>
13             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
13     select
13 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
13         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
13         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
13         t.x
13      from t;
14 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
14       <html lang="en">
14       <head>
14           <meta charset="utf-8"/>
14           more stuff
14         </table>
14       </body>
14        </html>
14             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
14     select
14 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
14         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
14         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
14         t.x
14      from t;
15 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
15       <html lang="en">
15       <head>
15           <meta charset="utf-8"/>
15           more stuff
15         </table>
15       </body>
15        </html>
15             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
15     select
15 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
15         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
15         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
15         t.x
15      from t;
16 with t(x) as (values( XMLPARSE(DOCUMENT ('<root><NotificationServiceDetails NotificationNo="0" AlarmCode="mail" AlarmStartTime="10:00:00" AlarmTime="0" Id ="2" ><NotificationServiceDetail Id="2"><Title><![CDATA[aaaaaaaaaaaaa]]></Title><ContentJson><![CDATA[
16       <html lang="en">
16       <head>
16           <meta charset="utf-8"/>
16           more stuff
16         </table>
16       </body>
16        </html>
16             ]]></ContentJson></NotificationServiceDetail></NotificationServiceDetails></root>'))))
16     select
16 + unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/@Id',t.x)))::text::integer as Id,
16         unnest((xpath('//NotificationServiceDetails/NotificationServiceDetail/Title/text()',t.x))):: text::character varying as Title,
16         unnest(xpath('//NotificationServiceDetails/NotificationServiceDetail/ContentJson/text()',t.x))::xml as ContentJson,
16         t.x
16      from t;