Hi, I'm wondering if the plpgsql code:
PERFORM 1 FROM foo; IF FOUND THEN ... is any slower than: PERFORM 1 FROM foo LIMIT 1; IF FOUND THEN ... Seems like it _could_ be smart enough to know that 1) It's selecting from a real table and not a function 2) GET DIAGNOSTICS is not used and therefore it does not have to do more than set FOUND, and need find only one row/plan the query to find only one row. I'm particularly interested in the query plan optimization aspect. Would it be considered poor practice to rely on such an optimization? Thanks. Karl <[EMAIL PROTECTED]> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org