Re: [SQL] Special grouping on sorted data.

2008-09-23 Thread Tom Lane
; 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

Re: [SQL] Special grouping on sorted data.

2008-09-22 Thread Tom Lane
what you need, but it sounds like the SELECT DISTINCT ON feature might solve it for you. Look into our SELECT reference page at the weather reports example. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] inserting boolean values in dynamic queries

2008-09-18 Thread Tom Lane
of newvalue from boolean to text causes problem. What problem? 'true' and 'false' are accepted as input for boolean AFAICS. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [SQL] Aggregates in WHERE clause?

2008-09-11 Thread Tom Lane
like to think about it is WHERE filters rows before aggregate functions are computed; HAVING filters them afterwards. Seen in those terms, it's obvious why WHERE can't contain any aggregates. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org

Re: [SQL] FW: Help- post gress sql error

2008-09-10 Thread Tom Lane
fixed some bugs with symptoms like that. If you can reproduce it on any current release version, please send a complete test case (the query alone is pretty useless without tables to try it on) to pgsql-bugs. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql

Re: [SQL] Function Syntax involving pipes and ' marks?

2008-09-10 Thread Tom Lane
. 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

Re: [SQL] problem with pg_stat_activity view

2008-09-08 Thread Tom Lane
Sofer, Yuval [EMAIL PROTECTED] writes: postgres version: 8.2.0.4 ERROR: invalid input syntax for type inet: fe80::104d:416e:a8dc:c02e%12 This is fixed in 8.2.5 and later. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make

Re: [SQL] variables with SELECT statement

2008-09-05 Thread Tom Lane
Frank Bax [EMAIL PROTECTED] writes: Kevin Duffy wrote: ERROR: function regexp_string_to_array(text, text) does not exist Are you running 8.3? Also, it's regexp_split_to_array ... regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make

Re: [SQL] seemingly slow for-loop in plpgsql

2008-09-02 Thread Tom Lane
(hashcode) = 33; 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

Re: [SQL] Why *no* ambig·uous complain in select part?

2008-08-22 Thread Tom Lane
, which merges the similarly-named columns into just one output column. RTFM, or any SQL book. 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

Re: [SQL] What is wrong with this PostgreSQL UPDATE statement??

2008-08-22 Thread Tom Lane
behavior is ill-defined if a given target row joins to more than one set of rows from the other table(s). 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

Re: [SQL] LIMIT question

2008-08-19 Thread Tom Lane
from c; commit; The only thing this saves over just doing the full query is that you don't have to transmit all the data to the client. Still, that can be an important savings. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make

Re: [SQL] DELETE with JOIN

2008-08-07 Thread Tom Lane
it, and it should 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

Re: [SQL] return setof record - strange behavior

2008-08-04 Thread Tom Lane
. But the FOR-loop all by itself isn't going to return any data to the function's caller. 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

Re: [SQL] Problem with ORDER BY and DISTINCT ON

2008-07-31 Thread Tom Lane
Steve Midgley [EMAIL PROTECTED] writes: At 07:29 AM 7/16/2008, Tom Lane wrote: I think what is happening is that ORDER BY knows that and gets rid of the duplicate entries while DISTINCT ON fails to do so. Of course removing the duplicate from both areas is the correct solution and I broke

Re: [SQL] order function in aggregate

2008-07-30 Thread Tom Lane
. 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

Re: [SQL] Query prepared plan

2008-07-25 Thread Tom Lane
Emi Lu [EMAIL PROTECTED] writes: Somebody know about how to find prepared query plan through command line? PREPARE fooplan(...) EXPLAIN EXECUTE fooplan(...) regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes

Re: [SQL] Strange query duration

2008-07-22 Thread Tom Lane
. 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

Re: [SQL] pg_advisory_lock(bigint) vs. LOCK TABLE

2008-07-17 Thread Tom Lane
the documentation. Advisory locks are defined as locking application-defined identifiers. Why would you expect them to conflict with system locks, and what would be the relationship exactly? regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org

Re: [SQL] Problem with ORDER BY and DISTINCT ON

2008-07-16 Thread Tom Lane
IS NOT NULL) THEN 1 ELSE 2 END, -- search_rate_max, property.id LIMIT 10 OFFSET 0 BTW, why are you bothering with the CASEs at all? Null values of search_rate_max would sort high already. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org

