<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.janforman.com/lib/exe/css.php?s=feed" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>wiki.janforman.com gis</title>
    <subtitle></subtitle>
    <link rel="alternate" type="text/html" href="https://wiki.janforman.com/"/>
    <id>https://wiki.janforman.com/</id>
    <updated>2026-05-05T03:24:27+00:00</updated>
    <generator>FeedCreator 1.8 (info@mypapit.net)</generator>
    <link rel="self" type="application/atom+xml" href="https://wiki.janforman.com/feed.php" />
    <entry>
        <title>gis:postgis</title>
        <link rel="alternate" type="text/html" href="https://wiki.janforman.com/gis:postgis"/>
        <published>2022-05-06T11:50:05+00:00</published>
        <updated>2022-05-06T11:50:05+00:00</updated>
        <id>https://wiki.janforman.com/gis:postgis</id>
        <author>
            <name>Anonymous</name>
            <email>anonymous@undisclosed.example.com</email>
        </author>
        <category  term="gis" />
        <content>Add geometry with X,Y columns


ALTER TABLE your_table ADD COLUMN geom geometry(Point, 4326);
UPDATE your_table SET geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326);


Auto regenerate X,Y while inserting

PostgreSQL 12+


ALTER TABLE test ADD COLUMN geom geometry(Point,5514) GENERATED ALWAYS AS (ST_SetSRID(ST_MakePoint(jtsk_x, jtsk_y), 5514)) STORED</content>
        <summary>Add geometry with X,Y columns


ALTER TABLE your_table ADD COLUMN geom geometry(Point, 4326);
UPDATE your_table SET geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326);


Auto regenerate X,Y while inserting

PostgreSQL 12+


ALTER TABLE test ADD COLUMN geom geometry(Point,5514) GENERATED ALWAYS AS (ST_SetSRID(ST_MakePoint(jtsk_x, jtsk_y), 5514)) STORED</summary>
    </entry>
</feed>
