Re: [GENERAL] Imperative Query Languages

2017-07-11 Thread dandl
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Merlin Moncure > It's probably of broader interest to consider some sort of "more relational" > language that would, in effect, be "more declarative" as opposed to > "more imperative" than SQL.

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread dandl
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jason Dusek SQL is great and I am fully on board with the idea. Everywhere I go, I promote the greatness of SQL, of the relational model, and of Postgres. I didn’t write in so much to challenge

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-11 Thread dandl
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Pavel Stehule I guess my question then is: how much do you pay for that durability? If you benchmark Postgres configured for pure in-memory usage with absolutely no writes to disk (or SSD or

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-10 Thread dandl
> From: Jim Nasby [mailto:jim.na...@bluetreble.com] > My guess is this is a test scenario that completely favors VoltDB > while hamstringing Postgres, such as using no transaction durability > at all in VoltDB while using maximum durability in Postgres. Comparing > the cost of every COMMIT doing

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-07 Thread dandl
> > I don't think this is quite true. The mechanism he proposes has a > small window in which committed transactions can be lost, and this > should be addressed by replication or by a small amount of UPC (a few > seconds). > > Except that's the entire point where all those kind of solutions >

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-02 Thread dandl
> >> > I wondered if there are any figures or measurements on Postgres > >> > performance in this ‘enough memory’ environment to support or > >> > contest this point of view? > > > > I don't think that's really answerable without individual use-cases > in > > mind. Answering that question for

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-02 Thread dandl
> Agreed. Stonebraker measured Shore DBMS, which is an academic > database: > > http://research.cs.wisc.edu/shore/ > > If he had measured a production-quality database that had been > optimized like Postgres, I would take more stock of his "overhead" > numbers. Exactly! And that's what

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-02 Thread dandl
> > > http://slideshot.epfl.ch/play/suri_stonebraker > > > > > > > > > > > > He makes the claim that in a modern ‘big iron’ RDBMS such as > Oracle, > > > DB2, MS SQL Server, Postgres, given enough memory that the entire > > > database lives in cache, the server will spend 96% of its memory > > >

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-02 Thread dandl
> > Re this talk given by Michael Stonebraker: > > > > http://slideshot.epfl.ch/play/suri_stonebraker > > > > > > > > He makes the claim that in a modern ‘big iron’ RDBMS such as Oracle, > > DB2, MS SQL Server, Postgres, given enough memory that the entire > > database lives in cache, the server

Re: [GENERAL] UPDATE OR REPLACE?

2016-09-02 Thread dandl
> >>> In my particular situation the case I care about is when the > result > >> of an UPDATE is two identical rows. All I really want is a DISTINCT > >> option. > >> > >> Assuming I am following correctly what you want is that the result > of > >> an UPDATE not be two identical rows. > > > >

[GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-02 Thread dandl
Re this talk given by Michael Stonebraker: http://slideshot.epfl.ch/play/suri_stonebraker He makes the claim that in a modern ‘big iron’ RDBMS such as Oracle, DB2, MS SQL Server, Postgres, given enough memory that the entire database lives in cache, the server will spend 96% of its memory

Re: [GENERAL] UPDATE OR REPLACE?

2016-09-01 Thread dandl
> > In my particular situation the case I care about is when the result > of an UPDATE is two identical rows. All I really want is a DISTINCT > option. > > Assuming I am following correctly what you want is that the result of > an UPDATE not be two identical rows. Correct. In practice I don't

Re: [GENERAL] UPDATE OR REPLACE?

2016-09-01 Thread dandl
> > Sqlite has options to handle an update that causes a duplicate key. > Is > > there anything similar in Postgres? > > This is not an UPSERT. The scenario is an UPDATE that changes some > key > > field so that there is now a duplicate key. In Sqlite this handled > as: > > UPDATE OR IGNORE table

[GENERAL] UPDATE OR REPLACE?

2016-08-31 Thread dandl
Sqlite has options to handle an update that causes a duplicate key. Is there anything similar in Postgres? This is not an UPSERT. The scenario is an UPDATE that changes some key field so that there is now a duplicate key. In Sqlite this handled as: UPDATE OR IGNORE table SET UPDATE OR

Re: [GENERAL] C++ port of Postgres

2016-08-16 Thread dandl
Just wondering what the end goal is for this project... Is it to just maintain an up to date Postgres fork that will compile with a C++ compiler? Is it to get a conversation going for a direction for Postgres itself to move? The former I don't see gaining much traction or doing all that much

Re: [GENERAL] Question about antijoin

2016-07-12 Thread dandl
ginal Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Tom Lane > Sent: Wednesday, 13 July 2016 12:13 AM > To: dandl <da...@andl.org> > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Question about

[GENERAL] Question about antijoin

2016-07-12 Thread dandl
>NOT EXISTS (SELECT NULL FROM dyr_pause_mot WHERE avlsnr = a.avlsnr) > > This can be executed as anti-join and is often more efficient. This got my interest! It's of great interest to me to know how and when Postgres performs an anti-join (this being a significant omission from SQL). Is

Re: [GENERAL] SPI returns error for SAVEPOINT

2016-05-24 Thread dandl
> >>SPI_exec("BEGIN",...) returns error SPI_ERROR_TRANSACTION. As expected. > >>SPI_exec("SAVEPOINT xyz",...) returns error SPI_ERROR_TRANSACTION. Not > > expected. > > The docs say that this is expected: > https://www.postgresql.org/docs/devel/static/spi-spi-execute.html > SPI_ERROR_TRANSACTION

[GENERAL] SPI returns error for SAVEPOINT

2016-05-24 Thread dandl
A plandl (language handler for Andl) function is called as follows: BEGIN; SELECT plandl_compile($1); // argument is Andl code COMMIT; Inside: >SPI_exec("BEGIN",...) returns error SPI_ERROR_TRANSACTION. As expected. >SPI_exec("SAVEPOINT xyz",...) returns error

Re: [GENERAL] Fatal error "stack empty" on ROLLBACK

2016-05-23 Thread dandl
- A New Database Language - andl.org > -Original Message- > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Tuesday, 24 May 2016 2:56 AM > To: dandl <da...@andl.org> > Cc: 'PostgreSQL' <pgsql-general@postgresql.org> > Subject: Re: [GENERAL] Fatal error "s

[GENERAL] Fatal error "stack empty" on ROLLBACK

2016-05-22 Thread dandl
SPI call to execute "ROLLBACK" triggers FATAL ERROR "stack empty". What does it mean? Nothing in the docs I can see. In the particular case there were no update commands issued between BEGIN and ROLLBACK. Is that what it means? Or am I missing something? Regards David M Bennett FACS Andl - A

Re: [GENERAL] How to know if SPI or some other API triggered an ERROR.

2016-05-21 Thread dandl
; From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Sunday, 22 May 2016 12:01 AM > To: dandl <da...@andl.org> > Cc: 'PostgreSQL' <pgsql-general@postgresql.org> > Subject: Re: [GENERAL] How to know if SPI or some other API triggered an > ERROR. > > "dandl

[GENERAL] How to know if SPI or some other API triggered an ERROR.

2016-05-21 Thread dandl
The question is whether there is any way to know that some Postgres API call such as SPI (or others) did not return but instead triggered an elog(ERROR). The context is the implementation of a language handler (plandl for Andl) with the possibility of re-entrant calls to functions. I would

Re: [GENERAL] Ascii Elephant for text based protocols

2016-05-15 Thread dandl
I agree, but I'm hoping someone with design skills (not me!) will step in to tweak it somewhat. Comparing it side by side with the one on the web site * the right ear lobe is too low * the tusks point wrong * the trunk is (how shall I put this?) somewhat phallic. A worthy goal, not quite there

Re: [GENERAL] CREATE OR REPLACE AGGREGATE -- NOT!

2016-05-05 Thread dandl
...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G. Johnston Sent: Thursday, 5 May 2016 2:06 PM To: dandl <da...@andl.org> Cc: Postgres General <pgsql-general@postgresql.org> Subject: Re: [GENERAL] CREATE OR REPLACE AGGREGATE -- NOT! On Wednesday,

[GENERAL] CREATE OR REPLACE AGGREGATE -- NOT!

2016-05-04 Thread dandl
I was surprised to discover that * CREATE OR REPLACE AGGREGATE is not allowed, but * CREATE OR REPLACE FUNCTION works just fine Is this an oversight, or is there some reason I missed? Yes, I know I can do: DROP AGGREGATE IF EXISTS CREATE AGGREGATE But this triggers

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-04 Thread dandl
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Mike Sofen I disagree. I’ve worked as database architect/engineer at a number of large and small firms in various verticals (healthcare, financials, insurance, aerospace, telecom, etc), and

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-04 Thread dandl
> From: Pierre Chevalier Géologue [mailto:pierrechevalierg...@free.fr] > ... > > Then I think you've seriously misunderstood. Most people can indeed > >learn to write basic SQL queries, but those are > >(obviously) not what I'm talking about. > > > > To write the business logic of a significant

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-04 Thread dandl
> ow...@postgresql.org] On Behalf Of Geoff Winkless > > I'm a strong believer in putting the business code next to the data, > > not the wrong side of the object-relational divide. However, for many > > the challenge of writing and debugging SQL code is just too high! > > Your source for this

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-03 Thread dandl
> ow...@postgresql.org] On Behalf Of Guyren Howe > I've long been frustrated with how most web developers I meet have no idea > how to use an SQL database properly. I think I'm going to write a book called > Love Your Database, aimed at web developers, that explains how to make their > apps

Re: [GENERAL] Does the initial postgres user have a password?

2016-05-03 Thread dandl
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Albe Laurenz > > What is going on here? Is there a password for user ‘postgres’ or > > isn’t there? What is it? Why don’t I need it sometimes, and I do other > times? > > You have a password

[GENERAL] Does the initial postgres user have a password?

2016-05-03 Thread dandl
I have a new 9.5 installation, Windows x64, developer only. No users have been added, and no passwords set. I can access the system: * using pgAdmin3, without specifying a user or password * using psql, specifying user ‘postgres’ but no password I cannot access the