table functions - Mailing list pgsql-general

From Eric B.Ridge
Subject table functions
Date
Msg-id 088C7724-0B38-11D7-A9FB-0003930C70D8@tcdi.com
Whole thread Raw
In response to functions + shared libraries  (Eric B.Ridge <ebr@tcdi.com>)
Responses Re: table functions  (Joe Conway <mail@joeconway.com>)
Re: table functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
First, let me say that table functions are really cool!

Let's say I've defined a table function named: myTableFunc() (written
in C), and that I do this:

    select a, b, c
       from myTableFunc() as foo (a integer, b varchar(255), c text)
    where a = 2;

Is it possible for me to get the FROM, WHERE, and AS ... clauses from
within my table function code?  I'd like to do this so my table
function can be a little smarter about what it does and what it returns.

Also, in psql, if I press ^C while a table function is executing, the
function doesn't actually stop, but psql does say "Cancel request
sent".   What processes this request?  How do I tell postgres that I
want to be notified too?

thanks again!

eric


pgsql-general by date:

Previous
From: Eric B.Ridge
Date:
Subject: functions + shared libraries
Next
From: suresh s
Date:
Subject: problem startting postgresql