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
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 something along that line. regards, tom

Re: [SQL] tsearch2 query question

2010-08-08 Thread Tom Lane
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 blemi...@gmail.com 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

Re: [SQL] aggregate function

2010-08-03 Thread Tom Lane
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 pgsql-sql

Re: [SQL] Backslash characters in PLPGSQL

2010-08-03 Thread Tom Lane
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] how to escape _ in select

2010-07-28 Thread Tom Lane
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
return the 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
'::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
*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 lane -- Sent via

Re: [SQL] ORDER BY is case insensitive

2010-06-22 Thread Tom Lane
implementations 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] Question about slow queries...

2010-05-27 Thread Tom Lane
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] Do not understand SETOF RECORD - therefore can not use ODBC-link

2010-05-27 Thread Tom Lane
* 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] Rules and sequences

2010-05-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: [SQL] safely exchanging primary keys?

2010-05-24 Thread Tom Lane
is this? 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] Help needed with NEW.* and TG_TABLE_NAME

2010-05-11 Thread Tom Lane
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
the planner 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] How to get localized to_char(DATE) output

2010-05-06 Thread Tom Lane
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 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org

Re: [SQL] Column Specific Update Trigger Routine

2010-05-06 Thread Tom Lane
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@postgresql.org) To make changes to your subscription

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

2010-05-05 Thread Tom Lane
Thomas Kellerer spam_ea...@gmx.net 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 (pgsql-sql

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

2010-05-03 Thread Tom Lane
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
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] Inserting Multiple Random Rows

2010-04-28 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 converting strings to timestamps with time zone

2010-04-28 Thread Tom Lane
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] Problem with insert related to different schemas

2010-04-21 Thread Tom Lane
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
*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
returns 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
$$ 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-sql mailing list (pgsql-sql@postgresql.org) To make changes

Re: [SQL] Does IMMUTABLE property propagate?

2010-03-25 Thread Tom Lane
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] Does IMMUTABLE property propagate?

2010-03-25 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Thu, Mar 25, 2010 at 2:35 PM, Tom Lane t...@sss.pgh.pa.us 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 matters

Re: [SQL] Simple aggregate query brain fart

2010-03-18 Thread Tom Lane
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: http

Re: [SQL] Emacs sql-postgres (please, sorry for question not about PostgreSQL).

2010-03-18 Thread Tom Lane
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] Postgresql format for ISO8601

2010-03-17 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] select points of polygons

2010-03-17 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] DROP RULE ... CASCADE

2010-03-16 Thread Tom Lane
other 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] Rename Index - Deadlock

2010-03-16 Thread Tom Lane
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] installing uuid generators

2010-03-16 Thread Tom Lane
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] Avoiding cycles in a directed graph

2010-03-16 Thread Tom Lane
. There's no way that I can see to express the no cycle constraint as a uniqueness constraint unfortunately. You could solve limited forms of it using the exclusion-constraint mechanism that's new in 9.0, but AFAICS not the general case :-( regards, tom lane -- Sent via pgsql

Re: [SQL] Avoiding cycles in a directed graph

2010-03-16 Thread Tom Lane
, 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
Richard Huxton d...@archonet.com 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 sufficient? If there's

Re: [SQL] installing uuid generators

2010-03-16 Thread Tom Lane
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] Odd query behavior

2010-03-15 Thread Tom Lane
-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-15 Thread Tom Lane
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-12 Thread Tom Lane
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
iss.insertcitystateinfofunc(); CREATE TRIGGER update_timestamp_citystateinfo BEFORE UPDATE ON iss.citystateinfo FOR EACH ROW EXECUTE PROCEDURE iss.timestampfunc(); Personally I'm suspicious that the BEFORE INSERT trigger is changing the data. regards, tom lane -- Sent via pgsql-sql

Re: [SQL] what exactly is a query structure?

2010-02-26 Thread Tom Lane
* 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 regards, tom lane -- Sent via pgsql-sql mailing

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

2010-02-26 Thread Tom Lane
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] Using new.id in the WHERE condition of one UPDATE inside ON INSERT rule

2010-02-25 Thread Tom Lane
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. regards, tom lane -- Sent via pgsql

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.postgresql.org

Re: [SQL] Problem with batch insert

2010-02-18 Thread Tom Lane
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 subscription: http://www.postgresql.org/mailpref

Re: [SQL] very frustrating feature-bug

