External Tabular Data Via SQL - Mailing list pgsql-hackers

From David Fetter
Subject External Tabular Data Via SQL
Date
Msg-id 20041003222257.GB28559@fetter.org
Whole thread Raw
List pgsql-hackers
Kind people,

Please find enclosed an example of what I hope to make into a
generalized way of accessing external tabular data via SQL.

It is written in PL/PerlU for portability reasons, although it could
probably be re-written in C at the cost of some large amount of
effort.  It depends on having Proc::ProcessTable installed.

init_ps() makes a process_table_type using Proc::ProcessTable.
get_ps() takes no arguments and returns a setof process_table_type,
and can be joined to, for example, pg_stat_activity.

Many thanks and kudos to Andrew Dunstan for helping me figure out the
niggly details.

This should go into a new section of contrib/ like sql_utils or some
such.

Big TIA for any hints, tips or pointers, especially to things I've
missed here. :)

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

Attachment

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)
Next
From: Tom Lane
Date:
Subject: Re: Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)