Re: [SQL] how to perform minus (-) operation in a dynamic query

2008-07-14 Thread Tom Lane
/100) \226 (sf \226 sf * comm/100) as... I'm not sure what character \226 is, but it's not a minus sign ... 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

Re: [SQL] Rollback in Postgres

2008-07-14 Thread Tom Lane
six thousand full-time developers and an already extremely mature database. Stuff that they see fit to add is not necessarily going to be on our radar screen in the foreseeable future. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make

Re: [SQL] Unnecessary repeat condition for a self inner join

2008-07-12 Thread Tom Lane
. An IN is not an equivalence condition. 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

Re: [SQL] Unnecessary repeat condition for a self inner join

2008-07-11 Thread Tom Lane
conditions. I'm still dubious, but that's at least one less catalog search ... 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

Re: [SQL] PERSISTANT PREPARE (another point of view)

2008-07-11 Thread Tom Lane
performance by reducing the number of network round trips needed to accomplish a multi-SQL-statement task 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

Re: [SQL] Egroupware infolog query slow (includes query plan)

2008-07-06 Thread Tom Lane
info_responsible to an int array would be reasonable. 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

Re: [SQL] column default dependant on another columns value

2008-07-01 Thread Tom Lane
not, it can only suppress rows at run-time; and what you've got is infinite macro expansion recursion. 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

Re: [SQL] distinct / group by assistance.

2008-06-28 Thread Tom Lane
values you want and use an aggregate function to get it. So your query might end up looking like select a.id, min(a.foo), avg(b.bar), ... from ... group by a.id; regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] TZ/tz not supported

2008-06-20 Thread Tom Lane
reason for this limitation or is it just the implementation waiting to be completed (nobody has had an itch intensive enough to scratch it)? The latter, I believe. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] Problem inserting data

2008-06-20 Thread Tom Lane
I'd look at option (1) before trying (2) with an implicit cast. 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

Re: [SQL] using calculated column in where-clause

2008-06-19 Thread Tom Lane
a bit you'll find multiple calls happening. (In recent releases you'd actually have a better chance of not having multiple calls if you'd declared it volatile instead of immutable.) regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make

Re: [SQL] COPY command and required file permissions

2008-06-12 Thread Tom Lane
wouldn't recommend that unless the machine is entirely isolated from the internet. 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

Re: [SQL] crosstab functions in postgres 8.1

2008-06-06 Thread Tom Lane
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

Re: [SQL] bcp.exe Fix Triggers

2008-06-02 Thread Tom Lane
--- perhaps run a Perl script over the dump before you import. There's no way those triggers will work, quite aside from your difficulties in auto-generating them, because \0 isn't valid in PG text values. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql

Re: [SQL] Difference in columns

2008-05-11 Thread Tom Lane
) - a.size AS difference FROM x a; ... but that'll be really slow for any significant number of entries. not really... if you have an index on the TS column. The OP said this was a view, so it may well not have any easy way to provide such an index. regards, tom lane

Re: [SQL] Index to enforce non-overlapping ranges?

2008-05-08 Thread Tom Lane
that overlaps is an equality condition (hint: it's not transitive). I don't say that it'd be impossible to construct an index type that could do this, but you won't get there with the pieces we have. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql

Re: [SQL] Working with dates before 4713 BC

2008-05-05 Thread Tom Lane
really need microsecond, or even day, resolution in your dates? I wonder if it'd not be good enough to store the year as an integer. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

Re: [SQL] psql: no schema info

2008-04-27 Thread Tom Lane
). 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

Re: [SQL] Protection from SQL injection

2008-04-26 Thread Tom Lane
tab where intcol = intcol; delete from tab; contains no literals and yet the delete is very probably injected. 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

Re: [SQL] Protection from SQL injection

2008-04-26 Thread Tom Lane
way to notice whether any insecure strings are getting into database queries. 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

Re: [SQL] trim(both) problem?

2008-04-25 Thread Tom Lane
. 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

Re: [SQL] trim(both) problem?

2008-04-25 Thread Tom Lane
/$', ''); 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

Re: [SQL] Error: could not find pathkey item to sort

2008-04-21 Thread Tom Lane
This is already reported and fixed, thanks. http://archives.postgresql.org/pgsql-bugs/2008-03/msg00275.php regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [SQL] using string functions on plpgsql

