Hi,
Does the ODBC driver for postgresql support the following timeout attributes (one way or around)?
- SQL_ATTR_CONNECTION_TIMEOUT
- SQL_ATTR_QUERY_TIMEOUT
With regards,
Vivek Gupta
PostgreSQL: The world's most advanced open source database Discussion.
Hi,
Does the ODBC driver for postgresql support the following timeout attributes (one way or around)?
With regards,
Vivek Gupta
I have been using IN clause almost exclusively until recently I tried
to use EXISTS and gained significant performance increase without
changing/creating any indexes:
SELECT ... FROM a WHERE a.ref IN (SELECT b.id WHERE ...)
vs
SELECT ... FROM a WHERE EXISTS (SELECT 1 FROM b WHERE a.ref=b.id ...)
Performance is at least few times better when EXISTS is used. Is it
just PostgreSQL specific?
Cheers
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
mmm... tenés razón (como escribirian los amigos argentinos)...
vejecutado_tejeduria es una vista, verdad?
esa es la parte que demora, devuelve 595637 filas... que pasa si
quiebras la consulta en 2 partes?
--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán
Correct, sort of. GridSQL is not part of the core server, it is a
separate Java-based distributed database which front-ends a cluster of
Postgres servers.
Originally, GridSQL was written to be database independent. However,
over the last year, it has been specialized for Postgres. Some of
these specializations include support of the Postgres wire-level
protocol, an understanding of Postgres SQL syntax, etc. Coming
versions of GridSQL will support more native Postgres features and may
benefit from some of our internal changes to the database core.
Regardless, it is open source and should always run against standard PostgreSQL.
--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/
--
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy
> But there isn't any floss software actually being shipped right? License/code
> wise truviso and netezza are basically the same in that respect, even if
> technologically truviso values postgres compatability higher, but there is no
> floss distributing occuring, right?
It's complicated and not something I'm at liberty to discuss. Suffice it
to say that there's a large list of FLOSS credits for the software stack
that Truviso provides to customers. But a look at the web site will note
the lack of the usual "Download" tab for the world at large, and the exact
details of how the FLOSS software distributed fits together isn't public
info yet at this point.
Tell you any more I'd have to kill you, etc.
> Oh, I understand that, but I even with the other ways, I don't know
> where Truvisio draws that line. Granted even if thier corporate policy
> is "never work on postgres during business hours"...
We're a startup--it's always business hours. The line you hypothesize
isn't really drawn too brightly. It may materialize further once I talk
with management about whether the days I spend at OSCON next month are
work or vacation time. If there's a BWPUG meeting next week (note subtle
hint that it's not clear yet whether there is or not) and I'm in town this
time I have a good story for you about that.
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
--
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy
I've got a table with rows relating another table.
mytab (id, name, group_nr, class_nr, fk)
SELECT * FROM mytab
WHERE (fk = 994010)
OR ((class_fk = 40) AND (fk = 0))
994001, Tick, 1, 40, 994010
4001, Reporting, 1, 40, 0
4002, LEADS, 2, 40, 0
994003, Track, 3, 40, 994010
4003, Details, 3, 40, 0
The rows with fk=0 are defaults that should only be used when there is
no specific reference to the other table.
Is there a way to remove the default-rows if there exists a fk<>0 row
that has the same group_nr ?
I'd like to get just:
994001, Tick, 1, 40, 994010
4002, LEADS, 2, 40, 0
994003, Track, 3, 40, 994010
Regards
Andreas
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Use varchar or text. character is weird about trailing spaces.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Sure. But what is right? I'm afraid to just push it to (say) 100
because of the possibility of O(N^2) behavior in eqjoinsel. Somebody
needs to do some measurements on somewhat realistic scenarios.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
> Yes, I would like to know more about:
> - how you do implement the user comments on your web pages,
Ahh yes this is not actually a doc question, so you are in the right
place. These are stored in a PostgreSQL database and sent through a
moderation queue. If the comment is appropriate we include the
information in the next version of the docs.
The website svn is available here:
> - whether you do have any schedule for merging these comments,
Per each major release.
> - how you do build and mark up the different versions (e.g. static and
> interactive per versions) of the documentation,
That I can't answer.
> - whether you do have any project-specific modifications for DocBook
We have specific stylesheet changes yes, you can find them in our
src/doc if you download a tarball.
> - what other tools you do use for creating documentation
Just docbook and jade :) (and dsssl)
Sincerely,
Joshua D. Drake
--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
I think there might be something wrong with this query:
> INSERT INTO organizations_path_enum
> SELECT o1.parent_id, r1.child_id, (o1.depth + 1)
> FROM organizations_path_enum o1, relationships r1
> -- advance existing paths by one level
> WHERE EXISTS (SELECT * FROM organizations_path_enum AS o2
> WHERE r1.parent_id = o2.child_id)
> -- insert only new rows into the table
> AND NOT EXISTS (SELECT * FROM organizations_path_enum AS o3
> WHERE o1.parent_id = o3.parent_id AND r1.child_id = o3.child_id);
I'm not totally clear on what this is supposed to accomplish, but
it seems like there should be some join clause between o1 and r1.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Thank you, I will also contact him, but I think he will got all these mails.
> But I might be able to help you as well. Do you have a specific are of
> interest besides the fact that we use Docbook?
Yes, I would like to know more about:
- how you do implement the user comments on your web pages,
- whether you do have any schedule for merging these comments,
- how you do build and mark up the different versions (e.g. static and
interactive per versions) of the documentation,
- whether you do have any project-specific modifications for DocBook
- what other tools you do use for creating documentation
Thank you for your answers in advance,
:g
--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
> The plan is to try out gitosis for account management. I have no experience
> with this, so we'd need to play around with it first.
Peter,
Just FYI if you find you don't like that direction, let me know and I
would gladly show you how I did it for pgweb with SVN... I believe it
would work out of the box for the git stuff.
Sincerely,
Joshua D. Drake
>
--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
> I got this advice from Bruce Momjian, because we are mainly interested
> in the implementation, not in the documentation itself :) As far as I
> know, this list is for developers, and -doc is for users. Do you know
> who is responsible for the implementation of the documentation?
Oh I apologize :). PeterE is pretty much lead doc dude around here:
Peter Eisentraut <peter_e@gmx.net>
But I might be able to help you as well. Do you have a specific are of
interest besides the fact that we use Docbook?
Sincerely,
Joshua D. Drake
--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
--
Saludos,
Julio Cesar Sánchez González.
--
Ahora me he convertido en la muerte, destructora de mundos.
Soy la Muerte que se lleva todo, la fuente de las cosas que vendran.
www.sistemasyconectividad.com.mx
http://darkavngr.blogspot.com/
--
TIP 8: explain analyze es tu amigo
Joshua D. Drake wrote:
>
> On Fri, 2008-06-06 at 19:02 +0200, Gabor PALI wrote:
>> Dear PostgreSQL Developers,
>
>> Thank you for your help in advance.
>
> I think you may want to be at pgsql-docs
>
I got this advice from Bruce Momjian, because we are mainly interested
in the implementation, not in the documentation itself :) As far as I
know, this list is for developers, and -doc is for users. Do you know
who is responsible for the implementation of the documentation?
Thank you,
:g
--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www
> Actually, the reason it's still 10 is that the effort expended to get it
> changed has been *ZERO*. I keep asking for someone to make some
> measurements, do some benchmarking, anything to make a plausible case
> for a specific higher value as being a reasonable place to set it.
> The silence has been deafening.
Not surprising really. It is a simple adjustment to make and it also is
easy to spot when its a problem. However it is not trivial to test for
(in terms of time and effort). I know 10 is wrong and so do you. If you
don't I am curious why I see so many posts from you saying, "Your
estimates are off, what is your default_statistics_target?" with yet
even more responses saying, "Uhh 10."
Sincerely,
Joshua D. Drake
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
> Well, you can't see the default or reset values in pg_settings, only the
> current value. However, I fail to see the use of either of those for
> a configure wizard.
I'm under the impression that the primary reason to put the default in
there is to make it easier for a file generator program to be decoupled a
bit from the internal representation. Regardless, these values should be
exposed for tool writers. If you build a prototype interface for an
interactive settings changing tool, you quickly discover that showing the
default, range, and recommended setting are all valuable things people
would like to see when deciding what the change a setting to. And there's
no reason accumulating all that info should be the responsibility of a
tool writer when it's easy to expose and keep up to date inside the
database itself.
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
> I should have been clearer there. Some of the items suggested are already
> in the structure, but aren't visible via pg_settings.
Well, you can't see the default or reset values in pg_settings, only the
current value. However, I fail to see the use of either of those for
a configure wizard. It'll presumably be attached to a fresh connection
so the reset value is not different from the current; and any decent
wizard is going to know perfectly well what the defaults are.
> ... In others (like the
> suggestion to add a URL to the documentation) it is actually a new field
> being added as well as its corresponding entry in the settings view.
Offhand I would argue that we should choose the URLs in such a way that
they can be derived automatically if you know the PG version number and
GUC variable name. (We're almost there already, except that you have
to know which section of the chapter it's in.) So the need to have a
pg_settings column seems questionable --- seems like it would mostly
be clutter. Perhaps instead of a view column, it would be useful to
encapsulate the algorithm as a function? pg_variable_help_url(name)
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Actually, the reason it's still 10 is that the effort expended to get it
changed has been *ZERO*. I keep asking for someone to make some
measurements, do some benchmarking, anything to make a plausible case
for a specific higher value as being a reasonable place to set it.
The silence has been deafening.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Well GridSQL isn't even an extension to PostgreSQL is it? It is written
in java and appears to be a userland application (or middleware if you
prefer). I could be wrong.
Sincerely,
Joshua D. Drake
--
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy
Well, since you didn't supply the exact error message, this is just a
guess; but it sounds like you haven't got the contrib/tablefunc module
installed in your 8.1 database, or at least haven't got it installed
correctly. You need a tablefunc.so file that is compiled for 8.1
(copying the 8.3 version will almost certainly NOT work).
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
I'm checking out some features in pgsql and found out about an array
datatype. As I'm curious to find out how well it performs, I've created
a table that contains an integer[] column and a script to insert about
500K rows in it. The length for the integer[] column is random (can be
10, can be 5000, can be more than that), as are the values in it.
When trying to insert a row, I get the following error:
index row requires 9796 bytes, maximum size is 8191
If I understood correctly, this is a limit of the b-tree index. Usually
you'd want to use another type of index but, again if I understood
correctly, those are meant mostly for full-text indexing.
Remember, I'm doing this for recreational purposes (the array type is
there, wanted to check out it's performance so why not? :-) ).
So my questions are: is this at all possible? If so, is is possible to
increate that maximum size?
Regards,
Celso
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Note that GridSQL, while it works with postgres, was developed completely
seperate and independently from postgresql.
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
--
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy
> Is this something we should do anything about?
IMHO, no. The reason for actually doing the chmod is to verify that we
own the directory. If it fails, we don't own the directory in any
meaningful sense. I think the complainant's real problem is that he's
misconfigured his SELinux permissions.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
> I think I made my point very clear when stating "not a file, but via
> SQL". Though I'm not a native English speaker, and I'm sure you
> understood. I must assume you're polluting this thread deliberately in
> order to sabotage the original intention of this thread. I find this
> disgusting.
>
> Ok, trying to contribute gui tools for pgsql is for masochists. We have
> vi, sed and grep, no more tools required, right?
Hold on guys, let's not get all out of whack. No one in their right mind
is going to suggest that vi, sed and grep are the only tools we need to
do this.
However a GUI wizard isn't really a way to go either. SQL? Yes it would
be very nice to be able to:
BEGIN;
SET shared_buffers to 65536 COMMENT IS 'Since I have 4G of ram I want
512 megs of shared buffers';
SET effective_cache_size to 262144 COMMENT IS 'Since I have 4G of ram I
want 1 gig of effective_cache';
COMMIT;
When that is done, it would write out the postgresql.conf.
Regardless of all of this, this thread is way out of hand. We went from
overhauling the configuration file to wizards, sample postgresql.conf
files and possibly even half of us migrating to MySQL :P.
Can we refine the topic a bit?
Joshua D. Drake
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
I think I made my point very clear when stating "not a file, but via
SQL". Though I'm not a native English speaker, and I'm sure you
understood. I must assume you're polluting this thread deliberately in
order to sabotage the original intention of this thread. I find this
disgusting.
Ok, trying to contribute gui tools for pgsql is for masochists. We have
vi, sed and grep, no more tools required, right?
Regards,
Andreas
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
> Well, my intention was that $Id$ should be expanded in pgfoundry, and
> $PostgreSQL$ should be expanded when the file is imported from pgfoundry
> into the main CVS repo. I'm not sure why it hasn't.
Right, but the copy in pgfoundry has never been imported into the main
CVS repo ...
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
It gets rid of a lot of unwanted NOTICE messages during drop, specifically
by ensuring that AUTO/INTERNAL drops are silent even when they cascade
from other cascaded objects. (In an unexpected side benefit, the messages
seem to come out in a more logical order, too.) See the regression test
diffs for examples. Also, it takes locks on objects before searching for
their dependencies, which fixes all of the concurrent-deletion problem
cases that I linked to in the above message.
I have not done anything about folding cascaded-drop NOTICEs into a
single long message, as was discussed a couple days ago. That would be
easy to do from here, but it seems like it should be a separate patch.
I was afraid while writing the patch that it might be too slow due to
reliance on simple linear list searching in ObjectAddresses lists ---
that means that deleting N objects is O(N^2), albeit with a constant
factor that's pretty tiny compared to the catalog-update work involved.
While this could be fixed by replacing ObjectAddresses with a more complex
data structure, I didn't want to have to do that in a first-generation
patch either. So I was pleased to find out that it actually seems to
be faster than CVS HEAD. I tested by timing "DROP SCHEMA public"
after running the regression tests. In CVS HEAD this involves dropping
1177 distinguishable objects (ie, there are that many entries in the
targetObjects list at completion of the scan phase). I get these timings
on a pretty-slow HPPA machine:
CVS HEAD:
$ time psql -c 'drop schema public restrict' regression 2>/dev/null
real 0m2.53s
user 0m0.04s
sys 0m0.03s
$ time psql -c 'drop schema public cascade' regression 2>/dev/null
DROP SCHEMA
real 0m8.06s
user 0m0.05s
sys 0m0.03s
With patch:
$ time psql -c 'drop schema public restrict' regression 2>/dev/null
real 0m0.74s
user 0m0.03s
sys 0m0.02s
$ time psql -c 'drop schema public cascade' regression 2>/dev/null
DROP SCHEMA
real 0m6.83s
user 0m0.03s
sys 0m0.02s
The speedup in RESTRICT timing was expected, but not so much CASCADE.
(BTW, I wonder why aren't the RESTRICT and CASCADE timings about the same
in CVS HEAD? The old implementation does all the same work in both cases,
and only fails at the end...)
It might be that with many thousand objects to be dropped, we'd
start to hit the O(N^2) behavior, but I suspect that CVS HEAD is
none too pleasant in such a case either. Anyone want to run some
experiments?
Another possible objection to this patch is that it takes an awful lot
of locks on things that we never locked before; a large DROP operation
could easily run out of locktable shared memory when it did not before.
That's fixable by increasing max_locks_per_transaction, but I wonder
whether there will be any push-back about it.
A couple of stylistic issues:
* After obtaining lock on an object-to-be-deleted, we need to check
whether it's already been deleted. This could have been done with
a pile of object-type-specific SearchSysCache tests, but I chose to
do it by checking to see if the pg_depend tuple we are traversing
has been marked dead; aside from being object-type-independent,
that should be a lot cheaper. This required sticking a little bit
of a wart into genam.c, since only at that level do we know which
buffer the tuple is in. This seemed cleaner than the alternative,
but I wonder if anyone has a better idea?
* The DROP code now requires more per-target-object state than just
the object's identity. However the ObjectAddresses struct it was
using is also shared with various dependency-adding functionality
that doesn't need any more than that. I chose to deal with that
by having the ObjectAddresses support routines handle ObjectAddresses
with or without a secondary "extra data" array. This is pretty ugly
IMHO, but duplicating most of that support code seemed no better.
Anybody have a strong aversion to that, or a better idea? (The
whole area might have to be revisited anyway, if we decide we need
something smarter than a linear list.)
If there are no objections I'll apply this in a day or two.
regards, tom lane
> On Fri, Jun 6, 2008 at 3:03 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>
> > 1. No elections, only appointees -- would be a publicity nightmare but
> > it is certainly not unheard of and in fact has shown that it works very
> > well in certain circumstances.
>
> I think if we chose a different name - like "Pg'R'Us" (with the US not
> meaning United States), or "Cmte for the Advancement of PostgreSQL" we
> could do that.
Well I wasn't actually suggesting it but as a note, Core is not
elected :P
> > 2. Hold off elections of the new board until March and have that board
> > term be 2 years. That means that every other year we would potentially
> > replace 3 or 4 depending on the year.
>
> Apologies to you both, but I would like Portland to be the place that
> these elections take place. And I would like the fall conference to
> continue to be on the West coast.
No reason to apologize, its what has been discussed and agreed upon. Its
just an issue of resolving the problem at this point. The fall
conference, considering its called West will likely always be on the
west coast (unless we somehow re-define the term west) but that isn't
really relevant to this discussion :P
>
> > 3. Have elections twice a year once the founder terms are up. Which
> > means twice a year we could lose 3 or 4.
>
> I think this is excessive.
Right. Which is why I documented my perfect world.
Sincerely,
Joshua D. Drake
--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board
Bug reference: 4226
Logged by: Austin Lee
Email address: Austin_Lee@rapid7.com
PostgreSQL version: 8.2.7
Operating system: Win2k3R2SP2
Description: PG_CTL fails to strip admin rights before running
postgres
Details:
I am trying to run pg_ctl.exe as admin when I get this error.
"FATAL: postgres: could not locate matching postgres executable."
I know there was a fix in 8.2.7 to fix this permission admin rights issue.
I've observed the fix in initdb.exe. In 8.2.1 initdb fails because it can't
find postgres. In 8.2.7 initdb success.
I assumed pg_ctl would have the same behaivor since I see the same calls to
AddUserDacl that I saw for initdb. However, I am still coming up error for
pg_ctl which I believe might be a windows permission issue.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
So, I've got two tables, which I'm going to try to simplify and still
get across:
The small table is a listing of county fips codes, their name, and the
geometry for the county. Each fips is only listed once. The big table
is multiple emissions for each county, the parameter for the emission,
and the source code for the emission (scc). Each county in big tbale
has many entries, variable number of pollutant types, variable number
of scc's.
small table:
fips (int), name(string), geom(geometry)
123, "some county", "some geometry"
124, "some other county", "some other geometry"
etc.
big table:
fips (int), pollutant(string), value(double), scc(int)
123, "co", 1000, 1000
123, "co", 1500, 1000
123, "co", 500, 1001
123, "co", 550, 1001
123, "co", 1500, 1002
123, "co", 50, 1002
123, "so2", 1100, 1000
123, "so2", 510, 1001
123, "so2", 1510, 1002
etc.
So the user supplies the pollutant, a number of scc's, and a minimum
value.
I need to select all the fips from the small table, as well as the sum
of values in the big table (for that pollutant and scc codes) WHERE
the sum of the values in the big table (for that pollutant and those
scc codes) are larger than the given value.
So, for the above, say the user picked "CO" for pollutant, 1001 and
1002 for SCC.
the rows in big table with 1001 OR 1002 for scc AND "co" for pollutant
are:
123, "co", 500, 1001
123, "co", 550, 1001
123, "co", 1500, 1002
123, "co", 50, 1002
I would return the 123 fips ONLY if the value provided was less than
the sum of the values for all scc's (500+550+1500+50 = 2600), as well
as the sum for those values.
so, return set would be
fips, name, value
123, "some county", 2600
for each fips in small table...
Boy I wonder if that makes sense, maybe some pseudo SQL speak would be
better:
SELECT small.fips, small.name, sum(big.value)
FROM small, big
WHERE
small.fips in (
SELECT fips from big
WHERE ((pollutant='co') AND
(
(scc LIKE '21%') OR (scc LIKE '2301%') OR (scc LIKE '2801000000%')
)
HAVING SUM(value > 2000)
)
GROUP BY small.fips, small.name;
This is the query that isn't returning yet.
If anyone has any questions, comments, or any suggestions at all, I'll
do my best to respond ASAP.
Any help is extremely appreciated!
-Ed
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general