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

Поиск
Список
Период
Сортировка
От Karl Czajkowski
Тема Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
Дата
Msg-id 20170806002502.GA11648@moraine.isi.edu
обсуждение исходный текст
Ответ на Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)  ("Dan Cooperstock at Software4Nonprofits" <info@software4nonprofits.com>)
Ответы Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)  ("Dan Cooperstock at Software4Nonprofits" <info@software4nonprofits.com>)
Список pgsql-general
>   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 по дате отправления:

Предыдущее
От: Rick Widmer
Дата:
Сообщение: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys(serials)
Следующее
От: "Dan Cooperstock at Software4Nonprofits"
Дата:
Сообщение: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)