2008-04-16 Thread Tom Lane
Craig Ringer [EMAIL PROTECTED] writes: i = length(texto) ^^^ i := length(texto) Whoops, I spoke too soon - it seems both are valid for assignment. Has that always been true? Yeah, it's not documented, but AFAIK plpgsql has always taken both. regards, tom lane

Re: [SQL] How to find double entries

2008-04-15 Thread Tom Lane
think of automating it completely. 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

Re: [HACKERS] [SQL] pl/PgSQL, variable names in NEW

2008-04-10 Thread Tom Lane
. Possibly the text should be reworded, with the mention of DBD::PgSPI put somewhere else or stuck into a note or something. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [DOCS] [HACKERS] [SQL] pl/PgSQL, variable names in NEW

2008-04-10 Thread Tom Lane
. 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

Re: [SQL] undefined relations in pg_locks

2008-04-07 Thread Tom Lane
never be a reason for a deadlock, because no other transaction could be trying to lock 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

Re: [SQL] drop table where tableName like 'backup_2007%' ?

2008-03-31 Thread Tom Lane
commands into a file, so they can eyeball them before actually executing them. 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

Re: [SQL] specifying wal file size

2008-03-31 Thread Tom Lane
rather doubt that your source knows how to change the intended file size from 16MB 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

Re: FW: Re: [SQL] Part 1 of several - Converting a varchar to an interval

2008-03-26 Thread Tom Lane
) 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

Re: FW: Re: [SQL] Part 1 of several - Converting a varchar to an interval

2008-03-26 Thread Tom Lane
PostgreSQL 8.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5) 8.2.3 is your problem --- this is fixed in 8.2.5 and up: http://archives.postgresql.org/pgsql-committers/2007-05/msg00345.php regards, tom lane -- Sent via pgsql-sql

Re: [SQL] Bizarre sort order

2008-03-26 Thread Tom Lane
Conlon, Joseph F SIK [EMAIL PROTECTED] writes: Does anyone think this is the correct behavior? If you don't think so, you need to change to C locale. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] Deferrable NOT NULL REFERENCES ... for two-way referential relationship

2008-03-25 Thread Tom Lane
: http://archives.postgresql.org/pgsql-hackers/2005-01/msg00882.php that suggest that constraint triggers are or have been deprecated. However, their removal is no longer on the TODO as far as I can tell. Yeah, there is no longer any thought of removing them. regards, tom lane

Re: [SQL] Rollback locks table - why?

2008-03-20 Thread Tom Lane
on test, so there must be something else going on that you didn't show us. 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

Re: [SQL] postgres server crashes unexpectedly

2008-03-18 Thread Tom Lane
probability that you have more than one corrupted index. Keep reindexing tables until you can get through a database-wide VACUUM. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [SQL] pg_dump using SQL

2008-03-18 Thread Tom Lane
that these queries are moving targets: they frequently change from one PG version to the next. By far the best answer, if you can use it, is to invoke pg_dump itself as a subprocess. Something like pg_dump -s -t mytable ... for instance. regards, tom lane -- Sent via pgsql-sql

Re: [SQL] postgres server crashes unexpectedly

2008-03-17 Thread Tom Lane
of the whole database. You ought to look into why this happened, too. Since you've provided precisely 0 context about PG version or platform, it's hard to speculate about that ... regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes

Re: [SQL] Subselect strange behaviour - bug?

2008-03-16 Thread Tom Lane
; that is, what you wrote is equivalent to select * from t2 where id1 in (select t2.id1 from t1); 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

Re: [SQL] RETURN QUERY generates error

2008-03-06 Thread Tom Lane
- if I create an empty table to go with it, it runs here. The error sounds suspiciously like what would happen if you tried to use RETURN QUERY in a pre-8.3 version. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] compiling plpython compilation error

2008-03-03 Thread Tom Lane
. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your Subscription: http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.orgextra=pgsql-sql

Re: [SQL] pl/pgsql and error handling

2008-02-28 Thread Tom Lane
Alex Hochberger [EMAIL PROTECTED] writes: Is it possible to grab access to the actually user-friendly error message? Doesn't the SQLERRM variable do what you want? regards, tom lane ---(end of broadcast)--- TIP 4: Have

Re: [SQL] operator class

