incorrectly or
can postgres not handle this kind of UPDATE?
Regards,
Collin Peters
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
ssumption I made that the offending row
would not even be included as it should have already been discarded.
Is this not the case?How can I overcome this problem? There
appears to be no isDate() function in postgresql like there is in sql
server.
Regards,
Collin Peters
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
I have a simple table called notes which contains notes for users.
The table has 4 columns: note_id (auto-incrementing primary key),
user_id (foreign key to a users table), note (varchar), and
modified_date (timestamp).
Is there a nice simple query I can run that will return me a list of
all the
I am having some serious mental block here. Here is the abstract
version of my problem. I have a table like this:
unique_id (PK) broadcast_id date_sent status
1 1 2005-04-0430
2 1 2005-04-01 30
3
I am learning about how to use rules to handle a multi-table insert.
Right now I have a user_activity table which tracks history and a
user_activity_users table which tracks what users are associated with
a row in user_activity (one to many relationship).
I created a rule (and a view called user_
The following is taken from section 9.9.3 of the help docs
===
Examples (supposing that the local time zone is PST8PDT):
SELECT TIMESTAMP '2001-02-16 20:38:40' AT TIME ZONE 'MST';
Result: 2001-02-16 19:38:40-08
SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 2
Is it possible to have a dynamic PREPARE statement in plpgsql?
Something like
PREPARE users_plan ( || 'text, text' || ) AS
INSERT INTO pp_users( || 'col1, col2' || )
VALUES($1, $2);
Regards,
Collin
---(end of broadcast)---
From: http://www.postgresql.org/docs/8.2/static/functions-comparison.html
" The ordinary comparison operators yield null (signifying "unknown")
when either input is null. Another way to do comparisons is with the
IS [ NOT ] DISTINCT FROM construct:
expression IS DISTINCT FROM expression
expressi
statements inside a
plpgsql function? Perhaps I am wrong and it does its PREPARE work
when the function is parsed.
Collin
On 4/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Collin Peters" <[EMAIL PROTECTED]> writes:
> Is it possible to have a dynamic PREPARE statement in plpg
So if I have an INSERT inside a LOOP in a plpgsql function, it is only
prepared once?
Regards,
Collin
On 5/1/07, Jonah H. Harris <[EMAIL PROTECTED]> wrote:
On 5/1/07, Collin Peters <[EMAIL PROTECTED]> wrote:
> Is it faster to use PREPARE for the various INSERT statements ins
In plpgsl, if I have a RECORD variable that is populated via some
dynamic SQL, is it possible to access the columns in that RECORD
object without knowing the column names? I.e. Can I grab whatever
value is the 3rd column?
random_colname = 'foobar';
sql = 'SELECT col1, col2, ' || random_colname |
tivity_user_activity_id_seq') as id,
CURRENT_DATE, 1, 2, 27, 'foo'
LOOP
INSERT INTO user_activity_single(mviews.id, etc...)
END LOOP;
Performance wise this doesn't seem as good. In my case the SELECT
statement would be around 4000 records.
Any tips for me?
Regards,
Coll
The exact problem is that you can't use nextval() with an INSERTable VIEW
Problem is the same as that in this post:
http://archives.postgresql.org/pgsql-sql/2003-07/msg00333.php
On 5/3/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote:
--- Collin Peters <[EMAIL PROTECTED]&g
rrect within the RULE. This was my
second question. If I call "INSERT INTO Vschematic_insert(..."
simultaneously 1000 times is it guaranteed to be correct?
On 5/3/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote:
--- Collin Peters <[EMAIL PROTECTED]> wrote:
> The exact pro
I have a need to convert an incorrectly typed serial column to a
regular integer column. Basically this just involves removing the
sequence. I am able to successfully remove the default value (DROP
DEFAULT) (which seems to use nextval) and now pgadmin does show the
column as an integer, but I ca
Anything pre-8.2?
On 5/11/07, Rodrigo De León <[EMAIL PROTECTED]> wrote:
CREATE TABLE dtab (i SERIAL);
ALTER TABLE dtab ALTER COLUMN i DROP DEFAULT;
ALTER SEQUENCE dtab_i_seq OWNED BY NONE;
DROP SEQUENCE dtab_i_seq;
---(end of broadcast)---
16 matches
Mail list logo