rowtype Questions

2

Solved

begin; create type public.ltree as (a int, b int); create table public.parent_tree(parent_id int,l_tree ltree); insert into public.parent_tree values(1,(2,2)),(2,(1,2)),(3, (1,28)); commit; Trying...
Howlend asked 30/11, 2021 at 8:47

1

Solved

Let's say we have two tables: CREATE TABLE element ( pk1 BIGINT NOT NULL, pk2 BIGINT NOT NULL, pk3 BIGINT NOT NULL, -- other columns ... PRIMARY KEY (pk1, pk2, pk3) ); CREATE TYPE element_pk_...
Benzoin asked 15/10, 2021 at 20:33

3

Solved

I have one table called event, and created another global temp table tmp_event with the same columns and definition with event. Is it possible to insert records in event to tmp_event using this ? ...
Coagulase asked 13/12, 2012 at 19:23

3

Solved

I have an Oracle 12c database with a table containing an identity column: CREATE TABLE foo ( id NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, bar NUMBER ) Now I want to insert into the tabl...
Dragster asked 12/11, 2015 at 15:37

1

Solved

I have a table my_friends_cards: id | name | rare_cards_composite[] | ---+---------+------------------------ 1 | 'timmy' | { {1923, 'baberuth'}, {1999, 'jeter'}} 2 |'jimmy' | { {1955, 'Joey D'}, {...
Cluj asked 16/12, 2014 at 22:37

2

Solved

I'm running PostgreSQL 9.2.1 and have a plpgsql function that returns 3 columns. It's called like this (simplified): SELECT (my_function(b.input)).*, a.other, b.columns FROM table_a a JOIN table_b...
Rascality asked 21/2, 2013 at 9:53

1

Solved

W.r.t code below I can not declare the type of fetch-into-variable as the underlying table's %ROWTYPE because the SYS_REFCURSOR is on a select that joins two tables and also selects a few functions...
Drais asked 25/6, 2012 at 10:16

1

Solved

I'm trying to return a Custom type from a PostgreSQL function as follows: DROP TYPE IF EXISTS GaugeSummary_GetDateRangeForGauge_Type CASCADE; -- Drop our previous type CREATE TYPE GaugeSummary_...
Xever asked 11/1, 2010 at 20:44
1

© 2022 - 2024 — McMap. All rights reserved.