This is a multi-part message in MIME format.
------=_NextPart_000_0003_01C8E27B.52D53B60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello
If you use Perl (like me) I have made a very nice set of small programs =
to access any database, any table and add, change or delete data.
I like it better than using Webmin or PgAdmin because I can easily =
customize the screens.
To get all database names and encoding:
my $dbh =3D DBI->connect("dbi:Pg:dbname=3Dtemplate1", "postgres", =
"postgres");
my $select =3D $dbh->selectall_arrayref("select datname,encoding from =
pg_database ORDER BY datname ") or die $DBI::errstr;
To get all tables in a base:
my $dbh =3D DBI->connect("dbi:Pg:dbname=3D$base", "postgres", =
"postgres");
my @[EMAIL PROTECTED]
=3D $dbh->tables('');=20
To get the field names in a table (nice for updates):
my @[EMAIL PROTECTED]
=3D @[EMAIL PROTECTED]
>{'NAME'}};=20
my @[EMAIL PROTECTED]
=3D @[EMAIL PROTECTED]
>{'TYPE'}};=20
Hope somebody can use them
------=_NextPart_000_0003_01C8E27B.52D53B60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If you use Perl (like me) I have made a =
very nice=20
set of small programs to access any database, any table and add, =
change or=20
delete data.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I like it better than using Webmin or =
PgAdmin=20
because I can easily customize the screens.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>To get all database names and=20
encoding:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my $dbh =3D=20
DBI->connect("dbi:Pg:dbname=3Dtemplate1", "postgres", =
"postgres");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my $select =3D =
$dbh->selectall_arrayref("select=20
datname,encoding from pg_database ORDER BY datname ") or die=20
$DBI::errstr;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>To get all tables in a =
base:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my $dbh =3D =
DBI->connect("dbi:Pg:dbname=3D$base",=20
"postgres", "postgres");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my @[EMAIL PROTECTED]
=3D=20
$dbh->tables('');</FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>To get the field names in a table (nice =
for=20
updates):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my @[EMAIL PROTECTED]
=3D @[EMAIL PROTECTED]
'NAME'}}; =
<BR>my=20
@[EMAIL PROTECTED]
=3D @[EMAIL PROTECTED]
'TYPE'}}; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hope somebody can use them</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0003_01C8E27B.52D53B60--


|