Hi,
- check for open server socket: netstat -tulpen | grep postgres
- try to force ipv4 for java with system property (a recent jre prefers
ipv6): -Djava.net.preferIPv4Stack=true
regards
Thomas
Am 24.08.2011 00:47, schrieb Sam Nelson:
Hi list,
A client is hitting an issue with JDBC
Hi,
use WITH queries, I use this regularly and it works fine.
http://www.postgresql.org/docs/9.0/static/queries-with.html
regards
Thomas
Am 14.08.2011 16:39, schrieb W. Matthew Wilson:
I'm sure I'm not the first person to end up with a gigantic query that
does lots of left joins
a
Thomas
Am 05.08.2011 18:32, schrieb jeffrey:
I have a table that looks like this:
homeidcity date measurement pre/post
123 san francisco 1/2/2003 1458 pre
123 san francisco NULL 1932 post
124 los angeles2/4/2005 938
salah jubeh, 26.07.2011 19:02:
Hello,
suppose the following scenario
the car speed is 240
the car has an airbag
Here the first value is integer and the second value is boolean. Consider that
I have this table structure
feature (feature id feature name)
car (car id, )
car_feature (car
again at the end of
transaction (even thus Oracle DB doesn't impose that either), but drop
and re-create the objects in correct order is painful.
The heart of the my pain is that a program I use works like this. I
would like to migrate the DB beneath it...
Cheers,
Thomas
Am 22.07.2011 10:26
Hello,
I would like to recreate/replace a view, but there are 'dependant
objects' on it. Is there a way to 'unrestrict' the dependant check in
the current transaction, like it could be done with certain constraints?
Kind regards,
Thomas
--
Sent via pgsql-general mailing list (pgsql-general
Durumdara, 22.06.2011 12:35:
Hi!
I have 3 tables. I want to run a query that collect some data from
them, and join into one result table.
I show a little example, how to do this in another DB with script:
with tmp_a as (
select id, name, sum(cost) cost
from items
...
),
temp_b as (
Chrishelring wrote on 10.06.2011 22:45:
HI all,
below is the view i´ve tried to create on a table. The purpose was to do
some math on one of the columns (retning). The column is a double precision
number. The result is that the function is not recognized (ERROR: function
to_number(double
On 07.06.2011 09:57, Vincent Veyron wrote:
Le lundi 06 juin 2011 à 12:59 +0200, Thomas Guettler a écrit :
how do you store recurring events in a database?
Selecting all events in a week/month should be fast (comming from an index).
My solution looks like this:
Table event:
Columns
Hi Craig and mailing list
On 07.06.2011 00:54, Craig Ringer wrote:
On 06/06/2011 06:59 PM, Thomas Guettler wrote:
Hi,
how do you store recurring events in a database?
I use two tables: one table that stores the recurring event, and another
that's essentially a materialized view containing
in a
time frame
like above (last three year, next three years). If a recurring event gets
altered,
all its serialized events need to be updated.
Any feedback?
Thomas Güttler
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
--
Sent via pgsql-general
On 5/25/2011 3:42 PM, akp geek wrote:
Dear all -
I would like to know if any one has migrated database from
MS access to Postgres . We use postgres 9.0.2 on solaris . Are there any
open source tools that you have used to do this task. Can you please
share your experiences ?
I
.
information_schema.columns is probably easier to look at:
http://www.postgresql.org/docs/current/static/infoschema-columns.html
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
restriction to those listed on
that page: that a file system backup will only work between the same OS and
architecture and is not suited to migrate between different types of systems.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
[ ... ] ]
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
the DEFAULT to be listed as a
constraint...)
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
the following?
group by 1 order by 1
On Apr 30, 2011, at 5:48 PM, Thomas Markus wrote:
Hi,
try something like this:
select
trunc(random() * 10.)/10.
, count(*)
from
generate_series(1,200)
group by 1 order by 2
Hi,
try something like this:
select
trunc(random() * 10.)/10.
, count(*)
from
generate_series(1,200)
group by 1 order by 2
regards
Thomas
Am 30.04.2011 18:37, schrieb Joel Reymont:
I have a column of 2 million float values from 0 to 1.
I would like to figure out how many
How is that done?
I know that the bar attribute ought to have type FLOAT, but I have to work
with this legacy database. And anyway this table will rarely be updated.
Sincerely, Thomas
specify how many decimals I want to be stored back from the result?
E.g. 2 / 3 = 0. but I want to just save 0.66.
2) Can I make a criteria that it should only update on the strings that can
be converted. Maybe smth. like:
UPDATE foo SET bar = (bar::numeric * 2) WHERE bar::is_numeric;
Thomas
I appreciate the advice. But in this particular case, other people have
decided for me that I should not change the schema. I guess they have their
reasons :)
On Thu, Apr 28, 2011 at 5:40 PM, Alban Hertroys
dal...@solfertje.student.utwente.nl wrote:
On 28 Apr 2011, at 15:26, Thomas Larsen
hirenlad, 27.04.2011 09:47:
Hiii
Hey i m using postgresql 8.4. now i m install postgresql8.4 silently
and it work properly, no issue during this process. Now problem is i want to
create one database automatically after install postgresql 8.4.
Can u plz inform me is it possible ? and if
I'm having trouble figuring out where this one is going wrong. It's a
brand new install of PostgreSQL 9.0 from PGDG on a RHEL5 box, running
Apache 2.2 and PHP 5.3 (from IUS).
- PostgreSQL 9.0 is running and listening on the localhost. I can run
pgAdmin III and connect to it over a SSH
On 4/27/2011 9:16 AM, Thomas Harold wrote:
- SELinux is running, but there are no denied messages in
/var/log/audit/audit.log and no setroubleshooting alerts in
/var/log/messages either.
Well, interestingly enough it is SELinux getting in the way, but not
logging anything. Temporarily
On 4/27/2011 11:42 AM, Thomas Harold wrote:
On 4/27/2011 9:16 AM, Thomas Harold wrote:
- SELinux is running, but there are no denied messages in
/var/log/audit/audit.log and no setroubleshooting alerts in
/var/log/messages either.
Well, interestingly enough it is SELinux getting in the way
On 4/27/2011 12:24 PM, Michael Nolan wrote:
On Wed, Apr 27, 2011 at 10:42 AM, Thomas Harold thomas-li...@nybeta.com
mailto:thomas-li...@nybeta.com wrote:
On 4/27/2011 9:16 AM, Thomas Harold wrote:
- SELinux is running, but there are no denied messages in
/var/log/audit
perform DDL in Oracle all your currently
running transactions are implicitly rolled back.
Not quite. The current transaction is committed, not rolled back.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1001.htm#i2099120
Regards
Thomas
--
Sent via pgsql-general
Alban Hertroys wrote on 03.04.2011 11:17:
On 2 Apr 2011, at 12:44, Thomas Kellerer wrote:
Even after a plain SELECT you should issue a COMMIT (or ROLLBACK)
to end the transaction that was implicitely started with the
SELECT.
Sorry, but you're wrong about that. A statement that implicitly
Sven Haag wrote on 03.04.2011 16:13:
Original-Nachricht
Datum: Sun, 03 Apr 2011 15:37:17 +0200
Von: Thomas Kellererspam_ea...@gmx.net
An: pgsql-general@postgresql.org
Betreff: Re: [GENERAL] Table lock while adding a column and clients are logged
in
Alban Hertroys wrote
not be a problem if you only see IDLE sessions.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Alex, 22.03.2011 17:33:
Using Windows 7 64 bit. Tried to install 8.4 and 9.0and it fails right near the
end when it tries to create or read the conf file. If I transfer my postgres
8.4 file over the upgrade takes but the postgres service doesn't exist so no
communication occurs.
Is there
help.
Ruben,
CREATE UNIQUE INDEX idx_cons ON invoices (EXTRACT(YEAR FROM invoice_date),
innvoice_number);
The only difference to a unique constraint is, that it cannot be used as the
target of a foreign key constraint.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general
efficient
and you may never rely on any implicit ordering.
If you need your rows sorted in a specific way, you have to use an ORDER BY
clause. Everything else is doomed to fail someday.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
.
The function needs to be created with SECURITY DEFINER though.
The downside of this is, that this only works if the result set isn't too
large. Because all rows that are returned by the function will be first
buffered on the the server before they are returned to the client.
Regards
Thomas
://www.postgresql.org/docs/current/static/runtime-config-statistics.html#GUC-UPDATE-PROCESS-TITLE
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
it to Version x.y
As it keeps track of all changes applied it automatically knows what to do.
I can handle static data as well as stored procedure and any custom SQL.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
differences?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
but simply let the software
find them seems like a very nifty feature.
I wonder how you detect renaming a table or a column?
On which programming language is dbstewart based?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
hi,
i would prefer many schemas. advantages:
- one backup/restore for all (or selective)
- one connection pool
- simple access to all schemas
regards
thomas
Am 08.02.2011 09:30, schrieb Szymon Guz:
Hi,
is there any noticeable difference between a cluster with many databases and
a database
and disadvantages (as described by the other posters)
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
.
If you don't really need the key = value pairs, you can simply use:
payload := payload || 'values: ' || ROW(old.*);
this will append everything in one operation, but not in the col=value format
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
the column alias:
SELECT *
FROM (
SELECT a,
b,
c,
(select problem from other_table where id=a) as problem
FROM mytable
) t
WHERE a=1
AND problem = 3
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
Jerry LeVan, 19.01.2011 17:35:
So I guess the question is:
Given a bare table name, how can I recover the schema
qualified name with whatever the current search path happens
to be?
SELECT table_schema
FROM information_schema.tables
WHERE table_name = 'your_table'
;
--
Sent via
quick with my answer.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
of the schema in the search
path in the order of the schemas listed in the search path.
The only thing I'm unsure about is whether unnest() will always preserve the
order of the array.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
as far as I know.
A deadlock can only happen between two different transactions (T1 locks R1,
waits for R2, T2 locks R2 waits for R1)
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql
Satish Burnwal (sburnwal) wrote on 07.01.2011 11:15:
I have 2 tables containing the data for same items:
STORE1
-
Id typeitems
-
1 FOOD10
2 FOOD15
3 SOAP20
STORE2
;)
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hello,
Am 03.01.11 00:06, schrieb Adrian Klaver:
On Sunday 02 January 2011 2:22:14 pm Thomas Schmidt wrote:
well, I'm new to postgres and this is my post on this list :-)
Anyway, I've to batch-import bulk-csv data into a staging database (as
part of an ETL-like pocess). The data ought
key/value store is not the idea behind DBMS
like postgres ...
See:
http://en.wikipedia.org/wiki/NoSQL
http://en.wikipedia.org/wiki/Relational_database_management_system
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
, car and km.
I don't know If I explain weel my problem. My english is not very
good.
That's exactly what the hstore data type supports:
http://www.postgresql.org/docs/current/static/hstore.html
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
- it all depends on the usage :-)
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hello,
Am 03.01.11 14:14, schrieb Andre Lopes:
Hi,
Thanks for the reply's. I was tempted to accept the Rodoslaw Smogura
proposal. There will be about 100 websites to capture data on daily basis.
Each website adds per day(average) 2 articles.
Thomas talked about the noSQL possibility. What do
in advance,
Thomas
[1] http://www.postgresql.org/docs/9.0/static/sql-copy.html
[2] http://pgbulkload.projects.postgresql.org/pg_bulkload.html
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
:N relationship for that.
Especially because guaranteeing that there will never be more than two in the N
part is quite complicated.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
if there is maybe a cleverer way to do this?
And I'm not sure how to copy the Oracle's strange DATE
column best into PostgreSQL, without losing precision?
Oracle's DATE includes a time part as well.
So simply use a timestamp in PostgreSQL and everything should be fine.
Regards
Thomas
--
Sent via pgsql
Alexander Farber, 10.12.2010 12:53:
On Fri, Dec 10, 2010 at 12:33 PM, Thomas Kellererspam_ea...@gmx.net wrote:
And I'm not sure how to copy the Oracle's strange DATE
column best into PostgreSQL, without losing precision?
Oracle's DATE includes a time part as well.
So simply use a timestamp
Alexander Farber, 24.11.2010 08:49:
Why do you want to do anything like that?
Easier to read... login, logout
I understand the easier to read part.
But what do you mean with login, logout?
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
of this as well, but when they ask me under
which circumstances this could happen, I can't think of a proper example.
Does anybody have an example that would show this?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription
Alexander Farber, 24.11.2010 08:42:
is there a syntax to add a column not at the last place
No, because the order of the column is irrelevant (just as there is no order on
the rows in a table)
Simply select them in the order you like to have.
Thomas
--
Sent via pgsql-general mailing list
this on the JDBC mailing list because I noticed this with
Java, but it seems that it's not a JDBC problem.
Could this be a Windows problem?
Note: I don't really want to use such a table name, I'm just wondering if this
_should_ work.
Regards
Thomas
--
Sent via pgsql-general mailing list
Tom Lane wrote on 22.11.2010 19:25:
Thomas Kellererspam_ea...@gmx.net writes:
I'm curious why the following is not working:
postgres=# show client_encoding;
client_encoding
-
UTF8
(1 row)
postgres=# create table umlaut_test_ö (id integer);
ERROR: invalid byte
1252 before running psql (I tried several other encodings
as well)
Try set client_encoding = win1252, then.
Thanks for the hint, unfortunately psql still shows the same behaviour.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
to send the
INSERT
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
.
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
if you post your experience using
those tools together with PostgreSQL
Actually I think it would be worthwhile documenting your experience in the
PostgreSQL Wiki as well:
http://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools
Regards
Thomas
--
Sent via pgsql-general mailing list
,
but can't find the correct syntax
That should work:
alter table pref_users add constraint pref_users_medals_check check check (medals
= 0);
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref
Carlos Mennens, 02.11.2010 22:37:
Before I move or rename '/var/lib/postgres/data', what version of
PostgreSQL should I be at? 8.4 or 9.0?
Actually both, because pg_upgrade needs the binaries of the old *and* new
version.
--
Sent via pgsql-general mailing list
will not
include e.g. users and roles.
So if he needs to restore users and privileges from the original 8.4
installation there is no way around re-installing the 8.4 binaries.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
retrieve the schema name for
temporary tables?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Thom Brown wrote on 01.11.2010 12:33:
You can use:
SELECT nspname
FROM pg_namespace
WHERE oid = pg_my_temp_schema();
to get the name of the current temporary schema for your session.
Thanks that's what I was looking for.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql
-REPLICATION
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
-only.
Once the failover has happened the standby is the new master and will allow
read/write access.
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Merlin Moncure wrote on 01.11.2010 21:13:
On Mon, Nov 1, 2010 at 6:46 AM, Thomas Kellererspam_ea...@gmx.net wrote:
Hello,
I have created a temporary table using
create temporary table foo
(
id integer
);
and noticed this was created in a schema called pg_temp_2
My question
Merlin Moncure wrote on 01.11.2010 23:13:
On Mon, Nov 1, 2010 at 4:27 PM, Thomas Kellererspam_ea...@gmx.net wrote:
The problem is, that the JDBC driver only returns information about the temp
tables, if I specify that schema directly.
Have you filed a bug report to jdbc yet? :-D.
I thought
-structures.html#PLPGSQL-UPSERT-EXAMPLE
Here is another solution based on triggers:
http://database-programmer.blogspot.com/2009/06/approaches-to-upsert.html
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
the difference?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
there since 8.4 ;)
Look into the windowing functions (in Oracle they are called analytical
functions)
http://www.postgresql.org/docs/current/static/tutorial-window.html
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
order in your SELECT statement.
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
than NUMERIC. I was thinking I would start out by defining
types DECIMAL32 and DECIMAL64 and some casts between those types and
NUMERIC. (A more ambitious project for later would be defining
arithmetic operators etc using compiler/hardware support).
Thanks
Thomas
--
Sent via pgsql-general
is starting the service) has
full access to the new directory?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi,
just a guess: Counting is slow, since it needs to check all rows. Explained
here:
http://wiki.postgresql.org/wiki/Slow_Counting
Thomas Güttler
Tim Uckun wrote:
I have two tables. Table C has about 300K records in it. Table E has
about a million records in it. Today I tried to run
bit large on the live site.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Thom Brown wrote on 04.10.2010 23:24:
Do you see the reduction in size compared to the live site an issue?
No, not at all.
I just wanted to mention it, in case you are interested.
I think both sizes are just fine.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general
very simple batch files to be able to
easily repeat these steps
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
because the example does use SELECT * to create the
view.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
the superuser is called postgres.
I don't think there is a account named root after a default installation.
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
and to read it. Its available
here:
http://www.linuxtechnicalreview.de/Vorschau/%28show%29/Themen/Datenbanken/PostgreSQL-erweitern
Bests
Thomas
--
Thomas Uzunoff
Linux New Media AG, Putzbrunnerstr. 71, 81739 München, Germany
Phone: +49 89 9934 1137 Fax: +49 89 9934 1199
tuzun...@linuxnewmedia.de
that is)
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
with it, so it's definitely not 24*7
We have about 250 users, but of course not all of them are active all the time
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
= default
log_min_error_statement = error
log_min_duration_statement = 3000
log_statement = 'all'
Pretty much everything else log related is commented out.. What am I
doing wrong? Thanks!
log_statement = 'all'
should be
log_statement = 'none'
Regards
Thomas
--
Sent via pgsql-general mailing
! That was the point.
The real question is:
what did you try to accomplish with the UPPER() on a numeric column?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
to learn Hibernate
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Alban Hertroys wrote on 08.08.2010 10:46:
On 7 Aug 2010, at 23:18, Thomas Kellerer wrote:
Or as an alternative:
SELECT tid, purchase_date
FROM orders
WHERE item in ('Laptop', 'Desktop')
GROUP BY tid, purchase_date
HAVING count(*) = 2
This one is incorrect, it will also find people who
ON l.tid = d.tid AND l.purchase_date = d.purchase_date AND d.item =
'Desktop'
WHERE l.item = 'Laptop'
Or as an alternative:
SELECT tid, purchase_date
FROM orders
WHERE item in ('Laptop', 'Desktop')
GROUP BY tid, purchase_date
HAVING count(*) = 2
Regards
Thomas
--
Sent via pgsql-general
.
Learn what youare doing (or dealing with) is a strategy that applies to
everything you do.
Do take the time to read the manuals - including the MySQL manual (because just
plunging into MySQL simply doesn't work either)
It'll make you a lot more proficient in the long run.
Regards
Thomas
--
Sent
)?
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Craig Ringer wrote on 17.07.2010 03:13:
On 17/07/10 04:26, Thomas Kellerer wrote:
Hmm.
For years I have been advocating to always use fully qualified column
lists in INSERTs (for clarity and stability)
And now I learn it's slower when I do so :(
If you're not doing hundreds of thousands
Tom Lane wrote on 17.07.2010 16:36:
Thomas Kellererspam_ea...@gmx.net writes:
I'm till a bit surprised that parsing the statement _with_ a column list is
mesurably slower than withou a column list.
Well, nobody's offered any actual *numbers* here. It's clear that
parsing the column list
701 - 800 of 1844 matches
Mail list logo