Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 447

How to create the array of rows by hand in PostgreSQL?

$
0
0

I'm trying to create the array of rows with ::RECORD[] or ::RECORD by hand as shown below:

SELECT ARRAY['(John,Smith)','(David,Miller)']::RECORD[];

Or:

SELECT ARRAY['(John,Smith)'::RECORD,'(David,Miller)'::RECORD];

But I got the error below:

ERROR: input of anonymous composite types is not implemented

Actually, I could run the query without ::RECORD[] or ::RECORD below but the type is TEXT[]:

SELECT ARRAY['(John,Smith)','(David,Miller)'];

So, how can I create the array of rows by hand?


Viewing all articles
Browse latest Browse all 447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>