pgtopo_import(1)

πŸ“¦
version 3.6.4 Β· 2 versions
  • 3.6.4 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 3.3.2 Β· debian bookworm
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ pgtopo_import β€” postgis topology importer ✨

okay bestie, welcome to pgtopo_import, part of the PostGIS crew 🫢 this is the little loader that takes your topology out of the group chat and puts it back into the database. let's get into it πŸ’…


🌸 SYNTAX 🌸

pgtopo_import [options] topology

that's it, that's the whole vibe ✨


πŸ’– DESCRIPTION πŸ’–

so the pgtopo_import data loader reads an export file that was written by pgtopo_export πŸ‘‘ and then it spits out an SQL script that reconstructs the topology that's inside that file. literally that's its whole job. no cap. 🌈


πŸŽ€ USAGE πŸŽ€

the <topology> argument is the name you want to give to the re-created topology β€” and yes, it can be different from the name of the topology the export was originally made from. glow-up naming rights, you have them πŸ’…

by default the SQL script gets written on standard output. so it just comes out, streamed, no extra files, very main character energy ✨


πŸ’œ OPTIONS πŸ’œ

these are the supported options 🫢

note bestie: --skip-layers and --only-layers are mutually exclusive. pick one, not both, ok? 😭
  • --skip-layers β€” do not include layers in the output SQL script. just the topology schema. layers? not invited to this party πŸ™ˆ
  • --only-layers β€” do not include the topology schema in the output SQL script. just the layers. schema? not invited to this party πŸ¦‹
  • -f <filename> β€” read the export file from the specified filename, rather than from standard input. so instead of piping it in, you point at it πŸ“
  • -h β€” display usage information. the little help me out moment, iconic 🌸

⭐ EXAMPLES ⭐

an example session using the loader to create an SQL file and uploading it might look like this:

# pgtopo_import city_data < city_data.pgtopo_export | psql newdb

look at that pipe. chef's kiss. pgtopo_import makes the SQL, psql eats it into newdb. ate. πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

originally written by Sandro Santilli <strk@kbt.io> πŸ’–


🌈 SEE ALSO 🌈

more information is available at http://postgis.net 🧚


and that's the whole page, bestie!! this one came from the PostGIS source, and it's the pgtopo_import(1) page β€” go forth and reconstruct those topologies πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from