Re: Nu-B here

2023-07-19 Thread Alban Hertroys
> On 20 Jul 2023, at 02:36, Amn Ojee Uw wrote: > > After this command 'sudo -u postgres psql' > I get this message : > could not change directory to "/home/my_account": Permission denied What’s the reason that you’re using the OS user postgres? If you’re simply trying to connect to the datab

Postgres SQL

2023-07-19 Thread Anthony Apollis
Hi What list can i post sql related errors etc?

Re: My 1st JDBC and PostgreSQL

2023-07-19 Thread Jeffrey Walton
On Wed, Jul 19, 2023 at 8:37 PM Amn Ojee Uw wrote: > > Following the example in : > https://www.tutorialspoint.com/postgresql/postgresql_java.htm > I wrote the bellow method : > > public void connectToDatabase() throws ClassNotFoundException, > SQLException { > try { > this.p

Re: My 1st JDBC and PostgreSQL

2023-07-19 Thread Chuck Davis
Postgresql is a sophisticated database server. You can do what you're attempting with something like Derby at the connection. But with Postgresql "you get what you pay for". 1) Insall Postgresql 2) start the database 3) use the interface app psql to create a database; 4) load the JDBC driver in y

Re: My 1st JDBC and PostgreSQL

2023-07-19 Thread Tom Lane
Amn Ojee Uw writes: > https://www.tutorialspoint.com/postgresql/postgresql_java.htm > In reference to the above web page, it reads : > The following Java code shows how to connect to an existing database. If > the database does not exist, then it will be created and finally a > database object w

Re: Nu-B here

2023-07-19 Thread Maciek Sakrejda
On Wed, Jul 19, 2023, 17:36 Amn Ojee Uw wrote: > After this command 'sudo -u postgres psql' > I get this message : > *could not change directory to "/home/my_account": Permission denied* > *psql (12.15 (Debian 12.15-1.pgdg120+1))* > *Type "help" for help.* > > I tried using help, but to no avail.

Re: Nu-B here

2023-07-19 Thread Tom Lane
Amn Ojee Uw writes: > After this command 'sudo -u postgres psql' > I get this message : > *could not change directory to "/home/my_account": Permission denied** > **psql (12.15 (Debian 12.15-1.pgdg120+1))** > **Type "help" for help.* This is normal if you launch psql via "sudo -u postgres" in a d

My 1st JDBC and PostgreSQL

2023-07-19 Thread Amn Ojee Uw
Following the example in : https://www.tutorialspoint.com/postgresql/postgresql_java.htm I wrote the bellow method : public void connectToDatabase() throws ClassNotFoundException, SQLException {     try {     this.perr(this.getDatabaseClass()); // org.postgresql.Driver = Class

Nu-B here

2023-07-19 Thread Amn Ojee Uw
After this command 'sudo -u postgres psql' I get this message : *could not change directory to "/home/my_account": Permission denied** **psql (12.15 (Debian 12.15-1.pgdg120+1))** **Type "help" for help.* I tried using help, but to no avail. What am I doing wrong? Thanks in advance!

Re: Effects of dropping a large table

2023-07-19 Thread Rob Sargent
On 7/19/23 17:15, David Rowley wrote: On Wed, 19 Jul 2023 at 07:41, Rob Sargent wrote: You might consider deleting portions of the table in separate (consecutive) batches (maybe 5% per delete). And then truncate table is not logged so that might be an alternative. Can you explain why this w

Re: Effects of dropping a large table

2023-07-19 Thread David Rowley
On Wed, 19 Jul 2023 at 07:41, Rob Sargent wrote: > You might consider deleting portions of the table in separate (consecutive) > batches (maybe 5% per delete). And then truncate table is not logged so that > might be an alternative. Can you explain why this would be a useful thing to do? It s

Re: suggestion about time based partitioning and hibernate

2023-07-19 Thread Alvaro Herrera
On 2023-Jul-18, Luca Ferrari wrote: > Dear all, > I'm looking for ideas here, and it could be someone already stepped > into declarative partitioning of an existing database where Hibernate > (a Java ORM) handles the tables. > The situation is as follows: > > create table foo( id primary key, a_d

Re: Fwd: Regarding Installation of PostgreSQL

2023-07-19 Thread Adrian Klaver
On 7/18/23 20:14, Sahil Sojitra wrote: -- Forwarded message - From: *Sahil Sojitra* > Date: Tue, 18 Jul, 2023, 8:43 am Subject: Regarding Installation of PostgreSQL To: mailto:secur...@postgresql.org>> Hello Sir,                I got stuck i

Need help setting up Windows authentication SSPI user mapping

2023-07-19 Thread Haidong Huang
Hi, I would like to get helo with setting Windows authentication in a testing scenario. I use Windows 11. Windows connects to AAD and thus I use a windows account. The domain name is na, user name is hai. I also setup a local user account hailocal. My machine name is haisurface I have Postgre

?????? fsync data directory after DB crash

2023-07-19 Thread Pandora
Yes, I saw the usage of syncfs in PG14, but it is recommended to use it on Linux 5.8 or higher. If my OS version is lower than 5.8, can I still enable it?   Pandora yeyu...@qq.com   --  -- ??: "Thomas Munro"https://www.postgresql.org/message-i

Re: Effects of dropping a large table

2023-07-19 Thread Laurenz Albe
On Tue, 2023-07-18 at 13:58 -0400, Devin Ivy wrote: > I'm hoping to ensure I understand the implications of dropping a large table > and > the space being reclaimed by the database and/or OS.  We're using pg v14. > > This table is quite large with a primary key and one additional index—all > toge