Thread: CREATE DATABASE command in Extended Query mode of 3.0 protocol

CREATE DATABASE command in Extended Query mode of 3.0 protocol

From
Carlos Guzman Alvarez
Date:
Hello:

I'm trying to create a database using the extended query mode ( with my 
own implementation of the 3.0 protocol in C# ) but i'm having problem, 
the CREATE DATABASE command seems to be executed well and the answer of 
the server is the expected but the database is never created, if i exec 
the same command with the simple query cycle all works as expected and 
the database is created, is this the correct behavior ??





-- 
Best regards

Carlos Guzmán Álvarez
Vigo-Spain



Re: CREATE DATABASE command in Extended Query mode of 3.0 protocol

From
Tom Lane
Date:
Carlos Guzman Alvarez <carlosga@telefonica.net> writes:
> I'm trying to create a database using the extended query mode ( with my 
> own implementation of the 3.0 protocol in C# ) but i'm having problem, 
> the CREATE DATABASE command seems to be executed well and the answer of 
> the server is the expected but the database is never created, if i exec 
> the same command with the simple query cycle all works as expected and 
> the database is created, is this the correct behavior ??

No, it should just work.  Can you give a test case?  Do you see similar
problems with other utility commands, or is it only CREATE DATABASE?
        regards, tom lane


Re: CREATE DATABASE command in Extended Query mode of 3.0

From
Carlos Guzman Alvarez
Date:
Hello:

> No, it should just work.  Can you give a test case?  Do you see similar
> problems with other utility commands, or is it only CREATE DATABASE?


I have a litlle test more and i have it working now, i have made change 
for send a Sync message instead of a Flush message after execute the 
command and now seems to be working as expected, is this correct or it 
needs to work with the Flush too??



-- 
Best regards

Carlos Guzmán Álvarez
Vigo-Spain




Re: CREATE DATABASE command in Extended Query mode of 3.0

From
Carlos Guzman Alvarez
Date:
Hello:
> No, it should just work.  Can you give a test case?  Do you see similar> problems with other utility commands, or is
itonly CREATE DATABASE?
 


I have made a litlle test more and i have it working now, i have made 
change for send a Sync message instead of a Flush message after execute 
the command and now seems to be working as expected, is this correct or 
it needs to work with the Flush too??





-- 
Best regards

Carlos Guzmán Álvarez
Vigo-Spain




Re: CREATE DATABASE command in Extended Query mode of 3.0

From
Tom Lane
Date:
Carlos Guzman Alvarez <carlosga@telefonica.net> writes:
> Hello:
>>> No, it should just work.  Can you give a test case?  Do you see similar
>>> problems with other utility commands, or is it only CREATE DATABASE?

> I have made a litlle test more and i have it working now, i have made 
> change for send a Sync message instead of a Flush message after execute 
> the command and now seems to be working as expected, is this correct or 
> it needs to work with the Flush too??

You do need to use Sync rather than Flush to create transaction
boundaries and error restart points.  I suspect your problem was coming
from having only a Flush and not a Sync between the CREATE DATABASE and
the *prior* command.
        regards, tom lane


Re: CREATE DATABASE command in Extended Query mode of 3.0

From
Carlos Guzman Alvarez
Date:
Hello:

> You do need to use Sync rather than Flush to create transaction
> boundaries and error restart points.  I suspect your problem was coming
> from having only a Flush and not a Sync between the CREATE DATABASE and
> the *prior* command.


Huummm there are no prior executed commands, the CREATE DATABASE command 
is the first i execute after connect to the server :)




-- 
Best regards
Carlos Guzmán Álvarez
Vigo-Spain