Arrays and FFTW

From: Alessandro Baretta <alex(at)baretta(dot)com>
To: PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Arrays and FFTW
Date: 2002-07-19 19:23:45
Message-ID: 3D386741.7030500@baretta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is a repost. I originally posted to the novice list,
but it seems to be a very low traffic list, and no one seems
to have noticed my message. Then I posted to the General
List, where I was kindly advised to try the hackers list. So
here I am.
------------------------------------------------------------

Hello! I'm a PGSQL newbie. I have installed postgres only a
few days ago in the attempt to use it to solve a specific
problem.

I am using (trying to...) PGSQL to store a database of
digital signals. Each signal is a sequence of (signal_id,
timestamp, double) tuples. I've managed to write resampling
alogrithms in pl/pgsql, and I don't think it would be hard
to write autoregressive filters. However, now I'm confronted
with the need to compute the power spectra of my signals. I
would like to use FFTW, which is lightning fast on my
machine. Has anyone already written FFTW bindings for
PostgreSQL?

If I have to write the code myself, I would need to create a
database function calling code from a C module. Such code
would have to operate on real and complex float arrays. I
understand how I could use a pl/pgsql function to create a
new table where each signal is stored as a (signal_id,
double array) tuple, but how am I supposed to pass such
arrays to a C function? How are postgres arrays actually
implemented in memory? In short, I need someone to get me
started on writing an FFTW binding for pgsql, in none is
already available.

Thank you in advance for any help you can give me. And
double thumbs up to the developers: running PostgreSQL for
the first time is an epiphanic experience. I want to study
the ins and outs of it rapidly so that, hopefully, in a
while, I will be able to contribute to the pgsql project.

Alex Baretta

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2002-07-19 20:17:52 Re: prepareable statements
Previous Message Tom Lane 2002-07-19 17:28:29 Re: preserving statistics settings