? config.log ? dbs ? config.cache ? config.status ? update.pb.sh ? make.pb.sh ? GNUmakefile ? pb.sql ? restart.pb.sh ? src/GNUmakefile ? src/Makefile.global ? src/backend/postgres ? src/backend/catalog/postgres.bki ? src/backend/catalog/postgres.description ? src/backend/parser/pb ? src/backend/port/Makefile ? src/bin/initdb/initdb ? src/bin/initlocation/initlocation ? src/bin/ipcclean/ipcclean ? src/bin/pg_config/pg_config ? src/bin/pg_ctl/pg_ctl ? src/bin/pg_dump/pg_dump ? src/bin/pg_dump/pg_restore ? src/bin/pg_dump/pg_dumpall ? src/bin/pg_id/pg_id ? src/bin/pg_passwd/pg_passwd ? src/bin/psql/psql ? src/bin/scripts/createlang ? src/include/pg_config.h ? src/include/stamp-h ? src/interfaces/ecpg/lib/libecpg.so.3.3.0 ? src/interfaces/ecpg/preproc/ecpg ? src/interfaces/libpgeasy/libpgeasy.so.2.2 ? src/interfaces/libpq/libpq.so.2.2 ? src/pl/plpgsql/src/libplpgsql.so.1.0 Index: src/backend/parser/gram.y =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/gram.y,v retrieving revision 2.276 diff -r2.276 gram.y 3305c3305 < insert_rest: VALUES '(' target_list ')' --- > insert_rest: VALUES '(' target_list ')' 5493a5494,5497 > /* pavlo (pb@pbit.org): 2001-12-26: handling for the 'default' value added; > it generates the @default string being handled later; > now it's possible to INSERT INTO ... VALUES (..., FEFAULT, ...)! > */ 5500a5505,5514 > | DEFAULT > { > A_Const *n = makeNode(A_Const); > $$ = makeNode(ResTarget); > $$->name = NULL; > $$->indirection = NULL; > n->val.type = T_String; > n->val.val.str = "@default"; > $$->val = (Node *)n; > } 6383c6397 < } --- > } \ No newline at end of file Index: src/backend/parser/parse_coerce.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/parse_coerce.c,v retrieving revision 2.64 diff -r2.64 parse_coerce.c 39c39 < Node *result; --- > Node *result; 69d68 < 75d73 < 80a79,85 > /* pavlo (pb@pbit.org): 2001-12-26: handle the @default string used to > * replace this place holder the default column value in an INSERT-statement. > */ > if (strcmp(val, "@default") == 0) > newcon->constvalue = strdup(val); > else > newcon->constvalue = stringTypeDatum(targetType, val, atttypmod); 82d86 < newcon->constvalue = stringTypeDatum(targetType, val, atttypmod); 607c611 < } /* PreferredType() */ --- > } /* PreferredType() */ \ No newline at end of file Index: src/backend/parser/parse_target.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/parse_target.c,v retrieving revision 1.76 diff -r1.76 parse_target.c 269a270,291 > else > { > /* pavlo (pb@pbit.org): 2001-12-26: handle the @default string used to > * replace this place holder the default column value in an INSERT-statement. > * This must be the right place for doing such replacement... > */ > if (type_id == UNKNOWNOID && IsA(tle->expr, Const)) > { > if (strcmp(((Const*)(tle->expr))->constvalue, "@default") == 0) > { > if (rd->rd_att->attrs[attrno - 1]->atthasdef) > { > Type targetType = typeidType(attrtype); > Const *con = (Const *) stringToNode(rd->rd_att->constr->defval[attrno - 1].adbin); > ((Const*)(tle->expr))->constvalue = con->constvalue; > ReleaseSysCache(targetType); > } > else > elog(ERROR, "no default value found for column \"%s\"\nDEFAULT cannot be inserted"); > } > } > } 302c324 < expr = coerce_type(pstate, expr, type_id, attrtype, attrtypmod); --- > expr = coerce_type(pstate, expr, type_id, attrtype, attrtypmod); 528c550 < } --- > } \ No newline at end of file Index: src/backend/parser/scan.l =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/scan.l,v retrieving revision 1.90 diff -r1.90 scan.l 640c640 < #endif /* FLEX_SCANNER */ --- > #endif /* FLEX_SCANNER */ \ No newline at end of file