mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 19:07:50 +00:00
address ben's comments
This commit is contained in:
parent
5d57d361f4
commit
4d4f64a339
4 changed files with 6 additions and 15 deletions
10
pg/type.go
10
pg/type.go
|
|
@ -32,15 +32,6 @@ var TypeINT4OID = Type{Id: 23, Typelen: 4}
|
|||
var TypeTEXTOID = Type{Id: 25, Typelen: -1}
|
||||
var TypeFLOAT8OID = Type{Id: 701, Typelen: 8}
|
||||
|
||||
// TypeData is a type containing raw postgres wire type information.
|
||||
/*
|
||||
type TypeData struct {
|
||||
TypeID int32
|
||||
TypeLen int16
|
||||
TypeModifier int32
|
||||
}
|
||||
*/
|
||||
|
||||
// TypeEngine is a system for managing types.
|
||||
// This is necessary for compound types like arrays which need ID generation.
|
||||
type TypeEngine interface {
|
||||
|
|
@ -71,7 +62,6 @@ func (pte PrimitiveTypeEngine) TranslateType(t Type) (message.ColumnDescription,
|
|||
case TypeFLOAT8OID:
|
||||
TypeID = TypeFLOAT8OID.Id
|
||||
TypeLen = TypeFLOAT8OID.Typelen
|
||||
//case
|
||||
default: // treat like TypeCharoid:
|
||||
TypeID = TypeCharoid.Id
|
||||
TypeLen = TypeCharoid.Typelen
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ func NewDefaultConfig() *Config {
|
|||
MaxWALSize: DefaultMaxWALSize,
|
||||
MinWALCheckpointSize: DefaultMinWALCheckpointSize,
|
||||
MaxWALCheckpointSize: DefaultMaxWALCheckpointSize,
|
||||
FsyncEnabled: false,
|
||||
FsyncEnabled: true,
|
||||
|
||||
// CI passed with 20. 50 was too big for CI, even on X-large instances.
|
||||
// For now we default to 0, which means use sync.Pool.
|
||||
|
|
|
|||
|
|
@ -419,12 +419,13 @@ func pgWriteStmtRows(w pg.QueryResultWriter, rows *pilosa.StmtRows) error {
|
|||
return nil
|
||||
}
|
||||
func getPgTypeFromColumnInfo(sql2type string) pg.Type {
|
||||
ret := pg.TypeCharoid
|
||||
switch sql2type {
|
||||
case sql2.DataTypeInt:
|
||||
ret = pg.TypeINT4OID
|
||||
return pg.TypeINT4OID
|
||||
default:
|
||||
return pg.TypeCharoid
|
||||
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
var _ = getPgTypeFromColumnInfo //make linter happy for this function will be needed in future
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ type Config struct {
|
|||
func NewDefaultConfig() *Config {
|
||||
return &Config{
|
||||
Backend: DefaultBackend,
|
||||
FsyncEnabled: false,
|
||||
FsyncEnabled: true,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue