How can I do "if exists" in pgplsql? - Mailing list pgsql-general

From adb
Subject How can I do "if exists" in pgplsql?
Date
Msg-id Pine.GSO.4.10.10101291054570.2561-100000@hairdini.beast.com
Whole thread Raw
Responses Re: How can I do "if exists" in pgplsql?  (Jan Wieck <janwieck@Yahoo.com>)
List pgsql-general
Is there a way for me inside a function
to do some conditional logic based on the existence of a row
like

if exists select userId from users where usrId = $1
    do something
else
    do something else

Thanks,

Alex.


pgsql-general by date:

Previous
From: "Felix König"
Date:
Subject: Re: Re: Trouble porting postgreSQL to WinNT
Next
From: Jan Wieck
Date:
Subject: Re: How can I do "if exists" in pgplsql?