Re: Suggestion: provide a "TRUNCATE PARTITION" command

2021-01-09 Thread Thiemo Kellner
Quoting Michael Lewis : Still, no feedback on the effect that a truncate call is having on the DB and may be doing more than intended fairly easily. I am not in the hackers group so I couldn't say this feature would not be implemented. It just seems unlikely given the philosophies of that

Re: How to keep format of views source code as entered?

2021-01-09 Thread raf
On Sat, Jan 09, 2021 at 02:22:25PM +, "Markhof, Ingolf" wrote: > Tom, all, > > when I change a tables column name in Oracle SQL , SQLdeveloper (a SQL > client) marks views that refer to the table using the old column name > as erroneous. So, I can easily identify these cases. And of course

Re: How to keep format of views source code as entered?

2021-01-09 Thread David G. Johnston
On Saturday, January 9, 2021, raf wrote: > > Actually, I just had a look at the pg_views system > catalog where the source code for views is stored, and > it doesn't seem to contain enough information to > reconstruct a create view statement. It only contains > these columns: > > schemaname >

Select a column and then apply JSONB_ARRAY_ELEMENTS to it

2021-01-09 Thread David G. Johnston
On Saturday, January 9, 2021, Alexander Farber wrote: > > BEGIN > FOR _tile IN SELECT * FROM JSONB_ARRAY_ELEMENTS(SELECT tiles FROM > words_moves WHERE mid = in_mid) > > Subqueries must be enclosed in parentheses. The parentheses that are part of the function call do not count. David

RE: How to keep format of views source code as entered?

2021-01-09 Thread Markhof, Ingolf
Tom, all, when I change a tables column name in Oracle SQL , SQLdeveloper (a SQL client) marks views that refer to the table using the old column name as erroneous. So, I can easily identify these cases. And of course I, as a user, I am acting in my context, i.e. my schema. So it is perfectly

Re: How to keep format of views source code as entered?

2021-01-09 Thread Jeremy Smith
On Sat, Jan 9, 2021 at 9:22 AM Markhof, Ingolf < ingolf.mark...@de.verizon.com> wrote: > Tom, all, > > when I change a tables column name in Oracle SQL , SQLdeveloper (a SQL > client) marks views that refer to the table using the old column name as > erroneous. So, I can easily identify these

Re: How to keep format of views source code as entered?

2021-01-09 Thread Tim Cross
Markhof, Ingolf writes: > Tom, all, > > when I change a tables column name in Oracle SQL , SQLdeveloper (a SQL > client) marks views that refer to the table using the old column name as > erroneous. So, I can easily identify these cases. And of course I, as a user, > I am acting in my

Re: How to keep format of views source code as entered?

2021-01-09 Thread Christophe Pettus
> On Jan 9, 2021, at 06:22, Markhof, Ingolf > wrote: > What I would like to have is something that would automatically update the > SQL code in the software repository when I run a CREATE OR REPLACE VIEW. I think you are approaching this backwards. The SQL in the repository should be the

Re: Select a column and then apply JSONB_ARRAY_ELEMENTS to it

2021-01-09 Thread Alexander Farber
On Sat, Jan 9, 2021 at 3:49 PM David G. Johnston wrote: > Subqueries must be enclosed in parentheses. The parentheses that are part > of the function call do not count. > > Ah! Thank you David, this has worked now - CREATE OR REPLACE FUNCTION words_solve_puzzle( in_mid

Static memory, shared memory

2021-01-09 Thread Jack Orenstein
I am writing a Postgres extension, and thought that I had memory corruption, (thanks for the --enable-cassert lead). I might, but It now looks like I need to understand the use of shared memory and locking in Postgres. So I have two questions. 1) I am now guessing that my original problem is

Re: Static memory, shared memory

2021-01-09 Thread Tom Lane
Jack Orenstein writes: > I am writing a Postgres extension, and thought that I had memory > corruption, (thanks for the --enable-cassert lead). I might, but It now > looks like I need to understand the use of shared memory and locking in > Postgres. So I have two questions. > 1) I am now

Select a column and then apply JSONB_ARRAY_ELEMENTS to it

2021-01-09 Thread Alexander Farber
Hello, for a word puzzle using PostgreSQL 13.1: https://wortefarbers.de/ws/puzzle2?mid=138=c6f469786df7e8d44461381b62b2ce7d I am trying to improve a stored function - CREATE OR REPLACE FUNCTION words_solve_puzzle( in_mid bigint, in_uid int,