Re: [SQL] SQL repr of bytea val

2005-06-20 Thread Michael Fuhr
On Mon, Jun 20, 2005 at 03:47:01PM +0200, Markus Bertheau ??? wrote: > > I'm constructing querys on the fly in PL/pgSQL_ and need a function that > returns the SQL representation of a bytea value. I tried encode(.., > 'escape') but it seems to return 8 bit ASCII values, not the \377 stuff > that's

Re: [SQL] Array in plpgsql with composite type

2005-06-20 Thread Michael Fuhr
On Mon, Jun 20, 2005 at 01:31:20PM -0300, grupos wrote: > > I need to make an array with composite type (varchar, float8) to get > data from a table (description and price) BUT I am having no success... According to the "Arrays" section of the "Data Types" chapter in the documentation, arrays o

[SQL] Array in plpgsql with composite type

2005-06-20 Thread grupos
Hi Guys! I need to make an array with composite type (varchar, float8) to get data from a table (description and price) BUT I am having no success... I searched a lot on the internet without success. On the PostgreSQL manual there is no information how to handle array with plpgsql with compos

[SQL] SQL repr of bytea val

2005-06-20 Thread Markus Bertheau ☭
Hi, I'm constructing querys on the fly in PL/pgSQL_ and need a function that returns the SQL representation of a bytea value. I tried encode(.., 'escape') but it seems to return 8 bit ASCII values, not the \377 stuff that's supposed to be in the bytea input syntax. Does anyone know a way to do tha

Re: [SQL] info

2005-06-20 Thread Theodore Petrosky
do you 'need' to know or 'want' to know. and I guess that depends on how you define 'to' but also... is there a particular 'somebody' that you are interested (wanting or needing) in --- Luca Rasconi <[EMAIL PROTECTED]> wrote: > I need to know if somebody read this mail. > > bye >

Re: [SQL] UPDATEABLE VIEWS ... Examples?

2005-06-20 Thread Din Adrian
An example(found it some time ago somewhere ?! :) ): /* drop view a_and_b cascade; drop table tbla cascade; drop table tblb cascade; */ CREATE TABLE tbla ( id int4 NOT NULL, a int4, b varchar(12), CONSTRAINT tbla_pk PRIMARY KEY (id) ) --WITHOUT OIDS ; CREATE TABLE tblb ( id int4 NOT NULL,

Re: [SQL] FW: help with serial

2005-06-20 Thread Richard Huxton
Luca Rasconi wrote: CREATE OR REPLACE RULE r1 AS ON INSERT TO TABLE_A DO INSERT INTO TABLE_B (uid) VALUES ((new.uid)); how is it possible, why in a table 37 and in the other 37 + 1? This is almost certainly the "nextval() evaluated twice" issue that catches everyone out from time t

Re: [SQL] info

2005-06-20 Thread Richard Huxton
Luca Rasconi wrote: I need to know if somebody read this mail. Ah, but what does it mean to "know" anything? -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [despammed] [SQL] info

2005-06-20 Thread Andreas Kretschmer
am 20.06.2005, um 11:45:55 +0200 mailte Luca Rasconi folgendes: > I need to know if somebody read this mail. Yes, i read it ;-) Regards, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net ===

[SQL] info

2005-06-20 Thread Luca Rasconi
I need to know if somebody read this mail.   bye

[SQL] FW: help with serial

2005-06-20 Thread Luca Rasconi
Hi all, There’s a behaviour I can’t understand There is table TABLE_A with 3 columns (uid, id, session) where uid is the pk and the data type is serial. There is table TABLE_B with 3 columns (uid, ts_col, col) where uid is the pk.   On table TABLE_A I have a rule on insert like thi

Re: [SQL] UPDATEABLE VIEWS ... Examples?

2005-06-20 Thread David Pradier
> >This is maybe a newbie question, but what is the difference with a > >materialized view ? > > As I understand it (and that understanding may be wrong) a > materialized view is a table that holds the values of a view from > some point in time. A view is a "saved" subselect. Everything you

Re: [SQL] UPDATEABLE VIEWS ... Examples?

2005-06-20 Thread Michael Glaesemann
On Jun 20, 2005, at 4:16 PM, David Pradier wrote: This is maybe a newbie question, but what is the difference with a materialized view ? As I understand it (and that understanding may be wrong) a materialized view is a table that holds the values of a view from some point in time. A view

Re: [SQL] UPDATEABLE VIEWS ... Examples?

2005-06-20 Thread David Pradier
> > This is maybe a newbie question, but what is the difference with a > > materialized view ? > > An updateable view is one you can insert, delete or update rows. > A materialized view is one that is pre-executed... i mean, that the > data is stored in a file for fast execution of the view Thank

Re: [SQL] UPDATEABLE VIEWS ... Examples?

2005-06-20 Thread Jaime Casanova
> This is maybe a newbie question, but what is the difference with a > materialized view ? > An updateable view is one you can insert, delete or update rows. A materialized view is one that is pre-executed... i mean, that the data is stored in a file for fast execution of the view -- regards, J

Re: [SQL] UPDATEABLE VIEWS ... Examples?

2005-06-20 Thread David Pradier
> Reading through the docs, both the CREATE VIEW and CREATE RULE pages refer > to how you can use a RULE to 'simulate' an updateable VIEW ... but I can't > seem to find any examples of this ... This is maybe a newbie question, but what is the difference with a materialized view ? David -- [EMA