Re: pgplsql, how to save row variable to a table row

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pgplsql, how to save row variable to a table row
Date: 2008-03-26 12:26:14
Message-ID: 20080326122614.GN6870@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 26, 2008 at 01:14:07PM +0100, josep porres wrote:
> I've tried:
>
> EXECUTE 'INSERT INTO F2_TEMPFAC SELECT * FROM row_tempf';

I think that:

INSERT INTO f2_tempfac
SELECT (row_tempf).*;

should do what you want. Unless you're doing something very fancy you
don't want the execute either. You can just put normal SQL statements
in the code and they'll get run as normal, expanding variables when
needed.

Sam

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2008-03-26 12:27:26 Re: RULES and QUALIFICATION for INSERT
Previous Message Raymond O'Donnell 2008-03-26 12:19:44 Re: pgplsql, how to save row variable to a table row