array as arguments of pg functions and php

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема array as arguments of pg functions and php
Дата
Msg-id 20080103143120.491ccdf1@webthatworks.it
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Sebastián Baioni
Дата:
Сообщение: Re: Can't make backup
Следующее
От: Tomasz Ostrowski
Дата:
Сообщение: Re: basic questions: Postgres with yum on CentOS 5.1