TABLEs to VIEWs with Perl - Mailing list pgsql-general

From Justin Tocci
Subject TABLEs to VIEWs with Perl
Date
Msg-id 38F8A304-34D7-416A-853F-1B345B7BDF6F@tocci.org
Whole thread Raw
List pgsql-general
#!/usr/bin/perl -w
use strict;

# This program turns text files with TABLE definitions
#      clipped from PGADMIN into VIEWs with a pre-pended 't'.
#
# All VIEWs get a full set of rules and permissions and assume the first column is the primary key.
# To use:
# put this script into a text file and save it.
# make it executable: chmod a+x viewsfromtable.pl
# Adjust the INFILE and FINAL directories for your system
# put your TABLE files, one TABLE per file into the INFILE directory.
# To run: ./viewsfromtable.pl fileone.txt filetwo.txt
# Output is appended to view.sql file in FINAL directory

I tried to post the program and got denied for size. Its 72 lines.

Is there an appropriate place to post such a thing?

justin tocci
fort worth, texas


pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: [JDBC] Storing/Using Passwords
Next
From: "Jan Sunavec"
Date:
Subject: Count and Results together