PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/postgree/pg.pl

http://cupsfilter.googlecode.com/
Perl | 27 lines | 14 code | 5 blank | 8 comment | 2 complexity | 88268cb276c97679e1c9ab606d2bdea7 MD5 | raw file
 1#!/usr/bin/perl
 2use DBI;
 3
 4# ??? ???? ??????
 5$dbname = "CupsLog";
 6# ??? ????????????
 7$username = "postgres";
 8# ??????
 9$password = "pg";
10# ??? ??? IP ????? ???????
11$dbhost = "localhost";
12# ????
13$dbport = "5432";
14# ?????
15$dboptions = "-e";
16# ????????
17$dbtty = "ansi";
18
19
20$dbh = DBI->connect("dbi:PgPP:dbname=$dbname;host=$dbhost;port=$dbport;options=$dboptions;tty=$dbtty","$username","$password",{PrintError => 0});
21
22if ($DBI::err != 0) {
23	print $DBI::errstr."\n";
24	exit($DBI::err);
25}
26
27$dbh->disconnect();