Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vq2Qy-0006no-SZ for pgsql-odbc@arkaria.postgresql.org; Mon, 09 Dec 2013 15:07:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vq2Qy-0004bE-C8 for pgsql-odbc@arkaria.postgresql.org; Mon, 09 Dec 2013 15:07:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vq2Qx-0004b8-Mp for pgsql-odbc@postgresql.org; Mon, 09 Dec 2013 15:07:43 +0000 Received: from 4glsol.com ([69.27.101.140]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vq2Qn-0003UC-Sj for pgsql-odbc@postgresql.org; Mon, 09 Dec 2013 15:07:42 +0000 Received: from cmr-208-124-135-50.cr.net.cable.rogers.com ([208.124.135.50]:4166 helo=mike) by cp1017.blacksun.ca with esmtpa (Exim 4.82) (envelope-from ) id 1Vq2Qf-003nZm-1K for pgsql-odbc@postgresql.org; Mon, 09 Dec 2013 09:07:25 -0600 From: "Mike Landl" To: Subject: Is this typical psqlodbc behavior? Date: Mon, 9 Dec 2013 10:07:15 -0500 Message-ID: <005c01cef4f0$5929e7d0$0b7db770$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005D_01CEF4C6.7053DFD0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac708FhJ4l0LTNYQTUWjq2nYgmfpZA== Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp1017.blacksun.ca X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - 4glsol.com X-Get-Message-Sender-Via: cp1017.blacksun.ca: authenticated_id: mlandl+4glsol.com/only user confirmed/virtual account not confirmed X-Source: X-Source-Args: X-Source-Dir: X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. ------=_NextPart_000_005D_01CEF4C6.7053DFD0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi there, I am trying to figure out if the behavior below is something that psqlodbc is doing automatically of if there is something else at play. The programming language I am using to access PostgreSQL is a high level 4th generation language called ProIV and I believe it is doing strange and/or unnecessary things behind the scenes. When I run a simple query (SELECT CUSTOMER_BILL_TO,CUSMS_BILL_NAME FROM CUS_MST WHERE CUSTOMER_BILL_TO='00000675';) against PostgreSQL the following shows up in the PostgreSQL log file: LOG: statement: SAVEPOINT _EXEC_SVP_0x1b42080 LOG: duration: 0.017 ms LOG: statement: select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid = 481563) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum LOG: duration: 2.487 ms LOG: statement: RELEASE _EXEC_SVP_0x1b42080 LOG: duration: 0.034 ms LOG: statement: PREPARE "_KEYSET_0x1af2180"(tid,tid) as SELECT CUSTOMER_BILL_TO,CUSMS_BILL_NAME , "ctid" FROM CUS_MST where ctid in ($1,$2) LOG: duration: 0.089 ms LOG: statement: SAVEPOINT _per_query_svp_;DEALLOCATE "_KEYSET_0x1af2180";RELEASE _per_query_svp_ LOG: duration: 0.027 ms LOG: statement: SAVEPOINT _per_query_svp_;select relhasoids, c.oid from pg_class c, pg_namespace n where relname = 'cus_mst' and nspname = 'public' and c.relnamespace = n.oid;RELEASE _per_query_svp_ LOG: duration: 0.180 ms LOG: statement: SAVEPOINT _per_query_svp_;select a.attname, a.atttypid from pg_index i, pg_attribute a where indrelid=481563 and indnatts=1 and indisunique and indexprs is null and indpred is null and i.indrelid = a.attrelid and a.attnum=i.indkey[0] and attnotnull and atttypid in (23, 26);RELEASE _per_query_svp_ LOG: duration: 0.246 ms LOG: statement: SELECT CUSTOMER_BILL_TO,CUSMS_BILL_NAME , "ctid" FROM CUS_MST WHERE CUSTOMER_BILL_TO='00000675' LOG: duration: 0.100 ms LOG: statement: SAVEPOINT _EXEC_SVP_0x1af2180 LOG: duration: 0.018 ms LOG: statement: select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid = 481563) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum LOG: duration: 2.412 ms LOG: statement: RELEASE _EXEC_SVP_0x1af2180 LOG: duration: 0.020 ms What I am wondering are 2 things: 1. Are the savepoints something that the odbc driver is automatically creating or could it be the programming language be adding additional things to my query? 2. Is the odbc driver automatically reading pg_class, pg_catalog, etc. or again, could it be the programming language adding additional queries behind the scenes? Thanks. Mike Landl 4GL Solutions 1020 Denison Street, Suite 101 Markham,ON L3R 3W5 Website: www.4glsol.com Phone: (905) 479-6727 Fax: (905) 479-1246 ------=_NextPart_000_005D_01CEF4C6.7053DFD0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi = there,

 

