composite-types Questions
2
Solved
I have a table with an XML column. The XML can contain an optional link element.
<Link ReasonCode="MultiLabel">
<UUID>1d177dee-1da4-4451-b175-396666afc370</UUID>
</L...
Runkel asked 13/6, 2018 at 11:12
3
Solved
For example ,
I use the following function to convert rows into json in PostgreSQL 9.2
select row_to_json(row(productid, product)) from gtab04;
and this will returns below results
row_to_json
-...
Deflect asked 29/8, 2014 at 8:40
1
Solved
Is it possible to extend an existing datatype in PostgreSQL? Essentially, I want the equivalent of this TypeScript but in SQL:
interface Meeting {
id: number;
start: Date;
end: Date;
descriptio...
Prepense asked 5/9, 2021 at 20:58
2
I have a problem that I'm working on. Below is a simplified query to show the problem:
WITH the_table AS (
SELECT a, b
FROM (VALUES('data1', 2), ('data3', 4), ('data5', 6)) x (a, b)
), my_data ...
Anabel asked 6/12, 2014 at 1:34
1
Does SQLAlchemy support PostgreSQL's composite types (http://www.postgresql.org/docs/devel/static/rowtypes.html)? I found it has something similar (sqlalchemy.orm.composite), but as far as I can se...
Tumblebug asked 14/4, 2015 at 12:4
3
Solved
I have the following nested types defined in postgres:
CREATE TYPE address AS (
name text,
street text,
zip text,
city text,
country text
);
CREATE TYPE customer AS (
customer_number text,
...
Rhettrhetta asked 14/10, 2016 at 16:24
1
Is there any document describing the tuple format that PostgreSQL server adheres to? The official documentation appears arcane about this.
A single tuple seems simple enough to figure out, but whe...
Proceeds asked 15/9, 2016 at 21:17
2
Solved
I'd like to make a composite type that includes a dictionary as one of its named fields. But the obvious syntax doesn't work. I'm sure there's something fundamental that I don't understand. Here's ...
Ettieettinger asked 27/5, 2015 at 15:6
1
Solved
I'm learning about creating composite* types in F# and I ran into a problem. I have this type and a ToString override.
type MyType =
| Bool of bool
| Int of int
| Str of string
with override t...
Kid asked 8/12, 2014 at 15:51
2
Solved
I want to loop through a query, but also retain the actual record for the next loop, so I can compare two adjacent rows.
CREATE OR REPLACE FUNCTION public.test ()
RETURNS void AS
$body$
DECLARE...
Linderman asked 10/9, 2014 at 23:18
1
Solved
I'm writing a PL/pgSQL stored procedure that will return a set of records; each record contains all the fields of an existing table (call it Retailer, which has two fields: retailer_key and retaile...
Chasidychasing asked 23/7, 2013 at 21:34
2
Solved
This function:
CREATE OR REPLACE FUNCTION fn_test1()
RETURNS SETOF date AS
$BODY$
declare
i int;
begin
i:=0;
while i<5 loop
return next '2001-01-02'::date;
i:=i+1;
end loop;
end
$BODY$
L...
Bahrain asked 19/2, 2013 at 19:24
1
Solved
Here's a sample of the scenario I'm facing. Say I have this column family:
create column family CompositeTypeCF
with comparator = 'CompositeType(IntegerType,UTF8Type)'
and key_validation_clas...
Rawson asked 18/1, 2012 at 20:18
1
© 2022 - 2024 — McMap. All rights reserved.