[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] datacopy syntax
From:       "James K. Lowden" <jklowden () freetds ! org>
Date:       2011-08-20 0:01:23
Message-ID: 20110819200123.96d16a2c.jklowden () freetds ! org
[Download RAW message or body]

On Wed, 17 Aug 2011 09:26:50 +0200
Frediano Ziglio <freddy77@gmail.com> wrote:

> > The current parameters are:
> >
> >        [-S server/username/password/database/table_or_view]
> >        [-D server/username/password/database/table]
> >
> > You see the problem immediately: how to omit the username &
> > password?
> >
> 
> Use strsep instead of strtok and pass empty strings like
> 
> -S my_server///my_db/my_table

Yes, that would work.  But if datacopy honored $DSQUERY and the default
dbname was OK, the syntax would be

	////my_table

which is just plain ridiculous, don't you agree?  Besides, nowhere else
do we use slashes that way.  

> > I propose to change the syntax to emulate a URL:
> >
> >        -S [username[:passwd]@][dbname.][schema.]tablename
> 
> why not using another parameter like --source to avoid clash?

(BTW, the above syntax left out the servername by mistake.)  

Simpler code.  Simpler documentation.  Better usability.  

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic