<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://www.sqlines.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.sqlines.com/feed.php">
        <title>SQLines Tools postgresql:how-to</title>
        <description></description>
        <link>https://www.sqlines.com/</link>
        <image rdf:resource="https://www.sqlines.com/lib/images/favicon.ico" />
       <dc:date>2026-04-14T06:32:54+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.sqlines.com/postgresql/how-to/create_user_defined_type?rev=1324387350&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.sqlines.com/postgresql/how-to/dateadd?rev=1676816268&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.sqlines.com/postgresql/how-to/define_version?rev=1325698299&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.sqlines.com/postgresql/how-to/pg_dump_database_file?rev=1325583352&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.sqlines.com/postgresql/how-to/return_result_set_from_stored_procedure?rev=1599565438&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.sqlines.com/lib/images/favicon.ico">
        <title>SQLines Tools</title>
        <link>https://www.sqlines.com/</link>
        <url>https://www.sqlines.com/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="https://www.sqlines.com/postgresql/how-to/create_user_defined_type?rev=1324387350&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-12-20T13:22:30+00:00</dc:date>
        <title>PostgreSQL - How to Create User-Defined Type (UDT)</title>
        <link>https://www.sqlines.com/postgresql/how-to/create_user_defined_type?rev=1324387350&amp;do=diff</link>
        <description>You can create a user-defined type using CREATE DOMAIN and CREATE TYPE statements.

Quick Example:


   -- Define a type using CREATE DOMAIN
   CREATE DOMAIN addr VARCHAR(90) NOT NULL DEFAULT 'N/A';
   -- Define a type using CREATE TYPE
   CREATE TYPE address AS (city VARCHAR(90), street VARCHAR(90));
 
    -- Use them in a table
    CREATE TABLE location (ship_address addr, full_address address);</description>
    </item>
    <item rdf:about="https://www.sqlines.com/postgresql/how-to/dateadd?rev=1676816268&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-19T14:17:48+00:00</dc:date>
        <title>PostgreSQL - DATEADD - Add Interval to Datetime</title>
        <link>https://www.sqlines.com/postgresql/how-to/dateadd?rev=1676816268&amp;do=diff</link>
        <description>Although PostgreSQL does not provide DATEADD function similar to SQL Server, Sybase or MySQL, you can use datetime arithmetic with interval literals to get the same results.

SQL Server:


  -- Add 1 day to the current date November 21, 2012
  SELECT DATEADD(day, 1, GETDATE());
  # 2012-11-22 17:22:01.423</description>
    </item>
    <item rdf:about="https://www.sqlines.com/postgresql/how-to/define_version?rev=1325698299&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-04T17:31:39+00:00</dc:date>
        <title>How to Find Out PostgreSQL Version - Version() Function</title>
        <link>https://www.sqlines.com/postgresql/how-to/define_version?rev=1325698299&amp;do=diff</link>
        <description>Connect to a PostgreSQL database, and execute version() function to find out the PostgreSQL version:


   -- Define the PostgreSQL version
   SELECT version();


The query returns (a sample output that depends on the system):

 version  PostgreSQL 9.0.4, compiled by Visual C++ build 1500, 32-bit 
Resources

	*  PostgreSQL Articles and Reference</description>
    </item>
    <item rdf:about="https://www.sqlines.com/postgresql/how-to/pg_dump_database_file?rev=1325583352&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-01-03T09:35:52+00:00</dc:date>
        <title>PostgreSQL - How To Dump Database to SQL Script - pg_dump Utility</title>
        <link>https://www.sqlines.com/postgresql/how-to/pg_dump_database_file?rev=1325583352&amp;do=diff</link>
        <description>pg_dump utility located in bin directory of PostgreSQL installation can be used to export database definitions and data to a SQL script. 

 Quick Example  pg_dump -U username dbname &gt; dump.sql  Extract Schema Only      -s option  Extract Data Only      -a option  Generate DROP statements      -c option  Export OIDs      -o option  How to Restore  Use psql utility 
pg_dump Examples

	*  Extact both schema and data from postgres database:</description>
    </item>
    <item rdf:about="https://www.sqlines.com/postgresql/how-to/return_result_set_from_stored_procedure?rev=1599565438&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-09-08T11:43:58+00:00</dc:date>
        <title>PostgreSQL - How to Return a Result Set from a Stored Procedure</title>
        <link>https://www.sqlines.com/postgresql/how-to/return_result_set_from_stored_procedure?rev=1599565438&amp;do=diff</link>
        <description>Both stored procedures and user-defined functions are created with CREATE FUNCTION statement in PostgreSQL.


	*  PostgreSQL Stored Procedures and Functions - Getting Started


To return one or more result sets (cursors in terms of PostgreSQL), you have to use refcursor return type.</description>
    </item>
</rdf:RDF>
