From: | aditya desai <admad123(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Convert text to user defined datatype |
Date: | 2021-10-25 03:27:15 |
Message-ID: | CAN0SRDGDSBvZOPR7_8Ea1utVfARzd-Px1msj4fuzuesdRg6z9Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks guys! Let me try out few things and get back to you in case I am
stuck.
On Sat, Oct 23, 2021 at 8:09 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> aditya desai <admad123(at)gmail(dot)com> writes:
> > Thanks Jean. However I am trying this inside procedure and getting an
> > error. Will try to send screenshot.
>
> That's frowned on around here. Can't you copy-and-paste the code
> and the error message?
>
> As Jean-Marc says, you shouldn't really need a defined CAST
> object to cast to or from text; Postgres will interpret that
> as a request to apply the datatype's I/O functions.
>
> You can formalize that by creating a cast "WITH INOUT", but
> you shouldn't need to, so I think your problem here is something
> different from what you said. Hard to give more advice without
> seeing the problem code and the specific error.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | aditya desai | 2021-10-28 17:43:59 | How to assign variable in array value inside function proc. |
Previous Message | Tom Lane | 2021-10-23 14:39:03 | Re: Convert text to user defined datatype |