Howdy:

With the PostgreSQL DBI, you can get a 
number of tuples (with ntuples) from 
some previously SQL query.

For example, I have :

[snip]
use Pg;
.
.
.
sub getcols {
    my($table)[EMAIL PROTECTED];
return doquery('find rows',"
SELECT   a1.attname, 
a1.attnotnull, 
a1.attnum, 
t.typname, 
a1.attlen, 
a1.atttypmo
d, c1.relkind
FROM     pg_class c1,
         pg_attribute a1,
         pg_type t
WHERE    c1.relname='$table'
         and a1.attnum > 0
         and a1.attrelid = c1.oid
         and a1.atttypid = t.oid
ORDER BY upper(attname);
");

}

#--------------- GET THE SOURCE TABLE'S VARIABLES
$source=&getcols($opt_s);
if ( $source->ntuples==0 ) {
        print STDERR "Source table $opt_s not found\n";
        exit 1;
}
[/snip]

Where when I bring down the results from &getcols($opt_s),
the docs on the PostgreSQL site says ntuples counts
the rows for you.

My question:  Is there an Oracle version of 'ntuples'?
I don't see any reference of this in the Perl DBI book.

Thanks in advance!


-X

Reply via email to