12,560 reputation
12048
bio website
location Munich
age
visits member for 3 years, 6 months
seen 16 mins ago

Oct
30
comment CTE works as expected, but not when wrapped into a function
Sorry, there was a copy and paste error in the SQL function. And the conversion to the array needed an explicit type cast.
Oct
30
comment CTE works as expected, but not when wrapped into a function
@JamesAnderson: Postgres doesn't have real stored procedures. So in the Postgres world the term "procedure" is often used as a synonym for "function"
Oct
29
comment SELECT all substrings (n-grams) of length n?
That is invalid SQL for Postgres
Oct
28
comment SQL Server stored procedure that would enforce atomicity?
"all inserts have to be executed at once or none of them" - that's precisely what a transaction is for. Assim's answer does exactly that. A transaction is atomic by definition.
Oct
27
comment Postgres Grouping of Like Results
@ypercube: the part "I would like to get the following back: source_id, triggering_id(s)" lead me to assume Andrew wants a comma separated list.
Oct
27
comment Postgres Grouping of Like Results
@AndrewGoldenberg If the query isn't returning what you want, you have to add the expected output based on your example data (edit your question)
Oct
27
comment 1 million strings and exact match search
You might be interested in this: blogs.enterprisedb.com/2014/09/24/…
Oct
27
comment MongoDB Benchmark with write-intensive on geo-indexed DB
EnterpriseDB has created a benchmark suite especially for this purpose: blogs.enterprisedb.com/2014/09/24/… You could also have a look at Postgres-XL or Postgres-XC both allow for horizontal scaling.
Oct
26
comment How can I determine the edition an Oracle session is using?
docs.oracle.com/cd/E11882_01/appdev.112/e41502/…
Oct
25
comment Re-writing a sub-select as a condition on a column generated with 'over (partition by …)'
the over (partition by...) thing is called a "window function".
Oct
24
comment Get seconds of day in Postgres
@ErwinBrandstetter: nice trick, I didn't think of using epoch on only the time part ;)
Oct
24
comment Get seconds of day in Postgres
@TimoteoPonce: sorry I didn't see that. There is no direct function to do that. You need to extract seconds, minutes and hours individually. But of course you can put that into a function.
Oct
24
comment Why does this query take 32 sec to execute?
Unrelated but: why are you using having when you are not using group by?
Oct
24
comment How to import large sql file in postgres?
Postgres is the (backend) server, psql is the client tool. The exception can either happen on the client when reading the file, or on the backend which is executing the individual SQL statements.
Oct
24
comment How to import large sql file in postgres?
Is psql throwing the out of memory error, or is the backend server that has the problem?
Oct
23
comment Size of Postgres database growing
Have a look at Postgres-XL
Oct
23
comment Combine 3 tables
wiki.postgresql.org/wiki/SlowQueryQuestions
Oct
23
comment numbering distinct column values in an ordering but not just displaying the total
There is no DBMS named "Visual 8.0"
Oct
22
comment numbering distinct column values in an ordering but not just displaying the total
Which DBMS are you using? Postgres? Oracle?
Oct
22
comment Optimizing query - understanding explain
The explain analyze says your query only takes 131 milli seconds (= 0.131 seconds), not 1.5 seconds.