All Questions
Tagged with node-postgres arrays
4
questions
2
votes
1answer
140 views
Node-Postgres/Knex returning CITEXT[] as a string in JS, instead of an array of strings
I'm using Knex, which itself uses package "pg" (aka "node-postgres").
If you SELECT some rows from a table with a TEXT[] column, all is well... in JS you get an array of strings.
...
2
votes
3answers
6k views
Pass array from node-postgres to plpgsql function
The plpgsql function:
CREATE OR REPLACE FUNCTION testarray (int[]) returns int as $$
DECLARE
len int;
BEGIN
len := array_upper($1);
return len;
END
$$ language plpgsql;
The node-...
1
vote
1answer
1k views
Passing array of custom type to postgres function from node-pg and SQL injection
CREATE TYPE phototable AS (
photoid integer,
parentid integer,
fileextension character varying(20),
description text,
tag character varying(100)
);
CREATE FUNCTION addphotos(
...
1
vote
1answer
1k views
NodeJS–Add Array of String in PostgreSQL Query
I am trying to write a postgres query (executed in nodejs using a pool created using the node-postgres package) that will insert a new row in a table. One of the columns in this table is of type text[]...