| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Wojciech Strzaka <wojtek_strzalka(at)interia(dot)pl> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: PL/pgSQL | 
| Date: | 2002-10-04 15:15:54 | 
| Message-ID: | 200210041515.g94FFsu03120@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Wojciech Strza?ka wrote:
> i've got a simple plsql function and this line is wrong:
> 
>    EXECUTE ''SELECT INTO lp MAX('' || column || '') AS MX FROM '' || table
> || '';'';
> 
> with error message:
> 
> "parse error at or near 'INTO' "
> 
> it seems like it don't recognize SELECT INTO - but what's wrong?
In PL/pgSQL, you have to use CREATE TABLE ... AS because INTO has
another meaning in PL/pgSQL.
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Justin Clift | 2002-10-04 15:21:11 | Re: PostgreSQL Website : advocacy.postgresql.org | 
| Previous Message | Bruce Momjian | 2002-10-04 15:14:36 | Re: Rows ordered |