Re: [SQL] naming arguments in aggregate function

2010-09-05 Thread Tom Lane
=?UTF-8?Q?Viktor_Bojovi=C4=87?= writes: > I am trying to name arguments in aggregate function, but i don't know how, You can't --- it's not implemented. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to

Re: [SQL] polygon overlay

2010-09-01 Thread Tom Lane
gt; ?column? > -- > t > (1 row) Up to 8.4 the poly_overlap function did this: * Determine if polygon A overlaps polygon B by determining if * their bounding boxes overlap. * * XXX ought to do a more correct check! I see it's been improved for 9.0 ...

Re: [SQL] a general ? on select performance

2010-08-28 Thread Tom Lane
#x27;d need more details about what you're really 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/pgsql-sql

Re: [SQL] plpgsql out parameter with select into

2010-08-18 Thread Tom Lane
trying to do it via OUT-parameter names. 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] type cast

2010-08-10 Thread Tom Lane
t > HINT: No function matches the given name and argument types. You might > need to add explicit type casts. That doesn't sound like a type cast issue. I'd bet you connected to the wrong database from your python app, or are using a different search_path setting, or somethin

Re: [SQL] tsearch2 query question

2010-08-08 Thread Tom Lane
;re really dependent on the exact behavior of LIKE-style searching then tsquery is not going to provide you with an exact replacement. You might consider looking at contrib/pg_trgm/ to find an indexable operation that can speed up LIKE searches. 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] pl/python out params

2010-08-07 Thread Tom Lane
Imre Horvath writes: > Is there a way to use output parameters with a pl/python fucntion? At the moment I think plpython only supports a single OUT param. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to y

Re: [SQL] Backslash characters in PLPGSQL

2010-08-03 Thread Tom Lane
t it's not obvious why that wouldn't lead to visible misbehavior, or why 8.4 would not like 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] aggregate function

2010-08-03 Thread Tom Lane
ant done. I think what you actually need is a transition function that works something like if ($1 is null) return agg_pov_sphere($2,$3,...); else return concat($1, agg_pov_sphere($2,$3,...)); regards, tom lane -- Sent via pg

Re: [SQL] how to escape _ in select

2010-07-28 Thread Tom Lane
e actual string value seen by ILIKE is just %_%, so of course it doesn't do what you want. 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] [TRIGGER] Returning values from BEFORE UPDATE trigger, without using them

2010-07-27 Thread Tom Lane
modified row from the trigger and let the update proceed normally. 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] subtract two dates to get the number of days

2010-07-13 Thread Tom Lane
01/2010'::date - '07/31/2010'::date; ?column? -- 1 (1 row) 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] How to select text field as interger

2010-06-29 Thread Tom Lane
w an error if there are any table rows where the name field *doesn't* contain a valid integer. 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] Average of Array?

2010-06-25 Thread Tom Lane
, and I'd like to make > sure I'm not missing something. You could unnest() the array and then apply the aggregate to the result. unnest() is only built in in 8.4 and later, but it's not terribly hard to write your own in previous versions. regards, tom l

Re: [SQL] ORDER BY is case insensitive

2010-06-22 Thread Tom Lane
tations of en_US locale use "dictionary" ordering. You might prefer C locale's rules 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

Re: [SQL] Casts in foreign schemas

2010-06-08 Thread Tom Lane
path used by a function, it's possible to do that in recent PG versions, by annotating the function definition with a "SET search_path = whatever" clause. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make chang

Re: [SQL] Do not understand "SETOF RECORD" - therefore can not use ODBC-link

2010-05-27 Thread Tom Lane
t4, ... You need that to be select * from odbclink.query ... the "as" business is only allowed in FROM clause. 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] Question about slow queries...

2010-05-27 Thread Tom Lane
easonably decent autovacuum facility, which 8.1.x does not. Suggest bugging your webhost provider to provide a less obsolete version of Postgres. 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] Rules and sequences

2010-05-26 Thread Tom Lane
trigger 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

Re: [SQL] safely exchanging primary keys?

2010-05-24 Thread Tom Lane
Louis-David Mitterrand writes: > When I run that function it seems the foreign keys are not properly > updated and the data ends up in a mess. Yeah? Could we see an actual example of what you're talking about? And which PG version is this? regards, tom lan

Re: [SQL] [Trigger] Help needed with NEW.* and TG_TABLE_NAME

2010-05-11 Thread Tom Lane
This seems like the hard way. Why don't you just RETURN NEW and let the normal insertion happen? 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] advice on query joining 10 tables

2010-05-10 Thread Tom Lane
find a better plan for this query. 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 Specific Update Trigger Routine

2010-05-06 Thread Tom Lane
ther isn't. It's possible this doesn't matter in this particular case (if password can't ever be null in this table), but being careful about nulls is a good habit to cultivate. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgre

Re: [SQL] How to get localized to_char(DATE) output

2010-05-06 Thread Tom Lane
there a way to get this information from within a > SQL statement? No. Postgres doesn't know anything about that. "locale -a" should work on pretty much any Unix-ish system, but I dunno what the equivalent on Windows would be. regards, tom lane -- Sen

Re: [SQL] How to get localized to_char(DATE) output

2010-05-05 Thread Tom Lane
Thomas Kellerer writes: > I'm trying to get the output of the to_char(date, text) method in German but > I can't get it to work: I think you need 'TMMon' to get a localized month name. regards, tom lane -- Sent via pgsql-sql mailing list (pg

Re: [SQL] WAL-files restore and nextval('PK')

2010-05-03 Thread Tom Lane
e you can prevent it by adjusting the sequence parameters to prevent any "caching" of values. 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] [GENERAL] Tsearch not searching 'Y'

2010-04-29 Thread Tom Lane
'::tsvector @@ 'holly:*'::tsquery; ?column? ------ t (1 row) So if you want to use prefix matching, don't normalize. 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 converting strings to timestamps with time zone

2010-04-28 Thread Tom Lane
string_value, '-MM-DD HH24:MI:SS-'); Forget to_timestamp; just cast the string to timestamptz. The regular timestamp input converter will handle that format fine. 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] Inserting Multiple Random Rows

2010-04-28 Thread Tom Lane
LIMIT 1); > I am able to achieve most of what I am trying to accomplish, but once > the random number is selected, it doesn't change. What am I missing? I believe the sub-SELECT will only get executed once, since it has no dependency on the outer query. What were you expecting to happen?

Re: [SQL] Problem with insert related to different schemas

2010-04-21 Thread Tom Lane
doesn't have the right permissions? 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 insert related to different schemas

2010-04-20 Thread Tom Lane
there is either a bug or a version difference here. 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] Re: CHECK constraints with plpgsql functions - check 'fires' BEFORE data modification?

2010-04-19 Thread Tom Lane
condition is still there. CHECK is meant to handle constraints on a row's value *in isolation*. If you try to use it to enforce cross-row conditions, the project will certainly end badly. 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 CASE in plpgsql causes 'ERROR: cache lookup failed'

2010-04-14 Thread Tom Lane
s no rows. NULL is NULL, but it still has a defined datatype ... 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 function returning a result set

2010-04-08 Thread Tom Lane
t_name LIKE name_pattern ||'%'; > END > $$ > LANGUAGE plpgsql; > I get one row returned which is correct, but the ID column is null > (but should be 1). Don't name the parameter the same as the table column ... regards, tom lane -- Sent via pgsql-

Re: [SQL] Does IMMUTABLE property propagate?

2010-03-25 Thread Tom Lane
Greg Stark writes: > On Thu, Mar 25, 2010 at 2:35 PM, Tom Lane wrote: >> When you're intending to have a SQL function be inlined, it's probably >> best not to mark it as either IMMUTABLE or STRICT --- that doesn't buy >> anything and it can complicate mat

Re: [SQL] Does IMMUTABLE property propagate?

2010-03-25 Thread Tom Lane
d it can complicate matters as to whether inlining is legal. 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] Emacs sql-postgres (please, sorry for question not about PostgreSQL).

2010-03-18 Thread Tom Lane
nto it via X11 copy-and-paste. You might find that disabling libreadline (option -n to psql) helps. 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] Simple aggregate query brain fart

2010-03-18 Thread Tom Lane
ess because WHERE filters rows before grouping/aggregation. HAVING filters afterwards, which is when it makes sense to put a condition on count(*). regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription:

Re: [SQL] select points of polygons

2010-03-17 Thread Tom Lane
Andreas Gaab writes: > I have polygons with 5 points (left, center, right, top, bottom) > Now I would like to select an individual point out of the polygon. Are > there any functions to provide this Doesn't look like it :-(. Seems like rather an oversight.

Re: [SQL] Postgresql format for ISO8601