2008-02-27 Thread Tom Lane
an index on a field wich is of a type defined by the user? Sure, if you are also willing to define operators and operator classes on your type. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives

Re: [SQL] Bounce test

2008-02-25 Thread Tom Lane
All to this message, I'd appreciate it. It bounced. The OP should note that this is a good way to get shunned on these lists. regards, tom lane ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project

Re: [SQL] SQL standards in Mysql

2008-02-22 Thread Tom Lane
spots of our own on questions like this one, so I'm disinclined to throw the first stone ... regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe

Re: [SQL] comment on COLUMN, broken or misunderstanding?

2008-02-17 Thread Tom Lane
sched.days; Schema | Name | Object | Description +--++- (0 rows) Try \d+ sched. I don't think \dd considers columns at all --- what that command would be looking for is comments on table days in schema sched. regards, tom lane

Re: [SQL] FUNCTIONs and CASTs

2008-02-15 Thread Tom Lane
for the lack of communication is that no one else believes that premise. Casting a value to the same type it already has is demonstrably a no-op. regards, tom lane ---(end of broadcast)--- TIP 7: You can help support

Re: [SQL] FUNCTIONs and CASTs

2008-02-14 Thread Tom Lane
), and no conversion between types is done. It's not exactly clear what you checked, but it works as expected for me. See test case below, proving that indexscan works just fine with a parameter declared using %type. regards, tom lane regression=# create table tt(f1 char(10) unique

Re: [SQL] Like problem

2008-02-13 Thread Tom Lane
, this might be the easiest localized solution. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-11 Thread Tom Lane
[EMAIL PROTECTED] writes: Now, what do I have to do in order to generate a valid UUID (or the 5 different versions as implemented by the RFC) under Windows? Figure out how to build ossp-uuid on Windows ... regards, tom lane ---(end of broadcast

Re: [SQL] Usage of UUID with 8.3 (Windows)

2008-02-11 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Figure out how to build ossp-uuid on Windows ... I think Windows has its own UUID generator, so the best bet would be to make that work. Only if it can be made to present the same SQL-level API as we have for OSSP. Otherwise we'll

Re: [SQL] Can CREATE TYPE be used to create a synonym?

2008-02-10 Thread Tom Lane
BTW, bouncing mail sent to your advertised reply address is a good way to discourage people from ever answering you again. regards, tom lane --- Forwarded Message Return-Path: MAILER-DAEMON Delivery-Date: Sun Feb 10 21:57:56 2008 Received: from localhost (localhost

Re: [SQL] Can CREATE TYPE be used to create a synonym?

2008-02-10 Thread Tom Lane
Dean Gibson (DB Administrator) [EMAIL PROTECTED] writes: CREATE TYPE DATETIME AS (dummy TIMESTAMP); I suspect not (syntax issues w/ input, output, etc). Is there an alternate way to declare a type synonym? CREATE DOMAIN would serve a lot better. regards, tom lane

Re: [SQL] Create Table xtest (like xtype)

2008-02-06 Thread Tom Lane
the relkind check. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Information schema permissions

2008-02-06 Thread Tom Lane
that are about tables that you have some access permissions for. This might or might not confuse your app ... regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [SQL] Cast in PG 8.3

2008-02-05 Thread Tom Lane
, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] Negative numbers for PK/ID's?

2008-02-05 Thread Tom Lane
Steve Midgley [EMAIL PROTECTED] writes: I'm wondering if there are any Bad Things that happen if I use negative integers for primary key values in Postgres (v8.2)? No. regards, tom lane ---(end of broadcast)--- TIP 4

Re: [SQL] Except without elimination of non-distinct rows

2008-02-04 Thread Tom Lane
at). regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Problem with the to_timestamp function

2008-01-31 Thread Tom Lane
why I am using the to_timestamp. Locale has nothing to do with this --- at most you might want to adjust the datestyle parameter. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Sql ORDER BY and ASC/DESC question

2008-01-30 Thread Tom Lane
hack for text keys. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Problem with the to_timestamp function

2008-01-30 Thread Tom Lane
configuration file.) regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [SQL] Problem with the to_timestamp function

2008-01-30 Thread Tom Lane
, the standard input converter is a whole lot more flexible for slightly-out-of-spec input ... so I ask again, do you really need to_timestamp at all? regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Slow Query problem

