be a lot easier to reconsider your representation of
permissions. You'd be likely to get significantly better results,
not to mention have more-readable queries, if you stored them as a group
of simple boolean columns.
regards, tom lane
--
Sent via pgsql-sql mailing list
the malfunction.
Nonsense ...
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
(not the one that owns the data directory).
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
pg_dump -Fc dumpfile
pg_restore dumpfile textfile2
diff textfile textfile2
If these don't produce the same results something is broken.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
, anyway).
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
. Didn't you notice that message was from 2005?
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
-createtableas.html
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
ja...@aers.ca writes:
I've simplified the query to make it easier to look at.
We need to see the table/index declarations. The query by itself is
just about useless.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes
ja...@aers.ca writes:
\d search_site1_2009_03_13
And MyColumn1 is really which column?
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
you update those indexes.
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
space needed to index the NULL entries. They aren't going to affect
search speed noticeably for non-NULL entries, I think.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
=# select unnest(ids) from tempa;
unnest
1
2
3
(3 rows)
Pre-8.4, you need a version of unnest() that's coded in C or SQL;
plpgsql won't do.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
is relevant to proving it's legal to use the index? Given the lack of
any schema information in the complaint, I suppose I can't rule that
out, but one would hope the OP would have mentioned such a thing.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql
Andreas Joseph Krogh andr...@officenet.no writes:
If I omit ORDER BY, is the output *guaranteed* (according to some
standard) to be ordered
No. It's not necessary to read any other details to answer that ...
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql
Tena Sakai tsa...@gallo.ucsf.edu writes:
So they were null,
Yes!
and null turns out to be a seven-character blank string!?
I don't understand how that happens. Mr Tom Lane
hinted that it might be a bug in sprintf...
Well, that was before I read the messages where it turned out
.
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
.
The race condition isn't.
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
.
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
/.psql_history: No such
file or directory
___
Apparently the postgres account still has HOME set to /var/lib/pgsql.
You'll want to make that point to some directory that actually exists.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
Harald Fuchs hari.fu...@gmail.com writes:
I tried to throw some invalid SQL to PostgreSQL and found its reaction
confusing:
test(# language char(3) NULL,
This is documented as being a no-op specification.
regards, tom lane
--
Sent via pgsql-sql mailing list
KEY will create implicit index t_pkey for
table t
ALTER TABLE
(barring remembering the NULL clause in the catalogs, which seems
entirely silly). So I'm not sure how interesting it is to complain
about the single-command case.
regards, tom lane
--
Sent via pgsql-sql
returning record
CONTEXT: SQL statement select * from dd_test( $1 )
PL/pgSQL function test_trg line 7 at SQL statement
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref
any
answer for you except breaking down the row into columns, which of
course is going to be a huge notational PITA.
Sure you can't move the DB off 7.4? There would be pretty considerable
benefits from adopting some recent release instead.
regards, tom lane
--
Sent via
it forces an actual index probe to happen) and it's not
safer (what if one day that PK value exists?).
I'd personally go with where false; why not say what you mean rather
than forcing humans and computers to deduce that the condition is
constant false?
regards, tom lane
would do the job?
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
such an optimization (although
I believe someone is working on it for 8.5). It seems likely though
that an expensive join condition would be too complex to be amenable
to such a proof anyway.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
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
?
Right, if you can't get into the database then the permissions of
objects within it don't matter...
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
the archives ...
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
order is just ASCII.
I'm not sure exactly how that might result in the observed odd behavior
of DISTINCT, but I bet it's causing it somehow. You'd probably have
better luck in the de_DE.ISO8859-1 or de_DE.ISO8859-15 locales.
regards, tom lane
--
Sent via pgsql-sql mailing
that the root of it is a problem of
this type.
Tangentally, is there a better way of rolling back a function than a
dumb hack like SELECT 1/0?
RAISE ERROR?
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
the right things here. Your first
example is fetching 40 times as many rows from retailer_offer as
the second one is. If the planner had stuck with the nestloop plan,
it would've taken about 40x as long, and been significantly slower
than the hash join.
regards, tom lane
. What you need to do is
dump out the *entire* results of the DISTINCT queries and look for the
unmatched lines. I'd try dumping to two files, stripping the 'e' with
sed, and then sort/diff.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
an entirely fair comparison. If your
expectation is that the database is going to be operating under mostly
cached conditions, then you probably ought to adjust the planner cost
parameters to reflect that (look at effective_cache_size, and try
reducing random_page_cost).
regards, tom
.
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
DISTINCT
queries and compare them --- looking at the actual data values should
give some insight as to what's happening.
BTW, what is the datatype of f.bezeichnung, and what locale are you
running in?
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql
= old.key_field;
BTW, you should also consider adding RETURNING clauses to these
rules so that UPDATE RETURNING etc will work on the views.
Here at least you can use RETURNING * ...
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make
layer on the client side is
doubling (or perhaps undoubling?) the backslashes for you. Exactly
what are you doing with that literal as you build the query? It might
help to turn on log_statements so that you can see just what the
server is getting.
regards, tom lane
NULLs. A NULL isn't
equal to something else, but it isn't unequal either. You could
use IS DISTINCT FROM instead of != in your second query.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http
numbers of
arguments, but it's reducing to the above underneath.
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
constraints, period. How did you
create those indexes? If you made them via SQL-standard PRIMARY KEY or
UNIQUE constraint syntax, they should show in the information_schema.
Otherwise not.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
Gerardo Herzig gher...@fmed.uba.ar writes:
Tom Lane wrote:
No, they contain information about constraints, period. How did you
create those indexes? If you made them via SQL-standard PRIMARY KEY or
UNIQUE constraint syntax, they should show in the information_schema.
Otherwise not.
Well
it.
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
look like it --- the final fputc('\n', fout); seems to be
done unconditionally in all the output formats. I wonder if we should
change that? I'm afraid it might break programs that are used to it :-(
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql
behavior.
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
it would
just be one composite column.
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
process any faster by doing that by hand.
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
the script into psql's stdin, if you prefer that type of
notation. The reason you have to do this is that psql doesn't recognize
backslash commands in a -c string. There's a school of thought that
doesn't want us to allow multiple commands in a -c string, even.
regards, tom lane
Erik Jones ejo...@engineyard.com writes:
On Mar 23, 2009, at 7:05 AM, Tom Lane wrote:
The reason you have to do this is that psql doesn't recognize
backslash commands in a -c string. There's a school of thought that
doesn't want us to allow multiple commands in a -c string, even.
Hmm
Is it possible to do the same with postgreSql?
No, but you can overload function names in Postgres, which can provide a
lot of the same notational conveniences.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
allowed.
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
to another. Just use count(*) instead.
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
must not end with escape character
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
D'Arcy J.M. Cain da...@druid.net writes:
What's next? Only help white folks?
This guy doesn't really deserve being responded to. Just ignore him.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
the date input converter to get invoked at
that time. So it'll still work tomorrow.
Of course, the cost of the runtime interpretation of the string
is what accounts for your speed difference.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
Craig Ringer cr...@postnewspapers.com.au writes:
2) Can i make a special type on_the_fly and returning setof that_type?
You're better off using SETOF RECORD, at least in my opinion.
Another possibility is to return a cursor.
regards, tom lane
--
Sent via pgsql-sql
in the PG archives, IIRC.
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
anot commutative
a b b c = a c transitive
It fairly obviously fails the first of these, and I don't have too much
confidence in the others.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
, but ...
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
.
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
for yourself. I think it would
be kind of painful to do without writing some C code though, because
a lot of useful operations like getObjectDescription() aren't exposed
at the SQL level.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make
.)
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
an explicit OWNED BY command, and the only
way to make the right dependency magic happen was to use the SERIAL
keyword while creating the table.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http
command. You can write some pretty ugly code if you choose to
:-(. Although the docs also threaten to tighten this up, it's been like
that for so long that I'm worried about how much user code we'll break
if we do.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql
about recovering from corrupt data. That
particular row is gone beyond recall, but you should be able to clear
out the damaged page(s) and at least recover the rest of your table.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make
could write the sub-select as
SELECT ROW(rl.reminder_header, rl.reminder_footer) FROM ...
We ought to make that happen automatically, but it's not real
high on the to-do list.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make
of extension functions or future
core functions failing to follow this coding rule; but as long as people
are lazy and copy-and-paste from the existing models, it should be okay.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
...
but this might be too ugly for your taste.
If not, when might I expect a fix?
8.3.6, or apply
http://archives.postgresql.org/pgsql-committers/2008-12/msg00109.php
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
to process the pg_statistic columns like this
--- I've done it myself. And we'd not heard any reports of problems
with it before 8.3.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
.
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
Pascal Tufenkji [EMAIL PROTECTED] writes:
I'm writing a query with a left join to a view, and the server is giving me
a wrong result.
What PG version?
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription
Richard Huxton [EMAIL PROTECTED] writes:
Anyone got anything more elegant?
Seems to me that no document should have an empty dup_set. If it's not
a match to any existing document, then immediately assign a new dup_set
number to it.
regards, tom lane
--
Sent via pgsql
Richard Huxton [EMAIL PROTECTED] writes:
Tom Lane wrote:
Richard Huxton [EMAIL PROTECTED] writes:
Anyone got anything more elegant?
Seems to me that no document should have an empty dup_set. If it's not
a match to any existing document, then immediately assign a new dup_set
number
deliberately chose this behavior awhile back, but I wonder
whether it does more harm than good.
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
really ought to update that ... among other
things, the documentation in recent versions explicitly covers the
point above ;-)
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
.
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
Milan Oparnica [EMAIL PROTECTED] writes:
Is there any way to use INNER, LEFT and RIGHT JOIN between functions
returning refcursor type.
No. Make them return setof whatever instead.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
in an installed PG file set is the
most convenient thing to study.
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
?
---
{(1,one),(2,two)}
(1 row)
Whether this is a good idea for a large table is a different question ;-)
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
Pavel Stehule [EMAIL PROTECTED] writes:
2008/11/13 Tom Lane [EMAIL PROTECTED]:
Sure you can, if you're using a version new enough to have arrays of
composite types.
I don't expect so user use devel version ;)
My example was done in 8.3.
- and result is array of
some composite type
Pavel Stehule [EMAIL PROTECTED] writes:
2008/11/13 Tom Lane [EMAIL PROTECTED]:
My example was done in 8.3.
I tested it with error:
postgres=# select array(select row(a,b) from f);
ERROR: could not find array type for datatype record
You left out the cast to a named rowtype --- that's
Mario Splivalo [EMAIL PROTECTED] writes:
Tom Lane wrote:
Exactly what version of pg_dump are you using? What I get from pg_dump
doesn't look like that. Bytea fields with -D look more like this:
INSERT INTO foo (f1) VALUES ('\\305S\\224\\226\\203)');
Yes, I mistakenly used pg8.2 pg_dump
Richard Huxton [EMAIL PROTECTED] writes:
Mario Splivalo wrote:
That's true, but I'd still like to use hexadecimal notation.
You could use decode():
regression=# select decode('c5a4', 'hex');
decode
--
\305\244
(1 row)
regards, tom lane
--
Sent via pgsql
('\\305S\\224\\226\\203)');
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
(conkey,1)) as i
from pg_constraint where contype = 'f') ss) ss2
where af.attnum = confkey and af.attrelid = confrelid and
a.attnum = conkey and a.attrelid = conrelid;
Deconstructing those arrays in parallel is a bit of a pain :-(
regards, tom lane
--
Sent via
retrieving that info in a more intuitive way.
Unfortunately, the whole point of information_schema is to be
standardized; the notion of a PG extension to it is just wrong.
Feel free to lobby the SQL committee to fix their oversight ...
regards, tom lane
--
Sent via pgsql
.
What you probably want is just to cast the timestamp to date:
cast(ts as date)-- SQL standard syntax
ts::date-- traditional Postgres abbreviation
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
.
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
Scott Marlowe [EMAIL PROTECTED] writes:
On Wed, Oct 29, 2008 at 4:23 PM, Tom Lane [EMAIL PROTECTED] wrote:
If you can tolerate losing the data on that page, just zero out the
entire 8K page. dd from /dev/zero is the usual tool.
Would zero_damaged_pages work here? I know it's a shotgun
, but hard for the system
to optimize. Consider recasting as NOT EXISTS instead.
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
.
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
ignored until end of transaction block
With no idea where the SET is coming from. My logging configuration
is as follows. What am I doing wrong? How can I get the full failing
SQL statement?
log_min_error_statement needs to be ERROR or less.
regards, tom lane
precip_arrays WHERE b = precip_control INTO id_result;
If you insist on using EXECUTE then you're going to have to fool with
converting the array to an appropriate text representation.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes
.)
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
.
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
complicated to use.
If the triggers that are privileged to delete deduced rows run as a
special user, couldn't the validation triggers look at CURRENT_USER
to see whether to allow the delete of a deduced row or not?
regards, tom lane
--
Sent via pgsql-sql mailing list
.
It would be possible to write a C function to do this with a lot less
overhead than a sequence entails, but no one's got round to it AFAIK.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http
;
NOTICE: TG_ARGV = 42, TG_NARGS = 1, par = 42
UPDATE 1
You need to show a more complete example of what you're doing.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref
the same command and
getting the same failure.
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
. You'd likely have better luck asking on pgsql-jdbc.
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
201 - 300 of 2222 matches
Mail list logo