0
CREATE TYPE dbobj_vry AS
(
    a character varying[]
);

CREATE TABLE IF NOT EXISTS calender
(
    day_name text COLLATE pg_catalog."default",
    day_date dbobj_vry
)

TABLESPACE pg_default;

Try to insert data in Calendar table.

insert into calender values ('1',dbobj_vry [9,5]);

It is not working.

Error shown - ERROR: syntax error at or near "," LINE 2: dbobj_vry [9,5] ^ SQL state: 42601 Character: 89

Jit Sarkar
  • 17
  • 3
  • "It's not working" is not a valid Postgres error message. The syntax to specify composite type values is [documented in the manual](https://www.postgresql.org/docs/current/rowtypes.html) –  Jul 26 '22 at 09:46
  • 1
    This looks like a really horrible design. What is the underlying problem you are trying to solve here? –  Jul 26 '22 at 09:47
  • @a_horse_with_no_name actually just try to insert data in calendar tables. can't able to insert. pls suggest correct syntax. – Jit Sarkar Jul 26 '22 at 10:13
  • The correct syntax is [the link](https://www.postgresql.org/docs/current/rowtypes.html) from my first comment. That looks like a really horrible way to store a "calendar" –  Jul 26 '22 at 10:14

0 Answers0