tial for
conflict. I suppose we could use long randomly-generated names like
ewjncm343cnlen, but are those really easier to work with?
I think a more useful approach is to treat it as a documentation
problem. Perhaps an example in the ALTER TABLE man page would help.
x27;t give --- you've got month sorting to the left of year,
is that really what you want? If it is then you'd need to go
group by
date_trunc('month', myCol)
order by
to_char(date_trunc('month', myCol), 'MM ')
regards, to
ther second
character, and both of these are significantly more useful than the
ability to have unquoted IDs starting with $ would be. So that's a dead
end. I think if we wanted to change the default assignment of
constraint names we'd just go with ordinary identifiers that we
[];
regression'# tmpv varchar;
regression'# begin
regression'# results := parseString();
regression'# tmpv := results[1];
regression'# RAISE NOTICE '' tmpv = % '',tmpv;
regression'# return tmpv;
regression'# end' language plpgsql;
CREAT
backend to release an exclusive
lock on the table, or an update lock on one of the rows to be updated.
The pg_locks view might help you determine who's the culprit.
regards, tom lane
---(end of broadcast)---
TIP 7: don
ibly this is something to improve someday, but there's surely no
percentage in doing lots of work in the JDBC driver to prefer the IN
form at the moment.
regards, tom lane
---(end of broadcast)---
TIP 5: Have you checked o
a different userid
that has a different search path?
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
.
regards, tom lane
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
e why this works?
The ORDER BY DESC is what forces the max image_id to be selected. Read
the discussion of SELECT DISTINCT ON in the SELECT reference page; the
"weather report" example may be illuminating.
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
LECT list as well, but no modern database
has such a restriction anymore ...
regards, tom lane
---(end of broadcast)---
TIP 8: explain analyze is your friend
Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Am Donnerstag, 22. April 2004 07:59 schrieb Tom Lane:
>> For instance I've been meaning to ask what to do about this open
>> bug report:
>>
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112244
&
I don't
think we are real close yet, though maybe Peter would have an idea what
would be needed. (Note this would also provide a usable solution to the
build-the-tutorial problem I mentioned.)
regards, tom lane
---(end of broadcast)---
27;s a bit hard to believe. Could we see a complete test case?
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
y the error message
complains about the temp *schema* and not a temp table. There's
something very strange here, because the temp schema name for a given
session is definitely fixed for the life of the session.
regards, tom lane
---(end of broad
n in plperl or pltcl.
(Mind you, I don't know why we don't offer a built-in one --- the needed
regex engine is in there anyway. I guess no one has gotten around to
getting agreement on a syntax.)
regards, tom lane
---(end of broadcast)--
t it so it still works
for them after they're spun off. It seems silly to abandon the
not-trivial work you and other people have already put into the contrib
build system; and also silly to expect gborg projects to individually
adapt it to their needs.
regards, tom
tures,
it's likely that nothing will be done about it. Right now this is
almost the only technique available for seeing what's going on inside
a plpgsql function, and crummy as it is, it's better than nothing...
regards, tom lane
t sure when the bigint >> and & operators got added, but \do would
tell you quickly enough if they're in your version.
Mind you that this is not going to be an especially fast solution, since
these are not indexable operators. You might be better advised to
rethink your data representation
able fooey(f1 int, f2 text);
CREATE TABLE
regression=# create function foo(fooey) returns int as '
regression'# begin
regression'# return $1.f1;
regression'# end' language plpgsql;
CREATE FUNCTION
regards, tom lane
---(end of b
see documentation about subselects returning more than
> one column, but it seems to work...
http://www.postgresql.org/docs/7.4/static/functions-subquery.html#AEN12497
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
xact sequence of
GRANT and REVOKE operations that were performed on this table? What
PG version is this, exactly?
regards, tom lane
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
deletion with
TRUNCATE.
regards, tom lane
---(end of broadcast)---
TIP 8: explain analyze is your friend
't. It only revokes privileges
directly associated with the database object, which are the rights to
create new schemas and temp tables within the database.
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/readi
k?
It says that no SQL command acquires ExclusiveLock *on a table*. The
pg_locks row you show represents ExclusiveLock on a transaction number.
Every transaction gets ExclusiveLock on its transaction number for the
duration of its existence.
regards, tom lane
-
OPERATOR4 <= ,
OPERATOR5 < ,
FUNCTION1 int4_reverse_order_cmp(int4, int4);
Now you can just use ASC/DESC in your ORDER BY ...
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
isn't a supported operation. How did you do it exactly? I suspect
that you got it wrong somehow ...
> I dont want user 'test' to access any tables from the 'ups'
> database, i tried revoking permissions it still doesnt work.
What did you revoke? What does psql&
at the
resulting Datum should be interpreted as a bool. 7.4 will coerce to
bool or throw an error if it can't.
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
er" does not exist
regression=# \set AAA '\'whatever\''
regression=# select :AAA;
?column?
--
whatever
(1 row)
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
edit the "set search_path" commands in the dump script, reload.
regards, tom lane
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
ks memory intraquery. That
is fixed for 7.5 though.
regards, tom lane
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
le ---
the first arm of each CASE will yield a non-null result for null input.
Get rid of the CASEs (perhaps you could wrap them into functions
declared STRICT) and the view would be flattenable.
The reason we need this is shown in this old bug report:
http://archives.postgresql.org/pgsql-bugs/2001-0
lf-contained test case.
regards, tom lane
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
gt; users.roles like '%Premium'
AND binds more tightly than OR --- I suspect you wanted some
parentheses.
AND
(bs.value = 'bezahlt' OR bs.value = 'erlassen')
AND
Or you could express the same thing using IN:
AND
bs.value IN ('bezahlt
ks for me, in the sense that returning NULL prevents the
deletion. However that assignment to OLD is a no-op: you can't change
the tuple that way. You'd have to do something like
UPDATE person SET status = 1 WHERE key = OLD.key;
("key" being w
e on 7.4?
Or see if you can rewrite the sreq function in plpgsql.
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
or any of these tables.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
7.5, but hopefully by
the release after that it will.
regards, tom lane
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
es, the planner's choices
are not surprising. You have not given us any information on whether
those estimates are accurate.
regards, tom lane
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
;s been some debate about whether this is really the most
desirable behavior, but that's how it is at the moment.
regards, tom lane
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http:/
head and define an assignment
cast WITHOUT FUNCTION to let you do the conversion.
regards, tom lane
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
say about it?
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
whole-row variables into SQL
expressions, which is essentially what you've got here. There's some
chance it will work in time for 7.5.
regards, tom lane
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
t (as reading a billion rows would take a while). Can
> anyone thing of a way to do this is postgresql?
There is a fairly decent random-sampling engine inside ANALYZE, but
no way for the user to get at it :-(. Can you make any use of
ANALYZE's results, viz the pg_stats view?
"Stijn Vanroye" <[EMAIL PROTECTED]> writes:
> I can't seem to find a way to substract two time values (or
> timestamp values) and get a numeric/float value. I always get the
> INTERVAL datatype.
extract(epoch from interval) may help.
do with it, but at this point
it's a pretty safe bet that it won't make 7.5. Maybe next time.
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
tyle says it is. See
the very voluminous flamewar about ambiguous date input handling in the
pgsql-hackers archives from last summer.
> although the documentation still states the following
AFAICS the documentation says so too...
regards, tom lane
the .
The data type of each referencing column shall be the same as
the data type of the corresponding referenced column.
Nothing there about "try to match by name".
regards, tom lane
---(end of broadcast)--
4 minutes'::interval -
> '4 minutes 30 seconds'::interval, 'mi:ss');
> to_char
> -
> 00:-3
> (1 row)
regards, tom lane
---(end of broadcast)---
TIP 8: explain analyze is your friend
ngy and use the
GiST indexing support on that. You'd have a query like
WHERE min_max_object overlaps-operator 'ABCDE'
and the overlaps operator would be a GiST-indexable one.
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
re what it ought to look like. Can we get away with adding
implementation-specific columns to information_schema tables?
If not, what other alternatives are there?
regards, tom lane
---(end of broadcast)---
TIP 2:
Richard Huxton <[EMAIL PROTECTED]> writes:
> On Wednesday 25 February 2004 21:32, Tom Lane wrote:
>>> SELECT * FROM blocks WHERE 'ABCDE' BETWEEN min AND max;
>>
>> Even if it did realize that, it couldn't do much, because this query
>> isn't
y such naming change to propagate
to Joe's-Corner-Bar's database.)
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
a.my_table USING btree (my_uuid USING my_schema.uuidopclass);
It's possible that we could think of a more convenient behavior for
default opclasses, but I don't want to do something that would foreclose
having similarly-named datatypes in different schemas. You have any
suggestions?
2003-10-17 23:07:00-04
(1 row)
Note the October date is taken as GMT-4, the December GMT-5. The hour
gained in the fall DST transition is accounted for when doing
timezone-aware arithmetic, but not when doing timezone-free arithmetic.
I still think
Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> We have discussed changing the default names of FK constraints
>> before. I have no problem with doing something like the above --- any
>> objection out there?
> I think it's a good idea. It w
quite unpleasant for
operators :-( You can't write
select * from foo where my_uuid = 'xxx';
instead
select * from foo where my_uuid operator(my_schema.=) 'xxx';
Yech. I think you'll end up putting uuid's schema in your search path
before long anyway.
ch path (probably via ALTER
DATABASE).
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
"Eric Lemes" <[EMAIL PROTECTED]> writes:
> - select to_timestamp('2004 10 10 00 00 00', ' MM DD HH MI SS')
> the output is:
> - 2004-10-09 23:00:00-03
What PG version is this, on what platform, and what's your current
timezone s
mn is char(n) and the other is text or varchar(n) then you
may get results you didn't expect. These types have different ideas
about whether trailing blanks are significant or not.
regards, tom lane
---(end of broadcast)---
h would reverse-convert as 11:00 PM standard
time...
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that yo
it is. Fixed in CVS tip --- thanks for pointing it out.
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
s to be simultaneously equal to all three.
So this test certainly fails at every row of CPA.
Perhaps you meant "= ANY"?
regards, tom lane
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
the cur_paralelo or nothing.
You're not expressing yourself clearly, because as far as I can
understand you there are guaranteed to be no such results.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will igno
Hannes Korte <[EMAIL PROTECTED]> writes:
> does anyone know how it is posible to set a composite type as the data
> type of a column when creating a new table?
Use 7.5 ;-). It's not supported in any existing release, but it does
work in CVS tip ...
from foo where id = $1;
r.f1 = ''baz'';
insert into foo select r.*;
return;
end' language plpgsql;
regards, tom lane
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
es punctuation. So probably what was really
at stake was
default 'now()'
(wrong because a string literal) versus
default now()
(correct because a function call).
regards, tom lane
---(end of broadcast)---
N.
Note that if you are using a pre-7.4 release this could have negative
effects on performance --- see the user's guide concerning how explicit
JOIN syntax constrains the planner.
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
an probably handle this; I'm less sure about plperl or plpython.
(No reflection on the languages, but pltcl has the most complete
Postgres interface.)
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/readi
ich to use. But with outer joins
there's a big difference.
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so th
lution here; maybe both LOGE and LOG10 could be provided, at
> least there would then be only one difference from the JDBC standard.
loge() strikes me as pointless; you might as well just use ln().
I don't have any objections to the other proposed additions though.
I inserted
> this timestamp into, I get the following error :
> ERROR: Unable to format timestamp; internal coding error
FWIW, this is fixed in 7.4 and later.
> Is there a way to select the values in the table?
I'd try something like
UPDATE table SET ... WHERE timestamp >
n any case, few people like to depend on such a
thoroughly nonstandard behavior ...
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail comman
that
you didn't show us.
> My question is simple: what the h... can I do? :-)
As far as finding the bug, you need to provide a complete,
self-contained test case.
As far as loading the schema, how about just removing the DEFAULT
clauses? "default null" is the default beh
you can't express today.
> Q2, vital. Can I be sure that the syntax I used here will work
> correctly, i.e. will the "test.name" always refer the column in outer
> table, not inner (t2)?
Yes. The alias *completely* hides the real name of that table
referenc
ver part of the EJB code is breaking ought
to know that, because for sure it is SQL-standard behavior. But the
JDBC people might be more responsive to a bug report.)
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
ql-hackers
archives concerning "dollar quoting".
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that y
de a column list in its COPY commands, so a
plain pg_dump should work. The way with COPY will be a good bit
faster than a pile of INSERT commands.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will ignore yo
d probably handle DISTINCT
using hash aggregation, as long as equality behaves sanely; but that's
not implemented now.)
Probably it'd be reasonable for the comparison operators to return
NULL for a noncomparable pair of inputs.
regards, tom lane
-
You're trying to use a 7.4 feature in 7.3. Multiple functional columns
in one index is new in 7.4.
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subsc
cause I see that age() still acts this way in CVS tip.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
50 and was inserted without complains in a Postgres 7.3.6 with
> SQL_ASCII.
Ugh. You'll have to work out how to convert that codepage to one of the
encodings that PG supports. Or else add it as a supported encoding
(I'm not sure how hard that is, but it's not out of
asleep.
Looks to me like it's just waiting for a response from the backend. I'd
suggest looking into what the backend is doing. I doubt you have an
"interface" problem at all...
regards, tom lane
---(end of broadcast)
k in the archives you'll find cases where creating an immutable
wrapper function was the recommended solution to performance problems.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will ignore your desi
like lower('z');
QUERY PLAN
--
Index Scan using fooeyi on fooey (cost=0.00..17.08 rows=5 width=32)
Index Cond: (lower((f1)::text) = 'z'::text)
Filter: (lower((f1)::text) ~~ 'z'::text)
(3 rows)
regression=# select substring('foobar' from 'o(.)a');
substring
---
b
(1 row)
You'd have to use it twice to collect two separate substrings, which is
mildly annoying, but it's hard to see how to do better without bizarre
behind-the-scenes st
do miskey them and then expect to be able to fix the error later.
As Achilleus' nearby story shows, you can have these problems (certainly
the misentry part) even with imported data that is allegedly someone
else's primary key; part numbers, USA social-security numbers, e
k in that
part of the documentation.
regards, tom lane
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
bit painful to use.
You might want to look at pltcl instead, which is much friendlier
to dynamically generated queries (since that's the only way it
does things). Of course, if you've never used Tcl there'll be
a bit of a learning curve :-(
regards,
27;'''key'''' '';
which is already getting painful, and more complex cases get rapidly
worse. With dollar quoting you can write the constant parts of your
query the same way you normally would.
> What about writing trigger functions in
but of limited understanding of regexes in the planner.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
ght to get fixed eventually, but claiming
it doesn't handle UTF8 at all is simply wrong.
regards, tom lane
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
array_to_string($1, '|')
regards, tom lane
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
;t work properly. It returns the rows of the
> first query ordered and then appends the rows of the second query
> ordered.
Pray tell, what Postgres release are you using?
AFAICT this will result in an overall sort in all PG releases since 7.0.
I don't have anything older to test...
s that you are misinterpreting the sorting result you
get. If you are using a non-C locale you may be seeing some pretty
weird sorting rules :-(
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/reading through Usen
tatypes except text/varchar/char ...
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
ggesting that PG
doesn't use a seconds-from-epoch form at all, but some other format
(such as perhaps separate /mm/dd/hh/mm/ss fields). Sorry if I added
to the confusion instead of dispelling it.
regards, tom lane
---(end of broadcast)---
(select class, student from grades order by class, student) ss
order by class;
It looks like (at least in CVS tip) planner.c will take into account the
relative costs of doing a GroupAgg vs doing a HashAgg and re-sorting,
but I'm too tired to try it right now...
re
until we find time to make that happen.
regards, tom lane
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
o
bite you in the past.
regards, tom lane
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
It works fine for the rest of us. Fix your mail software.
regards, tom lane
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
1201 - 1300 of 2610 matches
Mail list logo