Re: Best way to calculate row size with pg_getline?
Andrew Dunstan <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
Mark Stosberg wrote: > I'm trying to determine the best value to use with pg_getline for the > "size" value. The docs say: > > "The second argument is the size of the variable: this should be greater > than the expected size of the row. " > > I have a table with many columns including several "text" fields. I'm > not sure how to calculate a row size that would be good to use here. > Suggestions? > > I'm hoping there might be an "auto" option, which would just calculate > the length of the row as it passes through, and raise the value if needed. > > I'm used to the land of Perl, where it generally doesn't care how big my > content is before I stuff into a variable. > > Why are we using these deprecated libpq calls instead of the modern calls, which have been available since pg 7.4? cheers andrew