Re: CREATE TYPE error in PostgreSQL database!!!!!! - Mailing list pgsql-admin

From Holger Jakobs
Subject Re: CREATE TYPE error in PostgreSQL database!!!!!!
Date
Msg-id c2d1f056-67c5-eb93-3904-e7b689bb29c6@jakobs.com
Whole thread Raw
In response to CREATE TYPE error in PostgreSQL database!!!!!!  (Ashok Kumar Mani <ashokkumar.mani@dnata.com>)
List pgsql-admin
Am 03.01.22 um 08:40 schrieb Ashok Kumar Mani:
.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }
Hi Team
While creating function I have encountered the below error in PostgreSQL database.
 
I need to know how to use the array declaration in Type datatype in postgreSQL database. Could you please help or share some exmple to use it?
 
  1. Need to create type
  2. Declare array variable in type datatype.
 
ERROR: syntax error at or near "c_db_fieldvalues" LINE 113: ... fetch usage_cursor into c_db_fieldvalues c_db_field... ^ SQL state: 42601 Character: 9447
 
Thanks & Best Wishes,
Ashok
 

What have you tried? All types in PostgreSQL can also be used as arrays. Put empty brackets after the type an it's a one-dimensional array. Put two pairs of empty brackets after the type and it's a two-dimensional array.

There is no need to explicitly create an array type.

see https://www.postgresql.org/docs/current/arrays.html


-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Attachment

pgsql-admin by date:

Previous
From: Ashok Kumar Mani
Date:
Subject: CREATE TYPE error in PostgreSQL database!!!!!!
Next
From: "ldh@laurent-hasson.com"
Date:
Subject: RE: CREATE TYPE error in PostgreSQL database!!!!!!