Thread: encode in base code
Put encode() into base system. Used part of Alex' patch for docs, hope he does not mind ;) -- marko
Attachment
Your patch has been added to the PostgreSQL unapplied patches list at: http://candle.pha.pa.us/cgi-bin/pgpatches I will try to apply it within the next 48 hours. > > Put encode() into base system. Used part of Alex' patch > for docs, hope he does not mind ;) > > -- > marko > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Marko Kreen writes: > Put encode() into base system. Used part of Alex' patch > for docs, hope he does not mind ;) Please use #include "", not #include <>, for PostgreSQL's header files. Would you mind changing the copyright to match the rest of the source? Put everything in encode.c (not varlena.c), and put encode.c in utils/adt. I think we've covered before that 'uint' is not a standard data type. VARSIZE is of type int32 (signed). To convert from text to C string, use textout(). Also, I think the term "encode" is already overloaded for multibyte use. Maybe it needs to be qualified, such as "binary_encode". -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
On Mon, Jul 02, 2001 at 07:50:45PM +0200, Peter Eisentraut wrote: > Would you mind changing the copyright to match the rest of the source? Ok, I needed the BSD-style for separate distribution. Should it be only line: Copyright (c) 2001 PostgreSQL Global Development Group ? > I think we've covered before that 'uint' is not a standard data type. > VARSIZE is of type int32 (signed). I have not seen this discussion. I used uint as simply handy shortcut. When I want unsigned var, should it be 'uint32' or simply 'unsigned'? Or should I avoid using unsigned vars? Why? -- marko
Marko Kreen writes: > On Mon, Jul 02, 2001 at 07:50:45PM +0200, Peter Eisentraut wrote: > > Would you mind changing the copyright to match the rest of the source? > > Ok, I needed the BSD-style for separate distribution. > > Should it be only line: > > Copyright (c) 2001 PostgreSQL Global Development Group You can keep your name if you want, but I don't see a point in having 73 slightly differently worded BSD-like licenses in the core. > > I think we've covered before that 'uint' is not a standard data type. > > VARSIZE is of type int32 (signed). > > I have not seen this discussion. I used uint as simply handy > shortcut. When I want unsigned var, should it be 'uint32' or > simply 'unsigned'? Or should I avoid using unsigned vars? Why? (Might have been related to your digest module.) AFAIK, 'uint' isn't a standard type at all. You can use uint32 (BSD-style, also used by PostgreSQL) or uint32_t (C99, <inttypes.h>). -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Where are we on this patch? > > Put encode() into base system. Used part of Alex' patch > for docs, hope he does not mind ;) > > -- > marko > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Mon, Jul 02, 2001 at 07:50:45PM +0200, Peter Eisentraut wrote: > Marko Kreen writes: > > Put encode() into base system. Used part of Alex' patch > > for docs, hope he does not mind ;) > > Please use #include "", not #include <>, for PostgreSQL's header files. > > Would you mind changing the copyright to match the rest of the source? > > Put everything in encode.c (not varlena.c), and put encode.c in utils/adt. > > I think we've covered before that 'uint' is not a standard data type. > VARSIZE is of type int32 (signed). > > To convert from text to C string, use textout(). > > Also, I think the term "encode" is already overloaded for multibyte use. > Maybe it needs to be qualified, such as "binary_encode". Used 'unsigned' in encoding code. -- marko
Attachment
Thanks. Patch applied. This has the copyright removal and the unsigned int change. > On Mon, Jul 02, 2001 at 07:50:45PM +0200, Peter Eisentraut wrote: > > Marko Kreen writes: > > > Put encode() into base system. Used part of Alex' patch > > > for docs, hope he does not mind ;) > > > > Please use #include "", not #include <>, for PostgreSQL's header files. > > > > Would you mind changing the copyright to match the rest of the source? > > > > Put everything in encode.c (not varlena.c), and put encode.c in utils/adt. > > > > I think we've covered before that 'uint' is not a standard data type. > > VARSIZE is of type int32 (signed). > > > > To convert from text to C string, use textout(). > > > > Also, I think the term "encode" is already overloaded for multibyte use. > > Maybe it needs to be qualified, such as "binary_encode". > > Used 'unsigned' in encoding code. > > -- > marko > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026