2000-01-15  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCreateQuery): 
	Fixed bug: When the first field in the definition was NULL
	the query string had an error, no field definition was written
	between the first parent and the first coma.
	Added a counter (i) for the fields written into the query string,
	so unless ( i != 0 ) we dont add a coma, and (i) is only 
	incremented if a field has been written.

1999-12-26  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (Exec): 
	Added the PQgetisnull test so we can know when a
	field is attribute is a NULL value.
	Now the GTransIFaseResult contains a NULL pointer where
	the item is NULL value, and not an empty string as returned
	by PQgetvalue.
	

1999-12-26  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (Exec): 
	Now the member fields of the GTransIFaseResult, must me
	a NULL terminated arry.

	
1999-12-26  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerFieldTypes): 
	Fixed a misstype in the field types.
	"RELATIME" -> "RELTIME".
	Thanks to Michel Onstein for reporting and patching.

1999-12-20  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerTypeMasks): 
	Geometrics don allow indices, or caouse trouble
	with them, so I filtered them in the type masks.

1999-12-20  Matias Mutchinick  <mmb@quetzal.innsz.mx>  

	* src/postgresql.c (TableDesignerTypeMasks): 
	Money type does not allow indices so I changed,
	the field type mask to 6.

1999-12-20  Matias Mutchinick  <mmb@quetzal.innsz.mx>  

	* src/postgresql.c (TableDesignerTypeMasks): 
	Point type does not allow indices so I changed,
	the field type mask to 6.
	
1999-12-20  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerTypeMasks): 
	Bool type does not allow indices so I changed,
	the field type mask to 6.

1999-12-11  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (Exec): 
	Merged Exec and Result to get a more apropiate
	error message calling.

1999-12-11  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerFreeTableDefs): 
	Free the table definition.

1999-12-11  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerFreeQueryList): 
	Free the query list and all the quey strings.

1999-12-11  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerExecQueryList): 
	New: Executes the create table , index 
	query list in a transacrion block.

1999-12-11  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCreateQueryList): 
	This function creates the query list that will be sent
	in a transaction block to the postgres backend.

1999-12-11  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCreateIndexQuery): 
	Added tis function to create the create query for an index

1999-12-07  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c: 
	Removed the MISSIN_NOT_NULL error from all the functions.
	(TableDesignerErrorMsg)
	(TableDesignerValidateField) and
	the enum of error types.
	

1999-12-07  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c:
	Renamed :
	(TableDesignerValidateWSyntax) as (TableDesignerValidateWordSyntax)
	
	* src/postgresql.c:
	Removed function (TableDesignerValidateWord):
	and replacedit with two other functions.
	(TableDesignerValidateWordField): to validate field names.
	(TableDesignerValidateWordId): to validate id names.
	
1999-12-07  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateWordField): 
	Created this function.
	Postgres has reserved key words that are valid for column names
	and not valid identifier names, such as table's function's.
	This function checks if the given word is a valid field name.
	
1999-12-07  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateWordId): 
	Created this function.
	Postgres has reserved key words that are valid for column names
	and not valid identifier names, such as table.
	This function checks if the given word is a valid id name.

1999-12-07  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/reserved.h: 
	Added reerved key-words for postgreSQL.

1999-12-07  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerTypeMasks): 
	Changed the mask for "SERIAL" type to binary #1000
	cause it doesnt allow NOT NULL , or DEFAULT's.
	This fixes a bug in the designer, where the query
	returned a syntax error.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateString): 
	Fixed bug: Would not validate ok the string cause
	it allowed '\'' char to be inside the string.
	This function checks that a string is valid to use
	for the "DEFAULT" attribute. 

	
1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCreateTable): 
	Modified to fit the postgresql connection.
	Checks the table definition.
	Executes the query.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCreateQuery): 
	Modified to fit the current designer.
	Creates the create query, but doesnt work at
	100%.
	Will fix soon.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCalcQuerySize): 
	Modified to fit the current designer.
	Returns the size, this is, the numer of characters
	needed for the query string.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerCalcFieldSize): 
	Modified to fit the current designer.
	Return the size needed by a field definition in the
	create clause.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateTable): 
	Created this function.
	Validates the table definition, checks the fields,
	names, syntax, indexes, keys....
	Returns error message or NULL if ok.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidatePrimaryKey): 
	Validates the number of "PRIMARY KEY" defined.
	( NO MORE THAN 1 )

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateFieldNumber): 
	Valdates the number of defined fields. ( != 0 ).
	
1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateFields): 
	Validate all the fields with recurrent calls to
	(TableDesignerValidateField)

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateField): 
	Changed this funcion to fit the current designer.
	This function validates the field definitions, checks
	syntax, valid indexation, and lots of stuff.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateWSyntax): 
	Created this function to validate the syntax of
	a word, this is, no forbidden charactes, or something
	that could mess up the query.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateWord): 
	Created this function to validate words, this is
	verify that are not reserved PostgreSQL words.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateString): 
	Created this function to parse and validate the
	"default" attribute.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerValidateLength): 
	Created this function, to validate the "length"
	field attribute.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerParseInt): 
	Created this function to parse a string
	and know if it fits an integer number syntax.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerErrorMsg): 
	Created this function, to get an error message,
	from the error id.

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerAttrNames): 
	Modified to support 4 type attributes.
	
1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerAttrVals): 
	Modified to support 4 type attributes.
	( Length , Nullity , Default , Indexes )

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c (TableDesignerIndexes): 
	Modified to support the correct postgresql keys.
	( INDEX , UNIQUE INDEX , PRIMARY KEY )

1999-12-06  Matias Mutchinick  <mmb@quetzal.innsz.mx>

	* src/postgresql.c 
	(TableDesignerTypeMasks): 
	Modified to fit the 4 attribute postgres designer,
	this is, changed the bit masks to a 4 bit number.

	(TableDesignerNullity): 
	I think this one remainde the same, but I changed
	almost everything, so...

	
