<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Postgres OnLine Journal - basics</title>
    <link>https://www.postgresonline.com/journal/</link>
    <description>Tips and tricks for PostgreSQL</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.3.5 - http://www.s9y.org/</generator>
    <pubDate>Fri, 02 Jan 2026 14:19:23 GMT</pubDate>

    <image>
    <url>https://www.postgresonline.com/journal/templates/default/img/s9y_banner_small.png</url>
    <title>RSS: Postgres OnLine Journal - basics - Tips and tricks for PostgreSQL</title>
    <link>https://www.postgresonline.com/journal/</link>
    <width>100</width>
    <height>21</height>
</image>

<item>
    <title>Learning PostgreSQL from AI and JSON exploration: Part 2</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/422-Learning-PostgreSQL-from-AI-and-JSON-exploration-Part-2.html</link>
            <category>17</category>
            <category>basics</category>
            <category>beginner</category>
            <category>postgresql versions</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/422-Learning-PostgreSQL-from-AI-and-JSON-exploration-Part-2.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=422</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=422</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;This is the second part of the series I started on &lt;a href=&quot;https://www.postgresonline.com/journal/archives/418-Learning-PostgreSQL-from-AI-and-JSON-exploration.html&quot;&gt;Learning PostgreSQL from AI and JSON exploration: Part 1&lt;/a&gt;.
For this 2nd part, I decided to try &lt;a href=&quot;https://ollama.com/library/gpt-oss&quot;&gt;gpt-oss&lt;/a&gt; the 14GB model which was just released in the past week.
My first impression, &quot;When will this ai shut up about its thinking process?&quot;. Phi4 on the other hand gave a bit of a narrative about how it came up with
answers but it did not write a novel about it and it also seemed more personable, using &quot;My and you&quot; instead of a distanced &quot;User wants to&quot;.
However gpt-os did become less chatty with a bit of coaxing. So anyway personality wise I prefer phi4.
That is not to say that Gpt-oss doesn&#039;t have some wow factor.  It created perfect SQL each time.  I did not need to correct it.
One of the other neat features of this model which I haven&#039;t had time to explore is ability to have it
do browser searches and other agentic like stuff.&lt;/p&gt;

&lt;p&gt;Again for this size model, speed of answering with my crappy graphics card and processor was not bad, but it was noticeably slower
than Phi4. Given the impressive accuracy, I didn&#039;t mind too much and I suspect can be improved by tweaking some of its settings.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/422-Learning-PostgreSQL-from-AI-and-JSON-exploration-Part-2.html#extended&quot;&gt;Continue reading &quot;Learning PostgreSQL from AI and JSON exploration: Part 2&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 21 Aug 2025 02:05:00 -0400</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/422-guid.html</guid>
    
</item>
<item>
    <title>Converting JSON documents to relational tables</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/420-Converting-JSON-documents-to-relational-tables.html</link>
            <category>basics</category>
            <category>beginner</category>
            <category>json</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/420-Converting-JSON-documents-to-relational-tables.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=420</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=420</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;JSON is one of the most popular ways of disseminating data between systems.
It is probably the most common offered by webservices.  PostgreSQL is a database 
perfectly suited for grabbing that data and transforming it into a more structured relational format.
All this can be done directly in the database. We&#039;ll go over some ways to load and restructure json data.&lt;/p&gt; &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/420-Converting-JSON-documents-to-relational-tables.html#extended&quot;&gt;Continue reading &quot;Converting JSON documents to relational tables&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 28 Mar 2025 00:03:00 -0400</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/420-guid.html</guid>
    
</item>
<item>
    <title>PG 17 new random functions</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/419-PG-17-new-random-functions.html</link>
            <category>17</category>
            <category>basics</category>
            <category>beginner</category>
            <category>postgresql versions</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/419-PG-17-new-random-functions.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=419</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=419</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;
Have you ever wanted to get a random integer between 1 and 10 and been a little annoyed the slightly cryptic code you had to write in PostgreSQL?
&lt;a href=&quot;https://www.postgresql.org/docs/current/functions-math.html#FUNCTIONS-MATH-RANDOM-TABLE&quot; target=&quot;_blank&quot;&gt;PostgreSQL 17 random&lt;/a&gt; functions make that simpler.  Sometimes it&#039;s the small changes that bring the most joy.
&lt;/p&gt; &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/419-PG-17-new-random-functions.html#extended&quot;&gt;Continue reading &quot;PG 17 new random functions&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 05 Mar 2025 22:45:00 -0500</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/419-guid.html</guid>
    
</item>
<item>
    <title>Learning PostgreSQL from AI and JSON exploration</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/418-Learning-PostgreSQL-from-AI-and-JSON-exploration.html</link>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/418-Learning-PostgreSQL-from-AI-and-JSON-exploration.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=418</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=418</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;After reading &lt;a href=&quot;https://blog.cleverelephant.ca&quot;&gt;Paul&#039;s&lt;/a&gt; teasing article on
&lt;a href=&quot;https://www.crunchydata.com/blog/accessing-large-language-models-from-postgresql&quot; target=&quot;_blank&quot;&gt;Accessing Large Language Models with AI&lt;/a&gt; and testing out his code,
I decided I should probably stop fighting this AI smothering.
I still have a distrust of AI services but downloading an AI model and using on my own local desktop or server is nice and I can break bread with that.
One use I tried is using AI to generate fake data and it did a pretty decent job. I also learned a couple of things.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/418-Learning-PostgreSQL-from-AI-and-JSON-exploration.html#extended&quot;&gt;Continue reading &quot;Learning PostgreSQL from AI and JSON exploration&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 10 Feb 2025 20:48:00 -0500</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/418-guid.html</guid>
    
</item>
<item>
    <title>Unpivoting data using JSONB</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/417-Unpivoting-data-using-JSONB.html</link>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/417-Unpivoting-data-using-JSONB.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=417</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=417</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;
One of my favorite uses of JSONB functionality is to unpivot data.
&lt;/p&gt;

 &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/417-Unpivoting-data-using-JSONB.html#extended&quot;&gt;Continue reading &quot;Unpivoting data using JSONB&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 19 Jan 2025 22:57:00 -0500</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/417-guid.html</guid>
    
</item>
<item>
    <title>Some of my favorite PostgreSQLisms</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/414-Some-of-my-favorite-PostgreSQLisms.html</link>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/414-Some-of-my-favorite-PostgreSQLisms.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=414</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=414</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;When I work with other relational databases I am reminded about how I can&#039;t use my favorite PostgreSQL hacks in them.
I call these hacks PostgreSQLisms.  A PostgreSQLism is a pattern of SQL unique to PostgreSQL or descendants of PostgreSQL.
In this post I&#039;m going to cover some of my favorite ones.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/414-Some-of-my-favorite-PostgreSQLisms.html#extended&quot;&gt;Continue reading &quot;Some of my favorite PostgreSQLisms&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 25 Nov 2024 23:01:00 -0500</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/414-guid.html</guid>
    
</item>
<item>
    <title>Substring function Regex style</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/415-Substring-function-Regex-style.html</link>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/415-Substring-function-Regex-style.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=415</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=415</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;I was reviewing some old code when I stumbled across something I must have completely forgotten
or someone else some time ago knew. That is that it is possible to use the function &lt;b&gt;substring&lt;/b&gt; for regular expression work.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/415-Substring-function-Regex-style.html#extended&quot;&gt;Continue reading &quot;Substring function Regex style&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 01 Dec 2024 16:37:00 -0500</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/415-guid.html</guid>
    
</item>
<item>
    <title>PostgreSQL Mistakes and How To Avoid them</title>
    <link>https://www.postgresonline.com/journal/index.php?/archives/410-PostgreSQL-Mistakes-and-How-To-Avoid-them.html</link>
            <category>basics</category>
    
    <comments>https://www.postgresonline.com/journal/index.php?/archives/410-PostgreSQL-Mistakes-and-How-To-Avoid-them.html#comments</comments>
    <wfw:comment>https://www.postgresonline.com/journal/wfwcomment.php?cid=410</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=410</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;The adoption of PostgreSQL is growing each year.  Many people coming to PostgreSQL are often coming from other 
	relational databases, with assumptions of how relational databases work.  Although PostgreSQL may feel very familiar to these 
	people, it is different enough to cause some misunderstandings which lead to bad and slow queries.
	There are also people coming often from only programming backgrounds, who assume data processing in SQL is much like 
	data processing in any language. For these two groups of folks, I think the 
	new book written by EDB and 2nd Quadrant Author, Jimmy Angelakos, &amp;quot;PostgreSQL Mistakes and How To Avoid Them&amp;quot; will save them a lot of miss-steps.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://www.postgresonline.com/journal/index.php?/archives/410-PostgreSQL-Mistakes-and-How-To-Avoid-them.html#extended&quot;&gt;Continue reading &quot;PostgreSQL Mistakes and How To Avoid them&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 05 Mar 2024 12:43:00 -0500</pubDate>
    <guid isPermaLink="false">https://www.postgresonline.com/journal/index.php?/archives/410-guid.html</guid>
    
</item>

</channel>
</rss>
