Re: How does pg parse 'select '(1,2)''

2023-08-06 Thread Kyotaro Horiguchi
At Sat, 5 Aug 2023 21:46:33 +0800, jacktby jacktby wrote in > I’m trying to add new grammar for my application. So I’m do research on > gram.y. > I think it will make the '(1,2)' as " '(' a_expr ')' "; but I can’t find out > something like > " a_expr ',' a_expr “, can you give me the details?

Re: Dropping all tables in a database

2023-08-06 Thread Thomas Kellerer
H schrieb am 07.08.2023 um 03:17: > I am running PostgreSQL 13.11 and tried to drop all tables in a > database without dropping the database or schema. After logging in as > the correct user, the following SQL statement does not work: > > SELECT 'DROP TABLE IF EXISTS "' || tablename || '"

Re: My 1st TABLESPACE

2023-08-06 Thread negora
Hi: Although the "postgres" user owns the "data" directory, Has he access to the whole branch of directories? Maybe the problem is that he can't reach the "data" directory. Regards. On 07/08/2023 07:43, Amn Ojee Uw wrote: I'd like to create a TABLESPACE, so, following this web page

My 1st TABLESPACE

2023-08-06 Thread Amn Ojee Uw
I'd like to create a TABLESPACE, so, following this web page ,  I have done the following : *mkdir /home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data* *sudo chown postgres:postgres

Re: Backup Copy of a Production server.

2023-08-06 Thread Ron
On 8/7/23 00:02, KK CHN wrote: List, I am in need to copy a production PostgreSQL server  data( 1 TB)  to  an external storage( Say USB Hard Drive) and need to set up a backup server with this data dir. What is the trivial method to achieve this ?? 1. Is Sqldump an option at a production

Backup Copy of a Production server.

2023-08-06 Thread KK CHN
List, I am in need to copy a production PostgreSQL server data( 1 TB) to an external storage( Say USB Hard Drive) and need to set up a backup server with this data dir. What is the trivial method to achieve this ?? 1. Is Sqldump an option at a production server ?? ( Will this affect the

Re: Dropping all tables in a database

2023-08-06 Thread Thorsten Glaser
On Sun, 6 Aug 2023, H wrote: >I am running PostgreSQL  13.11 and tried to drop all tables in a >database without dropping the database or schema. See: https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=useful-scripts/useful-scripts.git;a=tree;f=SQL;hb=HEAD Comments welcome (especially a

Re: Dropping all tables in a database

2023-08-06 Thread David G. Johnston
On Sun, Aug 6, 2023, 18:25 Christophe Pettus wrote: > > > > On Aug 6, 2023, at 18:17, H wrote: > > > > Is there some setting I have to change in the database to have the first > SQL statement to work or have I run into a possible bug? > > The first statement just generates a line of text output

Re: Dropping all tables in a database

2023-08-06 Thread Julien Rouhaud
On Mon, Aug 7, 2023 at 9:25 AM Christophe Pettus wrote: > > > On Aug 6, 2023, at 18:17, H wrote: > > > > Is there some setting I have to change in the database to have the first > > SQL statement to work or have I run into a possible bug? > > The first statement just generates a line of text

Re: Dropping all tables in a database

2023-08-06 Thread Christophe Pettus
> On Aug 6, 2023, at 18:17, H wrote: > > Is there some setting I have to change in the database to have the first SQL > statement to work or have I run into a possible bug? The first statement just generates a line of text output that contains the statement. There's nothing in it that

Dropping all tables in a database

2023-08-06 Thread H
I am running PostgreSQL  13.11 and tried to drop all tables in a database without dropping the database or schema. After logging in as the correct user, the following SQL statement does not work: SELECT 'DROP TABLE IF EXISTS "' || tablename || '" CASCADE;' FROM pg_tables WHERE schemaname =

Re: How to solve the warning?

2023-08-06 Thread Jeffrey Walton
On Sat, Aug 5, 2023 at 10:10 AM jacktby jacktby wrote: > How to solve the warning? Use an explicit cast, if the types are correct. Jeff

Re: /usr/local/pgsql is empty after successful of make

2023-08-06 Thread Aramaki Zyake
Thank you for prompt response! I'll try it:) On Mon, Aug 7, 2023, 01:09 Adrian Klaver wrote: > On 8/6/23 09:00, Aramaki Zyake wrote: > > Hi, > > I have a general question about PostgreSQL. > > Yeasterday, I tried to build PostgreSQL from source code and the make > > command succeeded, but

Re: /usr/local/pgsql is empty after successful of make

2023-08-06 Thread Adrian Klaver
On 8/6/23 09:00, Aramaki Zyake wrote: Hi, I have a general question about PostgreSQL. Yeasterday, I tried to build PostgreSQL from source code and the make command succeeded, but /usr/local/pgsql directory was empty even owner of pgsql was postgres user. I invoked following commands by

Re: /usr/local/pgsql is empty after successful of make

2023-08-06 Thread Tom Lane
Aramaki Zyake writes: > What should I do to move built artifacts into /usr/local/pgsql? "make install", or possibly "sudo make install" if you'd rather the installed files be root-owned. https://www.postgresql.org/docs/current/install-short.html regards, tom lane

Re: /usr/local/pgsql is empty after successful of make

2023-08-06 Thread Julien Rouhaud
Hi, On Mon, Aug 7, 2023 at 12:00 AM Aramaki Zyake wrote: > > Hi, > I have a general question about PostgreSQL. > Yeasterday, I tried to build PostgreSQL from source code and the make command > succeeded, but /usr/local/pgsql directory was empty even owner of pgsql was > postgres user. > > I

/usr/local/pgsql is empty after successful of make

2023-08-06 Thread Aramaki Zyake
Hi, I have a general question about PostgreSQL. Yeasterday, I tried to build PostgreSQL from source code and the make command succeeded, but /usr/local/pgsql directory was empty even owner of pgsql was postgres user. I invoked following commands by postgres user. CFLAGS=-O0 ./configure