2008-01-28 Thread Tom Lane
. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] Syntax question: use of join/using with fully qualified table name

2008-01-27 Thread Tom Lane
... b) If a named columns join is specified, then every column name in the join column list shall be the column name of exactly one column of T1 and the column name of exactly one column of T2. regards, tom lane

Re: [SQL] extract or date_part on an interval? How many e

2008-01-27 Thread Tom Lane
answers in various corner cases, but I'm not sure there is a right answer. regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] This SQL works under Mysql, not Postgresql.

2008-01-25 Thread Tom Lane
, it's not too surprising that they'd show such a weak grasp of correct syntax. Maybe replace the comma with CROSS JOIN? ... (SERVICE suv CROSS JOIN SERVICE sus) ... regards, tom lane ---(end of broadcast)--- TIP 5: don't

Re: [SQL] TIMESTAMP comparison problem

2008-01-22 Thread Tom Lane
timestamps. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through

Re: [SQL] (possible) bug with constraint exclusion

2008-01-21 Thread Tom Lane
of course cannot be patched. (According to the CVS tags the revisions of plancat.c and predtest.c in the 8.2.6 release are 1.127 and 1.10.2.2, respectively, whereas the patch is against the head revisions.) Better look again. regards, tom lane ---(end

Re: [SQL] How to test/read a stored procedure that returns a boolean?

2008-01-16 Thread Tom Lane
forgot to declare num_matches as a local variable, too. regards, tom lane ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Is DATETIME an ANSI-SQL type?

2008-01-15 Thread Tom Lane
WITH TIME ZONE If you need to port from a system that used DATETIME as a type name, consider defining DATETIME as a domain over whichever of the standard types seems to have the closest semantics (likely the last of these). regards, tom lane ---(end

Re: [SQL] UTF8 encoding and non-text data types

2008-01-14 Thread Tom Lane
of decimal digits, nor of any other character that would be allowed in input for a decimal field. I can't tell what your problem really is, but you have certainly misunderstood or misexplained it. regards, tom lane ---(end of broadcast

Re: [SQL] UTF8 encoding and non-text data types

2008-01-14 Thread Tom Lane
; they're something or other in Arabic, apparently. So I think you've got a problem in your Unicode conversions as well as a notational problem. regards, tom lane ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL

Re: [SQL] UTF8 encoding and non-text data types

2008-01-14 Thread Tom Lane
Joe [EMAIL PROTECTED] writes: Tom Lane wrote: Well, you've got two problems there. The first and biggest is that #NNN; is an HTML notation, not a SQL notation; no SQL database is going to think that that string in its input is a representation of a single Unicode character. The other

Re: [SQL] trigger for TRUNCATE?

2008-01-10 Thread Tom Lane
to have access to the set of deleted rows, and then you'd be stuck either scanning the table or having TRUNCATE act differently from plain DELETE. My feeling is that if you want to know what was deleted, you shouldn't use TRUNCATE. regards, tom lane

Re: [SQL] trigger for TRUNCATE?

2008-01-10 Thread Tom Lane
rowset information, even after we add that for the other types of statement-level triggers. Never mind ... regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Argentinian timezone change at the last moment. How to change pgsql tz db?

2008-01-03 Thread Tom Lane
till previous step was done. Too tired to experiment, but you may need a pg_ctl reload or even a restart to get PG to notice changes in your timezonesets file. regards, tom lane ---(end of broadcast)--- TIP 7: You can help

Re: [SQL] Argentinian timezone change at the last moment. How to change pgsql tz db?

2008-01-02 Thread Tom Lane
/postgresql/timezonesets/Default, if you're using 8.2. In earlier versions the table is hardwired into datetime.c :-( regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [SQL] Using rules to implement backward-compatible schema changes

2007-12-31 Thread Tom Lane
a different default for inserts to the view than for inserts directly to the underlying table. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Describe Table

2007-12-17 Thread Tom Lane
by internal commands such as those generated by \d commands. Another alternative is to run pg_dump -s -t table; that will get you a lot closer to SQL-ready output, and you won't need to worry as much about updating your code for future system catalog changes. regards, tom

Re: [SQL] odd error updating - varchar

2007-12-14 Thread Tom Lane
. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

<    1   2   3   4   5   6   7   8   9   10   >