pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCREATE TYPE error in PostgreSQL database!!!!!!
3+ messages / 3 participants
[nested] [flat]
* CREATE TYPE error in PostgreSQL database!!!!!!
@ 2022-01-03 07:40 Ashok Kumar Mani <ashokkumar.mani@dnata.com>
2022-01-03 15:05 ` Re: CREATE TYPE error in PostgreSQL database!!!!!! Holger Jakobs <holger@jakobs.com>
2022-01-03 21:33 ` RE: CREATE TYPE error in PostgreSQL database!!!!!! ldh@laurent-hasson.com <ldh@laurent-hasson.com>
0 siblings, 2 replies; 3+ messages in thread
From: Ashok Kumar Mani @ 2022-01-03 07:40 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CREATE TYPE error in PostgreSQL database!!!!!!
2022-01-03 07:40 CREATE TYPE error in PostgreSQL database!!!!!! Ashok Kumar Mani <ashokkumar.mani@dnata.com>
@ 2022-01-03 15:05 ` Holger Jakobs <holger@jakobs.com>
1 sibling, 0 replies; 3+ messages in thread
From: Holger Jakobs @ 2022-01-03 15:05 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Am 03.01.22 um 08:40 schrieb Ashok Kumar Mani:
> 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
Attachments:
OpenPGP_signature (application/pgp-signature, 202B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: CREATE TYPE error in PostgreSQL database!!!!!!
2022-01-03 07:40 CREATE TYPE error in PostgreSQL database!!!!!! Ashok Kumar Mani <ashokkumar.mani@dnata.com>
@ 2022-01-03 21:33 ` ldh@laurent-hasson.com <ldh@laurent-hasson.com>
1 sibling, 0 replies; 3+ messages in thread
From: ldh@laurent-hasson.com @ 2022-01-03 21:33 UTC (permalink / raw)
To: Ashok Kumar Mani <ashokkumar.mani@dnata.com>; pgsql-admin
From: Ashok Kumar Mani <ashokkumar.mani@dnata.com>
Sent: Monday, January 03, 2022 02:40
To: pgsql-admin@postgresql.org
Subject: CREATE TYPE error in PostgreSQL database!!!!!!
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
[Laurent Hasson]
Can you post your code that's erroring out?
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-01-03 21:33 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 07:40 CREATE TYPE error in PostgreSQL database!!!!!! Ashok Kumar Mani <ashokkumar.mani@dnata.com>
2022-01-03 15:05 ` Holger Jakobs <holger@jakobs.com>
2022-01-03 21:33 ` ldh@laurent-hasson.com <ldh@laurent-hasson.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox