On Wed, Nov 9, 2011 at 4:39 PM, Sylvain Mougenot wrote:
> As I mentioned before, your code works on special cases (insert with all the
> columns) and those are very few cases.
> Try this
> CREATE TABLE foo (a int, b int);
> CREATE TABLE job_2011_11 (c int, d int);
>
> CREATE OR REPLACE FUNCTION jo
On Wed, Nov 9, 2011 at 6:57 AM, Sylvain Mougenot wrote:
> Even if the query below is fine (the exact content I try to build as a
> String to use with EXECUTE)
> INSERT INTO job_2011_11 values (NEW.*)
> Is there a way to solve this?
> Isn't it a bug (in how EXECUTE works)?
I doubt this is a bug i
On Tue, Nov 8, 2011 at 11:04 AM, Sylvain Mougenot wrote:
> EXECUTE 'INSERT INTO '|| currentTableName || ' values (NEW.*)';
The quotes in the above line are wrong; you want it like:
EXECUTE 'INSERT INTO '|| currentTableName || ' values ' || (NEW.*);
Josh
--
Sent via pgsql-sql mailing list (pgs
On Sat, Sep 17, 2011 at 10:52 AM, Andreas wrote:
> Instead of the update the query fails with an double key value error for the
> primary key.
> Shouldn't the insert fail, get rolled back and then exercute an update
> instead successfully?
Yes, and that is indeed what I see when I run your exampl
2011/8/3 Raj Mathur (राज माथुर) :
> Hi,
>
> Can you point me to any pages that explain the difference between using,
> say CHAR(8) vs VARCHAR(8) as the primary key for a table? Is there any
> impact on the database in terms of:
>
> - Speed of indexed retrieval
> - Speed of join from a referencing
On Wed, Jan 26, 2011 at 12:07 PM, manuel antonio ochoa
wrote:
>
> Hello,
> I have the next :
>
> COUNTONE=`/var/lib/pgsql/bin/./psql -U 'Thor' -d princlocal -p 5432 -h
> 192.170.1.82 -c "select count(*) from monterrey.${NOMBRETB}"`
> COUNTTWO=`/var/lib/pgsql/bin/./psql -U 'Thor' -dprinclocal
On Wed, Mar 24, 2010 at 2:38 PM, John Gage wrote:
> In going through the arcana of string functions, I have come across the
> following series of selects that contain, for me, a mysterious "$re$".
>
> -- return all matches from regexp
> SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$)