Re: Why does it sort rows after a nested loop that uses already-sorted indexes?

2024-04-19 Thread negora
d the values of the outer loop to be unique. I guess that was because, very often, I used unique indexes for my tests... But it doesn't have to be so, of course. Best regards. On 18/04/2024 16:53, Tom Lane wrote: negora writes: As you can see, the planner does detect that the out

Why does it sort rows after a nested loop that uses already-sorted indexes?

2024-04-18 Thread negora
n although it could take advantage of it (for example, because the analysis time rarely is worth it)? Or is there something that I'm missing? If I'm not mistaken, in this case both index scans seem to be done serially, in an N x M style, so I think the row order would be preserved, Right? Thank you! negora

Re: How to reference a DB with a period in its name ?

2024-03-29 Thread negora
Hi: I think your problem is in the Perl side more than in PostgreSQL's. When you said you tried escaping with \, Did you mean *exactly* this? "delete from \"thedb.v1\".theschem.thetab where col1 = 1" I think this should work. Or you can use single quotes to enclose the query, so that you

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

Re: Return rows in input array's order?

2023-05-09 Thread negora
Hi Dominique: Take a look to the "unnest()" function. It transforms an array into a set of rows. I believe I used it in the past to do something similar to what you need. Another option is to use a "values" expression (in a subquery) instead of an array, and build the query dynamically. Be

Re: Get more columns from a lookup type subselect

2023-03-10 Thread negora
book.title, book.release_date         FROM book         WHERE book.author_id = author.id         ORDER BY book.release_date DESC         LIMIT 1     ) AS latest_book; On 10/03/2023 11:00, Durumdara wrote: Dear Negora! Can you show me the usage with some short examples? Thanks for it! BR    dd

Re: Get more columns from a lookup type subselect

2023-03-10 Thread negora
Hi Chris: You can use a subselect in the `from` and `join` clauses. That's how I get multiple columns from a single subselect. If the subselect needs to use a reference from the outer scope (i.e. the main query) , you can use the `lateral` modifier. Best regards. On 10/03/2023 08:34, Duru

Re: Off-topic? How to extract database statements from JPA?

2022-10-31 Thread negora
Hi Gus: JPA (Jakarta Persistence API; previously known as Java Persistence API) is "just" the specification. There are several implementations of this. The reference implementation is EclipseLink, but there are others widely used such as Hibernate or OpenJPA. You should ask which one is being

Re: DBeaver does not show all tables in a Schema

2021-10-29 Thread negora
Are you sure that you're not applying a filter in the "Database Navigator" panel of DBeaver? Sometimes, it occurs to me that I apply a filter for certain database, I forget to remove it, then open another database, and some or all tables do not appear in the navigator. On 29/10/2021 12:46,

Re: dbeaver

2020-04-01 Thread negora
ships among tables, I had to add virtual FKs. That way, I had a permanent visual aid. That feature, combined with the auto-diagrams generated by DBeaver, allowed me to understand part of that mess. It was my salvation. On 01/04/2020 22:28, Thomas Kellerer wrote:

Re: dbeaver

2020-04-01 Thread negora
On 01/04/2020 18:17, Roberto Della Pasqua wrote: > Hello, please some questions about a newbie Postgresql user: > > - what is the best method to keep the data replicated (for backup purposes): > Can be possible to deploy a master/slave with realtime data replication and > adding a storage where do