13,175 reputation
12151
bio website
location Munich, Bavaria
age
visits member for 3 years, 8 months
seen 6 hours ago

Jan
24
comment Take advantage of monotonic columns in PostreSQL
"Adding a multicolumn index is useless" - are you sure? Did you test it?
Jan
23
comment PostgreSQL operator uses index but underlying function does not
Do you have to use a PreparedStatement? As long as you don't use that, you can use a ? without any problems.
Jan
23
comment Timeline or time function in PostgreSQL
What exactly is "messy" about that output? To me this looks exactly the way you want it.
Jan
22
comment How to store thousands of properties related to a record in PostgreSQL?
I think the only option you have is to actually create a sample database with a hstore column and see how this performs.
Jan
22
comment what is the difference between data file and data block in oracle
I think this link to the manual is better: docs.oracle.com/database/121/CNCPT/logical.htm#CNCPT004
Jan
22
comment Access Oracle GTT table data from another session?
"I know GTT tables data is only session specific vs. "is their any way to access/read GTT table that belongs to another session" if you know it's impossible then why do you ask?
Jan
22
comment Getting around the constraint “column must appear in the GROUP BY clause or be used in an aggregate function”
You state that "one person can only have one license" so why is person_id not a primary key in the license table then?
Jan
22
comment Getting around the constraint “column must appear in the GROUP BY clause or be used in an aggregate function”
If the license table had a primary key (why doesn't it have one?), you can use group by person.id, license.id because the ungrouped columns are then functionally dependent on the two primary keys.
Jan
22
comment what is the difference between data file and data block in oracle
A data file contains many, many data blocks
Jan
21
comment PostgreSQL and array of custom type
Here is an example: sqlfiddle.com/#!15/5c776/4
Jan
21
comment PostgreSQL and array of custom type
It seems you'd better use a JSON column directly or store the contactinfo in a hstore column. An array like that will be quite hard to handle. The hstore column will be much more flexible when you need to remove or add elements.
Jan
21
comment Error when creating Trigger (PostgreSQL 9.4)
'company_t' is a string literal, not an identifier. Identifiers are either not quoted at all (which I highly recommend to do!) or quoted using double quotes " (as you have did in the create table statement - which I would discourage you from doing). More details on identifiers are in the manual: postgresql.org/docs/current/static/…
Jan
21
comment New to databases - does my ERD reflect good database design?
You wording is a bit "wrong". The artist's name or the album name can be a "unique key" as well. You are probably referring to "surrogate keys" where you generate an artificial unique identifier to server as a primary key. Any combination of columns can be a "unique key", not only generated ones. But I do agree that using names for the primary key is not a good idea.
Jan
20
comment Use result of aggregate in same select?
I believe you would see that in the execution plan when using explain analyze
Jan
20
comment Timeline or time function in PostgreSQL
Please add some sample data and the expected output to your question. I have no idea what a "timeline view" is supposed to be.
Jan
20
comment PostgreSQL: Use column with hash based on other columns as unique index?
@ErikVandeVen: Feike is not indexing null values. The expression replaces NULLs with something else.
Jan
20
comment PostgreSQL: Use column with hash based on other columns as unique index?
What exactly are you trying to achieve with the index? Do you want to make sure that there is only a single product for each offer? Or that each product has only a single price? Or that you do not have overlapping intervals for valid_from, valid_to? Or that you do not have overlapping intervals with the same price? I also don't understand why price_alt is a character column? Why don't you store the alternate price as a number?
Jan
20
comment what does !! as an operator in mysql?
@NawazSohail: <> is the "not equal" operator. It's a binary operator that requires two values. That is something different than a the unary NOT operator on a "boolean" value.
Jan
20
comment Return the id after insert or select
@alex: see here for a solution: stackoverflow.com/q/15939902/330315
Jan
19
comment Is there a way to query all error messages in Postgres?
Is there any reason why you are looking at the manual of a completely outdated and un-maintained version? As far as I know the error message are compiled directly into the executables. You could probably do some intelligent grep-ing on the source code