Re: [GENERAL] Altering array(composite-types) without breaking code when inserting them and similar questions

2014-04-20 Thread Fede Martinez
If you don't know the columns your type will have, you could consider using json or hstore if the data is unstructured. El 20/04/2014 14:04, "Dorian Hoxha" escribió: > Hi list, > > I have a > create type thetype(width integer, height integer); > create table mytable(thetype thetype[]); > > How ca

Re: [GENERAL] Querying all documents for a company and its projects etc

2014-04-16 Thread Fede Martinez
what about resolving the join "document doc JOIN document_usage du ON doc.id = du.document_id" using WITH? I think this won't work because the result of this CTE would be huge, but you could get the company with that id first using a WITH clause too, then you would have the name and you wouldn't ha