2010-03-17 Thread Tom Lane
8601 standard. 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] installing uuid generators

2010-03-16 Thread Tom Lane
_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables > -fasynchronous-unwind-tables -g ' --without-perl? --without-python? What are these people thinking? (Personally I don't like --without-tcl either, but I know not so many people care about that one anymore.) File an RFE, or find a more clueful distro. 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] Avoiding cycles in a directed graph

2010-03-16 Thread Tom Lane
Richard Huxton writes: > On 16/03/10 21:09, Tom Lane wrote: >> If you don't expect this to be common, maybe you could fix the >> concurrency issue by taking a table-wide lock that locks out >> other writers. > Surely SELECT FOR UPDATE on the parents would be suffici

Re: [SQL] Avoiding cycles in a directed graph

2010-03-16 Thread Tom Lane
trigger? If you don't expect this to be common, maybe you could fix the concurrency issue by taking a table-wide lock that locks out other writers. 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] Avoiding cycles in a directed graph

2010-03-16 Thread Tom Lane
ey can commit. The same kind of problem exists for unique and foreign key constraints, both of which use low-level locking mechanisms to catch such cases. There's no way that I can see to express the "no cycle" constraint as a uniqueness constraint unfortunately. You could s

Re: [SQL] installing uuid generators

2010-03-16 Thread Tom Lane
that theory by looking at the output of pg_config --configure. If so, file a bug report with SUSE asking for that to be added. 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] Rename Index - Deadlock

2010-03-16 Thread Tom Lane
rying to use the index. Why exactly do you feel you need to do this every day? 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 RULE ... CASCADE

2010-03-16 Thread Tom Lane
er types of objects, too.) 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] Odd query behavior

2010-03-15 Thread Tom Lane
don't know of a reason for that to break anything. 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] Odd query behavior

2010-03-15 Thread Tom Lane
e more information about the contents of the column involved, in particular what non-7-bit-ASCII characters it contains? regards, tom lane PS: please cc the list on replies. -- 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] Odd query behavior

2010-03-12 Thread Tom Lane
server's LC_CTYPE setting, and what PG version is this 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: [SQL] Selecting names of indexes that are not dependent on constraints.

2010-03-11 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] Does IMMUTABLE property propagate?

2010-03-06 Thread Tom Lane
representing the result value. 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] Issue with insert

2010-02-27 Thread Tom Lane
gt; EXECUTE PROCEDURE "iss"."insertcitystateinfofunc"(); > CREATE TRIGGER "update_timestamp_citystateinfo" BEFORE UPDATE > ON "iss"."citystateinfo" FOR EACH ROW > EXECUTE PROCEDURE "iss"."timestampfunc"(); Personally I'm su

Re: [SQL] Date comparison, user defined operators and magic

2010-02-26 Thread Tom Lane
, because pg_catalog is normally at the front of the search path. 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 exactly is a query structure?

2010-02-26 Thread Tom Lane
licit error message: regression=# SELECT * from get_noobs(); ERROR: structure of query does not match function result type DETAIL: Returned type unknown does not match expected type text in column "pass". CONTEXT: PL/pgSQL function "get_noobs" line 2 at RETURN QUERY

Re: [SQL] Using new.id in the WHERE condition of one UPDATE inside ON INSERT rule

2010-02-25 Thread Tom Lane
a macro, which in this example will be expanded into a nextval() function call, which is why it doesn't work --- the nextval() in the WHERE condition will produce a different value from the one in the original INSERT. You would be far better off using a trigger here instead of a rule.

Re: [SQL] sintax error

2010-02-19 Thread Tom Lane
regression$# end$$ language plpgsql; ERROR: missing expression at or near ";" LINE 3: return; ^ regression=# regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.po

Re: [SQL] Problem with batch insert

2010-02-18 Thread Tom Lane
ow you the actual server error message. > Postgre version on the server 8.1 on development 8.3 8.1 does not support multiple rows in a VALUES construct. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscri

Re: [SQL] very frustrating feature-bug

2010-02-17 Thread Tom Lane
silly sad writes: > may i ask? when this feature will be fixed? > (now i am using 8.3.9) The example works fine for me in 8.4. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription

Re: [SQL] Howto have a unique restraint on UPPER (textfield)

2010-01-31 Thread Tom Lane
Andreas writes: > Tom Lane schrieb: >> Well, it is that --- it just doesn't provide access to all the features >> that CREATE INDEX does. >> > So as it is a shortcut for "create index" then why would the function > call of upper not be accepted when t

Re: [SQL] Fwd: Help required on query performance

2010-01-31 Thread Tom Lane
f the other side of the join; repeating the scan 8 times seemed better than the alternatives. After you improved the statistics, it most likely switched *to* a hash join (or possibly a merge join) for this step, rather than switching away from one. regards, tom lane

Re: [SQL] Howto have a unique restraint on UPPER (textfield)

2010-01-31 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] clock command regression in pltcl?

2010-01-24 Thread Tom Lane
resql.org/pgsql-committers/2010-01/msg00369.php Or, if you just need a quick workaround, use pltclu. 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] clock command regression in pltcl?

2010-01-22 Thread Tom Lane
sterInterp, clockObj, clockObj, 0, NULL); Tcl_DecrRefCount(clockObj); if (status != TCL_OK) { goto error2; } } So apparently it's still *supposed* to work, but there's something about the way we are using tcl that makes it not work. Any tcl

Re: [SQL] clock command regression in pltcl?

2010-01-22 Thread Tom Lane
eatures, which could mean it's not safe anymore. But I don't see any explicit acknowledgement in the release notes that it's now considered unsafe. 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] CHECK constraint removing brackets

2010-01-11 Thread Tom Lane
7;s no functional difference. 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] CHECK constraint removing brackets

2010-01-11 Thread Tom Lane
me thing. (AND binds tighter than OR.) I think your real problem is that you're trying to use "= NULL" and "!= NULL" where you should say IS NULL or IS NOT NULL. 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] short-cutting if sum()>constant

2009-12-23 Thread Tom Lane
tic evaluator. Yeah. As an example, overflow is supposed to be caught in "a + 1", unlike what would happen in C. In principle you could map some of the builtin operators into inline code, but it would be a great deal of work and the results would be un-portable.

Re: [SQL] 8.3/8.4 SQL incompatibility?

2009-12-16 Thread Tom Lane
his particular case worked before, it'd be nice if it kept working. I'll see what I can do about it. It's too late for 8.4.2 though. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http:

Re: [SQL] Window function trouble

2009-12-10 Thread Tom Lane
ikely to break existing applications than to do anyone any 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

Re: [SQL] Window function trouble

2009-12-10 Thread Tom Lane
the default name for any output column other than a simple column reference is implementation-dependent. I think our implementation involves looking at the default value for a CASE. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make ch

Re: [SQL] problems with changing the case of turkish characters

2009-12-07 Thread Tom Lane
s, UTF-8' >LC_CTYPE = 'English, United States, UTF-8' Not sure why you'd be expecting an English locale to follow Turkish case-changing rules. 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] Getting more than one row in UNIQUE fields

2009-12-04 Thread Tom Lane
version is this, and on what platform? 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] create user xxx with md5 string?

2009-12-03 Thread Tom Lane
t look at the code or docs. 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_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Tom Lane
> Hmm.  It seems like pg_restore would already know 90% of what it needs > to in this case. But of course pg_restore doesn't know what else you might want to do. > Of course I'm just trying to cut down on the 4+ hour VACUUM ANALYZE.  You could try just ANALYZE without the VA

Re: [SQL] pg_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Tom Lane
h forcing the issue once you've completed your data loading. (This might involve multiple steps, which is why pg_restore doesn't try to force it for you.) regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make chang

Re: [SQL] Sqldf - error message

2009-11-20 Thread Tom Lane
er case-folding in Postgres. That column would come back named "broedselid", but it's probably looking for "BroedselID". Or possibly it's expecting the qualifier "dbo_tbl_Broedsels." to be included in the returned column name. Either way, you need to

Re: [SQL] lost password

2009-11-17 Thread Tom Lane
a bit confused by that, but it works and that's what I > need. The md5 will depend on both the actual password and the user's name ... does that help? regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subs

Re: [SQL] ORDB and dot-notation query

2009-11-10 Thread Tom Lane
c in table b in schema a. You need to write (address.country).tld to get the parser started in the right direction. 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] Learning about WITH RECURSIVE

2009-11-04 Thread Tom Lane
he whole result for the next iteration of the recursive term. 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] Learning about WITH RECURSIVE

