pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Upgrading from 9.6 to 12 and running into cast issues with pg_catalog.text()
3+ messages / 2 participants
[nested] [flat]

* Upgrading from 9.6 to 12 and running into cast issues with pg_catalog.text()
@ 2019-10-30 03:17  Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Wells Oliver @ 2019-10-30 03:17 UTC (permalink / raw)
  To: pgsql-admin

I have some implicit casts such as real to text where they depend on the
function pg_catalog.text(real) which seems to no longer exist in 12. The
pg_upgrade failure says:

Command was: CREATE CAST (real AS "text") WITH FUNCTION
"pg_catalog"."text"(real) AS IMPLICIT;

Should I just DROP CAST (real as text) or is there a better solution?


-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Upgrading from 9.6 to 12 and running into cast issues with pg_catalog.text()
@ 2019-10-30 05:22  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2019-10-30 05:22 UTC (permalink / raw)
  To: Wells Oliver <wells.oliver@gmail.com>; +Cc: pgsql-admin

Wells Oliver <wells.oliver@gmail.com> writes:
> I have some implicit casts such as real to text where they depend on the
> function pg_catalog.text(real) which seems to no longer exist in 12. The
> pg_upgrade failure says:

> Command was: CREATE CAST (real AS "text") WITH FUNCTION
> "pg_catalog"."text"(real) AS IMPLICIT;

Hm, there wasn't any such function in 9.6 either, so I suspect you've
forgotten some critical details about how these casts got created.
But anyway, if you really want that behavior, creating the cast
"WITH INOUT" is probably the best way to do it.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Upgrading from 9.6 to 12 and running into cast issues with pg_catalog.text()
@ 2019-10-30 05:27  Wells Oliver <wells.oliver@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Wells Oliver @ 2019-10-30 05:27 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Thanks, Tom! I found some long ago (8.3) code that created 15 implicit
casts (AND the needed functions within pg_catalog that I had been using
through the years, so I was able to drop them and move forward. Ah, memory
lane.


On Tue, Oct 29, 2019 at 10:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Wells Oliver <wells.oliver@gmail.com> writes:
> > I have some implicit casts such as real to text where they depend on the
> > function pg_catalog.text(real) which seems to no longer exist in 12. The
> > pg_upgrade failure says:
>
> > Command was: CREATE CAST (real AS "text") WITH FUNCTION
> > "pg_catalog"."text"(real) AS IMPLICIT;
>
> Hm, there wasn't any such function in 9.6 either, so I suspect you've
> forgotten some critical details about how these casts got created.
> But anyway, if you really want that behavior, creating the cast
> "WITH INOUT" is probably the best way to do it.
>
>                         regards, tom lane
>


-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-10-30 05:27 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 03:17 Upgrading from 9.6 to 12 and running into cast issues with pg_catalog.text() Wells Oliver <wells.oliver@gmail.com>
2019-10-30 05:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-10-30 05:27   ` Wells Oliver <wells.oliver@gmail.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