You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro steps. Create schema as outlined below. then execute couple of statements through nzsql - 1st will fail, while 2nd will succeed.
DEV.ADMIN(ADMIN)=> create table t1(c1 int, c2 varchar(10)); CREATE TABLE DEV.ADMIN(ADMIN)=> insert into t1 values(1, 'one'); INSERT 0 1 DEV.ADMIN(ADMIN)=> select * from t1;
C1 | C2
----+-----
1 | one
(1 row)
DEV.ADMIN(ADMIN)=> select c3 from t1;
ERROR: Attribute 'C3' not found
DEV.ADMIN(ADMIN)=> select c2 from t1;
C2
-----
one
(1 row)
However, when executing these 2 statements in the same order via nzpy, the same error displayed twice. Here is the code sample and the output:
import nzpy
con = nzpy.connect(user='admin', password='password', port=5480, database='dev')
cur = con.cursor()
stmts = [
"select c2 from t1",
"select c3 from t1",
]
for i, s in enumerate(stmts, 1):
try:
cur.execute(s)
out = cur.fetchall()
except Exception as e:
print("I={}; Error={}".format(i, str(e)))
cur.close()
Output:
/workspaces/elog/main/src/tests/json> python3 testCon.py
I=1; Error=ERROR: Attribute 'C3' not found
I=2; Error=ERROR: Attribute 'C3' not found
The text was updated successfully, but these errors were encountered:
Repro steps. Create schema as outlined below. then execute couple of statements through nzsql - 1st will fail, while 2nd will succeed.
However, when executing these 2 statements in the same order via nzpy, the same error displayed twice. Here is the code sample and the output:
The text was updated successfully, but these errors were encountered: