Search Postgresql Archives

TABLEs to VIEWs with Perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#!/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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux