![](https://secure.gravatar.com/avatar/07480171a9741333d26c96bd6623c1c5.jpg?s=120&d=mm&r=g)
Hi! It seems to be, that there is a BUG on the statement CREATE TABLE..
It is not being consider the *DEFAULT property.*
Take a look on the following example:
sql>CREATE TABLE test (updated TIMESTAMP(0) DEFAULT current_timestamp()); operation successful (1.433ms) sql>\d test CREATE TABLE "sb_traf"."test" ( "updated" TIMESTAMP(0) DEFAULT current_timestamp() );
sql>CREATE TABLE test2 (LIKE test); operation successful (1.102ms) sql>\d test2 CREATE TABLE "sb_traf"."test2" ( "updated" TIMESTAMP(0) );
May be Im missing something, if thats the case, please let me know! Rgds Ariel
![](https://secure.gravatar.com/avatar/07480171a9741333d26c96bd6623c1c5.jpg?s=120&d=mm&r=g)
Anybody, an idea ?
On Tue, Jan 9, 2018 at 1:13 PM, Ariel Abadi aabadi@starconnecting.com wrote:
Hi! It seems to be, that there is a BUG on the statement CREATE TABLE..
It is not being consider the *DEFAULT property.*
Take a look on the following example:
sql>CREATE TABLE test (updated TIMESTAMP(0) DEFAULT current_timestamp()); operation successful (1.433ms) sql>\d test CREATE TABLE "sb_traf"."test" ( "updated" TIMESTAMP(0) DEFAULT current_timestamp() );
sql>CREATE TABLE test2 (LIKE test); operation successful (1.102ms) sql>\d test2 CREATE TABLE "sb_traf"."test2" ( "updated" TIMESTAMP(0) );
May be Im missing something, if thats the case, please let me know! Rgds Ariel
![](https://secure.gravatar.com/avatar/fef2c36212357b81f48efe7e25cfbf5c.jpg?s=120&d=mm&r=g)
On Tue, Jan 16, 2018 at 11:02:35AM -0300, Ariel Abadi wrote:
Anybody, an idea ?
Ariel
The current implementations of LIKE only creates the columns like the given table and for the columns only the types are the same. So no constraints, indices or default values.
So for postgres users with default like_options: EXCLUDING ALL.
Also none of the like_options are handled. { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS | INDEXES | STORAGE | COMMENTS | ALL }
Maybe you could create a feature request for this.
Niels
On Tue, Jan 9, 2018 at 1:13 PM, Ariel Abadi aabadi@starconnecting.com wrote:
Hi! It seems to be, that there is a BUG on the statement CREATE TABLE.. It is not being consider the DEFAULT property. Take a look on the following example: sql>CREATE TABLE test (updated TIMESTAMP(0) DEFAULT current_timestamp()); operation successful (1.433ms) sql>\d test CREATE TABLE "sb_traf"."test" ( "updated" TIMESTAMP(0) DEFAULT current_timestamp() ); sql>CREATE TABLE test2 (LIKE test); operation successful (1.102ms) sql>\d test2 CREATE TABLE "sb_traf"."test2" ( "updated" TIMESTAMP(0) ); May be Im missing something, if thats the case, please let me know! Rgds Ariel
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Ariel Abadi
-
Niels Nes