Re: [SQL] Fetch the latest log for each product

2000-08-17 Thread Jeff Hoffmann
t_transaction from log_tb l, prod_tb p where l.prod_id=p.prod_id group by p.prod_name, l.prod_id; i think that's what you want, at least... -- Jeff Hoffmann PropertyKey.com

Re: [SQL] Table Attribute Help

2000-10-09 Thread Jeff Hoffmann
"Brian C. Doyle" wrote: > > Hello all, > > I am trying to find a query to retrive the attributes of a table as in \d > tablename but as a select command. Is this possible? run "psql -E" -- it will echo all of the sql queries that those commands use. -- Jeff Hoffmann PropertyKey.com

Re: [SQL] fetching rows

2000-10-30 Thread Jeff Hoffmann
t how I can fetch rows from 26 to 50? I mean withou fetching first 25. Or > can I skip first 25? you can't do that with a cursor, but you can use they mysql-ism called a limit clause. for example, to fetch rows 26-50 from that query, you'd do: select * from films limit 25,26; or s

Re: [SQL] RTREE on points

2001-04-16 Thread Jeff Hoffmann
a query by shutting off the sequential scans (set enable_seqscan=off) and retrying the query. essentially, this forces it to use an index scan if at all possible. -- Jeff Hoffmann PropertyKey.com ---(end of broadcast)--- TIP 5: Have you checked o

Re: [SQL] RTREE on points

2001-04-16 Thread Jeff Hoffmann
work, but there doesn't seem to be a lot of usage of the geometric functions by the developers to look at missing features -- they're mostly just reactive to problems. i really have never dug into tweaking access methods to get this to work, but i would imagine it's not that hard

Re: [SQL] RTREE on points

2001-04-17 Thread Jeff Hoffmann
but i thought there used to be at least a gist_box_ops. or was that another contrib item that got dropped? -- Jeff Hoffmann PropertyKey.com ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] RTREE on points

2001-04-17 Thread Jeff Hoffmann
ny built-in way of using it, if for no other reason than to be able to test if the feature even works. -- Jeff Hoffmann PropertyKey.com ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-noma

Re: [SQL] RTREE on points

2001-04-17 Thread Jeff Hoffmann
on in the standard distribution because it'd be easy to test -- you already have to run rtree tests anyway, you can just duplicate them with gist & gist_box_ops. -- Jeff Hoffmann PropertyKey.com ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] creating tables that are visible across databases

2001-04-20 Thread Jeff Hoffmann
created when you create a new database using that template (look at "createdb -T" to see how this works). this may not be what you're looking for because they wouldn't be shared across databases, they would just be copied into the new database when it was created. i don&#

Re: [SQL] SET SEQSCAN TO OFF - error

2001-04-26 Thread Jeff Hoffmann
Does anybody know why? > because the documentation is wrong. the variable name is ENABLE_SEQSCAN, i.e.: SET ENABLE_SEQSCAN TO OFF; should work. -- Jeff Hoffmann PropertyKey.com ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] performance issue with distance function

2001-07-26 Thread Jeff Hoffmann
> Thanks in advance. > this probably isn't what you want, but would it speed things up if you did an "order by distance" instead of doing the "distance <= 60", then having your application cut the results at 60? that should work from a language perspective, at le

[SQL] finding schema of table that called a trigger

2005-03-13 Thread Jeff Hoffmann
Is there a variable defined that has the schema of the table that called the trigger (like TG_RELNAME = table name)? I didn't see anything in the documentation. Is the only way to get that to look it up with TG_RELID? -- Jeff Hoffmann [EMAIL PROTECTED] ---(e

Re: [SQL] Use of index in 7.0 vs 6.5

2000-05-25 Thread Jeff Hoffmann
Tom Lane wrote: > One way to put a thumb on the scales is to reduce the value of the SET > variable random_page_cost. The default value is 4.0, which seems to > correspond more or less to reality, but reducing it to 3 or so would > shift the planner pretty nicely in the direction of indexscans.

Re: [SQL] Default timestamp value

2000-06-05 Thread Jeff Hoffmann
Tom Lane wrote: > > "Rob S." <[EMAIL PROTECTED]> writes: > > ...but I still don't see how to have the default value of a timestamp to be > > the time at which the individual record is inserted. I just get the time I > > created the table. > Versions before 7.0 are not entirely consistent abou

Re: [SQL] Merging two columns into one

2000-06-23 Thread Jeff Hoffmann
e you want on it if you want to reuse it. the files located at: http://www.potlatch.org/source/phone.tar.gz -- Jeff Hoffmann PropertyKey.com