The array tag has no wiki summary.
2
votes
1answer
29 views
Transpose two-dimensional array from n rows to 2 columns
Background
Using PostgreSQL 9.1, so WITH ORDINAL (a 9.4 feature) is not available.
Problem
Looking to simplify the code that pivots a two-dimensional array.
Code
A working, overly-verbose example ...
1
vote
1answer
80 views
Pass a table array as a parameter to an upsert function in postgresql
i have an UPSERT function which works well but i update and insert records in batches, can this function be modified so that i just pass all the records to this function as an array then it will ...
0
votes
0answers
28 views
Checking of one specific element of one array is in another array?
Suppose I have two arrays. One looking like (3, 9, 10, 39), and one looking like (4, 10, 9, 48, 391, 2).
How would I (through pure MySQL) check if one of the elements in the first array is inside the ...
2
votes
1answer
142 views
Selecting with varbinary(max) criteria (in the where clause)
Basic info
Database: SQL Server Express 2008 R2
Client: SQL Server Management Studio
Backround (skip if not interested):
A project I'm maintaining uses an ORM, which apparently stored my enum ...
5
votes
3answers
181 views
How to pass a table type with an array field to a function in postgresql
i have a table called book
CREATE TABLE book
(
id smallint NOT NULL DEFAULT 0,
bname text,
btype text,
bprices numeric(11,2)[],
CONSTRAINT key PRIMARY KEY (id )
)
and a ...
0
votes
0answers
165 views
PHP - Binding results of an mysqli query to an associative array
I'm trying to retrieve the results of a query using mysqli and put them into an associative array. After searching online I found this post:
...
0
votes
2answers
211 views
ERROR: could not find array type for datatype information_schema.sql_identifier
I am trying to run the below sql command:
SELECT ARRAY(
SELECT column_name
FROM information_schema.columns
WHERE table_name ='gis_field_configuration_stage'
);
and I get the below ...
3
votes
1answer
128 views
Postgresql - Internal Array handling - array type or pointer type
I have a question, about the internal handling of array columns in Postgres.
Does the engine handle it as a classical array with memory alloc or is it somehow a pointer list.
It would be interesting ...
6
votes
1answer
368 views
How do I preserve the order of the original elements in an unnested array?
Given the string
'I think that postgresql is nifty'
, I would like to operate on the individual words found within that string. Essentially, I have a separate from which I can get word details ...
5
votes
1answer
83 views
Retrieve Indices of Associative Array as Collection
In PL/SQL, suppose I have some associative array defined as follows:
declare
type a_arr_t is table of PLS_INTEGER index by PLS_INTEGER;
a_arr a_arr_t;
I then, sparsely, populate the ...