2010-02-17 Thread Tom Lane
silly sad s...@bankir.ru 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: http

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] Fwd: Help required on query performance

2010-01-31 Thread Tom Lane
of 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 -- Sent via

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

2010-01-31 Thread Tom Lane
Andreas maps...@gmx.net 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 the sql parser maps the uniqe

Re: [SQL] clock command regression in pltcl?

2010-01-24 Thread Tom Lane
-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
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] clock command regression in pltcl?

2010-01-22 Thread Tom Lane
); 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 experts in the house? regards, tom lane -- Sent via

Re: [SQL] CHECK constraint removing brackets

2010-01-11 Thread Tom Lane
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
. 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. regards, tom lane -- Sent

Re: [SQL] 8.3/8.4 SQL incompatibility?

2009-12-16 Thread Tom Lane
that this 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
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 changes to your

Re: [SQL] Window function trouble

2009-12-10 Thread Tom Lane
likely 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] problems with changing the case of turkish characters

2009-12-07 Thread Tom Lane
= '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

Re: [SQL] Getting more than one row in UNIQUE fields

2009-12-04 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] create user xxx with md5 string?

2009-12-03 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_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Tom Lane
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 changes to your subscription: http

Re: [SQL] pg_restore followed by immediate VACUUM ANALYZE

2009-11-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] Sqldf - error message

2009-11-20 Thread Tom Lane
, 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 bug sqldf's authors to fix it. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql

Re: [SQL] lost password

2009-11-17 Thread Tom Lane
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 subscription: http

Re: [SQL] ORDB and dot-notation query

2009-11-10 Thread Tom Lane
(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
Richard Broersma richard.broer...@gmail.com 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, tom

Re: [SQL] Learning about WITH RECURSIVE

2009-11-04 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] Function Syntax Help

2009-10-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] pg_get_functiondef and overloaded functions

2009-10-29 Thread Tom Lane
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
,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 mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

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

2009-10-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] Problem with return type of function ??? (corrected)

2009-10-22 Thread Tom Lane
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] Assigning Values to Composite Types

2009-10-22 Thread Tom Lane
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] question about timestamp with tz

2009-10-22 Thread Tom Lane
the6campbells the6campbe...@gmail.com 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

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

2009-10-22 Thread Tom Lane
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 mailing list (pgsql-sql@postgresql.org) To make changes to your subscription

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

2009-10-19 Thread Tom Lane
and wonderful 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-sql@postgresql.org) To make

Re: [SQL] Dynamic Query

2009-10-19 Thread Tom Lane
think 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 lane

Re: [SQL] maintaining nested views

2009-10-12 Thread Tom Lane
a field 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

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

2009-10-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] ERROR: null value in column id violates not-null constraint

2009-10-10 Thread Tom Lane
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
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] Common table expression - parsing questions

2009-10-04 Thread Tom Lane
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: http

Re: [SQL] Disable Constraints in Postgresql 8.4

2009-09-29 Thread Tom Lane
Jyoti Seth jyotiseth2...@gmail.com 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

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

2009-09-22 Thread Tom Lane
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

Re: [SQL] Hibernate, web application and only one sequence for all primary keys

2009-09-17 Thread Tom Lane
rawi only4...@web.de writes: Grails/Hibernate wishes per default one sequence for all tables-PKs and all PKs as BigInt. Redesign that software; this is fundamentally broken and stupid. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org

Re: [SQL] CHECK constraint on multiple tables

2009-09-14 Thread Tom Lane
that isn't available to user-written constraints. 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] about pg_proc (column pronamespace)

2009-09-11 Thread Tom Lane
Gerardo Herzig gher...@fmed.uba.ar writes: Obviously im missing something, i cant find any relation between pg_proc.pronamespace and pg_namespace. You didn't look at pg_namespace.oid, which is a system column meaning SELECT * doesn't show it. regards, tom lane -- Sent

Re: [SQL] its posible to use a 2 column returning function as a subquery?

2009-09-11 Thread Tom Lane
to the sub-select to keep the planner from flattening the sub-select and producing multiple calls of the function. 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

Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-30 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: COPY in plpgsql are not allowed. I think it will work if you use an EXECUTE. 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] Selecting values from comma separated string

2009-08-26 Thread Tom Lane
... WHERE id = ANY(string_to_array('1,3,7,8', ',')::int[]) ... Of course this just begs the question of why the OP doesn't use an array in the first place. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription

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