pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: select into
Date: Wed, 22 Nov 2006 16:47:42 +0100
Message-ID: <20061122154742.GA28962@a-kretschmer.de> (raw)
In-Reply-To: <20061122082816.26958.qmail@web90504.mail.mud.yahoo.com>
References: <20061122082816.26958.qmail@web90504.mail.mud.yahoo.com>

am  Wed, dem 22.11.2006, um  0:28:15 -0800 mailte Mulham freshcode folgendes:
> Hi guys,
> 
>    Am new to sql scripting so this might be a stupid question. Am getting an
> error while trying to do the following
>  
> SELECT INTO svc_data_rec * from svc_tbl_name where 'uid' = sub_id;
> 
> where svc_data_rec is defined as record and svc_tbl_name is a varchar that
> holds the name of a table  and sub_id is another varchar. the error message is

You should rewrite your plpgsql-function. You can't handle with
string-vars in this way, you must create a string with your complete sql
and EXECUTE this string.

Read
http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-...


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



view thread (43+ messages)  latest in thread

Message-ID: <20061122154742.GA28962@a-kretschmer.de>
Permalink:  ../20061122154742.GA28962@a-kretschmer.de/
Also on:    postgresql.org/message-id/20061122154742.GA28962@a-kretschmer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: andreas.kretschmer@schollglas.com
  Subject: Re: select into
  In-Reply-To: <20061122154742.GA28962@a-kretschmer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox