Question : In my PostgreSQL 9.6 database, I have a composite type, let’s call that type widget. I have a […]
Tag: composite-types
What type of rows does `SELECT my_table FROM my_table` return?
Question : I sometimes encounter this SELECT statement (in JSON-related answers on stackexchanges): SELECT my_table FROM my_table; It seems to […]
Is ‘internallength’ always useful in custom type definition in Postgres?
Question : In our database we use a custom type to store 3D locations: CREATE TYPE float3d AS ( x […]
AutoIncrement non-primary key or Make unique composite key?
Question : I have a db with a table that has a rollover value such as OrderNumber and another column […]
PostgresSQL: Get single attribute of UDT in SELECT statement
Question : I created a user-defined type in a PostgreSQL 9.2 database and am trying in the SELECT statement to […]
Return type of JOINing stored procedure – PostgreSQL
Question : Is it possible to express return type of stored procedure that returns joined tables using table type of […]
Good layout of 3d point data for spatial queries in Postgres?
Question : Like shown in another question, I deal with a lot (>10,000,000) entries of points in a 3D space. […]
why is mysql not using the composite index on my query?
Question : Here is my query. select user_id, sum(user_points.points) overallpts, username from user inner join user_points on user.user_id = user_points.user_id […]
PostgreSQL – Return type and EXECUTE QUERY
Question : My function returns a setof composite type, however the RETURN EXECUTE seems to return some other unknown type: […]
How to set/get a field of a nested composite type variable?
Question : For example: create type t1 as (a int2, b text, c boolean); create type t2 as (a t1, […]