Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials) - Mailing list pgsql-general

From Igor Korot
Subject Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
Date
Msg-id CA+FnnTyv8nE8bTaQo3ai=k_RhV2Pzoh_4L6CUTb_Xzx29o+S=Q@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)  ("Dan Cooperstock at Software4Nonprofits" <info@software4nonprofits.com>)
List pgsql-general
Hi, Dan,

On Sat, Aug 5, 2017 at 8:52 PM, Dan Cooperstock at Software4Nonprofits
<info@software4nonprofits.com> wrote:
> 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.

Do you have this DW inside some Window object?
Further do you have those queey in responce to an event for DW or Window?
If yes - what kind?

Can you post a complete script? You can do a PM if anything.
I didn't work with PB + PG, but I do have some PB knowledge...

Thank you.

>
> --------------------------------------------------------
> 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
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: "Dan Cooperstock at Software4Nonprofits"
Date:
Subject: Re: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)
Next
From: "David G. Johnston"
Date:
Subject: [GENERAL] PostgreSQL with PowerBuilder, and Identity keys (serials)