Multi-row insert using a Function

From: Michael Rowan <mike(dot)rowan(at)internode(dot)on(dot)net>
To: postgresql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Multi-row insert using a Function
Date: 2010-11-24 00:13:29
Message-ID: D2E3658A-9E47-42C8-80DB-FE72DC0824EE@internode.on.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Very new to Postgres and functions.

Using PostgreSQL 9 and pl/pgsql I wish to use a function to insert several rows into a table. The table has text and integer columns. Another function inserts a single row correctly, but I do not see how to arrange the data for the multiple row function. I assume it needs to be in an array, but I cannot find an example in the docs, and am darned if I can send it something acceptable.

Any example would help. Thanks.

Michael Rowan
mike(dot)rowan(at)internode(dot)on(dot)net

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message bakkiya 2010-11-24 04:41:25 Re: Could not open relation with OID (table partitioning issue?)
Previous Message Rob Richardson 2010-11-23 20:41:10 Re: Why won't this function loop?