Re: PL/pgSQL: SELECT INTO EXACT

From: Matt Miller <mattm(at)epx(dot)com>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: PL/pgSQL: SELECT INTO EXACT
Date: 2005-07-29 22:47:18
Message-ID: 1122677238.7396.35.camel@dbamm01-linux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> > The motivation is to come closer
> > to Oracle's SELECT INTO behavior: when SELECTing INTO scalar targets,
> > raise an exception and leave the targets untouched if the query does not
> > return exactly one row.

> why that is not the default behavior of the SELECT INTO?
> ...
> i mean, when you do that code you are expecting just one row from your
> query

I agree. I suppose I was fearful of breaking existing stuff, so I added
a new keyword.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-07-29 23:04:59 Re: Chocked
Previous Message Matt Miller 2005-07-29 22:43:13 Re: PL/pgSQL: SELECT INTO EXACT

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-07-30 02:26:19 Re: INSERT ... RETURNING
Previous Message Matt Miller 2005-07-29 22:43:13 Re: PL/pgSQL: SELECT INTO EXACT