C++-Language Function/Process List

From: Kelly Burkhart <kelly(at)tradebotsystems(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: C++-Language Function/Process List
Date: 2005-05-23 14:13:00
Message-ID: 1116857580.32520.60.camel@krb06
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've written a simple function to return a list of processes running on
the server. The function uses the Linux /proc filesystem, so is not
portable. Usage is like this:

tradebot01@ [local] => select * from tb_ps() where command like
'%post%';
pid | username | command
-------+----------+------------------------------------------------
3597 | root | /usr/lib/postfix/master
23671 | postgres | /usr/bin/postmaster -i -D /var/lib/pgsql/data
23677 | postgres | postgres: stats buffer process
23678 | postgres | postgres: stats collector process
23738 | postgres | postgres: tradebot tradebot01 [local]: SELECT
(5 rows)

I used C++ and noticed that some Postgres headers contain C++ keywords.
Is there any interest among PG developers in making the C-language
interface C++ clean? Or, is there hostility to this idea?

-K

Attachment Content-Type Size
tb_ps.cpp text/x-c++ 6.8 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick.FICHE 2005-05-23 14:22:37 Re: How to recover from : "Cache lookup failed for rela
Previous Message Howard Cole 2005-05-23 14:09:14 Re: Postgresql .NET Data Provider for Visual Studio 2005