CREATE DATABASE command in Extended Query mode of 3.0 protocol

Started by Carlos Guzman Alvarezover 22 years ago6 messages
#1Carlos Guzman Alvarez
carlosga@telefonica.net

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Carlos Guzman Alvarez (#1)
Re: CREATE DATABASE command in Extended Query mode of 3.0 protocol

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

#3Carlos Guzman Alvarez
carlosga@telefonica.net
In reply to: Tom Lane (#2)
Re: CREATE DATABASE command in Extended Query mode of 3.0

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

#4Carlos Guzman Alvarez
carlosga@telefonica.net
In reply to: Tom Lane (#2)
Re: CREATE DATABASE command in Extended Query mode of 3.0

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??

--
Best regards

Carlos Guzm�n �lvarez
Vigo-Spain

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Carlos Guzman Alvarez (#4)
Re: CREATE DATABASE command in Extended Query mode of 3.0

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

#6Carlos Guzman Alvarez
carlosga@telefonica.net
In reply to: Tom Lane (#5)
Re: CREATE DATABASE command in Extended Query mode of 3.0

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