2009-11-04 Thread Tom Lane
Richard Broersma writes: > Can anyone one explain why a "WITH RECURSIVE" query has the same > results regardless whether UNION or UNION ALL is specified? Well, if the rows are all different anyway, UNION isn't going to eliminate any ... regards, t

Re: [SQL] Function Syntax Help

2009-10-30 Thread Tom Lane
"Plugge, Joe R." writes: > Thanks, I changed my code to this, it compiled, and it seems to be running > now: It looks like you are expecting assignment to the input parameters to do something useful ... it will not. Maybe you need some output parameters?

Re: [SQL] pg_get_functiondef and overloaded functions

2009-10-29 Thread Tom Lane
uot; does not exist > What am I missing? You need to use regprocedure. regproc is mainly for bootstrap purposes --- it accepts a function name only. 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_restore "WARNING: errors ignored on restore"

2009-10-28 Thread Tom Lane
... try dropping that switch. 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] Table Valued Parameters

2009-10-24 Thread Tom Lane
); > SELECT print_array(ARRAY[ '(1,"abc")', '(2,"def")' ]::typ1[]); In this case there's not much real difference, but with a lot of array elements the individual casts get tedious. regards, tom lane -- Sent via pgsql-sql mai

Re: [SQL] date + interval year - why is the return type convered to a timestamp?

2009-10-22 Thread Tom Lane
m tversion Would you expect a date for date '2001-03-30' - interval '1 hour' ? They are type-wise the same case; we don't have different types for different lengths of interval. regards, tom lane -- Sent via pgsql-sql maili

Re: [SQL] question about timestamp with tz

2009-10-22 Thread Tom Lane
the6campbells writes: > Question.. is there a way that I can get Postgres to return the tz as > supplied on the insert statement No. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription

Re: [SQL] Assigning Values to Composite Types

2009-10-22 Thread Tom Lane
a good idea --- I think it would work without, but probably not with good performance. 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 return type of function ??? (corrected)

2009-10-22 Thread Tom Lane
ant to vouch for its safety, considering it hasn't been through a beta test cycle yet. 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 return type of function ??? (corrected)

2009-10-22 Thread Tom Lane
Richard Huxton writes: > Tom Lane wrote: >> plpgsql isn't tremendously good with rowtypes that contain dropped >> columns. > I thought that only applied to columns dropped after the function was > defined. Live and learn. There are/were some variants that go away if

Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-22 Thread Tom Lane
to drop and recreate the table without any dropped columns. 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] Dynamic Query

2009-10-19 Thread Tom Lane
you'd be best off not using a dynamically-constructed query at all --- given the desired %'s in the LIKE pattern, there is not going to be any benefit at all from using an unparameterized query. Just write it out without all the string-construction. regards, tom

Re: [SQL] How to order varchar data by word

2009-10-19 Thread Tom Lane
ful rules that embody somebody's notion of "dictionary order". If you don't like it, try switching to C locale. Or you could learn enough about locale definitions to create your own. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sq

Re: [SQL] maintaining nested views

2009-10-12 Thread Tom Lane
d to a lower level view one has to: > drop view vw_lowlevel CASCADE; As of 8.4 you can add a column via CREATE OR REPLACE VIEW without that. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www

Re: [SQL] ERROR: null value in column "id" violates not-null constraint

2009-10-10 Thread Tom Lane
t; seems odd. Should I change it? That's all there is in 8.0 ... 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: null value in column "id" violates not-null constraint

2009-10-10 Thread Tom Lane
st what happened and whether you're missing anything else from the original database state ... 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: null value in column "id" violates not-null constraint

2009-10-10 Thread Tom Lane
ult in anything better than a busted dump. 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] Common table expression - parsing questions

2009-10-04 Thread Tom Lane
equire the keyword will fail to process some standard-conforming queries in a standard-conforming way. IOW, no, we are not going to change this. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: ht

Re: [SQL] Disable Constraints in Postgresql 8.4

2009-09-29 Thread Tom Lane
Jyoti Seth writes: > How can I disable and enable constraints in Postgres Version 8.4? See ALTER TABLE DISABLE TRIGGER. (Fooling with reltriggers has been deprecated since 8.1.) regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To m

Re: [SQL] AccessExclusiveLock on CREATE TABLE REFERENCES deadlocks (formatted better)

2009-09-22 Thread Tom Lane
ating dynamic table creation, how can this operation > be altered? Get rid of long-running transactions that hold locks on the contexts table. 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   2   3   4   5   6   7   8   9   10   >