I am trying to figure out if the behavior below is = something that psqlodbc is doing automatically of if there is something = else at play.

The programming = language I am using to access PostgreSQL is a high level 4th = generation language called ProIV and I believe it is doing strange = and/or unnecessary things behind the scenes. When I run a simple query = (SELECT CUSTOMER_BILL_TO,CUSMS_BILL_NAME FROM CUS_MST WHERE = CUSTOMER_BILL_TO=3D'00000675';) against PostgreSQL the following shows = up in the PostgreSQL log file:

 

 

LOG:  = statement: SAVEPOINT _EXEC_SVP_0x1b42080

LOG:  duration: 0.017 ms

LOG:  statement: select n.nspname, c.relname, = a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, = a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, = d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, = t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join = pg_catalog.pg_namespace n on n.oid =3D c.relnamespace and c.oid =3D = 481563) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and = a.attnum > 0 and a.attrelid =3D c.oid) inner join pg_catalog.pg_type = t on t.oid =3D a.atttypid) left outer join pg_attrdef d on a.atthasdef = and d.adrelid =3D a.attrelid and d.adnum =3D a.attnum order by = n.nspname, c.relname, attnum

LOG:  duration: 2.487 ms

LOG:  statement: RELEASE = _EXEC_SVP_0x1b42080

LOG:  = duration: 0.034 ms

LOG:  = statement: PREPARE "_KEYSET_0x1af2180"(tid,tid) as SELECT = CUSTOMER_BILL_TO,CUSMS_BILL_NAME , "ctid" FROM CUS_MST  = where ctid in ($1,$2)

LOG:  = duration: 0.089 ms

LOG:  = statement: SAVEPOINT _per_query_svp_;DEALLOCATE = "_KEYSET_0x1af2180";RELEASE _per_query_svp_

LOG:  duration: 0.027 ms

LOG:  statement: SAVEPOINT _per_query_svp_;select = relhasoids, c.oid from pg_class c, pg_namespace n where relname =3D = 'cus_mst' and nspname =3D 'public' and c.relnamespace =3D n.oid;RELEASE = _per_query_svp_

LOG:  duration: = 0.180 ms

LOG:  statement: = SAVEPOINT _per_query_svp_;select a.attname, a.atttypid from pg_index i, = pg_attribute a where indrelid=3D481563 and indnatts=3D1 and indisunique = and indexprs is null and indpred is null and i.indrelid =3D a.attrelid = and a.attnum=3Di.indkey[0] and attnotnull and atttypid in (23, = 26);RELEASE _per_query_svp_

LOG:  duration: 0.246 ms

LOG:  statement: SELECT = CUSTOMER_BILL_TO,CUSMS_BILL_NAME , "ctid" FROM CUS_MST WHERE = CUSTOMER_BILL_TO=3D'00000675'

LOG:  duration: 0.100 ms

LOG:  statement: SAVEPOINT = _EXEC_SVP_0x1af2180

LOG:  = duration: 0.018 ms

LOG:  = statement: select n.nspname, c.relname, a.attname, a.atttypid, = t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, = c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when = 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from = (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = =3D c.relnamespace and c.oid =3D 481563) inner join = pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 = and a.attrelid =3D c.oid) inner join pg_catalog.pg_type t on t.oid =3D = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = =3D a.attrelid and d.adnum =3D a.attnum order by n.nspname, c.relname, = attnum

LOG:  duration: 2.412 = ms

LOG:  statement: RELEASE = _EXEC_SVP_0x1af2180

LOG:  = duration: 0.020 ms

 

 

What I am = wondering are 2 things:

1.       Are = the savepoints something that the odbc driver is automatically creating = or could it be the programming language be adding additional things to = my query?

2.       Is = the odbc driver automatically reading pg_class, pg_catalog, etc. or = again, could it be the programming language adding additional queries = behind the scenes?

 

Thanks.

 

 

Mike = Landl

4GL = Solutions

1020 Denison = Street, Suite 101

Markham,ON = L3R 3W5

 

Website: www.4glsol.com

Phone: &= nbsp;  (905) 479-6727

Fax: &nb= sp;      (905) 479-1246

 

------=_NextPart_000_005D_01CEF4C6.7053DFD0--