Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)

Поиск
Список
Период
Сортировка
От Dan Cooperstock at Software4Nonprofits
Тема Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
Дата
Msg-id 00df01d30e4e$45c62d90$d15288b0$@software4nonprofits.com
обсуждение исходный текст
Ответ на Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)  (Karl Czajkowski <karlcz@isi.edu>)
Ответы Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
[GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
Список pgsql-general
No, Carl, when I created the sequence, I didn't put its name in double
quotes, so therefore its name wasn't being forced to stay upper case. So in
the nextval() command, putting it only in single quotes works - Postgres
converts both the original creation and the reference to it to lower case.

As I have mentioned in several replies, I have tested all of this code
directly in SQL statements and they work perfectly. It's only the
interaction with PowerBuilder that isn't working right, which is why I keep
saying that further answers from anyone that hasn't solved this problem of
using Postgres with PowerBuilder, and getting identity retrieval to work in
PowerBuilder, are not at this point worthwhile.

--------------------------------------------------------
Dan Cooperstock
DONATION and ACCOUNTS web site: http://www.Software4Nonprofits.com
Email: info@Software4Nonprofits.com
Phone: 416-423-7722
Mail: 57 Gledhill Ave., Toronto ON M4C 5K7, Canada

If you do not want to receive any further emails from Software4Nonprofits,
please reply to this email with the subject line "UNSUBSCRIBE", and we will
immediately remove you from our mailing list, if you are on it.


-----Original Message-----
From: Karl Czajkowski [mailto:karlcz@isi.edu]
Sent: August 5, 2017 8:25 PM
To: Dan Cooperstock at Software4Nonprofits <info@software4nonprofits.com>
Cc: 'Rob Sargent' <robjsargent@gmail.com>; 'Forums postgresql'
<pgsql-general@postgresql.org>
Subject: Re: PostgreSQL with PowerBuilder, and Identity keys (serials)


>   Select currval('GEN_&TableName')
>

From the above, I am assuming you did something like:

   CREATE SEQUENCE "GEN_&TableName" ...;

and are trying to access this sequence?  If so, you actually have to include
the SQL quoted identifier syntax within the text argument to
currval() or nextval(), e.g.

   SELECT nextval('"GEN_&TableName"');

With these sorts of identifier-as-argument parameters in Postgres, you can
also include schema-qualification syntax:

   SELECT nextval('"My Schema"."GEN_&TableName"');


Karl




В списке pgsql-general по дате отправления:

Предыдущее
От: Karl Czajkowski
Дата:
Сообщение: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
Следующее
От: Igor Korot
Дата:
Сообщение: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)