Re: [SQL] Max column number.

2011-07-12 Thread k...@rice.edu
On Tue, Jul 12, 2011 at 03:08:36PM -0300, Miguel Angel Conte wrote: > Unfortunately It's an inherited data model and I can't make any change for > now... > Thanks for your answer! > > On Tue, Jul 12, 2011 at 2:52 PM, Reinoud van Leeuwen < > reinou...@n.leeuwen.net> wrote: > > > On Tue, Jul 12, 20

Re: [SQL] Select random lines of a table using a probability distribution

2011-07-13 Thread k...@rice.edu
On Wed, Jul 13, 2011 at 03:27:10PM +0200, Jira, Marcel wrote: > Hi! > > Let's consider I have a table like this > > idqualificationgenderageincome > > I'd like to select (for example 100) lines of this table by random, but the > random mechanism has to follow a certain probabili

Re: [SQL] Tripping over (my own) stupidity - VARCHAR declaration minus specificity

2011-10-14 Thread k...@rice.edu
On Fri, Oct 14, 2011 at 01:51:04PM -0400, Adam Cornett wrote: > On Fri, Oct 14, 2011 at 1:27 PM, Good, Thomas wrote: > > > I created a table in a hurry and forgot to specify the max capacity for a > > varchar() data type. > > Can it be said what the max would be in a case like this (just curious)

Re: [SQL] Problem with sequence increment

2012-01-25 Thread k...@rice.edu
On Wed, Jan 25, 2012 at 09:42:05AM -0430, Francisco Calderón wrote: > Hello, > > I am having a situation with postgresql 8.3, i have two tables, ta and tb, > with a relation "one tb has many ta" and... well, i will let the SQL talk > for me ;) > > ---SQL--- > CREATE TABLE tb > ( >

Re: [SQL] Simple method to format a string

2012-06-20 Thread k...@rice.edu
On Wed, Jun 20, 2012 at 12:08:24PM -0600, Wes James wrote: > On Wed, Jun 20, 2012 at 8:42 AM, Emi Lu wrote: > > > Good morning, > > > > Is there a simply method in psql to format a string? > > > > For example, adding a space to every three consecutive letters: > > > > abcdefgh -> *** *** *** > >

Re: [SQL] Split a string to rows?

2013-01-08 Thread k...@rice.edu
On Tue, Jan 08, 2013 at 09:34:24AM -0500, Emi Lu wrote: > Hello Thomas, > > >>Thanks a lot! I just noticed that my postgresql is 8.3(unnest > >>function is not there by default). Is there a way that I could > >>download and load only this function from somewhere? > > > > > >Are you aware that 8.3

Re: [SQL] how can I replace all instances of a pattern

2013-03-26 Thread k...@rice.edu
On Tue, Mar 26, 2013 at 09:13:39AM -0400, James Sharrett wrote: > Sorry, caught a typo. Mytext1 is correctly replaced because only one > instance of the character (space) is in the string. > > This deals with the correct characters but only does the first instance of > the character so the output

Re: [SQL] Encrypting PGBouncer to Postgres DB connections

2013-04-10 Thread k...@rice.edu
On Wed, Apr 10, 2013 at 11:06:32AM -0700, Bhanu Murthy wrote: > Hi all, >   > Can someone please point me to detailed documentation on how to > secure/encrypt connections between PGBouncer and Postgresql database (version > 8.4.3)?  >   > Thanks in advance! >   > Bhanu M. Gandikota > Cell: (415)