Re: PSQL = Yes ... JDBC = no ??

2023-09-04 Thread Peter J. Holzer
On 2023-09-03 20:19:44 -0400, Amn Ojee Uw wrote: > I see now, any suggestions as work around in JDBC? Implement the functionality in Java. You could do it directly: execute SELECT 'CREATE DATABASE jme_test_database' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname =

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread Amn Ojee Uw
I see now, any suggestions as work around in JDBC? Thanks!! On 9/3/23 8:12 p.m., David G. Johnston wrote: On Sunday, September 3, 2023, Amn Ojee Uw wrote: Are you saying that JDBC cannot handle or process \gexec, since it is PG-15 exclusive? psql is a client application present in

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread David G. Johnston
On Sunday, September 3, 2023, Amn Ojee Uw wrote: > > Are you saying that JDBC cannot handle or process \gexec, since it is > PG-15 exclusive? > psql is a client application present in all versions of PostgreSQL. It has a bunch of features related to executing SQL queries. The stuff that it is

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread Adrian Klaver
On 9/3/23 15:25, Amn Ojee Uw wrote: PD: Are you saying that JDBC cannot handle or process \gexec, since it is PG-15 exclusive? I am saying \gexec is a command unique to the client program psql, it has no meaning outside of the program. In other words it is not an SQL command and JDBC

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread Maciek Sakrejda
On Sun, Sep 3, 2023, 16:25 Amn Ojee Uw wrote: > Are you saying that JDBC cannot handle or process \gexec, since it is > PG-15 exclusive? > JDBC cannot handle our process \gexec since it is _psql_ exclusive. It's a command interpreted and evaluated by that client specifically, not by the

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread Amn Ojee Uw
Thanks Adrian, I did read the link you suggested. I was had at the Introduction title, since it makes this mention "/Alternatively, input can be from a file or from command line arguments./" since the input would be from the back end of the database, as I am using Java DBC to access the

Re: PSQL = Yes ... JDBC = no ??

2023-09-03 Thread Adrian Klaver
On 9/3/23 09:00, Amn Ojee Uw wrote: Hello! This issue really puzzles me beyond intrigue. Why would this schema: *SELECT 'CREATE DATABASE jme_test_database' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'jme_test_database')\gexec* work when entered at the psql prompt, but not when

PSQL = Yes ... JDBC = no ??

2023-09-03 Thread Amn Ojee Uw
Hello! This issue really puzzles me beyond intrigue. Why would this schema: *SELECT 'CREATE DATABASE jme_test_database' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'jme_test_database')\gexec* work when entered at the psql prompt, but not when passed as a parameter in a JDBC