Re: [SQL] Error message during compressed backup

2003-10-24 Thread Peter Eisentraut
Senthil Kumar S writes: > $ $ pg_dump -h 192.xxx.x.xxx -p 5432 -v testdb -f > /home/db_repository/testdb20031023.sql.tar.gz -u -F c > WARNING: owner of function "plpgsql_call_handler" appears to be invalid Run select proowner from pg_proc where proname = 'plpgsql_call_handler'; which gives yo

Re: [SQL] Regular expression problem

2003-10-24 Thread Manuel Sugawara
Matias Surdi <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: > >Use something like '^[a-z]{2}$' > > so, is this a bug No it is not. The sintax you are using is not supported. Regards, Manuel. ---(end of broadcast)--- TIP 3: if posting/

Re: [SQL] Regular expression problem

2003-10-24 Thread scott.marlowe
On 24 Oct 2003, Manuel Sugawara wrote: > Matias Surdi <[EMAIL PROTECTED]> writes: > > > Manuel Sugawara wrote: > > >Use something like '^[a-z]{2}$' > > > > so, is this a bug > > No it is not. The sintax you are using is not supported. It certainly seems to work in Postgresql 7.4 beta 4: c

Re: [SQL] Regular expression problem

2003-10-24 Thread Manuel Sugawara
"scott.marlowe" <[EMAIL PROTECTED]> writes: > It certainly seems to work in Postgresql 7.4 beta 4: > > create table test2 (info text); > CREATE TABLE > insert into test2 values ('ab'); > INSERT 109169538 1 > insert into test2 values ('abc'); > INSERT 109169539 1 > > marl8412=# select * from test

[SQL] extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax

2003-10-24 Thread Alexander Vlasenko
Please CC me, I am not subscribed. An imaginary SQL statement INSERT INTO table FETCH ... FROM cursor; looks almost the same as currently available INSERT INTO table SELECT ...; I tried it because I needed to insert a row in a table after I DELETEd a set of rows, something like this: BEGIN; DECL

[SQL] problem with sql

2003-10-24 Thread Adaś
Hello to everyone, In my own database, I linked customers table with orders table using one-to-many relation. I need to check status of last order for each customer and then set customer's status. I made a query using LAST and GROUP BY to select last order for each customer and I wanted to use

Re: [SQL] date_trunc for 5 minutes intervals

2003-10-24 Thread Mathieu Arnold
+-Le 19/10/2003 23:38 +1000, email lists écrivait : | Hi All, | | I am wanting to perform the equivalent of date_trunc to 5/10/15 minute | intervals. As this does mnot seem to be natively supported by | date_trunc, can anyone point me in the right direction to possible write | the SQL ro achieve

[SQL] naming conventions constraint

2003-10-24 Thread Julian North
I'm at the very beginning of working with postgres. The aim is to replace / build a number of very large and very complex database currently residing in Oracle, MSSQL and Informix. In order to coordinate across a medium size DBA team I instituted a standard constraint naming convention suitable f

Re: [SQL] Regular expression problem

2003-10-24 Thread scott.marlowe
On 24 Oct 2003, Manuel Sugawara wrote: > "scott.marlowe" <[EMAIL PROTECTED]> writes: > > > It certainly seems to work in Postgresql 7.4 beta 4: > > > > create table test2 (info text); > > CREATE TABLE > > insert into test2 values ('ab'); > > INSERT 109169538 1 > > insert into test2 values ('abc'

Re: [SQL] naming conventions constraint

2003-10-24 Thread Rod Taylor
rbt=# create table bob_is(your_uncle integer, constraint "bob_is#your_uncle" check(true)); CREATE TABLE rbt=# \d bob_is Table "public.bob_is" Column | Type | Modifiers +-+--- your_uncle | integer | Check constraints: "bob_is#your_uncle" CHECK true Yo

Re: [SQL] Regular expression problem

2003-10-24 Thread Jeff Eckermann
7.4 uses a completely new regex engine, so comparisons with that will not be valid anyway. Pre-7.4 regex behaviour is all documented: Users Guide -> Functions & Operators -> Pattern Matching --- "scott.marlowe" <[EMAIL PROTECTED]> wrote: > On 24 Oct 2003, Manuel Sugawara wrote: > > > Matias Surdi

[SQL] Referring to derived column name in a RECORD

2003-10-24 Thread David B
Hi folks, I know I'm doing something wrong here but cannot make it work no matter how many/few quotes I use I'm trying to reference a column in a RECORD which is not a column name but a derived column. Any suggestions??? Example code below to highlight the problem: DECLARE r_app RECO

Re: [SQL] Referring to derived column name in a RECORD

2003-10-24 Thread Joe Conway
David B wrote: SELECT to_char( created_timestamp, 'DDMMYY' ) AS "joined_on", r_app.joined_on ; -- HOW do I reference this value?...this does not work Try either making that first line: ... AS joined_on, (i.e. without the double quotes) or make the second one: r_app."joined_on"; (i.

Re: [SQL] [GENERAL] Alias-Error

2003-10-24 Thread Csaba Nagy
You have the alias in upper case: "C2", and postgres complains about a lower case "c2". May be this some case sensitivity problem ? Just a thought. HTH, Csaba. On Tue, 2003-10-21 at 09:17, Jost Richstein wrote: > Ok. The exact error message is as follows: > > SQLException Time : Mon Oct 20