Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPtyA-0008Ch-JJ for pgsql-interfaces@arkaria.postgresql.org; Tue, 27 Jun 2017 17:08:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dPtyA-0003kV-2f for pgsql-interfaces@arkaria.postgresql.org; Tue, 27 Jun 2017 17:08:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dPty7-0003gV-Au for pgsql-interfaces@postgresql.org; Tue, 27 Jun 2017 17:08:03 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dPty4-0006ZY-Lt for pgsql-interfaces@postgresql.org; Tue, 27 Jun 2017 17:08:02 +0000 Received: by mail-wm0-x232.google.com with SMTP id 62so30696677wmw.1 for ; Tue, 27 Jun 2017 10:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=yY+UOFiCugJNEhMtvGKpf5u4HBe9xiM5d5h9bqAmXS8=; b=j09LGStRkgMeIpqhWdZy8gqF1aBOo+pHcgozbyt7/w/jKkwU9s0nhjtiSNFUaB0taC oX+NGPg1Q3YQQBR/dRFDLTmR4uotEoLyUGuLjQ5MFm1wU4ytVKEU6kPPaInnVtzXA64o WuMmR9PE8eDCn9Im8JmoUDCZBbX+N//W3vHhkwmZyK/NLJyV8xsdy6urHiOtfzjQlMf7 v6UdGrXz0Kwsg57sFBSH5ei+CDAtxGFB8KD8OmoLRK9r5ZAbcA/UKD5Y0Q4lEnOeyTZT SalH+yY0gUS3JXZhXtV9aRHL2ao7JZLk3lhHmoMm7PBYAEPoUTSrIKMarzN9rscJn8pX lRzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yY+UOFiCugJNEhMtvGKpf5u4HBe9xiM5d5h9bqAmXS8=; b=NASrHdJ49n1u9uLCcpOEt1Tt16Li9i+SNlonEhoVQA1/wBsZbrs+CDbpDoWFeYfBIW x9Voe3A6YFna2Tzf7UWBlBN18GbQtueOQeTIBgfJ1+p+0r8LXCvcVkMDWlMFyfg/9suo RmWRgxfaZUA3PmyjyazrwWUosQwVARZ1mZDEdrVKxl+OaRwbvezu+DX/ivvSDjNeDS/I QORUcU9Bk6HSoc4RGP7XRVlOabnncuSWmfTQWx/UwYzSMe0IFqhCl9P/swrX3YV9bESS 74fCcn3C5PWHdFpLEDicEP5FKavUVgCC4pbeQzvO3W6YCoM5iJuK8pDJ8/88Isyj/N5u 117Q== X-Gm-Message-State: AKS2vOy9ZCgVuF3GR5d739DyNW9lcnI+j95QcbqZLNld6tt2QhRkZKhd rvZDIsMSQpCdMLHIccmEmuQytOpvbW7N6Jo= X-Received: by 10.28.133.3 with SMTP id h3mr4309002wmd.77.1498583278349; Tue, 27 Jun 2017 10:07:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.146.129 with HTTP; Tue, 27 Jun 2017 10:07:57 -0700 (PDT) From: Wei Shan Date: Tue, 27 Jun 2017 18:07:57 +0100 Message-ID: Subject: Questions on Cursors in PostgreSQL To: pgsql-interfaces@postgresql.org Content-Type: multipart/alternative; boundary="001a11442c2af8f4f90552f41b24" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org --001a11442c2af8f4f90552f41b24 Content-Type: text/plain; charset="UTF-8" Hi all, I have some questions on PostgreSQL cursors (not PL/pgSQL but the libpq implementation): 1. What happens when my cursor hit the end of the table? Does it close automatically? I suppose if I declare it as a SCROLLABLE cursor, it should not close at all. 2. If I have declared a cursor and the session got disconnected, can I reattach back to the cursor if I know the cursor name? I believe this is not possible but I'm not very sure. Thanks! -- Regards, Ang Wei Shan --001a11442c2af8f4f90552f41b24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

I have some questions on Postgr= eSQL cursors (not PL/pgSQL but the libpq implementation):=C2=A0
<= br>
  1. What happens when my cursor hit the end of the table?= Does it close automatically? I suppose if I declare it as a SCROLLABLE cur= sor, it should not close at all.
  2. If I have declared a cursor and th= e session got disconnected, can I reattach back to the cursor if I know the= cursor name? I believe this is not possible but I'm not very sure.
Thanks!

--
Regards,
Ang Wei Shan
--001a11442c2af8f4f90552f41b24--