# SQL Error for Postgres Virtual Graph

**URL:** <https://community.stardog.com/t/sql-error-for-postgres-virtual-graph/4094>\
**Category:** Bug\
**Created:** [November 17, 2022, 4:57pm UTC](https://community.stardog.com/t/sql-error-for-postgres-virtual-graph/4094 "2022-11-17T16:57:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mgberg/32/1601_2.png) [@mgberg](https://community.stardog.com/u/mgberg)\
**Post date:** [November 17, 2022, 4:57pm UTC](https://community.stardog.com/t/sql-error-for-postgres-virtual-graph/4094/1 "2022-11-17T16:57:50Z")

</div>

I'm trying to virtualize some data in Postgres, and the generated SQL queries can fail at times as they sometimes contain the following pattern:

CAST("table"."column" AS DOUBLE)

This is problematic because in Postgres the datatype is called DOUBLE PRECISION, not DOUBLE. Copying the failed query and executing it manually after adding PRECISION works. Has anyone encountered this before and is there a fix, or is this actually a bug?

---

<div class="post-metadata">

**Author:** ![PaulJackson](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pauljackson/32/243_2.png) [@PaulJackson](https://community.stardog.com/u/PaulJackson)\
**Post date:** [November 17, 2022, 5:00pm UTC](https://community.stardog.com/t/sql-error-for-postgres-virtual-graph/4094/2 "2022-11-17T17:00:44Z")

</div>

Hi Matt,

This sounds like a bug. I'll create a ticket for it.

Thanks,  
-Paul

---

<div class="post-metadata">

**Author:** ![PaulJackson](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pauljackson/32/243_2.png) [@PaulJackson](https://community.stardog.com/u/PaulJackson)\
**Post date:** [November 17, 2022, 5:02pm UTC](https://community.stardog.com/t/sql-error-for-postgres-virtual-graph/4094/3 "2022-11-17T17:02:48Z")

</div>

> [@mgberg](#):
>
> I'm trying to virtualize some data in Postgres, and the generated SQL queries can fail at times as they sometimes contain the following pattern:
> 
> CAST("table"."column" AS DOUBLE)
> 
> This is problematic because in Postgres the datatype is called DOUBLE PRECISION, not DOUBLE. Copying the failed query and executing it manually after adding PRECISION works. Has anyone encountered this before and is there a fix, or is this actually a bug?

The ticket is [PLAT-5067]
