array as arguments of pg functions and php - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject array as arguments of pg functions and php
Date
Msg-id 20080103143120.491ccdf1@webthatworks.it
Whole thread Raw
List pgsql-general
I've read through some solutions proposed on ml, blogs etc... but
maybe something changed or someone came up with a better idea or just
I wasn't able to find a satisfactory solution through google...

Of course PHP arrays can't be passed directly to pg functions so:

I can:
1) write a php function that prepare the array as a string with
proper escaping
2) pass a text string and "number of elements" and let the pg
function parse the text
3) create a temp table and pass it to the function (?)

Can anything be done with prepared statement and pg_execute?
Can pg functions accept variable number of arguments?

I'm going to go with 1) but well it would be nice if I discover
something nicer.

thx

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: Sebastián Baioni
Date:
Subject: Re: Can't make backup
Next
From: Tomasz Ostrowski
Date:
Subject: Re: basic questions: Postgres with yum on CentOS 5.1