Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sc46J-003bHo-2Z for pgsql-admin@arkaria.postgresql.org; Thu, 08 Aug 2024 14:26:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sc46H-00EjQV-FH for pgsql-admin@arkaria.postgresql.org; Thu, 08 Aug 2024 14:26:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sc46H-00EjQM-3n for pgsql-admin@lists.postgresql.org; Thu, 08 Aug 2024 14:26:45 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sc46E-003oMC-SN for pgsql-admin@lists.postgresql.org; Thu, 08 Aug 2024 14:26:44 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52f00ad303aso1299596e87.2 for ; Thu, 08 Aug 2024 07:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723127202; x=1723732002; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=wzcSs4dbeYw6Qusyl+b3CMNs06hrBHLrg7oWtwsFUm8=; b=E/Q+fIhD5nzpJMHbYVaH9a57iibgmbgresQZwf1EhxJHJFHdIDXrZDSmRTWPS7QPgk 9xWkmshPZzrWABsS02hymHbU/IK+T6uRhhdL445HJQljiFrgTm7L//oXKsb+tdy0RfMF TghT5mf4uOoyfxUQBiicIjMk+8UXOPhdX0NLJWiNiVTO63UEnLVIsTYH9j7Y8VhOG88Q 4ug32fli0eqjXnAauKGhenVYdxMHJGY2xqLfQ3rgv+Oi5UYDLZq7Wu4aUXQp1Vj3gHyN dQ+rTzZtvLe8N49422RWz9sE25EcbC439ZNgsPcat/Su7jdYDSoEmclOm2jSOLA6eQ4M ftFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723127202; x=1723732002; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wzcSs4dbeYw6Qusyl+b3CMNs06hrBHLrg7oWtwsFUm8=; b=ryYC0YjucKqeV2aaiUrN5s4TD3ZsYk66G9wu7bsAbExreTB9DWrxQb4kfG/pBW7bOE jgMxH8w+va+2lq49xRDz9zNKGmWS0TT9+BZEz6p/Ep540ooxLVHVyPgYJ8R1z1ckciSD 8R6bq/1wXSw4w2iPEIvgapx1AvoCnz4thpZN+APhBMN/c8FFptxtYheSiyi6Z9Lu/auj TTv2THKCghAri3p4ZPuoyAusjBjdZ7Z4cASQB5JL3NuPnCe1JWpBz6xH9Vrt5UlX01mJ HFD1yxcKygy9iIaYFIX+QsCAFTNxxJUbf8765TAUmvF/YiSC7lSOxjy86wTha+0i/dzs RhOQ== X-Gm-Message-State: AOJu0YzlPWkmeRbBkAIjpJ/XPffANNhXF3Q0ZKpbweEQLzGnnWQbkbje hCpMwzWjmFDDO1dgbXnTvmsXfR1hghDKBnwzbDpsBI1wQxPIL0lngvdujt6uGN4vdbURb/8Aip+ lUHwS4yqLHktTXjXeGXnJ03n56Ty973Rb X-Google-Smtp-Source: AGHT+IHe5mdeL5Opv2/RvTfpaFQeI9fbed0d/2GvbNBlwAkabNhYcoIQFtb8mVSj6CPGoKryrZGIk8ce9IQ2bup/8pw= X-Received: by 2002:a05:6512:1251:b0:52e:74f5:d13 with SMTP id 2adb3069b0e04-530e584500dmr1516014e87.30.1723127201131; Thu, 08 Aug 2024 07:26:41 -0700 (PDT) MIME-Version: 1.0 From: Erik Serrano Date: Thu, 8 Aug 2024 10:26:29 -0400 Message-ID: Subject: Export Query Output to incremental csv file To: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000b9f6c2061f2cd0e7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b9f6c2061f2cd0e7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi guys, I would like to ask a question about exporting a query output to a csv file but with the particularity that it is incremental (that is, the same file grows in size) since I need to do the query multiple times and I don't want to fill up with csv files... but rather just one that always grows, as if it were a log. I will add the query to a shell and schedule it using a crontab in Linux Centos. Thank you very much. Regards. *Erik R. Serrano Saavedra* *Ingeniero de Sistemas Inform=C3=A1ticos* * Data Base Administrator* * eserranos@gmail.com * --000000000000b9f6c2061f2cd0e7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi guys,
I would like to ask a question about exporting= a query output to a csv file but with the particularity that it is increme= ntal (that is, the same file grows in size) since I need to do the query mu= ltiple times and I don't want to fill up with csv files... but rather j= ust one that always grows, as if it were a log.

I will add the query= to a shell and schedule it using a crontab in Linux Centos.

Thank y= ou very much.
Regards.


= Erik R. Serrano Saavedra
Ingeniero de Sistemas Inform=C3=A1ticos<= /i>
=C2=A0 =C2=A0 =C2=A0 Data Ba= se Administrator
=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0<= a href=3D"mailto:eserranos@gmail.com" target=3D"_blank">eserranos@gmail.com=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0
--000000000000b9f6c2061f2cd0e7--