Hi, I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort: - Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain. - Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized) - When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk) - What is the difference between PGAsciiRow and PGDataRow? Doru -- www.tudorgirba.com "Every thing has its own flow"
Another thing I see in the comment of PGConnection is this: Copyright (c) 2001-2003 by Yanni Chiu. All Rights Reserved. Does anyone know the actual license? Doru On Sun, Mar 2, 2014 at 5:34 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"
Hmmm. Didn't remember that was there. IIRC, it was released under Squeak Licence, via SqueakMap. Then when migrated to squeaksource.com, I believe it was marked as MIT. I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. -- Yanni On 02/03/2014 11:36 AM, Tudor Girba wrote:
Another thing I see in the comment of PGConnection is this: Copyright (c) 2001-2003 by Yanni Chiu. All Rights Reserved.
Does anyone know the actual license?
Doru
On Sun, Mar 2, 2014 at 5:34 PM, Tudor Girba <tudor@tudorgirba.com <mailto:tudor@tudorgirba.com>> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
Thank you, Yanni! Doru On Mon, Mar 3, 2014 at 12:11 AM, Yanni Chiu <yanni@rogers.com> wrote:
Hmmm. Didn't remember that was there. IIRC, it was released under Squeak Licence, via SqueakMap. Then when migrated to squeaksource.com, I believe it was marked as MIT. I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. -- Yanni
On 02/03/2014 11:36 AM, Tudor Girba wrote:
Another thing I see in the comment of PGConnection is this: Copyright (c) 2001-2003 by Yanni Chiu. All Rights Reserved.
Does anyone know the actual license?
Doru
On Sun, Mar 2, 2014 at 5:34 PM, Tudor Girba <tudor@tudorgirba.com <mailto:tudor@tudorgirba.com>> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"
Doru Will you add comments in the classes? Where the code located? Would be good to migrate it to SmalltalkHub. Stef On 03 Mar 2014, at 07:27, Tudor Girba <tudor@tudorgirba.com> wrote:
Thank you, Yanni!
Doru
On Mon, Mar 3, 2014 at 12:11 AM, Yanni Chiu <yanni@rogers.com> wrote: Hmmm. Didn't remember that was there. IIRC, it was released under Squeak Licence, via SqueakMap. Then when migrated to squeaksource.com, I believe it was marked as MIT. I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. -- Yanni
On 02/03/2014 11:36 AM, Tudor Girba wrote: Another thing I see in the comment of PGConnection is this: Copyright (c) 2001-2003 by Yanni Chiu. All Rights Reserved.
Does anyone know the actual license?
Doru
On Sun, Mar 2, 2014 at 5:34 PM, Tudor Girba <tudor@tudorgirba.com <mailto:tudor@tudorgirba.com>> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com
"Every thing has its own flow"
I will add some comments and will create some tool support as well. For now, I updated the copyright notice: Name: PostgresV2-TudorGirba.30 Author: TudorGirba Time: 3 March 2014, 7:46:26.827104 am UUID: 7efdf379-1733-470b-a84e-29ed8f79dd6e Ancestors: PostgresV2-EdwinDH.29 updated the copyright notice based on a mail from the author Yanni Chiu: <quote> I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. </quote> It is already in StHub in PharoExtras :). Cheers, Doru On Mon, Mar 3, 2014 at 7:37 AM, Pharo4Stef <pharo4Stef@free.fr> wrote:
Doru
Will you add comments in the classes? Where the code located? Would be good to migrate it to SmalltalkHub.
Stef
On 03 Mar 2014, at 07:27, Tudor Girba <tudor@tudorgirba.com> wrote:
Thank you, Yanni!
Doru
On Mon, Mar 3, 2014 at 12:11 AM, Yanni Chiu <yanni@rogers.com> wrote:
Hmmm. Didn't remember that was there. IIRC, it was released under Squeak Licence, via SqueakMap. Then when migrated to squeaksource.com, I believe it was marked as MIT. I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. -- Yanni
On 02/03/2014 11:36 AM, Tudor Girba wrote:
Another thing I see in the comment of PGConnection is this: Copyright (c) 2001-2003 by Yanni Chiu. All Rights Reserved.
Does anyone know the actual license?
Doru
On Sun, Mar 2, 2014 at 5:34 PM, Tudor Girba <tudor@tudorgirba.com <mailto:tudor@tudorgirba.com>> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"
excellent! I will put ROE close to it when I have a moment. I should also do some integration but Iâm refactoring a house right now (without a refactoring browser) Setf On 03 Mar 2014, at 07:46, Tudor Girba <tudor@tudorgirba.com> wrote:
I will add some comments and will create some tool support as well. For now, I updated the copyright notice:
Name: PostgresV2-TudorGirba.30 Author: TudorGirba Time: 3 March 2014, 7:46:26.827104 am UUID: 7efdf379-1733-470b-a84e-29ed8f79dd6e Ancestors: PostgresV2-EdwinDH.29
updated the copyright notice based on a mail from the author Yanni Chiu:
<quote> I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. </quote>
It is already in StHub in PharoExtras :).
Cheers, Doru
On Mon, Mar 3, 2014 at 7:37 AM, Pharo4Stef <pharo4Stef@free.fr> wrote: Doru
Will you add comments in the classes? Where the code located? Would be good to migrate it to SmalltalkHub.
Stef
On 03 Mar 2014, at 07:27, Tudor Girba <tudor@tudorgirba.com> wrote:
Thank you, Yanni!
Doru
On Mon, Mar 3, 2014 at 12:11 AM, Yanni Chiu <yanni@rogers.com> wrote: Hmmm. Didn't remember that was there. IIRC, it was released under Squeak Licence, via SqueakMap. Then when migrated to squeaksource.com, I believe it was marked as MIT. I've lost track of where it's being actively maintained, but please go ahead and remove or update the copyright text in the comment to MIT. -- Yanni
On 02/03/2014 11:36 AM, Tudor Girba wrote: Another thing I see in the comment of PGConnection is this: Copyright (c) 2001-2003 by Yanni Chiu. All Rights Reserved.
Does anyone know the actual license?
Doru
On Sun, Mar 2, 2014 at 5:34 PM, Tudor Girba <tudor@tudorgirba.com <mailto:tudor@tudorgirba.com>> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com
"Every thing has its own flow"
On 02/03/2014 11:34 AM, Tudor Girba wrote:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
Because the PGConnection is designed as an active object, controlled by a state machine. Depending on the connection state, the result set associated with the connection is either valid or not valid. The layer above PGConnection should not hold onto any PGResult directly, since it's internal data structure of the Postgres client. The object mapping layer would be expected to copy data values from the result rows.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
IIRC, something like: connection execute 'select * from foo1; select * from foo2' will get you multiple result sets.
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
IIUC (it's been a long time since I looked at it), the V3 protocol has this streaming support. In the V2 protocol, I think you have to read and discard the results. As for DBXTalk, it's likely using the V3 protocol.
- What is the difference between PGAsciiRow and PGDataRow?
The message format is documented at: http://www.postgresql.org/docs/7.1/static/protocol-message-formats.html I see an AsciiRow and a BinaryRow there, but no DataRow. So, I don't know where DataRow comes from, unless it's from an even older version of the protocol docs (original development was done on Postgres version 6.4, IIRC).
Doru, Note that there is also the newer http://www.squeaksource.com/PostgresV3.html which implements a more recent, incompatible version of the wire protocol between the client and server. I haven't tested it though, and I don't know if it is compatible at the higher level. Sven On 02 Mar 2014, at 17:34, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com
"Every thing has its own flow"
Which one would you recommend? V2 or V3? As I understand it, those version numbers refer to the PG Protocol version, it is not the actual version of the library, right? On Mon, Mar 3, 2014 at 8:25 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Doru,
Note that there is also the newer
http://www.squeaksource.com/PostgresV3.html
which implements a more recent, incompatible version of the wire protocol between the client and server. I haven't tested it though, and I don't know if it is compatible at the higher level.
Sven
On 02 Mar 2014, at 17:34, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com
"Every thing has its own flow"
On 03 Mar 2014, at 09:48, François Stephany <tulipe.moutarde@gmail.com> wrote:
Which one would you recommend? V2 or V3? As I understand it, those version numbers refer to the PG Protocol version, it is not the actual version of the library, right?
As I said, I did not (yet) test the V3 stuff. V2/V3 does indeed refer to the protocol level. From a technical standpoint the V3 is better, more efficient. On the other hand, PostgresV2 is good enough and has seen lots of usage. PostgresV3 is a bit strange in that respect: it exists and is OS, but there is nobody pushing it...
On Mon, Mar 3, 2014 at 8:25 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote: Doru,
Note that there is also the newer
http://www.squeaksource.com/PostgresV3.html
which implements a more recent, incompatible version of the wire protocol between the client and server. I haven't tested it though, and I don't know if it is compatible at the higher level.
Sven
On 02 Mar 2014, at 17:34, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I am trying to understand how PostgresV2 is implemented because I would like to build some inspector support for it, and I encounter a couple of issues. In case anyone knows the answer, it would speed up my effort:
- Why is result an instance variable in PGConnection? Making it a variable always returns the same object when executing a query and that is a bit of a pain.
- Why does the PGResult have the possibility of holding multiple PGResultSets? When is it possible to have multiple at the same time? (when you execute a query, the result is being initialized)
- When running something like connection execute: 'select * from ...' the PGResultSet already includes all rows of the query. Is it not possible to have a stream-like functionality in which the actual rows are retrieved only on demand? (a similar functionality exists in DBXTalk)
- What is the difference between PGAsciiRow and PGDataRow?
Doru
-- www.tudorgirba.com
"Every thing has its own flow"
participants (5)
-
François Stephany -
Pharo4Stef -
Sven Van Caekenberghe -
Tudor Girba -
Yanni Chiu