cannot CREATE CAST PostgreSQL 9.6

已查看 269 次
跳至第一个未读帖子

javier.g...@ingennia.cl

未读,
2018年8月1日 09:00:532018/8/1
收件人 Google Cloud SQL discuss
CREATE CAST (text AS smallint) WITH INOUT AS IMPLICIT;

=> ERROR:  must be owner of type text or type smallint

Any alternative or solution to this? 
It's really pushing me back on Google SQL as an alternative.

George (Cloud Platform Support)

未读,
2018年8月2日 16:47:182018/8/2
收件人 google-cloud...@googlegroups.com
Hello Javier, 

To be able to create a cast, you must own the source or the target data type and have USAGE privilege on the other type. You may have a look at the "CREATE CAST" documentation page

If you use WITHOUT FUNCTION, you must enjoy superuser privileges. This is never the case in Cloud SQL PostgreSQL. In what context do you call the CREATE CAST statement? What would you like to achieve? A detailed use-case would definitely help in defining and clarifying the scope of the issue. 

Daniel Joyce

未读,
2018年10月5日 15:29:552018/10/5
收件人 Google Cloud SQL discuss
We need custom casts to simplify certain kinds of queries. This is a useful feature in general given postgres' support of custom data types. Its sad there is no easy way to do this.

-Daniel

George (Cloud Platform Support)

未读,
2018年10月5日 17:31:592018/10/5
收件人 google-cloud...@googlegroups.com
Hi Javier, 

If you think your feature is needed and helpful for many, you are encouraged to open a similarly formulated issue in the Public Issue Tracker. To facilitate issue assessment and Engineering work towards its implementation, a detailed use-case would definitely help in defining and clarifying the scope of the issue. This use-case should refer to and incorporate the context of your CREATE CAST statement, and its ultimate purpose: what you'd like to achieve.

Daniel Joyce

未读,
2018年10月7日 10:40:352018/10/7
收件人 Google Cloud SQL discuss
Also it would be nice to be able to add casts for existing types, which are currently owned by cloudsqladmin :/

George (Cloud Platform Support)

未读,
2018年10月7日 11:30:422018/10/7
收件人 Google Cloud SQL discuss
Hello Daniel, 

You are similarly encouraged to open a feature request in the Public Issue Tracker, with a detailed use-case, and explanation of the need for the new feature. One feature request per issue in Tracker makes assessment and implementation easier. 
回复全部
回复作者
转发
0 个新帖子