Skip to main content

Questions tagged [array]

An array is an ordered linear data structure consisting of a collection of elements (values, variables, or references), each identified by one or more indexes. When asking about specific variants of arrays, use related tags as well. When using this tag, in a question that is specific to a database, tag the question with the database being used.

1 vote
1 answer
146 views

I'm using an query to update a object array inside a jsonb column. Example data: [ { "_id": "68696e0a3aab2f9ff9c40679", "altura": 1, "comprimento":...
flourigh's user avatar
  • 145
1 vote
1 answer
97 views

I've got a database full of documents which each contain a collection of transactions: [ { "key": 1, "data": [ { "trans": 1, "uid&...
ralmond's user avatar
  • 13
2 votes
1 answer
143 views

How do I obtain the cardinality of a multirange? I'm using range_agg() to aggregate ranges, which merges ranges if they are continuous, or returns what looks like an array of ranges if the ranges are ...
Colin 't Hart's user avatar
0 votes
0 answers
88 views

I want to write a function that accepts array of arrays of my composite type. because of they have different lengths, it can NOT be defined as one array. So, I want to use variadic to accept arrays ...
Morteza Seydi's user avatar
0 votes
2 answers
63 views

I have a table post_likes with one column being a post ID (uint), and another column being an array of IDs (uint[]) of users who liked the post. If I'm selecting info from multiple tables on multiple ...
bqback's user avatar
  • 107
0 votes
1 answer
108 views

We have a collection in our MongoDB where due to a changed use-case a so-far small query is now really slow. The aggregate in question is somewhat like this: db.collection.aggregate([ { $match: {...
DaPeda's user avatar
  • 5
0 votes
0 answers
116 views

I'm considering to use a composite type, array of standard type and array of composite type columns in TimescaleDB hypertable. I'm curious whether using such columns has any downsides like less ...
oliora's user avatar
  • 101
0 votes
1 answer
94 views

I'm trying to create a unique index in MongoDB that enforces uniqueness based on the existence and non-undefined nature of a field (barcodes) in my skus collection. Here's the index creation query I'm ...
Brainfuck's user avatar
1 vote
1 answer
129 views

The Goal: Update an secondary table called Lottery_Cycle when an INSERT occours on table Lottery_History with some computed values and checking previous data. Let's say a lottery with 25 numbers of ...
Wisdom's user avatar
  • 11
0 votes
0 answers
287 views

In the following example variables in single quotes '' are arguments passed to the PostgreSQL query. If 'tag_args' is an empty array, the first row of result table is a row of three nulls and I use ...
jvkloc's user avatar
  • 133
-1 votes
1 answer
518 views

I have a table with an array of URLs in column urls. Now there's a need to update some URLs changing the hostname. E.g.: {https://storage.host1.com/file.jpg, https://storage.host1.com/file2.jpg} ...
minicooper's user avatar
0 votes
1 answer
396 views

CREATE TABLE public.article ( id uuid NOT NULL, tags _text NULL, CONSTRAINT article_pkey PRIMARY KEY (id) ); I have the requirement to load articles that have a tag which is in a large ...
user1117605's user avatar
0 votes
1 answer
48 views

BigQuery has no native support for linear forecasting outside of machine learning, but it does support user-defined functions, and these can accept arrays as inputs. However, (as of 2023/10 anyway), ...
Jon of All Trades's user avatar
0 votes
1 answer
725 views

Given an enum type (e.g. letter). What is the syntax to convert an existing array to the enum type? The existing values are valid for the enum. For example, how would I convert letter_data in: create ...
gerardw's user avatar
  • 115
0 votes
1 answer
91 views

I'm working with a table called price_options that has the following fields: id, slots, list_slots, and quantity. Issue Description My objective is to calculate the quantity for each price option ...
Khuzema's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
22