[Babase] Queries that run forever
Tyler Brock
tjb13 at duke.edu
Wed Apr 4 00:45:56 EDT 2007
Ok good idea to list the columns, I was just doing that short hand
way to try and get it to work so that advice is well taken, and the
nextval part I kind of stole from ppa web interface which used it
somewhere as I had no idea what to put there and that seemed to work
when it complained about that column's inserted values. Is there a
better way to be doing that? Thanks for all the help.
-Tyler
On Apr 4, 2007, at 12:42 AM, Karl O. Pinc wrote:
>
> On 04/03/2007 11:31:42 PM, Tyler Brock wrote:
>> Ok awesome! Also, this is the update query I was trying to run:
>> INSERT INTO ranks VALUES (nextval('ranks_rnkid_seq'::regclass),
>> 'PLA', '2003-1-01', '10.0', 'ALM', '1');
>
> I'm looking at it now.
>
> FYI. It's good form (albiet slower, but who cares) to list
> the columns in the INSERT, like:
>
> INSERT INTO ranks (rnkid, sname, date, grp, rnktype, rnk) ...
>
> That way should the column order ever change your code
> will still work.
>
> (Also, I never explicitly typcast the nextval argument.
> I guess I don't see the point. I've never thought
> about it....)
>
> Karl <kop at meme.com>
> Free Software: "You don't pay back, you pay forward."
> -- Robert A. Heinlein
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
-Tyler
Tyler J. Brock
Duke University
6202 McQueen Dr.
Durham, NC 27705
(516)857-5208
tjb13 at duke.edu
More information about the Babase
mailing list