{"id":4136,"date":"2020-11-26T15:26:04","date_gmt":"2020-11-26T21:26:04","guid":{"rendered":"https:\/\/www.logikalsolutions.com\/wordpress\/?p=4136"},"modified":"2023-11-27T18:24:31","modified_gmt":"2023-11-28T00:24:31","slug":"postgresql-oddity","status":"publish","type":"post","link":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/","title":{"rendered":"Interesting PostgreSQL Oddity"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I was working on a tiny database to send out some emails with varying subjects. Decided to use PostgreSQL so I could have a real database as the back end. SQLite doesn&#8217;t share (on most platforms) so I couldn&#8217;t add data while the program was running. Being able to add stuff and check on progress while running is one of those design things you can&#8217;t kick when you&#8217;ve been in IT as long as me.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nothing odd about the definition of the table. It only has two columns.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"CREATE TABLE agile_book_subjects (\n\tsubject VARCHAR(80),\n\tlast_used VARCHAR(60)\n\t); \n\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F78C6C\">CREATE<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">TABLE<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #82AAFF\">agile_book_subjects<\/span><span style=\"color: #BABED8\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">\t<\/span><span style=\"color: #F78C6C\">subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C792EA\">VARCHAR<\/span><span style=\"color: #BABED8\">(<\/span><span style=\"color: #F78C6C\">80<\/span><span style=\"color: #BABED8\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">\tlast_used <\/span><span style=\"color: #C792EA\">VARCHAR<\/span><span style=\"color: #BABED8\">(<\/span><span style=\"color: #F78C6C\">60<\/span><span style=\"color: #BABED8\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">\t); <\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Opted to be a bit lazy when I created the test data. I created a text file with the following:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"subject,last_used\nSubject Line 1,\nSubject Line 2,\nSubject Line 3,\nSubject Line 4,\nSubject Line 5,\nSubject Line 6,\nSubject Line 7,\nSubject Line 8,\nSubject Line 9,\nSubject Line 10,\nSubject Line 11,\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #FFCB6B\">subject,last_used<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">2<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">3<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">4<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">5<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">6<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">7<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">8<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">9<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">10<\/span><span style=\"color: #C3E88D\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">Subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">Line<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">11<\/span><span style=\"color: #C3E88D\">,<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Next I created a simple import script.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"# import_email_subjects.sh\n#\nif [ -z &quot;$1&quot; ]; then\n    echo &quot;must pass csv file name to import&quot;\n    echo &quot;first line must have column names&quot;\n    exit\nfi\n\nexport PGUSER=roland\nexport PGPASSWORD=spooge_1\n\npsql -q -d email_marketing -c &quot;copy agile_book_subjects from '$1' csv header;&quot;\n\npsql -q -d email_marketing -c &quot;select count('*') from agile_book_subjects;&quot;\n\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #464B5D; font-style: italic\"># import_email_subjects.sh<\/span><\/span>\n<span class=\"line\"><span style=\"color: #464B5D; font-style: italic\">#<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">if<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">[<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">-z<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #BABED8; font-style: italic\">$1<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">];<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF; font-style: italic\">then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #82AAFF\">echo<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">must pass csv file name to import<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #82AAFF\">echo<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">first line must have column names<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #82AAFF\">exit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">fi<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #C792EA\">export<\/span><span style=\"color: #BABED8\"> PGUSER<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #C3E88D\">roland<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C792EA\">export<\/span><span style=\"color: #BABED8\"> PGPASSWORD<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #C3E88D\">spooge_1<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">psql<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">-q<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">-d<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">email_marketing<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">-c<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">copy agile_book_subjects from &#39;<\/span><span style=\"color: #BABED8; font-style: italic\">$1<\/span><span style=\"color: #C3E88D\">&#39; csv header;<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #FFCB6B\">psql<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">-q<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">-d<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">email_marketing<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #C3E88D\">-c<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">select count(&#39;*&#39;) from agile_book_subjects;<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Here is what happened<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When I run it all looks well. I ass-u-me it would have gagged if it didn&#8217;t like the missing value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"94\" src=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-12-13-1024x94.png\" alt=\"\" class=\"wp-image-4139\" srcset=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-12-13-1024x94.png 1024w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-12-13-300x28.png 300w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-12-13-768x71.png 768w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-12-13-850x78.png 850w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-12-13.png 1198w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">11 records as expected<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">While the application is running I see only one subject being used. This is odd. I perform a few queries in another terminal.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"249\" src=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-07-45-1024x249.png\" alt=\"\" class=\"wp-image-4140\" srcset=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-07-45-1024x249.png 1024w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-07-45-300x73.png 300w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-07-45-768x187.png 768w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-07-45-850x207.png 850w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-07-45.png 1176w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Ascending sort seems borked<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Well, if that doesn&#8217;t look like a Microsoft product! My ascending sort puts the only record with a value in the sort column on top. The select statement in the Java program is as follows:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#0F111A\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"SELECT subject FROM agile_book_subjects ORDER BY last_used ASC LIMIT 1;\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-ocean\" style=\"background-color: #0F111A\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F78C6C\">SELECT<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">subject<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">FROM<\/span><span style=\"color: #BABED8\"> agile_book_subjects <\/span><span style=\"color: #F78C6C\">ORDER BY<\/span><span style=\"color: #BABED8\"> last_used <\/span><span style=\"color: #F78C6C\">ASC<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">LIMIT<\/span><span style=\"color: #BABED8\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #BABED8\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"133\" src=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-16-50-1024x133.png\" alt=\"\" class=\"wp-image-4141\" srcset=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-16-50-1024x133.png 1024w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-16-50-300x39.png 300w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-16-50-768x100.png 768w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-16-50-850x111.png 850w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-16-50.png 1175w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Result of actual select used<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If it is unable to sort on a null value, how did it get the first row? Better yet, explain this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"248\" src=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-18-25-1024x248.png\" alt=\"\" class=\"wp-image-4142\" srcset=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-18-25-1024x248.png 1024w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-18-25-300x73.png 300w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-18-25-768x186.png 768w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-18-25-850x206.png 850w, https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/Screenshot-from-2020-11-26-15-18-25.png 1166w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Nulls have a higher value than text?<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">How is it the nulls sort above the record with actual text? I&#8217;m on Ubuntu 20.04 LTS using stuff out of the repos if anyone is interested in the platform.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course the fix was to stick a 0 in for last_used then recreate the database and repopulate the table. Still, if it can&#8217;t handle nulls in a column as one would expect nulls, it shouldn&#8217;t have given me the first row. Is it really putting something like COBOL HIGH-VALUES in the column? <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A value should always sort higher than a null value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kind of reminds me of this song<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"C+C Music Factory - Things That Make You Go Hmmmm.... (Video Version) ft. Freedom Williams\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/XF2ayWcJfxo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I was working on a tiny database to send out some emails with varying subjects. Decided to use PostgreSQL so I could have a real database as the back end. SQLite doesn&#8217;t share (on most platforms) so I couldn&#8217;t add data while the program was running. Being able to add stuff and check on progress while running is one of those design things you can&#8217;t kick when you&#8217;ve been in IT as long as me. &hellip; <a title=\"Interesting PostgreSQL Oddity\" class=\"bnm-read-more\" href=\"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/\"><span class=\"screen-reader-text\">Interesting PostgreSQL Oddity<\/span>Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":4138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[438,435,1381],"class_list":["post-4136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-information-technology","tag-cobol","tag-java-programming","tag-postgresql","bnm-entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Interesting PostgreSQL Oddity &#8211; Logikal Blog<\/title>\n<meta name=\"description\" content=\"Stumbled into very odd handling of null values under PostgreSQL. Maybe this oddity only exists on Ubuntu? Null value sorting . . .\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Interesting PostgreSQL Oddity &#8211; Logikal Blog\" \/>\n<meta property=\"og:description\" content=\"Stumbled into very odd handling of null values under PostgreSQL. Maybe this oddity only exists on Ubuntu? Null value sorting . . .\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/\" \/>\n<meta property=\"og:site_name\" content=\"Logikal Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-26T21:26:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-28T00:24:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/IMG_2020-11-26_15-01-10.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"2560\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"seasoned_geek\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"seasoned_geek\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/\"},\"author\":{\"name\":\"seasoned_geek\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\"},\"headline\":\"Interesting PostgreSQL Oddity\",\"datePublished\":\"2020-11-26T21:26:04+00:00\",\"dateModified\":\"2023-11-28T00:24:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/\"},\"wordCount\":356,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\"},\"image\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/IMG_2020-11-26_15-01-10.jpeg\",\"keywords\":[\"COBOL\",\"Java programming\",\"PostgreSQL\"],\"articleSection\":[\"Information Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/\",\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/\",\"name\":\"Interesting PostgreSQL Oddity &#8211; Logikal Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/IMG_2020-11-26_15-01-10.jpeg\",\"datePublished\":\"2020-11-26T21:26:04+00:00\",\"dateModified\":\"2023-11-28T00:24:31+00:00\",\"description\":\"Stumbled into very odd handling of null values under PostgreSQL. Maybe this oddity only exists on Ubuntu? Null value sorting . . .\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/IMG_2020-11-26_15-01-10.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/IMG_2020-11-26_15-01-10.jpeg\",\"width\":1440,\"height\":1920},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/postgresql-oddity\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interesting PostgreSQL Oddity\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/\",\"name\":\"Logikal Blog\",\"description\":\"No part of this site may be used by AI without first purchasing that right\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\",\"name\":\"seasoned_geek\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\",\"caption\":\"seasoned_geek\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\"},\"description\":\"Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++\\\/Qt touchscreen\\\/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the \\\"Zinc It!\\\" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome \\\"The Minimum You Need to Know to Be an OpenVMS Application Developer\\\" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there \\\"The Minimum You Need to Know\\\" book series was born. Three years later he wrote his first novel \\\"Infinite Exposure\\\" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of \\\"The Earth That Was\\\" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.\",\"sameAs\":[\"https:\\\/\\\/theminimumyouneedtoknow.com\"],\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/author\\\/seasoned_geek\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Interesting PostgreSQL Oddity &#8211; Logikal Blog","description":"Stumbled into very odd handling of null values under PostgreSQL. Maybe this oddity only exists on Ubuntu? Null value sorting . . .","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/","og_locale":"en_US","og_type":"article","og_title":"Interesting PostgreSQL Oddity &#8211; Logikal Blog","og_description":"Stumbled into very odd handling of null values under PostgreSQL. Maybe this oddity only exists on Ubuntu? Null value sorting . . .","og_url":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/","og_site_name":"Logikal Blog","article_published_time":"2020-11-26T21:26:04+00:00","article_modified_time":"2023-11-28T00:24:31+00:00","og_image":[{"width":1920,"height":2560,"url":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/IMG_2020-11-26_15-01-10.jpeg","type":"image\/jpeg"}],"author":"seasoned_geek","twitter_card":"summary_large_image","twitter_misc":{"Written by":"seasoned_geek","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#article","isPartOf":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/"},"author":{"name":"seasoned_geek","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842"},"headline":"Interesting PostgreSQL Oddity","datePublished":"2020-11-26T21:26:04+00:00","dateModified":"2023-11-28T00:24:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/"},"wordCount":356,"commentCount":0,"publisher":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842"},"image":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#primaryimage"},"thumbnailUrl":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/IMG_2020-11-26_15-01-10.jpeg","keywords":["COBOL","Java programming","PostgreSQL"],"articleSection":["Information Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/","url":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/","name":"Interesting PostgreSQL Oddity &#8211; Logikal Blog","isPartOf":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#primaryimage"},"image":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#primaryimage"},"thumbnailUrl":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/IMG_2020-11-26_15-01-10.jpeg","datePublished":"2020-11-26T21:26:04+00:00","dateModified":"2023-11-28T00:24:31+00:00","description":"Stumbled into very odd handling of null values under PostgreSQL. Maybe this oddity only exists on Ubuntu? Null value sorting . . .","breadcrumb":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#primaryimage","url":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/IMG_2020-11-26_15-01-10.jpeg","contentUrl":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2020\/11\/IMG_2020-11-26_15-01-10.jpeg","width":1440,"height":1920},{"@type":"BreadcrumbList","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/postgresql-oddity\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.logikalsolutions.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Interesting PostgreSQL Oddity"}]},{"@type":"WebSite","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#website","url":"https:\/\/www.logikalsolutions.com\/wordpress\/","name":"Logikal Blog","description":"No part of this site may be used by AI without first purchasing that right","publisher":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.logikalsolutions.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842","name":"seasoned_geek","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r","url":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r","caption":"seasoned_geek"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r"},"description":"Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++\/Qt touchscreen\/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the \"Zinc It!\" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome \"The Minimum You Need to Know to Be an OpenVMS Application Developer\" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there \"The Minimum You Need to Know\" book series was born. Three years later he wrote his first novel \"Infinite Exposure\" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of \"The Earth That Was\" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.","sameAs":["https:\/\/theminimumyouneedtoknow.com"],"url":"https:\/\/www.logikalsolutions.com\/wordpress\/author\/seasoned_geek\/"}]}},"_links":{"self":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/posts\/4136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/comments?post=4136"}],"version-history":[{"count":0,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/posts\/4136\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/media\/4138"}],"wp:attachment":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/media?parent=4136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/categories?post=4136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/tags?post=4136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}