pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feeddatabase abstraction -> functions
2+ messages / 2 participants
[nested] [flat]
* database abstraction -> functions
@ 2002-09-24 07:45 Jeroen Olthof <j.olthof@millipede.nl>
0 siblings, 1 reply; 2+ messages in thread
From: Jeroen Olthof @ 2002-09-24 07:45 UTC (permalink / raw)
To: pgsql-general@postgresql.org; pgsql-sql
Hi,
When developing applications is a good thing to create abstraction between
different layers
The one concerning the database would be the persistence layer. To create
such abstraction I want all mij datababase activitie runned through
functions. But how can I return a set of rows instead of a single datatype
(I looked into the setof but never found a clear simple)?
kind regards
Jeroen Olthof
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: database abstraction -> functions
@ 2002-09-25 14:03 Dmitry Tkach <dmitry@openratings.com>
parent: Jeroen Olthof <j.olthof@millipede.nl>
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Tkach @ 2002-09-25 14:03 UTC (permalink / raw)
To: Jeroen Olthof <j.olthof@millipede.nl>
Jeroen Olthof wrote:
> Hi,
>
> When developing applications is a good thing to create abstraction between
> different layers
> The one concerning the database would be the persistence layer. To create
> such abstraction I want all mij datababase activitie runned through
> functions. But how can I return a set of rows instead of a single datatype
> (I looked into the setof but never found a clear simple)?
>
A very simple answer - there is no way to do what you want :-(
They promise to have it in 7.3...
I am using a workaround, where my functions glue all the columns together into a pipe-separated
line, that I then parse back into columns in my application...
Also, note that, unless your functions are in C (anything like plpgsql, or just sql), they are slow like hell...
In that case, you are much better off implementing your abstraction layer through views...
Dima
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-09-25 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-24 07:45 database abstraction -> functions Jeroen Olthof <j.olthof@millipede.nl>
2002-09-25 14:03 ` Dmitry Tkach <dmitry@openratings.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox