Re: [SQL] session_id

2004-11-21 Thread Bruce Momjian
Riccardo G. Facchini wrote: > No, I can't provide it because your'e right. currval() is NOT affected > by other sessions. > > Thanks anyway for the suggestion, using pg_backend_pid() solved the > uniqueness I needed. I'll keep the nextval/currval for another > opportunity. FYI, we needed a unique

Re: [SQL] SQL Question

2004-11-21 Thread Mischa Sandberg
Igor Kryltsov wrote: We have table create table group_facility ( group_id integer not null, facility_id integer not null ) It stores facilities membership in group. For example: "North Region" - facilityA, facilityB I need to extract groups from this table which contain facilityN AND facilityZ and

[SQL] SQL Question

2004-11-21 Thread Igor Kryltsov
Hi, If anybody can offer better SQL query please. We have table create table group_facility ( group_id integer not null, facility_id integer not null ) It stores facilities membership in group. For example: "North Region" - facilityA, facilityB I need to extract groups from this table which conta

Re: [SQL] missing... at end of sql expression

2004-11-21 Thread Michael Fuhr
On Thu, Nov 18, 2004 at 12:28:03PM -0700, [EMAIL PROTECTED] wrote: > --row_data enrollment%ROWTYPE; > --row_dataa student%ROWTYPE; Your loop variables are commented out. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)---

Re: [SQL] missing... at end of sql expression

2004-11-21 Thread Tom Lane
[EMAIL PROTECTED] writes: > I am trying to learn pspgsql but I am not having a lot of luck. > I have written a function but I keep getting the error missing... at end of > sql expression. Can anyone help! What it's really unhappy about is that you failed to declare the FOR variable; this is caus

[SQL] How to make lo_import and lo_export to use file on client local machine?

2004-11-21 Thread Premsun Choltanwanich
I try to use lo_import and lo_export for manage large object on PostgreSQL. I found that all files must be process on server with these commands. Could I make lo_import and lo_export to use file on client local machine? And How? Or Is it has other ways to manage large object that process is betwe

[SQL] missing... at end of sql expression

2004-11-21 Thread Justine . Cleary
I am trying to learn pspgsql but I am not having a lot of luck.   I have written a function but I keep getting the error missing... at end of sql _expression_. Can anyone help!     CREATE FUNCTION exp101 () RETURNS text AS '   DECLARE -- Declare a variable to hold