Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/3bafa427714a80609104 to your computer and use it in GitHub Desktop.
Save doctrinebot/3bafa427714a80609104 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DBAL-21 - https://github.com/doctrine/dbal/issues/1383
250,251c250,269
< t.typname AS type,
< format_type(a.atttypid, a.atttypmod) AS complete_type,
---
> COALESCE(
> (
> SELECT t1.typname
> FROM pg_catalog.pg_type t1
> WHERE t1.oid = t.typbasetype
> ),
> t.typname
> ) AS type,
> COALESCE(
> (
> SELECT
> format_type(t2.typbasetype, t2.typtypmod)
> FROM
> pg_catalog.pg_type t2
> WHERE
> t2.typtype = 'd'
> AND t2.typname = format_type(a.atttypid, a.atttypmod)
> ),
> format_type(a.atttypid, a.atttypmod)
> ) AS complete_type,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment