On 10/22/15 8:52 PM, Dane Foster wrote:
It just occurred to me that another option, for my specific example,
would be to record/cache FOUND instead of testing the RECORD variable
for its NULLness. Unless of course assigning FOUND to a variable is a
pass-by-reference assignment, which in the
2015-10-23 18:05 GMT+02:00 Jim Nasby :
> On 10/22/15 8:52 PM, Dane Foster wrote:
>
>> It just occurred to me that another option, for my specific example,
>> would be to record/cache FOUND instead of testing the RECORD variable
>> for its NULLness. Unless of course
On 10/21/15 9:32 PM, Dane Foster wrote:
"If STRICT is not specified in the INTO clause, then target will be
set to the first row returned by the query, or to nulls if the query
returned no rows."
​Foot removed from mouth.
Note however that there's some unexpected things when
On Thu, Oct 22, 2015 at 2:00 PM, Jim Nasby wrote:
> On 10/21/15 9:32 PM, Dane Foster wrote:
>
>> "If STRICT is not specified in the INTO clause, then target will be
>> set to the first row returned by the query, or to nulls if the query
>> returned no rows."
On Fri, Oct 23, 2015 at 12:33 PM, Dane Foster wrote:
> On Thu, Oct 22, 2015 at 6:54 PM, Thomas Munro
> wrote:
>>
>> On Fri, Oct 23, 2015 at 10:27 AM, Dane Foster wrote:
>> > On Thu, Oct 22, 2015 at 2:00 PM, Jim Nasby
On Thu, Oct 22, 2015 at 6:54 PM, Thomas Munro wrote:
> On Fri, Oct 23, 2015 at 10:27 AM, Dane Foster wrote:
> > On Thu, Oct 22, 2015 at 2:00 PM, Jim Nasby
> wrote:
> >> On 10/21/15 9:32 PM, Dane Foster wrote:
> >>>
On Fri, Oct 23, 2015 at 10:27 AM, Dane Foster wrote:
> On Thu, Oct 22, 2015 at 2:00 PM, Jim Nasby wrote:
>> On 10/21/15 9:32 PM, Dane Foster wrote:
>>>
>>> "If STRICT is not specified in the INTO clause, then target will be
>>> set to the
On Thu, Oct 22, 2015 at 9:15 PM, Thomas Munro wrote:
> On Fri, Oct 23, 2015 at 12:33 PM, Dane Foster wrote:
> > On Thu, Oct 22, 2015 at 6:54 PM, Thomas Munro
> > wrote:
> >>
> >> On Fri, Oct 23, 2015 at 10:27
I wrote the following simple function to try to learn what happens to a
DECLAREd variable whose assignment comes from an INTO statement where the
query being executed does not return a result.
CREATE OR REPLACE FUNCTION _test() RETURNS BOOLEAN AS $$
DECLARE r RECORD;
BEGIN SELECT 1 AS one INTO r
On Thu, Oct 22, 2015 at 2:48 PM, Dane Foster wrote:
> I wrote the following simple function to try to learn what happens to a
> DECLAREd variable whose assignment comes from an INTO statement where the
> query being executed does not return a result.
>
> CREATE OR REPLACE
On Wed, Oct 21, 2015 at 10:23 PM, Thomas Munro <
thomas.mu...@enterprisedb.com> wrote:
> On Thu, Oct 22, 2015 at 2:48 PM, Dane Foster wrote:
> > I wrote the following simple function to try to learn what happens to a
> > DECLAREd variable whose assignment comes from an INTO
Doesn't the following allow a race condition?
declare foo record;
begin
select into foo * from overview...
if not found
insert...
else ...
end if;
end;
ISTM 2 or more clients could attempt to insert the same row, based on the select
failing, if all were issued at the same time. I've
On Fri, Oct 27, 2000 at 02:32:28PM -0700, Warren Vanichuk wrote:
Greetings.
I am writting up a function in PL/pgSQL to automate a couple of multi-table
updates, and I have a question.
I need to check to see if the data is already in the database, and if it is,
perform and update, or if
Greetings.
I am writting up a function in PL/pgSQL to automate a couple of multi-table
updates, and I have a question.
I need to check to see if the data is already in the database, and if it is,
perform and update, or if it's not, perform an insert. The lookup is
against a primary key, so I
On Fri, 27 Oct 2000, Warren Vanichuk wrote:
Greetings.
I am writting up a function in PL/pgSQL to automate a couple of multi-table
updates, and I have a question.
I need to check to see if the data is already in the database, and if it is,
perform and update, or if it's not, perform
15 matches
Mail list logo