4 ms·
https://github.com/TriangleCommunications/reorder-table-columns https://github.com/TriangleCommunications/reorder-table-colu...
by wcorrales 4y ago
https://github.com/TriangleCommunications/reorder-table-columns https://github.com/TriangleCommunications/reorder-table-colu...
- sargstuff 4y agoReviewing database normal forms might be helpful/useful. [1] Non-postgress, old school method: 1) Dump table data to ascii delimited file. 2) Use awk/gawk to re-arrange columns in ascii delimited file. 3) drop old data table. 4) create new data table to upload the awk/gawk data generated in #2. 5) upload awk/gawk data from #2. -------- google translate might be helpful : https://translate.google.com/ https://translate.google.com/ [1] : https://www.geeksforgeeks.org/first-normal-form-1nf/?ref=lbp https://www.geeksforgeeks.org/first-normal-form-1nf/?ref=lbp few other related links, as some things get lost when translating between languages. https://www.linkedin.com/learning/programming-foundations-databases-2/normalization-2 https://www.linkedin.com/learning/programming-foundations-da... https://www.cs.dartmouth.edu/~cs61/Resources/Papers/CACM%20Kent%20Five%20Normal%20Forms.pdf https://www.cs.dartmouth.edu/~cs61/Resources/Papers/CACM%20K... https://www.i-programmer.info/babbages-bag/292-codd-and-his-rules.html?start=1 https://www.i-programmer.info/babbages-bag/292-codd-and-his-...
- HNBRN 4y agoThanks, we could definitely start from this
- sargstuff 4y agoresources: awk: the power and promis of a 40 yr old language (2021) : https://www.fosslife.org/awk-power-and-promise-40-year-old-language https://www.fosslife.org/awk-power-and-promise-40-year-old-l... Gawk: Effective AWK programming https://www.gnu.org/software/gawk/manual/ https://www.gnu.org/software/gawk/manual/ gawk-psql : pgsql extension of GNU awk : https://gawkextlib.sourceforge.net/pgsql/pgsql.html https://gawkextlib.sourceforge.net/pgsql/pgsql.html gawkextlib : http://shouce.jb51.net/gawk/gawkextlib.html http://shouce.jb51.net/gawk/gawkextlib.html gawk libraries for XML, PostgreSQL : https://osdn.net/projects/sfnet_gawkextlib/ https://osdn.net/projects/sfnet_gawkextlib/ psql : https://www.tutorialspoint.com/unix_commands/psql.htm https://www.tutorialspoint.com/unix_commands/psql.htm postgresql copy from program : https://stackoverflow.com/questions/62254888/using-awk-and-postgresqls-copy-from-program-together https://stackoverflow.com/questions/62254888/using-awk-and-p... user-defined modules to postgres : https://www.highgo.ca/2019/10/01/a-guide-to-create-user-defined-extension-modules-to-postgres/ https://www.highgo.ca/2019/10/01/a-guide-to-create-user-defi...