Личный кабинет
Укажите e-mail, на который будет выслан код восстановления пароля.
На указанный вами адрес e-mail был выслан код подтверждения аккаунта. Введите полученный код для продолжения:
Введите новый пароль два раза:
On 05/07/2018 08:11 PM, tango ward wrote: Sorry, accidentally pressed send. cur_p = conn_pr(cursor_factory=psycopg2.extras.DictCursor) cur_t = conn_t.cursor(cursor_factory=psycopg2.extras.DictCursor) cur_t.execute(""" SELECT TRANSLATE(snumber, ' ', '') FROM sprofile """) DictCursor is a hybrid dict/sequence. # This will result in KeyError for row in cur_t: print row['snumber'] Above you are using it as a dict and as David pointed you would need to use translate as the key: test=> select translate('test', '', ''); translate ----------- test # This works fine for row in cur_t: print row[0] Above you are using as a sequence, so the indexing works. Sorry again. I would really appreciate any suggestions. Thanks, J -- Adrian Klaveradrian.klaver@aklaver.com
Sorry, accidentally pressed send. cur_p = conn_pr(cursor_factory=psycopg2.extras.DictCursor) cur_t = conn_t.cursor(cursor_factory=psycopg2.extras.DictCursor) cur_t.execute(""" SELECT TRANSLATE(snumber, ' ', '') FROM sprofile """)
# This will result in KeyError for row in cur_t: print row['snumber']
# This works fine for row in cur_t: print row[0]
Sorry again. I would really appreciate any suggestions. Thanks, J
В списке pgsql-general по дате отправления: