Associative array in Pl/PgSQL

From: Karel Riveron Escobar <kescobar(at)estudiantes(dot)uci(dot)cu>
To: pgsql-general(at)postgresql(dot)org
Subject: Associative array in Pl/PgSQL
Date: 2013-05-04 23:40:48
Message-ID: 33a4e186-4f34-4b7b-94a3-3aa9eeecb3cf@ucimail4.uci.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello everyone,

I have a problem with Pl/PgSQL function. I need to pass it as parameter an associative array. I have no idea how to do that. C an s omebody help me?

To be more specific, I have an associative array in PHP. Something like this:

array(
'name' => 'Robert',
'age' => 24,
'teachers' => array(
array( 'name'=>'Sean'),
array('name'=>'Megan')
)
);

And, I need work with it into a Pl/PgSQL function. How can I do this?

Thanks in advance.

Regards, Karel Riverón
Student Scientific Council
Informatics Science University

http://www.uci.cu

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2013-05-04 23:44:23 Re: Simple SQL INSERT to avoid duplication failed: why?
Previous Message Yang Zhang 2013-05-03 20:53:10 Re: "Unlogged indexes"