Provided by: manpages-zh_1.5.2-1_all bug

NAME

       CREATE CAST -

SYNOPSIS

       CREATE CAST (sourcetype AS targettype)
           WITH FUNCTION funcname (argtype)
           [ AS ASSIGNMENT | AS IMPLICIT ]

       CREATE CAST (sourcetype AS targettype)
           WITHOUT FUNCTION
           [ AS ASSIGNMENT | AS IMPLICIT ]

DESCRIPTION

       CREATE CAST

       SELECT CAST(42 AS text);

        42  text  text(int4)

        ""   text  varchar

         CAST(x AS typename) x::typename typename(x)

        AS ASSIGNMENT  foo.f1  text

       INSERT INTO foo (f1) VALUES (42);

        integer  text  AS ASSIGNMENT

        AS IMPLICIT  ||  text

       SELECT 'The time is ' || now();

        timestamp  text  AS IMPLICIT

       SELECT 'The time is ' || CAST(now() AS text);

         PostgreSQL     int2  int4   float8  int4   text  int4

PARAMETERS

       sourcetype

       targettype

       funcname(argtype)

       WITHOUT FUNCTION

       AS ASSIGNMENT

       AS IMPLICIT

NOTES

        DROP CAST

        PostgreSQL 7.3     pg_cast

EXAMPLES

        int4(text)  text  int4

       CREATE CAST (text AS int4) WITH FUNCTION int4(text);

COMPATIBILITY

       CREATE CAST  SQL99 SQL99 AS IMPLICIT  PostgreSQL

SEE ALSO

       CREATE  FUNCTION  [create_function(7)],  CREATE  TYPE [create_type(7)],
       DROP CAST [drop_cast(7)]

       Postgresql  <laser@pgsqldb.org>